t_mattinen
2019-11-11 19:01:05
hello,
im trying to make a repeat function but i cant get it to work properly.
i have a working counter from a timing clock and can get a outgoing timer to fire on whatever division is chosen.
like this:
incoming: timing clock
rules:
//counter
y0=y0+1
if y0>=95 then y0=0
//y1 is set in a preset toggle.
if y1==1 then goto "1/4"
exit rules, skip Outgoing Action
//timer goes off on every quarter note
label "1/4"
if y0==0 then exit rules, execute Outgoing Action
if y0==24 then exit rules, execute Outgoing Action
if y0==48 then exit rules, execute Outgoing Action
if y0==72 then exit rules, execute Outgoing Action
exit rules, skip Outgoing Action
outgoing: one shot timer which triggers note on.
and a similar translator which fires timer for note off.
note on/off and velocity are set to global variables.
can not get notes to behave like i want. only one note at a time repeats or notes get stuck.
- they need to work like regular note on/offs when a repeat preset is off.
- when a repeat preset is on the notes should only fire on divisions from the timing clock.
- work with chords.
any ideas? /Tommi
Steve-Bome Forum Moderator
2019-11-11 19:36:11
comment
So when you have y1 set to 1 you want just note-on to go out at 0, 24, 48 and 72 or both note-on and note-off to go at 0, 24 48 and 72? If the latter, how long after note-on do you want to send note-off? Right now, if the timer trips both actions, they will happen at the same time which depending on internal clock timing, may cause random results. YOu probably want the second translator that triggers note-off to delay maybe 10-20ms.
I assume you have additional translators that handle normal note-on and note-off when y1=0.
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
t_mattinen
2019-11-11 23:34:11
comment
my note translators are setup like this
incoming any note-on set to ga and any velocity set to gb. outgoing, one shot 0ms timer “note on”.
incoming any note-off set to gc. outgoing, one shot 0ms timer “note off”.
the timers “note on” and “note off” triggers multiple note-on/off for different instruments and in those translators the local variables are set to ga and so on, and this works well for the standard non repeating playing (y1==0).
so for example when y1==1 i want the “note on” timer to be sent only when y0==0, 24, 48 and 72 when i press a note.
there is also a translator which sends the “note off” btw at the same interval and it is delayed.
when i press one note and the repeat is on it works as intended, but if i press more notes the repeat only applies to one note
and notes may get stuck.
Steve-Bome Forum Moderator
2019-11-11 23:54:23
comment
Then you need to either:
1) Track all notes that you have set to on and then reset any that were on when the note-off triggers
or
2 Send a note off to all possible notes as a separate iteration (or MIDI all notes off message), when the note off timer trips.
This is because the timer is reset the next time it trips if it hasn’t yet fired.
Steve-Bome Forum Moderator
2019-11-12 00:16:37
If your destination understands all notes off CC 123 then the below should work.
If not, try disabling 0.2 and enabling 0.3 as it will send consecutive note off messages instead using a timer (0.7) .
If all you want to do is turn of notes that have sounded, then there will be more work ahead as we will need to track notes that were sent on and only send note-off messages for those notes.
My guess is the way you had it, is you were only sending note-off for the last note pressed and so if you pressed 2 notes close together the previous note was not turned off.
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
Attachments:
t_mattinen
2019-12-11 17:41:16
comment
“If all you want to do is turn of notes that have sounded, then there will be more work ahead as we will need to track notes that were sent on and only send note-off messages for those notes.” How do i do this?
Steve-Bome Forum Moderator
2019-12-11 17:53:15
“If all you want to do is turn of notes that have sounded, then there will be more work ahead as we will need to track notes that were sent on and only send note-off messages for those notes.” How do i do this?
Answer:
Well the way I would do that is by using global variables as a bit map. Since there are a possibility of 128 notes (0-127) on a given midi channel and MT Pro uses 32 bit variables, you would need 4 more global variables.
Then you would have to set up a translator to set the proper bit every time that particular note is struck.
So in this examples say you use ga for notes 0-31, gb for notes 32-63, gc for notes 64-95 and gd for notes 96-127
I believe there is another post I created for how to do “bit mapping”.
The note off timer as it iterates through the notes, would then look at the bit to see if it is set and only send a note-off if the bit is set and then also clear that bit (until you hit that note again). Otherwise it would skip the outgoing action (note-off).
Setting this up for you is beyond the scope of free support, however I could do that on a fee basis if you would like. Just drop me an email for an estimate. Or if you look at this board and have some time to learn, I’m sure you could do it yourself.
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
t_mattinen
2019-12-12 13:11:43
comment
Ok, i have some learning to do 🙂 thank you for the support.