I'm designing a sequencer in Max/MSP that allows the user to create a specific sound with a Wii Controller (Using Native Instruments Massive VST), record the sound, and then place the recorded sound within a sequencer.
While I'm only at the early stages of the project, I've encountered a problem with sending midi data to Massive. The user selects the note (for example 48) while using the acceleration of the Wii-Remote to determine the note velocity, and this is sent to the VST object using the following:
Midievent 144 $1 $2 ($1 being note number, $2 being velocity).
In order to stop the sound (Velocity changing from for example 100, instantly to 0), the user quite easily lets go of the "Note On" button, however I've added the choice to smooth out the velocity from the initial value to 0, using the line object, sending a stream of data similar to as follows:
Midievent 144 48 100
Midievent 144 48 99
Midievent 144 48 98
Midievent 144 48 97
However, this causes Massive to re-play the note for every message sent into the VST object.
Am I approaching this incorrectly? Is there a different Midievent I should be sending to achieve this effect? Or should I link this "Smooth decrease" to something else, such as the amplitude?
All responses are appreciated!
Edit: Just to clarify, the effect I aim to achieve is to slowly lower the intensity of the sound to zero over a short space of time, as opposed to instantaneously setting the velocity to 0.