FortySevenEffects / arduino_midi_library

MIDI for Arduino
MIT License
1.59k stars 257 forks source link

Time signature #104

Closed Jimbolaya64 closed 5 years ago

Jimbolaya64 commented 5 years ago

Hello. I’m interested and in using this library to develop a midi controller to link my Beat Buddy drum machine to my guitar effects processor. Part of this requires being able to read a midi time signature. From my amateurish review of the code I don’t see this feature. Any plans to include it? The time signature is described here: http://midi.teragonaudio.com/tech/midifile/time.htm Thank you.

mink99 commented 5 years ago

This command only applies to midi files (smf) and not for direct messaging between devices... to sync a BB midi clock commands are sufficient. Or are you trying to upload patterns ?

Jimbolaya64 commented 5 years ago

Thanks for the quick reply. I’m trying to sync drum beats from the Beat Buddy to a Boss RC-20XL looper pedal. I want to start and stop the looper at the start of a measure. To determine the start of a measure I need the midi clock, a start signal and the time signature. The Beat Buddy puts all of these out. I can read the clock and start signal with your library. I don’t think I can read the time signature. Does that better describe what I’m trying to do?

joebowbeer commented 5 years ago

http://midi.teragonaudio.com/tech/midifile/time.htm

@Jimbolaya64 Here is more about these meta messages:

https://www.recordingblogs.com/wiki/midi-meta-messages

mink99 commented 5 years ago

Do you have a midi trace on how the bb transmits this time signature ? I am not a maintainer of this lib but I would be happy to include this info into a synchroniser for the bb.

Jimbolaya64 commented 5 years ago

This link describes it well: http://midi.teragonaudio.com/tech/midifile/time.htm I did check and this is exactly what the BB puts out for time signature.

mink99 commented 5 years ago

Once any device receives this message it will immediately shutdown as the signature 0xFF, if not used in a smf, is the system reset message.... before implementing that killswitch in the midi library I would strongly recommended to ask the developers of the beat buddy to change their code....

Jimbolaya64 commented 5 years ago

The BB developers and the developers of the midi capable looper pedals (Boomerang III, Pigtronix Infinity, TC Electronic Ditto X4, Boss RC-300) have been working together for a few years now and agreed on the use of the system reset message with a time signature in direct device communication. I doubt they will change anything at my request. The midi library already has the system reset message implemented. I just need that sub-routine to return the data for the time signature.

mink99 commented 5 years ago

Only because some developers have agreed to contradict the midi standard there should be a fixup in the midi library that will definitely harm any device that has not been implemented by these some developers ? Man you must be joking...... just create a switch on your device that will define the signature .

mink99 commented 5 years ago

I will ask a colleague who owns a bb to file a bug report on this behaviour on the bb . The response will be published in the midi.org discussion forums.....

Jimbolaya64 commented 5 years ago

Sorry. I don't know the midi standard. That's why I asked the question. I learn a little more with each response that I get. No jokes. As far as a switch goes... I would prefer not to use one. I'm trying to automate/simplify things so as to minimize error and equipment failure during my live performance. Thank you for your guidance. I will move on.

mink99 commented 5 years ago

Sorry , not meant to be disrespectful.....

mink99 commented 5 years ago

Asked the colleague to provide a trace , his response was : I switched Time Signature ON, started BB and switched to a 5/4 rhythm out of the OddTime-Folder. The BB sent this message: F0 7F 7F 03 02 04 05 02 18 08 F7 I hooked it up to my MicroX again, did the same and it plays as usual. Note that the BB stops when you change songs/Rhythms.

So your basic assumption may have been wrong..... maybe you should really do some tracing .... This message from above could be easily processed....

Jimbolaya64 commented 5 years ago

I agree with what your colleague got from the BB. I did do some tracing. My error was assuming what I saw in a Google search was what I saw from the BB. I didn’t compare the data side by side. Thank you for following through. I believe this issue is resolved.