Voice Targeting And/Or Synth disposal
Good evening all.
I'm creating synths for a web application, so building them in RNBO then exporting them to web assembly.
I've created a simple synth in RNBO and configured it to have 16 voice polyphony. I've also exposed the voice parameters which allows me to target individual voices using a path, such as:poly/<id>/<param>
Using the attriui object, I can see all of the individual voice parameters formatted in this way. When I export to web assembly, logging out the individual parameters also confirms to me that these individual voice parameters exist:
console.log(device.parametersById.get('poly/16/amp'))
However, when I trigger notes using a MidiEvent, I can't see any way of knowing what voice I am triggering, so I'm unable to effectively target the individual parameters. What I would really like to be able to do is something like:
- Query the device to get the next available voice id
- Target the voice, setting the desired parameters
- Schedule an event for that voice
The other option would be that I export a monophonic synth and, in JS, create a new synth instance for each note event, then dispose of it after it has finished. Not sure on the performance overhead of spinning up so many audio worklets, but as a concept, does anyone know if this is possible? Can I dispose of devices?
Many thanks in advance for everyone's time.
Cephas.
Hi Cephas,
I'd recommend looking at the documentation for User Voice Control which gives you far more control on how to use and interact with voices within your RNBO patch.
Hope that helps
Florian
Hi Florian,
That's exactly what I'm looking for.
Thanks very much!
Cephas.