What can I do with the variables? (pp, g2, hn, etc...)

chumbo

2016-04-05 02:13:39

This must sound really dumb to all of you but I read the entire manual expecting to find at some point a list explaining what is pp, ss, tt, ga, h2, etc....but nothing?!

Some I'm already assuming each one doesn't have a different function but that it's probably a different name for the same thing (a variable) but then I have to ask...why? Why wouldn't it be enough to just have one local variable and one global variable?

There's clearly a basic concept I'm missing here but I can't figure it out...could some kind soul take the time to explain it to me in VERY simple layman's terms?

Thanks!
Chumbo

DvlsAdvct

2016-04-05 02:30:30

Hi Chumbo

Variables are used to replace a byte of information in the MIDI string. This allows that byte to pass through the translator. For example, a standard MIDI note message is 90 30 7F. That is Note on channel 1 (90) middle C (30) 127 velocity (7F). If that's the trigger for the incoming message, then the message will only fire if it receives a MIDI message containing that exact information. If you replace one of those bytes with a local variable like pp, like the velocity, it will fire every time 90 30 comes in, regardless of the velocity. So, 90 30 4C will fire the same as 90 30 01 as 90 30 7F.

The local variable is calculated in that one translator and forgotten, and can have rules run against it. So, you can say, every time any message comes in, add 12 to it. So you can always raise the octave by 1. If your incoming message is 90 pp 7F, you can have rules that say pp=pp+12. Then your outgoing message can be 90 pp 7F, but the outgoing message will be one octave higher. Make sense?

Local variables are pp qq rr ss tt uu vv ww xx.

Global variables can be used to store information to be used across translators. The best example of this is a shift key. For example, let's say you have a knob you want to send two commands, one for EQ and one for volume. You would set a button to be a shift key. When you press the button down it would set a global variable, which the knob will reference. For example, your incoming message for that button would be 90 30 pp. The rule would say g0=pp. This way, whatever the velocity of the button is (usually 127 on press and 00 on release) will be the value of g0.

Then the knob would have something like B0 02 pp. This would mean that the incoming message fires every time the knob assigned CC 2 on channel 1 is turned. But the outgoing message is different based on whether or not the button is being held down. In the rules it would say something like:

if g0==0 then qq=2
if g0==127 then qq=3

And the outgoing message would be B0 qq pp

So the position is always the same, but the message number changes based on whether or not the button is held down.

Global variables are g0, g1, g2, g3...g0, ga, gb, gc... gz for g, h, i, j, k, l, m, n, y, z.

So g0, ha, ik, ll, mq, n4, yx and z2 are all examples of global variables.

Does that help?
Jared

chumbo

2016-04-05 18:05:46

Thanks so much for your long and detailed reply but I'm afraid you missed the point of my question which as it says in the title: "Why so many variables?!", and that question is unfortunately left unanswered :cry:

I just don't understand what's the difference between, e.g. pp, ss, tt, u2, etc...So why and when would I use one rather than the other, I just don't get it? Do they each have a different function? If yes, then...what are they and if not, then...what's the point of having lots of different names for the same thing??

I can't even get started doing anything with Bome MT if I can't get past this one! please help... :roll:

DvlsAdvct

2016-04-05 21:35:44

That's exactly what I tried to explain.

One (local variables) can be used independently across all of the translators in your project and never conflict. That's pp qq rr ss tt uu vv ww xx. They are calculated in each translator and forgotten.

the global variables are used and stored across the entire project, and can be referenced later. These are used for more advanced functions. For example, you can't use a local variable to create a shift key. And you wouldn't want to have values stored permanently that should be forgotten.

And there may look like there are a lot, but i've created complex projects that run out of variables, both within individual translators and across the entirety of the project.

Does that help?
Jared

hgpa

2016-04-06 08:15:53

Local variables:

Often you need not only one, but a few of variables in a single translator,
and then you need different names for them. Thats the reason, that a single
local variable wouldnt be enough.

Global variables:
And global variables are very quick "run out", if you determine a lot of switches
or so in a program (midi-controller-programming etc...)

HG

chumbo

2016-04-06 18:02:27

Jared, sorry if I misunderstood your 1st explanation then but now it's clear: All these variables are the same thing, i.e. I could substitute pp, s2, r4, etc...for p1, tt, t4, uu, etc... AS LONG AS they are themselve not used in another translation, correct? They all do the same thing but each is unique. The reason this is helpful is not yet clear to me, but as I understand it, this is necessary for translations to work properly so each can have a unique application. I hope I understood it correctly now! :?

Thanks HG, that helped! :)

DvlsAdvct

2016-04-06 19:58:58

Well, these variables are not the same.

Local variables are ONLY pp qq rr ss tt uu vv ww xx

p1 and s9 and ra and xc will not work. You can only use as they are listed: pp qq rr ss tt uu vv ww xx

These variables are calculated between the incoming action and the rules, and after the outgoing action is sent, or the translator's outgoing action is ignored (using rules) the value of the variables is forgotten, and they cannot be referenced until the translator has been activated again. Meaning, you can replace the velocity of a pad with a local variable. The variable will be calculated when the pad is pressed, and once the translator has finished, MT does not remember what value pp was anymore for that interaction.

You can use local variables in any translator at the same time, and they will be calculated independently. Meaning you can have two different translators, firing on different incoming actions, each using the local variable ss. Translator 1 will only care what the value of ss is for that translator, whereas translator 2 can have a different value for ss, and they will never overlap.

Global variables are made up of g0-g9, ga-gz for g, h, i, j, k, l, m, n, y, z. They are calculated the same way (incoming action or in rules), but their values are stored across translators. Meaning that if the value of g1 is used in Translator 1, Translator 2 can use its value as a reference to change its outgoing action, such as a shift key. But that can only be done with a global variable because its value is stored, whereas a local variable is forgotten.

I hope that is clear
Jared

chumbo

2016-04-06 23:42:41

Thanks but I give up, I'm totally lost!? I now understand much less than I thought I did before...I'm totally confused!!?
This isn't for me and yet I don't consider myself a computer illiterate but it's clearly beyond me.
I'm just not getting the basic concept of these variables! (and I'm surprised anybody else is since it's not explained at all in the manual?!)

