Hey,

I worked on MIDI clock out over the past week and it is now in a usable
state. You can check out my branch at
lp:~ervanalb/mixxx/midi_clock_out

To use, just run Mixxx. Use the LateNight1280x800-WXGA skin because that's
the only one I've added buttons to.

My buttons are on the left side just above the library. Click:

MIDI OUT to toggle MIDI clock output

MIDI SYNC to synchronize the clock (On the next beat, sends midi STOP,
START and fixes the phase of the MIDI clock to match that of the song)

The #1 / #2 button to change which deck the MIDI clock is attached to.
Doing so will immediately change the tempo, but not the phase of the MIDI
clock.

The MIDI SYNC button is: Gray - Unsynced. Clock is ticking but
no guarantees about proper phase. Red - Syncing. Waits for a beat to pass
under the play position cursor, then becomes Synced (Green.) When it is
synced, every subsequent beat is guaranteed to be aligned with the MIDI
clock.

The MIDI clock is currently sent to all enabled MIDI output devices.

Known Bugs / TODO:
- See controllers/midiclockthread.cpp for a bigger list. These are just the
big ones.
- Move around some of the code. I'm pretty sure my CO's shouldn't be in
controllermaster.cpp, and I have tacked the buttons onto just one skin.
- The clock is sent to all enabled MIDI devices. This may mess them up. Add
an option to turn them on/off.
- The clock will attempt to stay synced through scratching, play/pause,
hotcues, etc. Currently, only beatloops will automatically mark the clock
as "de-synced." This requires adding more slots that call desync() in
controllers/midiclockthread.cpp
- BPM tap does not work, since it updates the bpm CO but does not update
the beatgrid.
- Occasionally will not load the sound card on startup. This may be my
fault. Workaround: Click reconfigure, choose master as "default." Repeat a
second time if it doesn't go the first time.
- Occasional segfault on exit. I don't think this is my fault.
- Use more accurate timers. The clock is a little jumpy (but will not drift)
- Make anticipation (see controllers/midiclockthread.cpp:run) a CO. Also
figure out why it is negative, i.e. beats are being triggered before they
are played. This is indicative of larger problems in MIXXX, such as
playposition_visual is not correct, or the waveform is incorrect, or the
beat locations are incorrect, or a number of other possible reasons.
- Make the sync button only resync on mouse press, not release.

Finally, I apologize for doing this, but I'm probably done working on this
for a while. Somebody else who is interested should take it and run with
it. I'll stick around for a while to help fix bugs / answer questions,
but I have my own projects to work on. Thanks for all your help!

- Eric Van Albert
ervan...@mit.edu
------------------------------------------------------------------------------
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