stuck on on note

pule_puje
Member Posts: 2 Newcomer
Hi everybody,
I'm working on a script and I'm kinda stuck on the range of notes played.
on init declare %CMaj[29] := (48,50,52,53,55,57,59,60,62,64,65,67,69,71,72,74,76,77,79,81,83,84,86,88,89,91,93,95,96) declare $key_count on note if($EVENT_NOTE = 36) while ($NOTE_HELD=1) play_note(%CMaj[random(0, 28)]+$key_count, random(10, $Force), 0, -1) if ($key_count # 0 and in_range($EVENT_NOTE, 36, 96)) play_note((%CMaj[random(0, 28)]+$key_count)-12, random(10, $Force), 0, -1) end if wait ($Speed) end while end if end on
$key_count is a counter that increments with different key signatures (C=0, C#=1, D=2, ecc) so that I can randomly play notes within the chosen key signature. My target is that, if the note that comes out of the playnote is over 96 (the limit I've setted for the samples), that note must be played an octave lower, so that it stays within the range. But I can't figure out how to do this. Any help would be really appreciated.
Tagged:
0
Comments
-
random(0, 28)]+$key_count, random(10, $Force)
This should be stored to a variable first, then test that value if it's above 96 and subtract -12 from it if it is.
0
This discussion has been closed.
Back To Top
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 65 NI News
- 797 Tech Talks
- 4.1K Native Access
- 16.8K Komplete
- 2K Komplete General
- 4.4K Komplete Kontrol
- 5.8K Kontakt
- 1.6K Reaktor
- 386 Battery 4
- 854 Guitar Rig & FX
- 433 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.4K Traktor
- 7.4K 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