Record preset Varibles

Hi
me gain back with even more questions
if i want a varible to only be active in a preset
so i can use it in multiple presets with out messing with eachoder
they will never be active at the same time but will store values that are only used when in that preset
exsample
in preset A gd=123 encoder value
switch to preset B gd=50
when switching back A gd are again 123
you guys get what im saying .
becouse i got 8 layers or preset
where each layer is the same 8 encoders
and they are all pass thru and i want record the value for each for next time i come back to same pre set .

Ps Steve im geting to the point where my ocd are getting satisfid with the amount of functions from V,M,R are transfered over to the APC 40 mkII

Hi Mikael,

Bome MIDI Translator has just two types of variables:

Global Variables - Are static and can be seen across all translators and presets
Local Variables - Are dynamic and can only be seen within a given incoming event

At this time there is no concept of ā€œPreset Variablesā€.

With that said, I anticipate what you want is to duplicate your translators in different presets to handle a different layer function without having to edit all of your rules with different variable names within each preset

The technique I use to do this is to save the ā€œpresetā€ variables to another global variable prior to changing presets, then save the global variables to the ā€œpresetā€ variables upon changing presets.

For example, you want ā€œgaā€ as a preset variable.

Prior to doing a preset change.

  • Copy ga to ha (the permanent global variable for preset 1)

  • Change presets (to preset 2)

Upon activation of the new preset (2) ,

  • copy ia (the permanent global variable for preset 2) to ga

Then you can continue to use ga in your rules as normal.

Since you also have MIDI helper, instead of using additional global variables, you could also save and restore global variables for each preset from different permanent storage files.

Steve Caldwell
Bome Customer Care


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

But i would still need about 40 varibles to store each value

im going to run out soonšŸ˜Ŗ

the helper is going to come in to play soon after hand i learn

What type of data are you storing? If it is only 1 or 0 then it is only 1 bit of data and you can use a single global variable to store up to 32 bits of data. If it is a 7 bit value (like a MIDI CC) then you can store up to 4 values into a single global variable (4x7=28 with 4 bits to spare).

MT Pro has room for up to 360 32 bit global variables. Again if you need more, you can use MIDIHelper to save different global variable sets so you are only limited to the number of filenames you have to save them to but will only have access to 360 at a given time.

For instance for my 64 bit grid on my APC-MINI I only use 2 global variables to maintain their on/off state using bitmapping.

Steve Caldwell
Bome Customer Care


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

the data im storing is the encoder position so between 0 to 127
this is for the Sel function on Bus 0 to 8
if i use the normal faders and they are set to what i have set on a nother channel and tuch them wile on this channel they jump to the physical position of the fader but recording the value on the encoder will let me be in the right position on that encoder on what ever channel im modifying hope that made sence

So bus 1-8 on Potato has 8 faders, 8 Reverb Returns and 8 delay returns so a total of 24, 7 bit values. You can store all of this in 7 global variables instead of each in their own global variables (which would use up 24).
In this case I would actually probably use 8 variables and organize them something like.
g1-g8
where bits 0-6 would be the fader value - skip bit 7
bits 8-14 would be the delay return - skip bit 15
bits 16-22 would be the reverb return - skip bit 23
and you could use bits 24-31 for future use/expansion:

For instance

  • A bit for select
  • Another bit for Mono
  • Another bit for EQ
  • Another bit for Mute
  • 4 bits for the Mode select (which can have 12 values)

That way each global variable has bits designed for a given bus
g1 bits - bus 1
g2 bits - bus 2
etc.

Steve Caldwell
Bome Customer Care


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

I see what u are saying
i need to learn bit mapping
the use was more for the Sel button as it works as a Shift layer for the inputs to that specific out put
so i can set Strip 0 to 7 for Bus 0
so each bus have its specific input levels
One question in what format must i type a cc to be stored in a global v
lets say i want to store midi 9f 20 22

See the attached example.

I store CC0 in to the lowest 7 bits
I store CC1 into bits 8-14 (skipping one bit)
I store CC2 into bits 16ā€“22 (skipping one bit)
I store CC3 into bits 24-30

Storing-4-7-bit-values-into-single-global-variable.bmtp (2.3 KB)

Steve Caldwell
Bome Customer Care


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

That is really usefull. But how is it possible to convert the variable back to 4 midi output. ItĀ“s really hard to understand bitwise operation, but it is a great tool. Thank you

Hi @Oliver.Rinn ,

I know bit manipulation seems a bit daunting but once you get used to it, it is quite powerful. Note that as the time of this original post we had less global variables available. We had 360 available at the time, but in the current version (v1.9.1) it is now 710.

With that said, bit mapping is still quite useful in some cases as it can actually be more efficient.

Now to your questions. Say that you have the global variable ga set up to store 4 ccā€™s as I described earlier.

//Letā€™s extract the lower byte into the local variable oo
oo=ga&0x7f

Now the next byte into the local variable pp
pp=ga>>8
pp=pp&0x7f

Now the next higher byte into the local variable qq
qq=ga>>16
qq=qq&0x7f

Finally the highest order byte into the local variable rr
rr=ga>>24
rr=rr&0x7f

The last construct is simply to ensure that that we never set bit 7 (the eighth bit) to a 1.

As a side note, if you use the following rules and save your project file, when you come back, it will change your rules to decimal so

oo=oo&0x7f

will show as

oo=oo&127

You can refer to this post with more detail on bitwise operations.

