Control [noteout] volume on Pure Data

1.4k views Asked by At

I have a patch that generates MIDI notes in Pure Data, but I would like to know if there is a way of controling the volume (with a slider or a knob, and also have a 'mute' option with a toggle for example) of these notes.

Can the result of [noteout] be sent to de [dac~]? If so, how?

1

There are 1 answers

0
Max N On

The note message in MIDI consists of a pair of integer numbers: the note value and the velocity (0-127). So if you change the velocity, you will get a different volume. If the velocity is zero, it is a note off message that ends the note. If you send MIDI out of Pd, then the receiving device or application in producing the sound, not Pd. So there is no way to send this sound to a [dac~], except if you use Jack to reroute the audio from another application back to Pd first, or you are generating the sound inside of Pd, but why using MIDI then in the first place.