View Single Post
Old 11-29-2019, 07:55 AM   #4
Time Waster
Human being with feelings
 
Time Waster's Avatar
 
Join Date: Aug 2013
Location: Bowral, Australia
Posts: 1,643
Default

1) Assuming you are receiving a MIDI message and then processing it in some way, you will generally want to send out a MIDI message at the same offset it was received on, unless you have a good reason not to.

5) In JSFX you can have up to 32,000,000 indexed memory slots (default is about 8,000,000). Each slot can store a numerical value or a text string. The syntax used to access a memory slot is number1[number2] and the index number for the slot is the sum of those two numbers. In your example the variable 'buf' has been set to 100000, so slot 100000 has been set to 0x90, slot 100001 has been set to 69 and 100002 has been set to 127.

6) 'len' is the length of the buffer, in this case three slots. In this example, the argument 'len' is telling midisend_buf() to read the values from three consecutive slots, starting from slot buf[0], and send those out as a three byte MIDI message.

7) midisend_buf() might save a bit of code if you already have the data you want to send stored in a buffer. I can't say I've ever used it, although maybe I should
__________________
Mal, aka The Wasters of Time
Mal's JSFX: ReaRack2 Modular Synth
Time Waster is offline   Reply With Quote