Iā€™m also finding with the new ā€˜Performā€™ feature of version 1.9.1, I often do not need as many global variables because we can pass parameters between translators with out needed to touch global variables.

Steve Caldwell
Bome Customer Care


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

Hi mfrisberg

I think this may help if Iā€™m hearing you correctly. I just finished a project that controls a Neural DSP guitar plugin. Iā€™m using a 4 button iRig Blueboard. Iā€™ve got 4 banks of presets with 4 presets on each bank. Each preset has 100 parameters that can be controlled via midi. Iā€™m only controlling 14 which is what you see on the front panel of the amp.

I can switch between all of the banks and presets at will. I have access to each front panel knob and can vary the value with 2 buttons - one for up and one for down. My main concern is to be able to keep the preset values intack for all 16 presets and offer full ā€œtake-overā€ mode on each parameter. For example the parameter of the current control is full on (127). When moving to the next control the value is low (5). The first touch of the low knob immediately slams the value from 5 to 127 which then has to be dialled back to its original value of 5. The second issue is to ensure the all 16 presets with 14 parameters each (228 total) retain their values as set by the user.

I just realized how old this post is so perhaps youā€™ve found the solution. Iā€™ll include the following snippets and if you or anyone wants to pursue it further Iā€™ll expand the information. Essentially each presetā€™s group of parameter values is just 2 translators.

The first translator you create global vars for the 14 parameters for each preset as a MTP rule

Followed by a translator that loads the above values for each parameter when entering the preset.

Iā€™ve included a link to an early demo which has been updated with access to a Neural guitar tuner as well a two button wah pedal feature. If you watch the video and only want to see the button control feature move to the 4:00 minute mark.

Hi @chrisjdan

Thanks for posting! Iā€™m reading through your description and am unclear if there is something you are still struggling with. Are you still getting jumps as you switch presets? Do you ever change the parameters using a mouse directly within the plugin? If you do, does the plugin send MIDI back to your project to update the global variable(s)?

Steve Caldwell
Bome Customer Care


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

Hi Steve,

Sorry if I misled you with my post. Itā€™s been a while since Iā€™ve been on the site and was looking at some of the other postings.

I noticed a posting by mfrisberg and it appeared he was having issues with keeping assigned preset variables intact when switching from one preset to another preset.

I was attempting to explain how I address the issue when needed. In my example Iā€™ve got 16 different presets with 14 parameters assigned to each preset, 228 in total. However you must manually load those values as global variables into MTP for each of the 16 presets. Once done youā€™re off to the races.

To answer you question Iā€™m very pleased with the functionality of the routine that allows me to accomplish my goal thanks to Bome MTP. The whole process runs without any problems at all and thatā€™s why I was attempting to share it with other users.

The plug-in does not provide any midi data when changing values with a mouse. I rely solely on MTP to harvest that information. Thatā€™s not totally true as I do use Midi Monitor as well due to its real time display conversion of hex to midi and vice versa. Iā€™ve watched some of your tutorials and your programming skills and knowledge are at a professional level compared to me and many of the uses I would think. You probably can convert hex to decimal like a second language without the need for additional toolsā€¦lol.

Harvesting the data from the plug-in using MTP is very simple. When done editing a bank of presets to my liking I simply dump the global variables, cut & paste into a spreadsheet, transpose them and cut and paste them back into the related translator fields in MTP.

The other benefit is that there is no ā€œfader, encoder slammingā€ as Iā€™m only using two encoders to modify 228 parameter values. Everything is smooth as poop through a goose.

The other reason I was on the site is I was looking to see if there was any way of writing changes made to the buffer preset variables back into the stored global variables in Rules. I found a conversation between you and ARC where you alluded to ā€œcustom codeā€ as the answer.

I plan on uploading a newer video that highlights the ā€˜takeoverā€™ mode, wah pedal and guitar tuner updates to the project.

Awesome. Thanks for the clarification! Just wanted to make sure if you had any questions, I could help further.

BTW I still use a hex/decimal calculator. No matter how hard I try, I havenā€™t been able to do much conversion in my head. There are a few areas I have it memorized though.

Thanks for the good words!

Steve Caldwell
Bome Customer Care


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

Hi steve long time
Hope all is fine
I dont use the the persistent any more was having some issues with the timing and the issue was the timing varies depending on how busy the cpu is

Yes, I understand. The MIDI Helper process was just serially reading and writing the global variable files and CPU timing could be a factor. Iā€™m not sure if the MH file you have used MT Pro timers or not to signal to MT Pro completion of setting and getting variables.

Steve

The last MH you sent me had some timers
And still i was gett inconsistencies
But now vm is using midi call backs so if a position on a rotary changed on a noter page then when swithing back vm is pinging the note setting and i have it routed direct to the port for the leds
I still use the MH but mostly as a master record for serten nobs that get reset when rebooting some software then i have it as a one click when i reboot obs it forgets where the faders where on the surface

Yes, the latest VoiceMeeter enhancements are nice. I use them for my faders, however still use an API using AutoHotkey for everything else.
But for my faders, since I donā€™t have motorized faders, I really donā€™t need feedback anyway.

My AutoHotKey program is based on this API.

It is a bit of spaghetti code but it works for me. I use an APC MINI MK2 to control Voicemeeter Potato.

Steve Caldwell
Bome Customer Care


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

I have been thinking about building a vm strip as a test using a micro controller and alps motor faders
And some alps rotary encoders in i saw some nice strip like oled displays that would work as vo meter
.its just getting the time and energy to start ordering hardware