It's really too bad as I realise what huge potential this software has but I've never felt as lost before when dealing with a software as I am now.
In fact, the reason I came here was because I have a Keith McMillen SoftStep II MIDI pedalboard and it's own software is very complicated and yet has it's limitations. But other SoftStep users claimed that Bome MT is able to circumvent these limitations so I gave it a try...but it's clearly even more complicated than the SoftStep's software so I can only therefore give up! :(

Thanks so much for trying, but I don't want to take up anymore of anybody's time because despite having received already several detailed replies attempting to help, I feel now even more lost as I realise that what I thought I understood is in fact wrong so...I'm clearly not getting anywhere. :cry:

It would take a lot more questioning and explaining and and I just don't feel right asking for that. Darn, what a shame...

DvlsAdvct

2016-04-07 01:53:58

First, relax. Seriously, just relax. This stuff can be really complicated, and putting words down is only half of the battle. Use the demo. Experiment. It might help local variables make more sense. I don't want you to walk away because it's hard, mainly because it is hard, and that initial learning curve is a pain. But it can make a lot of sense, and after a while it can become really clear.

It took me a long time, and a lot of work, to get how all of this works. If I can figure it out, anyone can.

We can take it slow, if you want. It's what I'm here for
Jared

chumbo

2016-04-08 17:19:40

DvlsAdvct wrote:It took me a long time, and a lot of work, to get how all of this works.
Well, my point exactly. It's just too complicated. And of course, if I do give it a long time and a lot of work, I would also hope I could get it to work for me! :roll:

Nevertheless, maybe a concrete example would help?
So, what brought me to Bome MT in the first place was to get a 'double click' (or rather, double tap!) working on my Softstep (SS) foot controller. Any of the 10 foot pedals on the SS can be setup to work with a double tap but unfortunately not if there is already an another simpler single tap function assigned to that same foot pedal. So, on any of the 10 foot pedals you can have a single tap OR a double tap, but not both at the same time! This is what I'd like to achieve (much like what we have with a PC mouse).

The way it works is this: with the SS software, you assign a MIDI control message to be sent out (I use simple MIDI note on/off) when I single foot tap for example. So let's just say MIDI note 60.
If I then assign e.g. MIDI note 61 to the double tap function of that same foot pedal, and double tap the pedal, this is what happens...the SS sends out two consecutive MIDI note 60 (because a double tap = 2 single taps of course!) PLUS the MIDI note 61 for the double tap! And that's exactly how it shows up in Bome MT as well!

So in the DAW i try to control, it ends up executing the note 60 from the single tap but not the 61 from the double tap!

This is where Bome should be able to help I think! Well, that's what I read in the SS forums anyway.

So...any ideas how I could go about implementing that in Bome?
Thanks!

ibanman555

2016-04-09 07:40:01

These variables took me a long time to understand as well, really... But as J mentioned... Try different things and experiment. I see that you asked why so many and I feel like it was explained just as it is but I'll try to explain it in layman's terms.

I have 32 encoders (endless knobs) that you can rotate in one direction forever. These send a 3 byte midi message, something like 90 84 xx. Let's say that this message is the first knob out of 32 knobs.

Now, if I turn that knob very slowly and consistently, "xx" will be 01. If turn that knob quickly and consistently, that byte "xx" will be 3E. This number will vary depending on the quickness of a turn on an encoder. This is the midi message that this specific encoder will send, always and forever.

Now, if you want to control a "knob" in a program and you have your midi devices and software sending/receiving properly, you may need BMT to send a different message to get that encoder on your surface to control that knob in your software. So let's say your software wants to see 50 6A xx to move the on-screen knob. The same rules apply with "xx"...

So this is where we make an translation, where incoming from your encoder will be message 90 84 xx and your outgoing message to your software will be 50 6A xx. Now, whatever midi byte "xx" is from your encoder will copy and paste to "xx" in your outgoing message.

But, I have 32 encoders.... I can't use "xx" for all of them!!!! Ok, so now I will use different "local variables" for each knob (pp, qq, rr....) this is once example of why there are many to choose from.

I hope this helps a little, to get you on track, if not maybe someone else will find it useful.

ibanman555

2016-04-09 07:48:49

Let's start simple with your example, what does a single foot press on 1 pedal send for a midi message (the whole message)?

chumbo

2016-04-09 11:14:39

Thanks ibanman555!! That was layman just enough for me, now it's starting to make a bit of sense :-)
Still, I don't see why the value part in a MIDI message needs to be translated into a unique variable for each encoder (according to your example), since the uniqueness of the message will come from the MIDI port, channel and CC#.
I can't quite see why using for example, the identical pp variable for all your encoders would not work if everything else in the MIDI message is unique? In theory, in my mind the DAW receiving messages from Bome MT could even be set to receive on all MIDI channels and still handle all the uniqueness of each of the messages coming from each of your encoders thru Bome MT despite them using the same pp variable?

But, as hard as I find it, in software I've learned to sometimes just accept things as they are even when I don't quite see the logic, so I'll move on from this one...maybe it will make more sense when I start using Bome in some concrete examples...which brings me to your second post! :wink:

But before I do, since you managed to simplify it enough for my tiny brain, maybe you could clarify this other point regarding variables...
As I had said in one of my previous posts, I was all thrilled to think I was finally understanding things after one of Jared's posts when he replied with this:
DvlsAdvct wrote:Well, these variables are not the same.

Local variables are ONLY pp qq rr ss tt uu vv ww xx

p1 and s9 and ra and xc will not work. You can only use as they are listed: pp qq rr ss tt uu vv ww xx
But he never went on to explain what those other p1 and s9 and ra and xc and such are for then?? - or at least I didn't understand enough his post to see the answer in there.

And according to Jared's reply, this would also mean that in your example of your 32 encoder controller...you would have run out of Local Variables after 9 encoders?! So...what am I missing now?? :shock:

chumbo

2016-04-09 12:36:39

ibanman555 wrote:Let's start simple with your example, what does a single foot press on 1 pedal send for a midi message (the whole message)?
There is no default, I set what the message is. There is a whole host of message types (Note Set, CC, Bank, Program, MMC, Aftertouch, etc...).
Below you can see what the SoftStep (SS) controller's software looks like for one of the 10 pedals:

Image

Each row represents one of the possible controls that pedal can send out. The 1st is the foot press on, 2nd I erased to not confuse because irrelevant, the 3rd is the double tap.
At the 1st row, In the 'Output Settings', last column, you will see the drop down menu called 'Message Type', that's where I set the MIDI message type to be MIDI Notes, and in this case, the note value is 60 (no Hex in this software), as shown in the 'Note' drop down menu next to it. And this is for the simplest of operations, i.e. as you asked, a single foot press or as it's called in the software Foot On (as seen under 2nd column 'Data Sources'/'Source'/Foot On)

The 3rd row is the double tap ('Dbl Trig' in the SS), which sends out MIDI note 68 when in fact double tapped quickly.

And above the SS software, you see what's received by Bome when I in fact double tap the pedal.

I assume the messages are displayed in the order they are received from bottom to top (top one being the last received) correct?

So, if I convert the Hex to Dec, keeping the same displayed order, we have:

Off 68 0
Off 60 0
On 68 127
On 60 127
Off 60 0
On 60 127

Which in fact shows that immediately after the 2nd Foot On (60), the Dbl Trig message is sent out (68) (followed by the Note Offs for both 60 & 68).

The problem is this...I use the SS to control Mobius Looper plugin and it seems to react to each an every message sent in the above scenario (or it seems that way).
I have the simple 'Foot On' assigned to note 60 to Record and Loop (1st press, it records, 2nd press it loops), the hidden row in the screenshot above is for a long press which erase the content of the loop and finally, the double tap is meant to pause the loop.
What happens instead when I double tap is that, it WILL execute the 1st incoming message which in this case is the 'Foot On' i.e. Rec/Loop so that's exactly what it does!?

I have Bome set with my FIRST translator (Hurrah! :D ) to take incoming note 68 and output note 68 which solves a previous problem of Mobius not even taking the mapping since it kept on detecting the note 60 as the 1st incoming message and would map only that one. It now maps correctly but since I set Bome MT's Router to pass on thru the MIDI from the Bome's MIDI driver IN to Bome's OUT so the other MIDI messages would come through as well...that's exactly what happens meaning, I'm sort of back to square 1 with Mobius taking on the 1st message & executing it, i.e. that darn note 60 (Foot On)!!

So...how can Bome MT save the day! :)

I need it to filter out all note 60 messages when I double tap. As you can see in the screenshot, for each row there is a 'Delay' setting in the SS software. I thought this would in effect save me by delaying the note 60 messages beyond the time it takes to execute the Double Tap note 68 message (100ms) but not really actually. While it does execute note 68 first which causes Mobius to pause, but only for a fraction of a second because it will then receive the following messages with note 60 which will cause Mobius to go immediately after that short pause, right in to REC mode!? Grrrr....

chumbo

2016-04-11 15:41:32

Bump
...please help! I just want to get a push to get me started, after that I hope to sail on my own...well, sort of :wink:

ibanman555

2016-04-12 21:31:58

Ok, so I've been thinking of every way for you to get this working the way you want, but unfortunately you are at the mercy of a single pedal press message occurring regardless of a single or double press.

On 60 127 (and 0 for release) will always occur no matter what. So, you will get undesirable results, as you've been having. You can't ignore a 60 message because that would affect your single foot press.

I know there is a way to have the first press allow a message, and a second press send another message via rules of that translation, but then you are just going back and forth between presses. Maybe that would work for you, im not sure.

chumbo

2016-04-12 21:46:44

Thanks for your reply!
I know it's a tricky one but Mocker - a user here - who also has a Softstep once posted in in the Softstep forum that it was an easy task to get the double tap to work with Bome MT!

I'll just keep trying to get in touch with him then...
Thanks anyway!
Chumbo

chumbo

2016-04-12 21:56:05

I found a post by Mocker where he states his success in resolving exactly the same problem! I just don't understand how to apply the solution :?

http://www.bome.com/forums/viewtopic.ph ... 221#p19221

ibanman555

2016-04-13 00:58:05

I'm writing this code from memory, I don't have the program at my side... So adjust, add or subtract delay on
Timers as needed, if needed. This should allow first and second presses to send specific midi messages, and
a double press should over ride either of those first two messages. The catch is first and second presses will
toggle back and forth, I believe...

Each section is a separate translator in a preset:

Code: Select all

Softstep Pedal 1 Global - 

Incoming: On 60 127
Outgoing: None
Rules: ga=1-ga
-----------------------------------------------------------------------------
Softstep Pedal 1 Timer (First Press)

Incoming: On 60 127
Outgoing: Timer, T1, Once
Rules: if ga!=1 then exit rules, skip Outgoing Action
-----------------------------------------------------------------------------
Softstep Pedal 1 Action (First Press)

Incoming: Timer T1
Outgoing: (whatever message you want sent for first press)
-----------------------------------------------------------------------------
Softstep Pedal 1 Timer (Second Press)

Incoming: On 60 127
Outgoing: Timer, T2, Once
Rules: if ga!=0 then exit rules, skip Outgoing Action
-----------------------------------------------------------------------------
Softstep Pedal 1 Action (Second Press)

Incoming: Timer T2
Outgoing: (whatever message you want sent for second press)
-----------------------------------------------------------------------------
Softstep Pedal 1 Double Press Timer

Incoming: On 68 127
Outgoing: Timer, T3, Once, delay 500ms
-----------------------------------------------------------------------------
Softstep Pedal 1 Double Press Action

Incoming: Timer T3
Outgoing: (whatever message you want sent for double press)
-----------------------------------------------------------------------------
Let us know if this puts you "in the ballpark".

