View Single Post
Old 02-05-2018, 10:44 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,776
Default

Quote:
Originally Posted by pipelineaudio View Post
I'm not sure what "mpos" means
AFAIU:
In Reaper, timing-wise, a Midi message is associated to the audio block of samples in which's timing range it happens to be generated. It never is associated to a single sample. That is why, in a JSFX, it does not make sense to do Midi work in an @sample rather than in an @block event.

Now the mpos variable in the Midi receive and send functions provides the sample-accurate positioning of the Midi message within that block of samples.

For stuff like patch changes you simply can pass it through between receiving ans sending.

(For better readability please post any code in a "[ code" ... "[ / code" block. )

-Michael
mschnell is offline   Reply With Quote