How do you query the voice number?
-
It doesn't seem to be part of event data. Is there any way to get the voice number to do voice specific processing? I want to use the voice number to send event data to specific voices.
function onNoteOn() { Message.ignoreEvent(true); // I'd like to be able to get hold of the voice number to link the detune knobs via voice Event.noteIds[Message.getNoteNumber()][0] = Synth.playNote(Message.getNoteNumber(), Message.getVelocity()); // Event.noteIds[Message.getNoteNumber()][1] = Synth.playNote(Message.getNoteNumber(), Message.getVelocity()); globalRouting.setEventData(Event.noteIds[Message.getNoteNumber()][0], 0, ControlValue.detune1); // globalRouting.setEventData(Event.noteIds[Message.getNoteNumber()][1], 0, ControlValue.detune2); }
An example @aaronventure wrote for me a while back (now in the snippet browser) exemplified how to create multiple notes from the same voice and detune them differently, but I'm not sure how to do this kind of thing across voices as well! I'm not very good with events yet.
-
@griffinboy you send data to specific voices using event is
-
Thanks and sorry: event is? I can't see that in the API
-
@griffinboy sorry, event ID.
-
Ah, but event ID increments. So I assume you're saying that I have to keep track and figure out which voices are which at a particular time?
I need to be able to, for instance, say detune voice two up an octave. When I press and hold three notes on the keyboard, voice 1 2 and 3 are now active. When I release the note that voice 2 was playing, and play a new note, this new note is using voice two as voice 1 and 3 are active. And therefore should inherit voice 2 detune.
I just want to make sure there isn't already a way to do what I'm needing. Thanks for your responses
-
@griffinboy you should set your fictional voice count, assign ids to array indexes and remove them when releasing notes. Then you can check along the array to fill the first empty index with a new od and set event data based on the index.
Your event data for individual voices is in another array, obviously, all ordered by voice order.
-
G griffinboy marked this topic as a question
-
G griffinboy marked this topic as a regular topic
-
G griffinboy marked this topic as a question
-
G griffinboy has marked this topic as solved