DvlsAdvct

2016-04-13 01:43:32

Hi chumbo

Is there any particular reason you aren't using MT Pro 1.8? I'd recommend upgrading.
But he never went on to explain what those other p1 and s9 and ra and xc and such are for then?? - or at least I didn't understand enough his post to see the answer in there.
p1, s9, ra, xc and those other examples don't exist. If a variable begins with p, it can only be pp. If it begins with s, it can only be ss. If it begins with r, it can only be rr. This holds for oo, pp, qq, rr, ss, tt, uu, vv, ww, xx. Those are local variables. g, h, i, j, k, l, m, n, y and z can all have different combinations, from g0-g9, ga-gz for each of those letters.
And according to Jared's reply, this would also mean that in your example of your 32 encoder controller...you would have run out of Local Variables after 9 encoders?! So...what am I missing now??
You cannot run out of local variables when using multiple translators. You can use pp, or qq, or tt in any translator.

For example

Code: Select all

Incoming: B0 30 pp
Outgoing: B3 20 pp
Translates the incoming message B0 30 into B3 20, and the value (pp) passes through unchanged. So if you turn the knob B0 30 to position 0F for the incoming message, the outgoing message becomes B3 20 0F. This will happen every time. If, in that same project you have a translator immediately following

Code: Select all

Incoming: 93 40 pp
Outgoing: 90 20 pp
It will work exactly the same. Hit the pad 93 40 with a velocity of 7F (127) then the outgoing message is always 90 20 7F. You can reuse local variables (00, pp, qq, rr, ss, tt, uu, vv, ww, xx) across as many translators in as many presets as you want and they will always work. The only time you run into limitations is when you use multiple local variables within rules. That has a hard limit of 10, but there are ways to get creative and make that less of an issue.

For double taps, though, I would utilize MT Pro exclusively for this and not the onboard software. Try the following translators

Code: Select all

Translator 1: Double Tap Detection
Incoming: MIDI Message
90 3C 7F
Rules:  gc=gc+1
if gc>=2 then gc=2
Outgoing: One-shot timer "Double Tap Detection": 300 ms delay

Translator 2: Single Tap Output
Incoming: Double Tap Detection Timer
Rules: if gc!=1 then exit rules, skip outgoing action
gc=0
Outgoing: 90 3C 7F

Translator 3: Double Tap Output
Incoming: Double Tap Detection Timer
Rules: if gc==2 then skip next 2 rules
gc=0
exit rules, skip Outgoing Action
gc=0
exit rules, execute Outgoing Action
Outgoing: 90 44 7F
This does not accommodate the Off messages. But if this works let me know.
Jared

chumbo

2016-04-14 23:02:39

Thanks a lot Ibanman555 & Jared for having taken the time to try and help! (Jared, my answer to your post is further down...)

But I'm afraid neither work though :cry:

I won't bother explaining what doesn't work because it's just all wrong really. I just think it's a bit too complicated of a setup to try to figure out without actually having the softwares in front of you (Softstep software & Mobius looper) to help troubleshooting.

They are both already quite deep and complicated in their own right, adding Bome MT just seems to make it a recipe for disaster!

Ideally, I'd need to really understand how Bome MT works to try and figure it out myself but there still is a lot I don't understand.
All the translator codes you both had me paste in MT made absolutely no sense to me, I don't understand the logic or mechanism of them (yet).

But back to those codes in fact, there are quite a few things I could have done that made the setup go wrong:

Ibanman555...when you wrote T1, T2 & T3, I assume it meant Translators 1, 2 & 3, right? But in Bome they are numbered from 0. I took it as meaning T1 = the 1st in the list, i.e. 'Softstep Pedal 1 Global' is T1, is that right?

Then there is delay time and the Outgoing message. I wasn't exactly sure what to put. For delay, just know that the double tap delay time on the Softstep is set at 100ms, but to be on the safe side I put 300ms where you gave me a choice and left the 500ms where you wrote it in. Don't know if that could mess things up or not?
As for the outgoing message, I'm a bit confused because on one hand you seem to have understood my needs quite well, and used the two MIDI messages I said I was using (60 for 1st press, 68 for double tap) but yet in two places in the translator codes, you leave it up to me to fill it in so then I wonder if maybe it's not meant to be as simple as it sounds to me? I input 60 for 'Softstep Pedal 1 Action (First Press)' and 68 for 'Softstep Pedal 1 Action (Second Press)'. I just wasn't sure why you didn't input it directly yourself? Does it sound right?

Those are the things that left me in doubt that maybe something could have gone wrong.



JARED...as I said above, it didn't work. It doesn't hold the action: 1st press sends out REC function but it instantly reverts to it's previous state which I'll call idle (stop or pause). Same with the double tap, it mutes and then instantly goes back to idle.

Also, I realise now that I shouldn't have left out of my explanations, the MIDI message for the 3rd function of the pedal, which is the long press. Because now that's messed up as well of course!? The long press is MIDI note 61 (for clearing the recorded loop).

I get a feeling that maybe as you pointed out, Note off messages need to be addressed in this scenario.

Just to not make this post too long I'll end it here but please do read my next posts where I'll be asking questions about further understanding the art of translators in Bome MT!

To answer your question, I can't NOT use the Softstep software. It's needed for the pedal to work, you can't bypass it. Without it, the softstep is just a big piece of plastic with lights.
Thanks!

DvlsAdvct

2016-04-15 00:47:21

Oh of course. You need the softstep software, that's fine. It actually shouldn't impact what we're doing.

When ibanmann wrote T1, T2 and T3, he was giving the timers names. When you create a timer in MT Pro, using the Timer Outgoing Message, you need to assign a name. So he wants you to create three timers.

Are you utilizing timers, or just outgoing messages?
Jared

chumbo

2016-04-15 10:10:12

I did exactly what you both posted in your respective codes. And as for the timers, I understood it slightly differently but I think it's resulted in the same thing. So in his 2nd translator, I named the translator 'Softstep Pedal 1 Global' for the one he calls T1. And so forth for the next ones so T2 was named 'Softstep Pedal 1 Timer' and T3 is 'Softstep Pedal 1 Action (First Press)'.
So wherever he instructs to use T3 for example, I used in fact 'Softstep Pedal 1 Action (First Press)'.
Was that wrong?

DvlsAdvct

2016-04-15 15:13:44

Yeah, I'm not sure ibanmann's rules will work.

Do you still have a router connection between the softstep and the virtual MIDI port?

chumbo

2016-04-15 15:38:11

Not exactly. If you refer to my Softstep screenshot at the top of this thread, you'll see that I can assign an output for each MIDI messages sent from the Softstep. So I setup up the Softstep software to send out from the Bome MIDI Translator and then in Bome MT's Router, I made a connection from the Bome MIDI Translator IN to Bome MIDI Translator Out. That's then picked up in Mobius Looper where I assigned it to take MIDI In from Bome MIDI Translator.

DvlsAdvct

2016-04-15 16:23:03

So the softstep is sending to MT Virtual Port, which is then routed to another Virtual Port that the software is picking up.

Disconnect the router connection. Set the default In port to the virtual port the Softstep is sending to, and the default out port to the virtual port the Mobius Looper is receiving on.

Let me know if the double tap works.

chumbo

2016-04-15 18:53:02

DvlsAdvct wrote:So the softstep is sending to MT Virtual Port, which is then routed to another Virtual Port that the software is picking up.
So when you say 'software', which are you talking about? There are three involved (Softstep, Bome, Mobius).


So I disabled the router connection, for the rest, it was already setup that way so no change. Result is that the double tap works...but not the rest! :roll:

The single tap does make Mobius go in to REC mode but it's instantly reset and it goes back to it's initial non REC mode (the note OFF issue you talked about maybe?). And as I said before, the long press for the 'clear' function is not working at all but I guess that's understandable since it hasn't been addressed at all in Bome. So in case you want to tackle that as well, the long press sends out midi note 61.

So one step forward, two steps back for the moment...but at least it shows that Bome can execute that darn double tap! :)


Once it's working (and I hope we'll get there!), I'd really appreciate if you could take a little time to explain at least some of the logic behind the codes, this way I'll be able to finally fly on my own with Bome MT!...but that's for later.

ibanman555

2016-04-15 21:56:55

chumbo wrote: It now maps correctly but since I set Bome MT's Router to pass on thru the MIDI from the Bome's MIDI driver IN to Bome's OUT so the other MIDI messages would come through as well...
If you pass all data thru in addition to your translated messages, you will never succeed. Only receive messages you want from your pedal board, translate them using either example we gave you, and output to the software you're looking to control. You don't want to have note off midi messages passing thru. Does that make sense?

DvlsAdvct appears to have a better solution than I do, so try his first.

chumbo

2016-04-15 22:14:19

Yes, thx Ibanman555, as stated in my previous post, I have now deactivated the MIDI thru, but it's still not working optimally...waiting for Jared's response.
Cheers & thx!
Chumbo

chumbo

