Hello, Eric.

On 05/27/2012 02:07 AM, Eric Van Albert wrote:
I noticed there's been some talk about adding a MIDI clock output to
mixxx. I am planning a show in about 3 months for which this would be a
very desirable feature.

I was wondering what work has been done on it so far. I would be willing
to implement it myself but don't know where to start in the mixxx codebase.

Right now, since Mixxx doesn't yet have a master clock internally (that's addressed in blueprint https://blueprints.launchpad.net/mixxx/+spec/master-clock) the only thing we can do is send a MIDI clock signal based on the BPM of the currently-loaded track, so each deck will send its own MIDI clock signal. (That will confuse the heck out of dual-deck controllers that pay attention to that signal.)

I would be willing to help implement the feature "officially" if specs
have been laid out. If not, is there a simple hack that I can do quickly
on my local copy, or even something with the MIDI controller scripting?

The script engine's context won't be reliable enough to deliver a precise clock signal. This would need to be done in MidiController.cpp.

I just created a blueprint for this. https://blueprints.launchpad.net/mixxx/+spec/midi-beat-clock

I started thinking of how to implement this while creating that, and we're going to have a problem with clock drift because we don't currently have a timing source with microsecond precision. (Since there are 24 clock pulses per beat, 120BPM is a clock pulse every 20833us, 150BPM is every 16667us and so on.) QTimers only have millisecond precision and may fire late. So even if they were on time, they could only accurately represent 78.125BPM (32ms), 100BPM (25ms), 125BPM (20ms), 156.25BPM (16ms), 250BPM (10ms), etc. Other whole ms values translate to fractional BPM values. (If you want to make your own spreadsheet, the formula is (1/(<timer value in ms>/1000))/24*60 )

On top of this, even the beat_active CO (which we would sync to on each beat) is only accurate to 50ms according to the Wiki.

So the question is: would a MIDI clock signal even be useable given this level of inaccuracy?

Sincerely,
Sean M. Pappalardo
"D.J. Pegasus"
Mixxx Developer - Controller Specialist

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to