|
Post by gdohmen on Apr 23, 2021 7:27:46 GMT
I am using midifire for the dynamic clock module. My setup: Forscore sends control command to the dynamic clock and then i start the clock with FA and send the clock to midi-in of my hardware metronom. In general that works. I am sending the sysex message as shown in the manual's example: F0 5A <ThousandsHundreds> <TensUnits> <TenthsHundredths> F7 However it does not work for <TensUnits> being in the 80ths or 90ths Example: F0 5A 00 80 00 F7 Event monitor: Sysex Mfg 5A 4 bytes (F05A00F7) / CH:01 Note off C-2 Rel:119 (80 00 77) F0 5A 00 81 00 F7 Event monitor: Sysex Mfg 5A 4 bytes (F05A00F7) / CH:02 Note off C-2 Rel:119 (81 00 77) .... .... F0 5A 00 89 00 F7 Event monitor: Sysex Mfg 5A 4 bytes (F05A00F7) / CH:10 Note off C-2 Rel:119 (89 00 77) F0 5A 00 90 00 F7 Event monitor: Sysex Mfg 5A 4 bytes (F05A00F7) / CH:01 Note on C-2 Vel:119 (90 00 77) F0 5A 00 91 00 F7 Event monitor: Sysex Mfg 5A 4 bytes (F05A00F7) / CH:02 Note on C-2 Vel:119 (90 00 77) .... .... F0 5A 00 99 00 F7 Event monitor: Sysex Mfg 5A 4 bytes (F05A00F7) / CH:10 Note on C-2 Vel:119 (99 00 77) The <ThousandsHundreds> or <TenthsHundredths> when <TensUnits> is between 80 and 99 do not make a difference. They do alter the note but still let midifire misinterpret the sysex message
To me it looks like the sysex command sourounded by the F0....F7 is somehow split into the sysex command for only the <ThousandsHundreds> and than the values of <TensUnits> and <TenthsHundredths> are interpreted as seperate midi messages.
|
|
|
Post by uncledave on Apr 23, 2021 10:18:39 GMT
Hi gdohmen , Not certain about sysex, but most MIDI messages use only 7-bit data bytes (max 3F, 127 decimal). That allows the control bytes to be identified by the high bit being set. I think the 2-digit pairs in your message should range from 0..99 decimal, or max 63 hex. You may be mixing hex and decimal. In StreamByter you can use $99 for decimal, but I'm not familiar with your app. Edit: nic I looked at the MIDIFire manual, and it says "F0 5A 01 25 37 F7 = 125.37 bpm". That implies that the displayed digits are a mixture of decimal and hex, which seems like a technical impossibility, I suspect this should "= 137.55". That would clarify how this is meant to work.
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Apr 23, 2021 16:16:31 GMT
Hi gdohmen , uncledave is on the right track, it is because the tempo set message may not always be a valid MIDI message. I guess when I specified this interface I didn't take that into account, d'oh. In valid sysex, the first nibble of each (7 bit) data byte should never be 8 or 9, so in theory you cannot set Thousands, Tens or Tenths to 8 or 9 without it being an invalid MIDI message. Are you sending the sysex message to set the tempo from Forscore to MidiFire via virtual CoreMIDI port or over a hardware/bluetooth connection? I think it will be possible to write a little StreamByter script to fix this for you, but I'd like to understand the path your tempo sysex messages are taking first, since virtual CoreMIDI quite happily passes 8-bit sysex and MidiFire will also quite happily receive it. NB, the tempo set message is a mixture of hex and decimal positions, so the manual is correct. The F0 5A and terminating F7 are hex, but the tempo data payload is a sequence of decimal digits. Nothing like a bit of consistency... Regards, Nic.
|
|
|
Post by uncledave on Apr 23, 2021 18:06:37 GMT
Oh dear, nic. That's beyond weird. It would have been so easy to make them binary values 0..$99, not hex values that look like decimal numbers. I'm agape!
|
|
|
Post by gdohmen on Apr 24, 2021 11:12:31 GMT
Hi Nic, I am not using Bluetooth or other Hardware. I set the tempo from Forscore to MidiFire via virtual CoreMIDI port. i would appreciate som help.
I tried the below and it kind of did the job. Probably can be done much better: # Press 'Install Rules' when done If M0 == F0 If ML == 6 Ass L2 = M2 Ass L3 = M3 Ass L4 = M4 Block Send F0 5A L2 L3 L4 F7 +F End If ML == 4 If M0 >= 80 Ass L2 = M2 Block End End Else If M0 != FA If M0 != FC If M0 != B0 Ass L3 = M0 Ass L4 = M1 Block Send F0 5A L2 L3 L4 F7 +F End End End End
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Apr 24, 2021 12:06:00 GMT
Hi gdohmen , OK, I guess what is happening is that Forscore does not like the bad MIDI message which is fair enough. Maybe we could try something where we change the format of the sysex message you specify in Forscore to something valid and then use StreamByter to convert to the format that Dynamic Clock expects. How about we change the format of the message you put in Forescore to: F0 5A <thousands> <hundreds> <tens> <units> <tenths> <hundredths> F7 eg: F0 5A 00 01 02 07 05 06 F7 = 127.56 bpm (maybe Forscore will even permit F0 5A 0 1 2 7 5 6 F7 to make it more readable?) The StreamByter code would be something like if ML == $9 if M0 == F0 5A # convert from 9 byte to 6 byte equivalent calc I0 = M2 * 10 calc I0 = I0 + M3 calc I1 = M4 * 10 calc I1 = I1 + M5 calc I2 = M6 * 10 calc I2 = I2 + M7 send F0 5A I0 I1 I2 F7 +F block end endBTW uncledave, you might be agape, but the purpose of the tempo set sysex message was to make it simple for a human to write a tempo message. :-)
|
|
|
Post by gdohmen on Apr 27, 2021 10:38:55 GMT
Hi Nic, thanks for your help. It works now. Good part is with the script I only need to change the sysex in forscore for the songs that have BPM between 80 and 99.
|
|