2016-04-18 12:42:56

Bump...

Jared, please don't give up on me now! I'm really determined to understand Bome but I still need some help with the basics.

I'm still trying to understand the logic of the variables and how to use them. I think I can +- say I've understood the principle behind the Local Variables. But when looking at the codes you posted in one of your previous posts in this thread, I'm a bit puzzled about the Global Variables?

With Local Variables, the way I understood it - and I really hope I got it right this time! :? - is that a working and proper use of a Local variable (but maybe not the only one) would be to put it in the Incoming MIDI message and replace one of the 3 values ot HEX message with a Local Variable. So, if needed, an incoming message like 90 3C 7F could be transformed into pp 3C 7F or 90 pp 7F or 90 3C pp...correct?

And then, rules and Outgoing message can be applied after using this variable...fine, got it!

NOW, what I don't understand with the Global Variable is, what does it apply to if it's not being used in the incoming message at all??

I'll take one of your codes from previous posts as an example...

Code: Select all

Translator 1: Double Tap Detection
Incoming: MIDI Message
90 3C 7F
Rules:  gc=gc+1
if gc>=2 then gc=2
Outgoing: One-shot timer "Double Tap Detection": 300 ms delay
As you see, the incoming message doesn't contain the variable, yet it appears in the Rules, so...what does the variable apply to?? which value is it meant to be 'replacing'/What is it going to affect?

And the other thing I'm not sure of in this code is, in which field is the 300ms delay supposed to go? In 'Outgoing' there are 2 possibilities:
- There's an 'Initial Delay' field (where I put it)
- and then further down, a 'Delay outgoing message' field as well?

If it doesn't go in the Initial Delay, which variable am I supposed select in that field then?

DvlsAdvct

2016-04-18 16:56:11

I haven't given up :)

Local and global variables can be used as you described, replacing pieces of a MIDI message. You are 100% correct. Either type of variable can also be used to create conditions for completing a translation. Think of a translator as a complete process, right? It responds to the conditions set in the incoming message (cannel, message type, message value, message position), goes through all of the rules and, if all conditions are satisfied, goes to the outgoing message.

The only difference, really, between a local and global variable, is that global variables retain their value between translators. So if a global variable is set in Translator 1 to a value of 4, Translator 2 can use that to change its messages. Like a shift key.

If you replace a byte of data in the incoming message with a variable, that translator will proceed regardless of the value of that byte. So, for example, if your incoming message is 90 30 pp, the conditions are met if that last value is 01, 40, 7F, 5E, etc. But if the incoming message is 90 30 7F, then it will only be satisfied if that specific value is met. Since we want the timer to be triggered ONLY when the button is pressed, and not when released, we want the value to be 7F only. If it was pp it would trigger on 7F AND 00. And we want to avoid that.

The rules are then calculated. It's just a basic form of code, really. Whenever the incoming message is received, the translator begins processing the rules. So, 90 3C 7F is received by MT Pro, and it moves to the next step, the rules. So whenever that message comes in, gc gets its value increased by 1. If gc is greater than or equal to 2, then it remains 2. This is a control to prevent gc from ever becoming more than 2, since those values are important for future translators.

When the button is pressed, and gc is 0, gc becomes 1. This is used as a reference later in the code. So the incoming message is processed, the rule is processed, nothing is stopping it from getting to the outgoing action, so that is triggered. This sends out a timer message with an initial delay of 300ms. When using a timer, ALWAYS use the timer delay values unless you know why not to. You want the timer to fire 300ms after the button press. You can play with this range, because it's how much time you have to press the button again.

So the first translator fires. Then the second translator comes in. After 300ms MT Pro calculates the value of gc. If you've pressed the button once, it is now 1. The timer goes off, completing the incoming message, and moving to the rules. GC=1, so the first step is ignored. If gc did not equal 1, then the outgoing action would be skipped. Since gc DOES equal 1, it now equals 0 and then the outgoing message processes. If you had used a local variable, this wouldn't work because translator 2 can't see what the value of pp (as an example) was in translator 1. Because we used a global variable, Translator 2 can use its value as set in translator 1.

Let's say you pressed the button twice within the 300ms window. So now gc=2. So the timer goes off, which satisfies translator 2. But gc=2, and not 1. So the first rule can't be satisfied and the translator is aborted. The rules are canceled and the outgoing action never completes. But it also triggers translator 3. Since gc=2, we skip the next two rules, which reset gc AND exit the translator. Instead gc=0 (so it can be started again from the top, and then the outgoing action is processed, which is different from translator 2.

Now let's say you press the button 5 times in that 300ms window. That's okay. The rules in Translator 1 won't let gc be greater than 2. And then when the timer fires off, gc is reset anyway. In fact, you should add a new rule to Translator 1 so it looks like this

Code: Select all

gc=gc+1
if gc>=2 then gc=2
if gc>1 then exit rules, skip outgoing action
So the timer will only activate when the button is pressed the first time, but the rules are still processed so the variables can be calculated correctly.

Jared

chumbo

2016-04-18 17:59:19

WOW Jared, thanks so much for all that! :o

The first couple of paragraphs reinforced what I thought I had understood 'til now about Bome and I will now store that in my long term memory as acquired & verified knowledge, done! pheeew :wink:

However, you lost me as soon as you spoke of gc! From there on you went to explain everything beautifully except...what is gc exactly!?
I mean, yes I understood that it's a Global Variable and that a GV will maintain its value across an entire preset and all its translators and I can see in a kind of virtual way how that might be useful but....what does gc represent?? That really was the essence of my question in my previous post.

As I said, Local Variables I can explain to a newer newbie than me and I'd tell him that it's meant to replace one of the 3 parts of an incoming HEX message so that regardless of the value in one of those 3 parts, the outgoing message can be carried out, IF rules are met as well of course.

But Global Variables...nope, don't get it? Maybe it's because I'm stuck thinking it should work in the same way as a LV and therefore I first expect it to be assigned a role (GV you are now replacing the MIDI Channel portion or Value portion of the HEX, go off and carry out your duties! And remember that we can call upon your duties in any of the following translators...stay alert!).

But it's not happening here so I just don't understand...what it is?? It's introduced BOOM just like that in the rules, but where does it come from, what value is it representing...just don't get it. :cry:

And when I'll understand that, I'll next be asking why adding +1 to gc, gives it a value of...1?? So a GV always has a value of zero then? Well...how is it a variable then, if it always has a value of zero? And none of the values in the incoming MIDI message had a value of zero so I can't even deduce that the gc was replacing one of the HEX values either...thoroughly lost.


And that's why almost the entire 2nd half of your post didn't make much sense to me. And I'm quite sure once that's cleared, I will reread your post entirely and it should hopefully make more sense. (Although I do expect a few more questions regarding timers mainly...).

I swear I'm trying hard Jared, believe me, so please be patient, I think we're almost there! Also, it's not lost effort on your part either as you will always be able to refer other newbies to this thread or just copy/paste from your own quotes when necessary to help other thick headed newbies like me! :wink:

(I'm baffled at the thought that so many others have managed to instinctively pickup Bome and fairly quickly get to use with it...is everybody here a genius or a software engineer here or am I just an idiot??)

DvlsAdvct

2016-04-18 18:11:51

I am not getting annoyed, don't worry. It took a long time for this stuff to make sense, but once it did it all gets a lot easier. I am not a genius, nor a software engineer, or a coder at all. I just use MIDI a LOT.

So, a variable is literally that. A variable. It can replace a MIDI value, or it can be used as a reference point. So gc, in this example, is just a reference. It's a number that MT is using to verify information.

GC has a value of 0 because we want it to. It can have any value, as long as it's an integer. MT Pro always rounds up, so 1.1246 will become 2.

The role of variables is a lot more general than you want it to be. Yes, variables can replace lines of data. Sure. But they can also be used to do math.
And when I'll understand that, I'll next be asking why adding +1 to gc, gives it a value of...1?? So a GV always has a value of zero then? Well...how is it a variable then, if it always has a value of zero? And none of the values in the incoming MIDI message had a value of zero so I can't even deduce that the gc was replacing one of the HEX values either...thoroughly lost.
Your over thinking it. Any variable has whatever value you assign to it. gc, in this example, isn't replacing anything. It's being used to control how information is handled. It's just a reference. We are setting gc to 0 when we use the translators. Notice in both the 2nd and 3rd translators we explicitly define gc as 0. So, then when you add 1 to 0, you get 1. And on and on. So gc+1 = 1 because we told gc it equals 0.

It's introduced because we need a global variable. If you don't use that variable, there's no way to have MT Pro know whether or not the button was pressed twice. You can't use a local variable for that because it can't be referenced by other translators, right? So you need a global variable. In this case we're using it as a counter. Count up by one every time it's pressed.

Variables CAN be used to replace the message points. They can also be used independently, and later referenced. For example, maybe you want to change the LEDs of a controller based on how many buttons are pressed. You can't use local variables for that, but you can use global variables as a counter.

So, every time a button is pressed, the value of g0 goes up by 1. And every time g0 goes up by 1, the LED color changes. g0 isn't related to the buttons themselves, but is an independent value, that can then be referenced to control another completely different command.

chumbo

2016-04-18 20:55:49

DvlsAdvct wrote:GC has a value of 0 because we want it to. It can have any value....
Ok, but what I find strange is that, since translators are executed in the order that they appear from top to bottom, what does the first translator do with a gc that has no value yet, since as you pointed out, it's only being assigned a value in translator 2 & 3? What effect is it having at that point? Do those rules in translator 1 have any application since the value for the gc comes in later translators? I mean, at that point, who cares 'if gc>=2 then gc=2', since no value will result from it if gc is numberless and nothing can be calculated yet?


Also, it seems to me there's a lot of forward thinking involved in the coding. It's all interconnected in a very intricate way which means that translator 1 could not have been laid down before having a whole plan of what was going to go down all across the preset, right? So what's your thought process to get to there? Where do you start? (that's more a rhetorical question, no need to answer it. I just wanted you to hear the kind of questions in my head. I know this one would be too vast and long to answer!).

DvlsAdvct wrote:Your over thinking it. Any variable has whatever value you assign to it. gc, in this example, isn't replacing anything. It's being used to control how information is handled. It's just a reference
I'm just not getting it (it's driving me crazy!?). When you say "it's just a reference"...sorry to ask but, a reference to what? There's something too abstract here for me to understand. I just don't get what this gc does, how it fits in to achieve the results that we're after? It has to have some kind of representation in what we're trying to do. There must be something more tangible I can hold on to that simply something "...being used to control how information is handled". It's just too...vague for me, it's doesn't mean anything to me, sorry for being so hard-headed.

My head is bursting...I hate not understanding, so frustrating :oops: Typically, I can see myself having a revelation where from one moment to the next, it all makes sense, just not there yet! I'm just missing something, some key explanation that will make all the puzzle pieces fall into place. For now, over thinking it as you said.
It's just very new concepts to me, ways of thinking I'm not familiar with at all so it's going to take some time to wrap my head around all this.
There's a piece of the puzzle missing for my mind to make it all make sense.

If you still have the patience, try it again but imagine I'm a 10 year old girl, and use apples and oranges if necessary to explain it. :cry: (what's wrong with me?? Kind of embarrassing at this point).

DvlsAdvct

2016-04-18 23:48:27

In general, if a variable is not defined, it is considered to be 0. So you don't need to tell MT Pro that gc is 0 if you're just adding 1 to it, because if it doesn't equal something other than 0, it is 0. These global variables exist in MT Pro, even if you aren't using them. They are there, waiting to be used. And in their dormant state, unused, they equal 0, because that hasn't been changed.

Everything seems interconnected because we need it to be. This whole thing is building a series of controls. The controller itself is stupid, right? You press the button and all the button knows is it has been pressed. When you release it, it knows it was pressed so it should send a different message. Beyond that it can't do anything. MT Pro receives those messages and does something with them, whatever we want it to. And to do that you need to have a plan. A lot of it, though, can be modified and updated as it goes. Nothing is in stone.
When you say "it's just a reference"...sorry to ask but, a reference to what?
gc is being used to reference how many times the button has been pressed. That's the function we've assigned it in this project.

Let's break this down. You want to (1) press the button once and have one message send, and (2) press the button twice and have a different message send. What is involved in that?

We need to be able to:
Press the button (translator 1)
Count how many times the button has been pressed (translator 1, using the gc variable)
Allow time for the button to be pressed more than once (300ms delay on a timer)
Reference how many times the button was pressed to:
Send message 1 if the button was pressed once.
Send message 2 if the button was pressed twice.

How do we do this?
When the button is pressed, we need a value to reference how many times it's been pressed. That's what GC is. GC is just counting how many times it's been pressed. Since we only want two values, we are only counting two presses. Any more than that will be ignored. So press once, gc=1. Press twice, gc=2. Press more than twice, gc still equals 2, because we don't need to know more than that.

So, when the button is pressed, gc=1. 300ms later, MT Pro checks to see how many times the button was pressed. Once? Send message 1. Twice? Send message 2. And when either message is sent, gc gets reset, so we can start counting from the top again.

chumbo

2016-04-19 11:09:00

Brilliant Jared! I've definitely learned and understood something new now! :)
DvlsAdvct wrote:In general, if a variable is not defined, it is considered to be 0.
Ah! Ok, precious information I didn't have before, I'll store that in my brain!

So now at least gc has sort of a face, I know what it stands for! It makes A LOT more sense now when I look at your code. :)

Although, there still is a little something I miss to totally have it sink in. Let me try this and tell me if I'm right...
To put it differently, would it be also correct for me to say that gc = The entire incoming MIDI message (ie 90 3C 7F here)? Because that's the part I'm not really totally getting...you told me that gc is going to be the number of times the pedal is pressed, fine, I accept that. But, how does Bome MT now? Who told him (or is it a her?)?

Is it always assumed that when a variable is not actually introduced in the Incoming MIDI message to replace 1 or several parts of the HEX values, the variable (possibly Local and/or Global?) that is later only introduced in the Rules is therefore taking the place of the entire incoming message? (a more complicated way of saying what I said in the previous paragraph).

BTW, all this is absolute crucial and probably more important than just having this preset working because ultimately I'd like to be able to do all this and a lot more on my own of course but, for now I've got to tell you that it's still not totally funcitonal.

The double tap works and is detected and executed correctly! However, the single tap starts the REC process as it should but it then instantly or rather what looks like 300ms later, reverts to it's previous idle state. :?

Any ideas what could still be wrong? (I introduced your latest change to the code of Translator 1).

Here's a copy of the Log for when I press once:

IN 0.0: MIDI 90 3C 7F
assignment: (gc=gc+1) = 1
OUT 0.0: One-shot timer "Double Tap Detection": 300 ms delay
IN 0.1: On timer "Double Tap Detection"
assignment: (gc=0) = 0
OUT 0.1: MIDI 90 3C 7F
IN 0.2: On timer "Double Tap Detection"
assignment: (gc=0) = 0
exit rules, skip Outgoing Action

It all looks correct to me? I mean, that it's carrying out what's dictated by the rules and that the correct Midi Note is being output but why then is Mobius not latching on to the message and reverting to it's previous state??
It of course won't happen when I just press the button on the GUI or the keyboard shortcut, nor does it even happen when I use it without Bome MT as in the previous scenario I had which was, without the double tap (since I couldn't get it to work), but with the long press for erasing. Which BTW, I've disabled for now to not make it more complicated but that's the end goal....
Single tap , Long tap, and double tap on one pedal.

PS Just FYI, I'm located in Belgium which explains why sometimes it takes me longer to reply. Otherwise, I anxiously wait for anything in my Inbox and instantly read it and give it a try and respond!

DvlsAdvct

2016-04-19 14:54:31

No worries on the delay. We've worked with users all over the world. Your English is spectacular, which makes this a lot easier. :)

Code: Select all

Although, there still is a little something I miss to totally have it sink in. Let me try this and tell me if I'm right...
To put it differently, would it be also correct for me to say that gc = The entire incoming MIDI message (ie 90 3C 7F here)? Because that's the part I'm not really totally getting...you told me that gc is going to be the number of times the pedal is pressed, fine, I accept that. But, how does Bome MT now? Who told him (or is it a her?)? 
After you have pressed the button, 90 3C 7F, gc=1. That is all. gc did equal 0, but when 90 3C 7F was received by MT Pro, gc had 1 added to its value, making it 1. If 90 3C 7F is pressed again within that 300ms window, gc will have 1 added to it again, make it 2.

gc only equals what you literally tell it to equal. The rules explicitly state that gc=gc+1 when 90 3C 7F is received. If gc>=2, then gc still =2, meaning it can never be greater than 2. That is all the rules say, so it is all that matters. gc does not represent the incoming message, it only represents what ever value you assign to it, in this case either 0, 1 or 2, depending on how many times 90 3C 7F has been pressed, and whether or not the timer has passed its delay.
The double tap works and is detected and executed correctly! However, the single tap starts the REC process as it should but it then instantly or rather what looks like 300ms later, reverts to it's previous idle state.
Hm... according to your log window, nothing is being sent out. I just want to confirm that you have definitely removed the all router connections, and disabled the double press setup in the softstep app?

thanks
J

chumbo

2016-04-19 15:53:29

Your English is spectacular, which makes this a lot easier. :)
Thanks, but I get zero credit for that I'm afraid...I'm an american living in Belgium! 8)

Arghhh, I was so hoping I was right in the quote of mine you posted! So still the logic isn't sinking in then.
I totally understand all the simple math involved about how gc=0 and if you add +1 it equals 1 and that it's zero when you start, etc...all that is fine, that's not the problem, so for now at least, you can leave it to rest until I blatantly misunderstand something in that regard as well.

