Update the playhead positions of multiple ui_waveform elements
I have an instrument with multiple waveform UI elements. I can update the playhead position of a single waveform element using the code seen in the reference manual:
on note while ($NOTE_HELD = 1) $playPos := get_event_par($EVENT_ID, $EVENT_PAR_PLAY_POS) set_ui_wf_property($layer1RiseWf, $UI_WF_PROP_PLAY_CURSOR, 0, $playPos) wait(10000) end while end on
How can I update the playhead position of multiple zone's waveforms, all of which are playing simultaneously?
Thanks! 😁
Answers
-
You would do that in listener callback, not in note callback.
0 -
@EvilDragon I've placed the waveform-updater code into a listener callback as below.
on listener if ($PLAYED_VOICES_INST # 0) $playPos := get_event_par($eventID, $EVENT_PAR_PLAY_POS) set_ui_wf_property($layer1RiseWf, $UI_WF_PROP_PLAY_CURSOR, 0, $playPos) end if end on
The $eventID variable is being given the value of $EVENT_ID in the on note callback. However, as you can imagine, this will only update the playhead position for a single waveform. How can I adapt this to set the playhead position for the waveforms of multiple samples simultaneously? Do I have to get multiple event IDs?
0 -
Yes, you would need to play an event for each layer in that case.
0 -
@EvilDragon How can I play an event for each layer?
0 -
Combination of play_note() and set_event_par_arr() along with $EVENT_PAR_ALLOW_GROUP.
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 62 NI News
- 785 Tech Talks
- 4.1K Native Access
- 16.5K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 379 Battery 4
- 845 Guitar Rig & FX
- 429 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.3K Traktor
- 7.3K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators