Read & Display current Tempo value

bossredman

Inspired
HI,

Do you know if is possible to directly read the current Tempo value pls?

I'd like to display it on my foot controller display.

Looked on the sysex wiki and can only see sysexs for changing via tap or MIDI_TEMPO_BEAT which I'm assumming is a msg for a pulse?

Thanks in advance
 
I recall also coming across some posts saying that the flashing LED on the front panel's TEMPO button is performed by a low priority thread & therefore can not necessarily be accurate.

Does that mean the MIDI_TEMPO_BEAT sysex msg (ie Function ID (0x10) ) can also be inaccurate?

If I can not read direct, was wondering if I could calculate the BPM by reading the time between 2 (or more) MIDI_TEMPO_BEAT sysex msgs.
 
Managed to work it out.

First time round I didn't fully grasp what the sysex wiki was saying about SET_TAP_TEMPO
ie
If you want to send a BPM value to the Axe-Fx II/AX8 you can do this via Function 0x02 GET/SET_BLOCK_PARAMETER_VALUE. To do this you will send the parameter to the "CONTROLLERS" Block (ID 141), Parameter ID 32, and the value would be a number between 30 and 250

After re-reading several times it finally dawned on me.

So..you can actually use the 0x02 GET/SET_BLOCK_PARAMETER_VALUE sysex msg to both read AND set the Tempo value.
You just need to change byte[13] to either 0 (read) or 1 (set)

For reading - send {0xF0, 0x00, 0x01, 0x74, 0x03, 0x02, 0x0D, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, CheckSum, 0xF7}

..and decode what comes back

For setting - send {0xF0, 0x00, 0x01, 0x74, 0x03, 0x02, 0x0D, 0x01, 0x20, 0x00, First_Value-byte, Second_Value_byte, Third_value-byte, 0x01, CheckSum, 0xF7}


..where the NEW value is sent as 3 bytes, calculated thus:
Code:
byte First_byte = (new_value & 0x7F);
byte Second_byte = ((new_value >> 7) & 0x7F);
byte Third_byte = ((new_value >> 14) & 0x7F);

Ref decoding:
Code:
Read_Value = ((MIDI.getSysExArray()[12]) << 14) | (( MIDI.getSysExArray()[11]) << 7) | MIDI.getSysExArray()[10];



Realise I'm talking to myself here (as I got no replies) - but just thought it would be useful for other folks if they ever want to get this.

Cheers.
(been nice chatting with you all :) )
 
Back
Top Bottom