|
Post by lukesleepwalker on Jan 28, 2019 14:49:06 GMT
This is super cool, thanks for posting this!
Question: what is the easiest way to create a predictable rotation of notes (not chords) by playing one note? Sometimes this is called "round robin". What I'd like to be able to do is go into a StreamByter script and quickly change a list of intervals that would cycle through a series of notes. So, something like this:
start with note C3, +2, -3, +5, -7, +9
I can do this by laboriously scripting out the note changes line by line but that's so much work that I'd probably not do it! Would be great to be able to simply change the interval values as in the above.
|
|
|
Post by lukesleepwalker on Feb 4, 2019 16:30:59 GMT
Responding to my own question above, I found this in a different thread: IF LOAD # the notes in your cycle numbered from 0 # in this case 0, 1 and 2 using hex codes # (from note to hex table) ASS K0 = 24 26 28 # K80 = last note in cycle # alter this if you have more/less # than 3 notes in your cycle (defined above) ASS K80 = 2 # current cycle position (start at 0) ASS L0 = 0 END # force note on/vel0 to note off # to make life easier 9X XX 00 = 8X # handle trigger note ON (C1/CH1) IF M0 == 90 24 # rewrite to current cycle note ASS M1 = KL0 END # handle trigger note OFF C1/CH1 IF M0 == 80 24 # rewrite to current cycle note ASS M1 = KL0 # move/cycle to next MAT L0 = L0 + 1 IF L0 > K80 ASS L0 = 0 END END And it does what it says on the tin, so thanks for the help on this one previously, nic.
|
|
|
Post by lukesleepwalker on Mar 10, 2019 2:31:21 GMT
nic What is the easiest way to reset the sequence of notes to zero when a specific note (say, note 50 in the example below) is played?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 11, 2019 15:55:23 GMT
Hi lukesleepwalker , IF M0 == 90 52 ASS L0 = 0 ENDImportant: make sure that bit of code is underneath this: 9X XX 00 = 8Xor it could also reset when you release note 50: Regards, Nic.
|
|
|
Post by lukesleepwalker on Mar 11, 2019 17:27:59 GMT
Hi lukesleepwalker , IF M0 == 90 52 ASS L0 = 0 ENDImportant: make sure that bit of code is underneath this: 9X XX 00 = 8Xor it could also reset when you release note 50: Regards, Nic. Well, good news is that I had the code right. Other good news is that you sussed out what I had wrong in your important note about sequence. Works great after I made that change. Thanks!
|
|
|
Post by lukesleepwalker on Mar 12, 2019 11:33:00 GMT
nic I ran into a design flaw in how I conceived this script after moving to the second piece of it. How do you suggest I reset L0 when any other note outside of the sequence is played? I tried the != operator but didn't get the results I expected.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 12, 2019 11:41:45 GMT
Hi lukesleepwalker , # reset cycle on any note bar trigger note IF M0 == 90 IF M1 != 24 ASS L0 = 0 END END(must be under the 9X XX 00 = 8X!) Regards, Nic.
|
|
|
Post by lukesleepwalker on Mar 12, 2019 12:22:34 GMT
nic That is what I came up with, too. But it returns the sequence to the second note in the sequence, not the first. Here is the full script I am working on: # StreamByter - Audeonic Apps IF LOAD # the notes in your cycle numbered from 0 # in this case 0, 1 and 2 using hex codes # (from note to hex table) ASS K0 = 30 2F 2D 2B # K80 = last note in cycle # alter this if you have more/less # than 3 notes in your cycle (defined above) ASS K80 = 3 # current cycle position (start at 0) ASS L0 = 0 END # force note on/vel0 to note off # to make life easier 9X XX 00 = 8X # reset cycle on any note bar trigger note IF M0 == 9A IF M1 != 30 ASS L0 = 0 END END # handle trigger note ON (C1/CH1) IF M0 == 9A 30 # rewrite to current cycle note ASS M1 = KL0 END # handle trigger note OFF C1/CH1 IF M0 == 8A 30 # rewrite to current cycle note ASS M1 = KL0 # move/cycle to next MAT L0 = L0 + 1 IF L0 > K80 ASS L0 = 0 END END
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 12, 2019 14:09:10 GMT
Hi lukesleepwalker , Are you resetting while a trigger note is sounding? Looking at the logic, this would happen. You could reset to the last note in the sequence with ASS L0 = K80 instead of 0 in the reset clause, but if you did a reset when a note was not sounding then you'll get the last note. What you probably want to do is maintain another flag (L1 in the code below) that is set when the trigger note is sounding (or not) and use that to handle those two cases. Something like: IF LOAD # the notes in your cycle numbered from 0 # in this case 0, 1 and 2 using hex codes # (from note to hex table) ASS K0 = 30 2F 2D 2B
# K80 = last note in cycle # alter this if you have more/less # than 3 notes in your cycle (defined above) ASS K80 = 3
# current cycle position (start at 0) ASS L0 = 0 0 END
# force note on/vel0 to note off # to make life easier 9X XX 00 = 8X
# reset cycle on any note bar trigger note IF M0 == 9A IF M1 != 30 # trigger is sounding IF L1 == 1 ASS L0 = K80 END # trigger is not sounding IF L1 == 0 ASS L0 = 0 END END END
# handle trigger note ON (C1/CH1) IF M0 == 9A 30 # rewrite to current cycle note ASS M1 = KL0 ASS L1 = 1 END
# handle trigger note OFF C1/CH1 IF M0 == 8A 30 # rewrite to current cycle note ASS M1 = KL0 ASS L1 = 0
# move/cycle to next MAT L0 = L0 + 1 IF L0 > K80 ASS L0 = 0 END ENDRegards, Nic.
|
|
|
Post by lukesleepwalker on Mar 12, 2019 17:14:57 GMT
Ah yes, the second flag is perfect! It works as expected so thanks for the suggestion. I have separately scripted out "note offs" as part of my recent experiment because I'm working on a more "ambient-ish" project. If I want to pre load "all notes off" before any new note sounds, is that possible here? In other words, I'd like the note tails to linger for varying lengths but as soon as I play a new note, I want to precede with "all notes off". The alternative is to set the note length manually, but that creates a bit of an abrupt and artificial feel to things.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 13, 2019 8:17:38 GMT
Hi lukesleepwalker , You could try adding an 'all notes off' message whenever you see a trigger note: # handle trigger note ON (C1/CH1) IF M0 == 9A 30 # send all notes off SND BA 7B 00
# rewrite to current cycle note ASS M1 = KL0 ASS L1 = 1 ENDIf the sound generator does not respond to that, then the brute force for of sending all notes off snippet would be: # brute force all notes off ASS I0 = 0 IF I0 < 80 +L SND 8A I0 00 MAT I0 = I0 + 1 ENDRegards, Nic.
|
|
|
Post by lukesleepwalker on Mar 18, 2019 12:08:49 GMT
Works as expected. Thanks, Nic!
|
|
|
Post by lukesleepwalker on Jul 2, 2019 21:22:04 GMT
Hey Nic, Is it possible to assign the notes (K0) to Q sliders to easily dial in the sequences of notes in the script above?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jul 3, 2019 7:06:35 GMT
Hi lukesleepwalker , Sure. Just change that K0 at the top to Q0 and KL0 to QL0 (two places in the script) Might be nice to label the controls and make them note dropdowns, like so: set Q0 note_1 +N set Q1 note_2 +N set Q2 note_3 +N set Q3 note_4 +NAnother enhancement would be to add a +P to the 'ass Q0' line so that changes made in the GUI are saved with the script. Regards, Nic.
|
|
|
Post by lukesleepwalker on Jul 3, 2019 13:05:09 GMT
Brilliant, that's simpler than I imagined!
|
|