Send Perform action only once

Hi Steve, I am trying to replicate what you showed me in the following scenario. This is what I want to happen in my software:

1when a pot is closed (value zero) looper will start to record vocals by going into record mode but the volume is closed (it is now simply continously recording 1 bar of audio of the main vocals which are coming in from another vocal channel). When I hear a vocal phrase of the main vocals that I want to repeat I am going to open said pot and when I open the pot (so the value becomes higher than 0) the looper goes into playback mode. The same pot is also controlling the volume of the vocal looper so as I open the pot we start hearing the looper louder. It should only activate playback mode once after opening (for instance when value is hits 1). When I am done and close the pot (value zero) it should engage record mode again.

This is how I’m trying to set it up in BMT
1-define perform event ‘VOCAL REPEAT’ (CC81 on CH1) with any value and set global variable ‘gi’
2-if gi=0 then start record mode by sending CC96 CH1 value 127
3-if gi=1 then start playback mode by sending CC97 CH1 value 127

I am trying to avoid value skipping and it should only activate once as long as the value is higher than 1 but not activate playback mode again when coming down to close the pot. It should stay in playback mode whenever the pot is higher than 0 but not activate playback mode more than 1 time until we have reached zero again.

Any help on this again is greatly appreciated. Thanks!

Hi,

I think you will need to add a global variable that tells whether the message was already sent and not to send the message again.

Something like:

// already sent?
if gr=1 then skip next rule
if gi=0 then perform "Start Playback"
gr=1

Then when you stop playback you can set both gr and gi back to 0.

Make sense?

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi Steve,

Thanks for the suggestion. I got it to work using a variable for the CC number which determines the looper mode - not sure about the way I implemented this and also there are 2 issues. (Attached a file with the way I did it. )
Problem 1
When stopping the song I have a translator putting the looper back in record mode but considering the pot is not on zero anymore, now when I open the pot to go into playback mode it’s not registering the ‘1’ and it won’t go intro playback mode. (when returning the pot to zero it will start recording first which is not what I want because I will miss the right vocal phrase). What can I do to make it so that whenever the pot is moved upwards it will meet the ‘playback condition’ but ONCE only - regardless of the starting value until the pot is returned to zero.

Problem 2
Sometimes the pot skips over the value ‘1’ thus also missing the playback condition. Perhaps solving Problem 1 with a better script will solve this too.

Any suggestions greatly appreciated. If I need to provide more information let me know. Thank you!
Ascension LIVE Vocal Track Looper.bmtp (2.0 KB)

Hi,

I disabled your preset and added my own.

Translator 1.0 takes the control change 39 on MIDI CH 1 and triggers the perform with a parameter of 0 for start record and 1 for start playback. You will need to change it back to your original values to test it.

Translator 1.1 looks at the parameter and then sets the CC to 96 or 97

We record the state of the mode in the global variable ga

If the state has not changed, then we exit rules and do not send a CC message. We only send the CC message when the state has changed.

I put some Log messages so that you can see it in action.

// Paramter passed
// pp = 0 for start record
// pp = 1 for start playback
// Decide which CC to Send
if pp==0 then vv=96
if pp>0 then vv=97
//state of ga
// 0= record mode
// >0 = play mode
// If we are already in that mode, don't send anything
if ga==pp then exit rules, skip Outgoing Action
// Log what we are doing
if pp>0 then Log "Log Start playback"
if pp==0 then Log "Log Start record"
// Update the state
ga=pp

Ascension LIVE Vocal Track Looper-sjc.bmtp (3.5 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Hi Steve, this works like a charm. Silky buttery sweet - exactly what I was looking for. Could not accomplish this without your excellent expertise and amazing responsiveness. :pray: So excited about having this working and have a great new 2024!

1 Like

Interesting … using Log messages for documentation … learned something new, even at the tail end of the year … Happy Ball Falling!

1 Like