Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: MIDI Controllers , Previous: Example using Incudine responders , Up: MIDI Input , Home: General

Clamps Packages

Exercise

Pure Data provides Midi responders for all common message types, called notein, ctlin, bendin, etc. It outputs 3 or 2 values, depending on the message type.

Write a wrapper around Incudine's make-responder, called notein, ctlin and bendin, which uses *​midi-in1​* as input. Each of these functions accepts only a function as argument and returns the responder. Depending on the implemented MIDI type, this function will have either 3 or 2 arguments, equal to the number of outlets of the corresponding Pure Data objects.

Give an example for each of the functions which will print out the received midi input in the following formats:

"midi notein: <keynum> <velocity> <channel>"

"midi ctlin: <cc-val> <cc-num> <channel>"

"midi bendin: <bendvalue> <channel>"