My missing puzzle piece is...I can't say it any better than before, how does Bome know to interpret that gc= a foot press (ie, I still stick by it, hem...90 3C 7F, because that's the ONLY incoming message and the one sent by my foot tap), where is that association being made if what I described before isn't correct?!
To me it's like if, you are the boss in a room with 20 employees with no names, each having to carry out identical kinds of tasks (secretaries for ex.), and you'd call out your orders in the room and suddenly one after the other, the one for whom is the task, gets up and leaves to carry it out?! I'd be baffled and ask you...how do they now it's THEIR task if you don't call out their names??
You see what I mean, what I don't understand? Where the association between the task and the employee? Where's the association between gc and the foot tap?

Even wiki seems to agree with me (notice what I bolded):
The variable name is the usual way to reference the stored value; this separation of name and content allows the name to be used independently of the exact information it represents
So...what does gc represent, refer to? (I wanna cry now)

Ok, nevertheless, I've still learned an additional thing: You said values are added as they come in, I didn't know/suspect that. So when the pedal is pressed twice and the value of one press is 1, they get added to make 2. I'll remember that too now.
I just want to confirm that you have definitely...disabled the double press setup in the softstep app?
Hem, no I haven't! I don't remember you writing I was supposed to? (maybe you did, if so, sorry I missed!). I now have to pickup my daughter at school, I'll try as soon as I'm back!

About my log, something is definitely being output because Mobius reacts...strangely but it reacts! Also, isn't this in fact the outgoing message of the log?

OUT 0.1: MIDI 90 3C 7F

DvlsAdvct

2016-04-19 16:23:07

I think I might be talking around the issue, and we may be using different words to say the same thing. MT Pro knows to change gc when the foot press comes in because the rules are only processed when the incoming message comes in. To alter your analogy a little bit

A secretary sits at a desk. The secretary is named Bome. They sit at a bank of phones, and need to route incoming calls differently based on the number that is dialed. Each incoming phone number has a special set of instructions about what to do when a call comes in. So if line 1 rings (90 3C 7F), the secretary needs to wait a set amount of time to see if it rings again. When it rings the first time, they flip a switch once. If it doesn't ring a second time the call is routed to Executive 1. If, within a certain amount of time, the line rings again, the secretary flips the switch a second time which causes the call to route to Executive 2.

I think that works. Analogies are hard.
Ok, nevertheless, I've still learned an additional thing: You said values are added as they come in, I didn't know/suspect that. So when the pedal is pressed twice and the value of one press is 1, they get added to make 2. I'll remember that too now.
That is only the case because it's what the rules are explicitly doing. The incoming message is received (90 3C 7F), which causes the rules of that translator to be processed. The rules then add values to gc, and when all conditions are met the outgoing action is triggered.
Hem, no I haven't! I don't remember you writing I was supposed to? (maybe you did, if so, sorry I missed!). I now have to pickup my daughter at school, I'll try as soon as I'm back!

About my log, something is definitely being output because Mobius reacts...strangely but it reacts! Also, isn't this in fact the outgoing message of the log?

OUT 0.1: MIDI 90 3C 7F
If the router is connected, and the softstep is still sending a second MIDI message, then that double press is passing through the router as well as the timer triggering, which will cause the MIDI message to be sent again. Remove the router connection and disable to double press from Softstep. This whole thing replaces that.

chumbo

2016-04-19 17:39:55

Haha! Bome is lovely gal and she's doing a great job, she's just a bit mysterious sometimes. :)

Good analogies can work wonders, yours did, thanks ;)

As you said - and I was starting to feel the same way too - we are sort talking about the same thing but in a different way. As I'll browse the forum more, look at more codes and try my own, I think it's really going to start make more and more sense, I'm feeling a bit more confident...we'll see.

To continue the analogy-thing, understanding the language of the coding is one thing, making elaborate sentences after that is something else! I don't think I could have come up with your code any time soon. I just don't have that mathematical/logical mindset yet. That too will hopefully come with time and trial & error. I see the problem - well, that's very easy! - but how to solve it in Bome is a challenge.

Regarding the 1+1 = 2, how is that explicit in the rules? It just states that gc=gc+1, not that IF gc=gc+1 followed by another gc=gc+1 it would make gc=2?
Again, analogies...if I ate a cupcake now and you asked me what I ate, I'd say a cupcake. An hour later I eat another cupcake, you ask me again, I tell you the same thing, I ate a cupcake. If now I stuffed 2 cupcakes in my mouth, and you asked me what I ate, I'd now tell you I ate 2 cupcakes...see what I mean? It just wasn't obvious to me that the two consecutives messages would be added up, instead of just being interpreted as being twice the same so, treated each time like if it was the first time they went trough the rules...but twice!

About the log, the router is off and has been for a while, even since you told me to do so. I now disabled the Dble Trig message in the softstep and it didn't change anything, same exact thing :cry:


Maybe it's asking too much of you since you don't have a Softstep, there could be something I need to do at the SS end of things to solve this. So, no problem if you prefer to stop here the support regarding the preset, but your continued help with regards to getting to grasp with Bome is still much appreciated! This way, maybe somewhere down the line, I'll figure it out myself!

One question I've been wanting to ask...couldn't you have replaced the gc=gc+1 in Translator 1 by gc=1? Wouldn't that amount to the same thing?

DvlsAdvct

2016-04-19 20:22:52

Code: Select all

To continue the analogy-thing, understanding the language of the coding is one thing, making elaborate sentences after that is something else! I don't think I could have come up with your code any time soon. I just don't have that mathematical/logical mindset yet. That too will hopefully come with time and trial & error. I see the problem - well, that's very easy! - but how to solve it in Bome is a challenge. 
Trust me when I say this takes time. The biggest problem with this software is the learning curve is insanely steep. but once you put it together, and it starts to click, everything starts making more sense. Honestly, most of the solutions I have are just copy and pasted from other threads by other people that figured it out.

Code: Select all

Regarding the 1+1 = 2, how is that explicit in the rules? It just states that gc=gc+1, not that IF gc=gc+1 followed by another gc=gc+1 it would make gc=2? 
So whenever the incoming message is received, gc=gc+1. If gc=0 the first time that message comes it, it equals 1, right? Because gc=0, so 0+1 is 1, so gc=1. That happens every time the incoming message comes in, within that 300ms delay. So if you double tap, gc+1 is processed and then gc+1 is processed again (during the second press) so it's 2 (0+1=1, 1+1=2). then the timer fires off and gc is reset to 0. So the next time you press the button, gc=gc+1. 0+1. gc=1.

Code: Select all

One question I've been wanting to ask...couldn't you have replaced the gc=gc+1 in Translator 1 by gc=1? Wouldn't that amount to the same thing?
Yes and no. If you replace gc=gc+1 with gc=1, and press the button only once ever, then sure. The conditions in the second translator will be met every time. But if you press the button twice, it will always be set to 1. So how will MT Pro know the button was pressed twice?

Code: Select all

Maybe it's asking too much of you since you don't have a Softstep, there could be something I need to do at the SS end of things to solve this. 
It's also likely that the program is waiting for another signal. Which would be weird, but there are some strange MIDI integrations out there. Is there a MIDI monitor or MIDI LED on the program that shows you that MIDI has been received?

chumbo

2016-04-20 22:32:57

DvlsAdvct wrote:The biggest problem with this software is the learning curve is insanely steep.
Yes, I've felt it strongly over the last few days, to the point where I almost wrote a surrender post this morning stating I cave in, but I then re-read all your post and I finally had a Eureka moment, the coin dropped on something and it finally made sense, but I'm far from out of the woods yet. So I'm still hanging in there but I don't know for how long as I really can't afford to be spending so much time on learning Bome, despite how I much need it and could use it for lots of things. I need to make some music! :?

So whenever the incoming message is received, gc=gc+1. If gc=0 the first time that message comes it, it equals 1, right? Because gc=0, so 0+1 is 1, so gc=1. That happens every time the incoming message comes in, within that 300ms delay. So if you double tap, gc+1 is processed and then gc+1 is processed again (during the second press) so it's 2 (0+1=1, 1+1=2). then the timer fires off and gc is reset to 0. So the next time you press the button, gc=gc+1. 0+1. gc=1.
And that's my Eureka moment! I actually fully understood that this morning, it FINALLY made sense! Of course, now I wonder why I had such a hard time with it ;)
And of course, the next one made sense as well now:
Yes and no. If you replace gc=gc+1 with gc=1, and press the button only once ever, then sure. The conditions in the second translator will be met every time. But if you press the button twice, it will always be set to 1. So how will MT Pro know the button was pressed twice?
Regarding this...
Is there a MIDI monitor or MIDI LED on the program that shows you that MIDI has been received?
The SS software isn't receiving any feedback in my current scenario, it's only sending out. It could receive as well for controlling the LED lights and alphanumerical LED display but I'm certainly not going to complicate things now with that too! :?

But I now know that the SS is not the culprit of these problems, it appears to come from Mobius.

