[Fluxus] Fluxus Digest, Vol 70, Issue 13
gabor papp
gabor.lists at mndl.hu
Sun Feb 27 02:17:56 PST 2011
hi Eduardo,
> I can take those values of "vel" to scale some objects (for example), but in
> some time it sends me an error in task, because expects type<vector> and
> given " #f ", or in other examples expects procedure and given the same " #f
> "; this #f value appears when no midi message it's sending from the device.
#f means false, you can use a conditional expression for testing,
something like:
(define (mid)
(define note (midi-note))
(define vel (vector-ref note 3))
(when vel
(displayln vel)))
i suggest that you should read the fluxus manual and the racket
documentaion to have a better grasp of the basics of the language.
http://en.flossmanuals.net/Fluxus/Introduction
http://docs.racket-lang.org/guide/index.html
http://www.htdp.org/
best,
gabor
More information about the Fluxus
mailing list