Increase/Decrease stages (Blind user)

Hello,

I am a blind user of Keyboard Maestro.

I am a musician and I created macros allowing me to use my instruments more easily via MIDI.

Could you help me on this macro, I've been stuck for a few days!

I have created several macros allowing to increase or decrease my variable by 1. The values ​​are spoken with Speak Text “%Variable%…%.

I have created a macro with Prompt for User Input for me to type in the desired value.

Macros allow me to change programs on the instrument as follows:

1001 to 1128 (User Bank 1, Program 1 to 128)

2001 to 2128 (User Bank 2, Program 1 to 128)

My macros work correctly:

If my variable is 1128, when I increase with Option + P my variable is 2001.

The value is spoken with Speak Text “%Variable%…%.

Control + P decreases the variable by 1.

I have tried with If Then Else and Enable/Disable Macro/Macro Group but without success.

(It works fine if I don't need to increase with Option + P)

I will try to share the macro with you as an attachment.

Thank you in advance for your help !

Best Regards,

Mat'
OBX8 Macros.kmmacros (30.3 KB)

Interesting, so it needs to detect when the value is 2001, and if you press Decrement, it needs to change it to 1128.
Same for the opposite, when the current value is 1128 and you press increment, it needs to change the value to 2001.
Is that correct?

Thank you for your interest.
Yes that's right!

Can you try these macros that I attached to this message.

First backup and disable your current ones, and then upload and enable these ones.

It is a little bit simpler, used "Switch Case" instead of "If-Then-Else".

OBX8 Macros.kmmacros (28.9 KB)

Please test it and let me know if it worked.

Edit: Just noticed you also have values up to 6000 and more, let me know if you also need to add those ranges to the macro.

1 Like

Hello,

Thank you for your quick reply.

Your macro does not send MIDI correctly.

You changed my example with Send MIDI packet B7 20 01 C7 %Hex2%OBX8 Program Change%

It's a bit more complicated:

1001 to 1128: Send MIDI packet B7 20 01 C7 %Hex2%OBX8 Program Change-1001%

2001 to 2128: Send MIDI packet B7 20 02 C7 %Hex2%OBX8 Program Change-2001%

3001 to 3128: Send MIDI packet B7 20 03 C7 %Hex2%OBX8 Program Change-3001%

Each stage sends its own hexadecimal conversion, that's why I tried with If Then Else.

1 to 5 select User Banks (1 to 5)

6 to 9 select Factory Banks (1 to 4)

For example:

1001 to 1128 (User Bank 1, Program 1 to 128)

2001 to 2128 (User Bank 2, Program 1 to 128)

6001 to 6128 (Factory Bank 1, Program 1 to 128)

9001 to 9128 (Factory Bank 4, Program 1 to 128)

Thank you in advance for your help!

Best Regards,

Mat'

Hello,

I just updated your macro and the MIDI works perfectly!

There are still the new stages with Switch/Case:

3001 to 3128 until 9001 to 9128

Thank you in advance for your help!

Best Regards,

Mat'
OBX8 Macros.kmmacros (39.4 KB)

1 Like

Hello,

After verification, my modifications lead to a problem…

1128 to 2001 to 1128: The hotkey pauses and the variable indicates 2000 in the Prompt for User Input.

Thank you in advance for your help!

Best Regards,

Mat'

Good evening,
I can't change Switch/Case.
Could you help me for 2001 to 2128?
Thank you!

Hello,

can you try this version ?
It works for me for 1128 to 2001 to 1128.
I need more time that I have now to figure it how to make bank changes smartly but I hope it helps.
OBX8 Macros.kmmacros (39.7 KB)

Hello @RETINOGRAM,

I re-do the all macro
OBX8 Macros.kmmacros (49.5 KB)
and here is a working version incrementing or decrementing programs and banks.
Tell me if it works well for your needs.

@hello, @Lucien_Keller, thank you very much for your help!

@Lucien_Keller:

Thank you very much for the macro, the stages work well.

For MIDI, each stage has its own code:

You used Send MIDI packet B7 20 01 C7 %Hex2%OBX8_Hex%

B7 20 01: 0(1) represents 1001 to 1128.

So for 2001 to 2128: B7 20 02 C7 %Hex2%

Is it possible to make it a variable, that's beyond my skills with Keyboard Maestro.

Thank you for the time you gave me!

Question:
How does the example of "So for 2001 to 2128: B7 20 02 C7 %Hex2%" look like?
I mean, can you list some examples of what would the value of %Hex2% be if MIDI is a certain value?
So, for example, for 2001, what would the value of %Hex2% be sent for this value?
Same for 2128, what would %Hex2% be?

@hello:

A program change in MIDI on an Instrument starts from 1 to 128.

But in the code it starts from 0 to 127, in hexadecimal 00 to 7F.

For banks, it starts in the code from 01 to 09.

1001: B7 20 01 C7 00

B7 20 (01) C7 (00)

2002: B7 20 02 C7 01

3128: B7 20 03 C7 7F

In my first macro with a Prompt for User Input:

If is >=1001 is <=1128 Send MIDI packet B7 20 01 C7 %Hex2%OBX8 Program Change-1001%

B7 20 (01) C7 (1128-1001=127) Hex2=7F

My macro's MIDI works perfectly but I couldn't use Switch/Case.

Thank you for the time you gave me!

Hello,

ok now it's clear. I missed the variable for the bank in the Hexa value.
I've also modified the macro for the control+alt+P shortcut.
Here is a new version of the macro group:
OBX8 Macros.kmmacros (38.6 KB)

Let us know how it goes.

Cheers

@Lucien_Keller:

Wonderful…

The MIDI part works perfectly!

On the other hand, when I press Control + P at 1001, the variable becomes 0128…

Would it be possible to block the macro at its ends?

Arrived at 9128: Option + P repeats with Speak Text, but does not send MIDI code.

Arrived at 1001: Control + P repeats with Speak Text, but does not send MIDI code.

Thanks again, this will help me a lot!

Hello,

I'm glad to help you.
Here is a new version who take care of limits:
OBX8 Macros.kmmacros (43.5 KB)
Tell me if it works for you.

P.S Now I'm curious to hear the music you're doing using this macro.

I bet it is some kind of dark industrial techno. Also curious to know more about the use.

1 Like

@Lucien_Keller, @hello, Thanks to you two!

(For your time and kindness)

The macro works perfectly, I will now try to understand how it was made in order to better master Keyboard Maestro.

I don't produce music in abandoned factories but I really like that thought!

The Vintage Instruments were easier to access for a blind person… One button one function.

Unfortunately, Modern Instruments are equipped with screens… With endless menus to scroll through.

Fortunately MIDI and Keyboard Maestro are there!

I recently discovered that it was possible to create randomness with Keyboard Maestro… This seems very interesting to me for musical effects.

Here are two sound examples of the Instrument:

2 Likes

Cool, reminded me of this comedy video

@Lucien_Keller, @hello:

Hello,

I hope you're doing well !

I observed the macro in order to progress on Keyboard Maestro.

I changed the variable names because it's easier for me. (VoiceOver reads more easily without the _)

I think I modified all the variables in all the macros but even after deleting them in Preferences/Variables, they reappear when I use the macros… (I deleted the first macro group you created for me)

These two variables reappear:

OBX8_Bank

OBX8_Program

Could you explain to me what I missed?

Best Regards,

Mat'
OBX8 Program Change Macros.kmmacros (43.5 KB)