I just tested the setup in Reaper alone and mapped the 1 tap & double tap to 2 different functions...it worked flawlessly! So, it's not a problem with Bome or the SS but with Mobius...at least I've narrowed it down! So Jared, unless you happen to be fairly knowledgeable with Mobius, we can really let this one go now. I'll post in the Mobius forum and see if I can get any help there.


Nevertheless, I still would like to try to work out my first translator for mapping the long press function...wish me luck! haha :)

I'll think out loud and let you hear my thoughts, correct me anytime...

- Ok, the long press message is going be launched by the same midi note message (90 3C 7F) as for the previous two functions (single tap, dble tap).
Therefore I need to address the fact that when I'll press the pedal, it will also trigger the rules in your 3 translators
- So, I'll need to use my good ol' pal gc! But how? This is what the SS manual has to say about the Long Press:
Long Trig
Pressing and holding the key for 1 second will output a 127 followed by a 0 (100ms later).

or
Long Trig Latch
Pressing and holding the key for 1 second will output a 127. Does not go back to 0.
So, maybe some kind of a 1 sec (or 1,1 sec?) timer will be involved? Or maybe you'll tell me that I shouldn't use the SS trigger at all and do it all in Bome like with the Dble Trig? Probably so...

I think that's about as far as I can get on my own. I really have no clue how it would be done from here on?

DvlsAdvct

2016-04-20 22:44:53

I'm so glad to hear that it's starting to make sense. Now you're gonna start getting crazy ideas for looping MIDI around a project and doing crazy math to get crazy stuff to work. And it'll be a blast :p

For the long press, honestly, I'm going to just say to use MT Pro. And you're right. To do that we need to refer to our trusty friend gc. AND we're going to have to make it more complicated. Excited yet?

So, if we want to add a Long Press, we need a few more reference points and an additional timer. What do we need to look for?

When the button is pressed
IF the button is released.
If the button is pressed again.

So at dormant state, gc=0. When it's pressed, gc=1. If it's released it's gc=2. If it's pressed again (within that 300ms window), gc=3. And we'll have two different timers sent at the same time (double press and long press) to get this sorted. We're going to have to include off message translators now, because we need to recognize when the button is released for the long press. What should this look like?

Code: Select all

Translator 1: Double Tap Detection
Incoming: MIDI Message
90 3C 7F
Rules:  gc=gc+1
if gc>=3 then gc=3
Outgoing: One-shot timer "Double Tap Detection": 300 ms delay

Translator 2: Button Release
Incoming: MIDI Message
90 3C 00 (or whatever message your device uses for Note Off)
Rules: gc=gc+1
if gc>=3 then gc=3
Outgoing: None

Translator 3: Long Press Detection
Incoming: MIDI Message
90 3C 7F
Rules: None
Outgoing: One-shot timer "Long Press Detection": 1000 ms delay

Translator 4: Single Tap Output
Incoming: Double Tap Detection Timer
Rules: if gc!=2 then exit rules, skip outgoing action
gc=0
Outgoing: 90 3C 7F

Translator 5: Double Tap Output
Incoming: Double Tap Detection Timer
Rules: if gc!=3 then exit rules, skip outgoing action
gc=0
Outgoing: 90 44 7F

Translator 6: Long Press Output
Incoming: Long Press Detection Timer
Rules: if gc!=1 then exit rules, skip outgoing action
gc=0
Outgoing: [i]whatever your long press message is[/i]
And I'm doing that off the top of my head, so it may TOTALLY be wonky. but I think it should hold. Let me know if it makes sense
J

chumbo

2016-04-20 23:37:26

Thanks Jared for your quick response and encouragements! Not sure about the crazy math but I'll try my best! ;)

Unfortunately, it's now almost midnight here in Belgium and need to go to bed, I'll try it first thing tomorrow and let you know!
Cheers,

florian

2016-05-03 23:16:11

chumbo, I'm not sure if you've gotten any closer to what you want to do with your softstep, but this thread is amazing! Kudos to everyone involved.
Florian (aka secretary bome)

chumbo

2016-05-03 23:41:46

Haha! Yes, thanks to my stubborn stupidity and Jared's patient and relentless help and support, I think this thread could often be referenced back to for other newbies like me.

I haven't given up and will be back to try and :oops: (why does it say oops when I wrote c-r-a-c-k?) this case.
However, a stupid misunderstanding got me banned from the Mobius forum for a week (I tried to help a guy with very poor english, so I asked what's his native language since I also speak italian and french. He was Ukrainian so I said I couldn't help him any further and that got me a ban on the basis that I was some how being...xenophobic I guess?! crazy...anyway).

Unfortunate because I had posted my problems there concerning Bome, the SS and Mobius and one guy gave me a very interesting suggestion/idea which I wanted to bring back here to Jared for him to reflect on, but that's now postponed for a week. And before that, I'll admit I had a bit of burn out on my troubles with Bome so I gave it a rest (needed to get back to making music!) and then the ban...so it's been a while but the ban ends soon so I'll be back to continue this marathon thread! :-)

chumbo

2016-05-22 19:35:12

Hi Jared...I'm back! (not sure how thrilled you'll be about that, hehe ;))

So, hard to resume from such a long pause! Unfortunately, things are not even working as 'good' as before!? I reconnected my setup (Softstep-->Bome-->Mobius VST in Reaper) and I'm not getting the same results as before the long pause.

Not all bad actually because it might be worth going over some basics as I do remember that some rather basic issues had been spotted only quite late in the thread and were the culprit for some of the problems:

For CONNECTIONS I have the SS sending out MIDI to Bome via 'Bome MIDI Translator 1' which in turn passes it on to Mobius thru the same port.

For SETTINGS...
- The SS is setup to only send one simple MIDI Note message (that was the 'basic' issue spotted late in the thread!).
- In Bome, not much to say. The MIDI Router is blank and I have all your translators setup as indicated in this thread.
- In Mobius, I just mapped the MIDI Notes according to the desired functions (REC, Clear & Mute)

Right now, pretty much nothing works!? :roll: which is strange since I haven't modified anything. Some messages are going thru because Mobius is reacting but reacting in a totally chaotic way?!

Well, had we been able to pick up from where we were before, this information picked up from the Mobius forum might have been useful. It was in reply to a post I made explaining these issues, more specifically about the fact that on the double tap that we'd tried to setup with Bome, Mobius would go in REC for a few seconds and reset to it's latent state (awaiting messages). His answer...
On the reset thing, is the SS putting out note on only? Or are you holding the pad down for longer than the default 'longpress' time? Mobius record function default behaviour is to use a longpress as a reset. If the SS doesn't send note toggle (on AND off) on a single press, the track will reset 'cos mobius doesn't receive an 'endSustain' message (note off).
And AFAIK, there is no MIDI Note Off in the translators, correct? Could this explain some of the problems we've had?

DvlsAdvct

2016-05-23 16:43:03

If it's waiting for an off message, then yes, that could DEFINITELY be causing an issue. But now I'm confused. If Mobius is looking for its own long-press, is it also listening for its own double press command? For example, can Mobius receive a double tap command and do something different, or does that need to be handled by MT Pro? I was expecting Mobius to just be a flat receiver, and not really care what it gets, but if it needs to have its own spec included in this then it gets more complex. It's still doable, just requires more work. :)

chumbo

2016-05-23 18:33:54

Mobius is an insane beast in itself! There are several manuals for every aspect of it so it would be hard for me to say with any certainty what in can and can't do and how it does it. In the Mobius forum, I was in fact advised to use Mobius' own scripting capabilities to program all the different tap/dble tap/long press commands but since I don't plan on only using Mobius, I think Bome MT is a safer route.

I did look into what was said in the Mobius forum quote I posted and in fact that is the case...Mobius natively responds to a long press to erase the loop! :-)
So as you said, it's actually not a flat receiver!

However, I do hope to use the SS to also control Reaper and maybe other things down the line so it would be handy to just at least have that in store, the tap/dble tap/long press working for whatever situation might need it in the future.

So as explained, since right now nothing seems to be working like before, let's forget Mobius and just stick to Reaper for which - if I remember correctly - the tap/dble tap/long press had worked with Bome MT! It's also a bit more straight forward and less tricky than Mobius. So it should be easier to get Bome MT to work in Reaper, and then work with that result to get Mobius to work as well.

So, the way Bome is currently setup...

- the single press sends out MIDI Note 60 (for the REC function)
- the dble tap send out MIDI Note 68 (for the Mute function)
- have the long press send out MIDI Note 61 (for the Clear/Del function)

What happens now in the Bome MT Log, and can be verified in Reaper or Mobius as well...

- when I single press, it sends out MIDI Note 61
- when I dble tap, it sends out MIDI Note 60
- when I long press, it sends out MIDI Note 61


And it's no real coincidence single press & long press both send out MIDI Note 61 as their logs are identical!:

Code: Select all

