Key Sensitivity + Random Tune Confusion
Hi,
I have 2 small On Note scripts which work individually but not together. I simply want to execute both but have run into some confusion.
In the 1st block (Key Sensitivity) - $EVENT_ID is ignored which is preventing the Random Tune script from working obviously but I have no idea how to get around this.
I have tried adding the Random Tune code lines inside each if statement but that didn't work.
I have tried positioning the Random Tune script before/above the Key Sensitivity script but that didn't work either.
Any help would be hugely appreciated. Thanks.
{ON NOTE - KEY SENSITIVITY KNOB} on note ignore_event($EVENT_ID) if ($EVENT_VELOCITY+$Key_Sensitivity > 127) play_note($EVENT_NOTE, 127, 0, -1) else if ($EVENT_VELOCITY+$Key_Sensitivity < 1) play_note($EVENT_NOTE, 1, 0, -1) else play_note($EVENT_NOTE, $EVENT_VELOCITY+$Key_Sensitivity, 0, -1) end if end if {RANDOM TUNE - NOT WORKING} $Random_Tune_Amount := random(-5000, 5000) change_tune ($EVENT_ID, $Random_Tune_Amount, 1) end on
Comments
-
you need to capture the event ID of the new playnotes you made in the script and then change_tune THAT
ie. $new_ID := play_note($EVENT_NOTE, $EVENT_VELOCITY+$Key_Sensitivity, 0, -1)
change_tune($new_ID, ...
0 -
Thanks so much. All seems to be working now.
0 -
Just a quick question regarding the variable I need to decalre in the on init block.
My instrument has multi mic channels - Do I need to use a polyphonic variable? It's not something I have used before. Thanks.
declare $new_ID {OR} declare polyphonic $new_ID
0 -
I don't think you need it polyphonic in this case since you're only tuning the event ONCE, at the beginning of each note event.
0 -
Thanks very much for the help. Much appreciated.
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
- 378 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