IN 2.0: MIDI 90 3C 7F
assignment: (gc=gc+1) = 1
IN 2.2: MIDI 90 3C 7F
OUT 2.0: One-shot timer "Double Tap Detection": 300 ms delay
OUT 2.2: One-shot timer "Long Press Detection": 1000 ms delay
IN 2.3: On timer "Double Tap Detection"
condition satisfied: if gc!=2 then exit rules, skip Outgoing Action
IN 2.4: On timer "Double Tap Detection"
condition satisfied: if gc!=3 then exit rules, skip Outgoing Action
IN 2.5: On timer "Long Press Detection"
assignment: (gc=0) = 0
OUT 2.5: MIDI 90 3D 7F

DvlsAdvct

2016-05-23 19:26:48

Would this be fixed by changing the outgoing messages to be consistent with what you need?

chumbo

2016-05-23 20:29:58

Hehe, no, nice easy try ;-)

As I said in the post:
So, the way Bome is currently setup...

- the single press sends out MIDI Note 60 (for the REC function)
- the dble tap send out MIDI Note 68 (for the Mute function)
- have the long press send out MIDI Note 61 (for the Clear/Del function)
I had actually verified that info in each individual translators before posting.

DvlsAdvct

2016-05-23 21:03:21

So the outgoing messages are correct in MT, but they are sending out incorrectly? I just want to make sure I understand.

J

chumbo

2016-05-23 21:05:53

Yes, that's it exactly, as shown in the log in fact.

chumbo

2016-05-23 22:35:09

Ok, now I'm sort of taking it back to Mobius since it should be simpler than before because we no longer need the long press control from Bome as it is already natively in Mobius.
I'm guessing this will be useful so here's the entire preset as I have it in Bome. And since we now realize that the long press is no longer needed, I guess I can deactivate the 2 translators related to it, right? But I imagine there's more to it than just that.

Code: Select all

Preset 2: Tap, Dbl Tap, Long Press

Translator 2.0: Double Tap Detection
Options: stop=false
Incoming: MIDI 90 3C 7F
Rules: 
  gc=gc+1
  if gc>=3 then gc=3
Outgoing: One-shot timer "Double Tap Detection": 300 ms delay

Translator 2.1: Button Release
Options: stop=false
Incoming: MIDI 90 3C 00
Rules: 
  gc=gc+1
  if gc>=3 then gc=3
Outgoing: (none)

Translator 2.2: Long Press Detection
Options: disabled, stop=false
Incoming: MIDI 90 3C 7F
Outgoing: One-shot timer "Long Press Detection": 1000 ms delay

Translator 2.3: Single Tap Output
Options: stop=false
Incoming: On timer "Double Tap Detection"
Rules: 
  if gc!=2 then exit rules, skip Outgoing Action
  gc=0
Outgoing: MIDI 90 3C 7F

Translator 2.4: Double Tap Output
Options: stop=false
Incoming: On timer "Double Tap Detection"
Rules: 
  if gc!=3 then exit rules, skip Outgoing Action
  gc=0
Outgoing: MIDI 90 44 7F

Translator 2.5: Long Press Output
Options: disabled, stop=false
Incoming: On timer "Long Press Detection"
Rules: 
  if gc!=1 then exit rules, skip Outgoing Action
  gc=0
Outgoing: MIDI 90 3D 7F

chumbo

2016-05-25 09:13:49

Bump...

Jared, if you want to leave this thread to rest, I can totally understand but on the other hand, having both put in so much into it as to spark congratulatory remarks from the founding father himself, it would seem too bad to leave this one unresolved.
It's become a bit simpler also since we now can see that only the single tap and double tap are needed since long press is handled natively by Mobius.

DvlsAdvct

2016-05-31 15:32:50

Hey Chumbo

Sorry for all the delays. I've been running around with the Memorial day holiday and work being a little nuts. The problem we run into is that if we want Mobius to handle Long Press and Single press, mapping JUST the double press to MT Pro brings up a few issues, like not passing through the single press. And then if we use MT Pro to process the single press, we technically need to have it handle the long press as well.

OH! I thinK I figured it out. What is the MIDI message when you release the button? Is it, by change, 80 3C 00?

chumbo

2016-05-31 18:27:57

Hi Jared!
I'm not sure I understand what you're asking me to try? If you want me to press the sofstep and check the log result in Bome MT, then I've already done that and posted the results in my previous post of a week ago (May 23rd). And I'm afraid there is no 80 3C 00 message in it, so...what does that mean?

I thought on the contrary that it's the lack of any Note Off message that made it interesting, because of what was said to me on the Mobius forum, as I posted earlier as well.

DvlsAdvct

2016-05-31 19:48:16

So what I want to see is the message when you press the pedal, and the message when you release it. Or does the softstep not send an off message at all?

chumbo

2016-05-31 21:46:33

Just checked in Bome and it definitely sends a note off message when I release the pedal. I guess that's sort of...disappointing because it doesn't point to where you thought might be the problem?

DvlsAdvct

2016-05-31 21:50:56

What IS the note off message? Is it 90 3C 00?

chumbo

2016-05-31 22:04:04

Well...no, it's 80 3C 00?! Isn't that the note off message...80?
So I press and I get 90 3C 7F
When I release I get 80 3C 00

Isn't that the way it's supposed to be?? :-S (or maybe you weren't sure I really knew what the off message was?)

DvlsAdvct

2016-05-31 22:44:11

For a while a lot of devices were using 90 xx 00 as the off message, but it's a habit that has gone away. I'm still in it, though.

Can you change the incoming message in Translator 2.1 to 80 3C 00 for me?

And let me know if the long press and single press now works.

chumbo

2016-05-31 23:33:33

Nope, same problem. But just to reassure your programming skills or not in question...it does work perfectly in Reaper! :-)

You know, I wouldn't have hung in this long with this problem if I hadn't read with my own eyes that some other guy in this forum succeeded to do this with the very same setup!

Because I'm starting to think there is something really strange going on with Mobius: when I go to the settings to map controls, there is a capture MIDI window just like in Bome and there...it DOES receive the proper notes for each different types of press!

But on the other hand you can't really put all the blame on Mobius because without Bome, the single press works just fine so...go figure?! What a mess :-S

florian

2016-06-03 00:34:24

just a quick side note: using Note On with zero velocity is actually a perfectly valid Note Off message. So, e.g. "90 3C 00" is equivalent to "80 3C 40". It was specified in the MIDI spec because many MIDI devices don't use Note Off velocity, and using Note On with 0 velocity to end a note had the advantage that you can play long sequences of notes with the same status byte (90) which can be removed when sent over the MIDI wire ("running status") and thus saving 1/3 of the bandwidth. Which is a lot on the MIDI 5-pin DIN cable... Running status cannot be used on USB-MIDI, but still many keyboards use the 0-velocity Note On message. And all MIDI software and devices understand it.

chumbo

2016-06-06 21:22:46

Thanks for the info Florian but I'm not sure what I can do with it unfortunately considering my newbie status (not even sure i understood it all either! :oops: ).

But maybe Jared can make some good use of it?

florian

2016-06-07 13:05:50

chumbo, don't worry! that's just background info not essential for using MT Pro!
Florian

DvlsAdvct

2016-06-08 01:58:03

I'm still torn on this. If it's working in Reaper but not in Mobius there has to be something broken in that transmission.

I have to think on this more, since I don't have the apps. Makes it a bit more difficult.

chumbo

2016-06-08 23:11:50

Well...since you seem fairly dedicated in your support - as proven by this epic thread! - you could also just run Mobius as it's free and it's portable! So you could install it to a USB stick/memory card or any folder on your PC and just delete it when finished. It will leave no trace as it installs nothing to the OS (and it's the best looper on the planet!).

Don't know why I didn't think of this sooner!? :-S

http://www.circularlabs.com/download2/download.html

If you do, I'll be glad to guide you through the setup steps. It's an ugly GUI but a VERY powerful software.

JacobiusWrex

2016-08-06 21:53:12

Now I'm struggling to do implement the same code.
I put it in and I'm getting inconsistent results.
Maybe it would be easier to just ask for specific help cuz I'm a newbie!

What I need is a 3 function button:

Function 1: Record Arm On/off
one tap toggle (~<1second) activated: output red LED (90 4F 21) and mouseclick down at (x1,y1)
one tap toggle deactivated: turn off red LED (80 4F 00) and mouseclick up at (x1,y1)

Function 2: Clear Track Contents
double tap: output yellow (90 4F 05) , and mouseclick at (x2,y2) , and physicalkeys (delete). Then turn off yellow LED.

Function 3:
Hold activated: output a variable value
release : do not output the variable.


Basically for context, I am trying to tap a button once to record arm a channel in Reason, tap again to disarm same.
Double tap same button to clear channel contents.
then, only if I Hold same button to allow my Hot hand USB accelerometers to control the volume on one axis/cc, and pan on another axis/cc. If I am not holding the button, then no volume or pan changes should happen.
I need this procedure repeated 7 times for 6 channels, and one master fader.

Hope to hear back from one of you MIDI Professionals!!