Offline
brooklyn, NY

Ive been using LSDJ MidiOut for a bit but the lack of clock sync left me wanting ... so I made an arduino device to add Midi clock sync to the signal stream coming from LSDj/ arduinoboy.     After snooping around a bit with midi monitor, i found that the arduinoboy sends both MIDI Start and Stop when the track is started and stopped, respectively.    Very cool.   I just need to send a specific MIDI CC# and value each step... my arduino device reads them and counts the time, divides it by 6 (for getting 24 ticks per 1/4note)   and spits out MIDI clock commands at that interval.

Pretty simple and works great (ill post the details soon,)  however.....
...... the LSDJ and/or Arduinoboy refuse to behave.    Mysteriously, at any time (= irregular intervals) LSDJ/ Aboy send an errant  MIDI Stop command that that totally cramps my style- shutting down anything listening for that command; sequencer, loop pedal, etc.     Sometime it will play for minutes w/o stopping... other times only seconds.  seems pretty unpredictable.   I tried both the previous versions of LSDJ/ Arduinoboy (4.7.3 + Aboy 1.2.3)  and the new version (4.8.8 + 1.3.0.)   I also tried different Gameboys;, DMGs and a pocket, with no change.   Seems to happen more when I am playing a whole "song"   (all 4 channels) and less when I am playing a specific chain or phrase (1 channel).    ???

Anyone know what is going on here and how to stop it ?

Offline
United States

i don't know enough about how midiout mode works to know if this is an LSDJ midiout mode issue or an arduinoboy midiout mode issue. i'd assume random stop commands could interfere with devices downstream from lsdj/arduinoboy that react to transport messages (in this case, your device), so this may be a bug.

everything else being equal, i think the most logical workaround is to have your device ignore midi stop. you could then have it automatically stop (and send out midi stop) if it hasn't heard from LSDJ for X steps.

Offline
brooklyn, NY

Ahh ... solved it!   Raising the bit rate delay from 80 to 100 in the editor cured this and some other glitchy issues.    thanks anyway.

Last edited by Charbot (Jul 27, 2016 9:24 pm)

Offline
Unsubscribe

Might be a placebo effect, according to Tim in the new version "The special bit and byte delays are no longer used. They are hardcoded to stable numbers"

Offline
NUMBSKULL
herr_prof wrote:

Might be a placebo effect, according to Tim in the new version "The special bit and byte delays are no longer used. They are hardcoded to stable numbers"

Crap, I wasn't going to say anything, but now the code will know he knows!

Offline
brooklyn, NY

I wont tell my arduinoboy

Last edited by Charbot (Jul 28, 2016 4:29 am)

Offline
Los Angeles
herr_prof wrote:

Might be a placebo effect, according to Tim in the new version "The special bit and byte delays are no longer used. They are hardcoded to stable numbers"

I may have been wrong on Midiout mode. Bit delay is still used.

To the subject, Sync was originally planned but it was not really reliable, the timing was all over the place so I disabled it before it was released because it was useless. Adding a CC command out per tick would be even worse and you'll easily overload the buffer / serial stream.

Offline
Sweden

What about adding a CC command out per beat instead of tick? That way the GB to aboy stream wouldnt be overloaded. Also you could stop sending CC after a few beats.

I actually tried this but couldnt get the sending of midi clock out of the aboy stable enough.

Offline
Unsubscribe

Ive done cc to a tap tempo that worked ok. Your device may vary.

I guess the bug is that it shouldnt send ANY clock byte in midiout? The clock start and stop without ticks wouldnt do anything as well, right?

Offline
brooklyn, NY

my device reads a cc and value every LSDJ step (1/16, right?)  counts the time, divides it by 6 and returns 24 sync ticks per 1/4 note.   After i got the rogue stop commands sorted by changing the bit rate delay, it seems to be working really well. Granted, my songs are pretty simple and Im using one channel just for the clock cc's.   It may get bogged down and glitchy if one were using it with some complicated tracks w/ elaborate tables.  Mine ran all evening and seemed to stay in sync (audibly at least).    The sketch is pretty simple... pretty sure it could easily be rolled into the Aboy code, but im not sure where to start.
Ill post the code as soon as I can figure out how to use Github (!!i know)   in the meantime, if anyone really wants to check it out,  you can PM me w/ you email and I'll send an attachment.



One weird thing that i noticed while working on this,   whenever i sent a CC value of FF in LSDJ   (seemed like any CC on any Channel)  arduinoboy would return 0xF8 - midi clock and no cc command.   Not sure what is going on here, but it was totally messing me up for a bit.   happened with both the new and previous versions of Aboy and their respective LSDj releases.

Last edited by Charbot (Jul 28, 2016 7:00 pm)

Offline
Unsubscribe

I've noticed the clock out bits happening whenever.

Offline
Los Angeles
Charbot wrote:

One weird thing that i noticed while working on this,   whenever i sent a CC value of FF in LSDJ   (seemed like any CC on any Channel)  arduinoboy would return 0xF8 - midi clock and no cc command.   Not sure what is going on here, but it was totally messing me up for a bit.   happened with both the new and previous versions of Aboy and their respective LSDj releases.

CC range for LSDJ out is 0x00 to 0x6F due to aboy using the first bit as a start bit, 0x70 to 0x7F are used as commands, such as transport start/stop, message type, and sync messages (which were disabled) 0xFF translates to 0x7F because of the one bit being used as a start bit. 0x7F I believe was the sync message command from lsdj.

Offline
brooklyn, NY

Ahh!   that is actually pretty cool

Last edited by Charbot (Jul 28, 2016 7:10 pm)

Offline
Ledfyr wrote:

What about adding a CC command out per beat instead of tick? That way the GB to aboy stream wouldnt be overloaded. Also you could stop sending CC after a few beats.

I actually tried this but couldnt get the sending of midi clock out of the aboy stable enough.

Wouldn'it be even more simple if lsdj itself would send a CC corresponding (somehow) to the phrase number?, or to the song row number?

Offline
Unsubscribe

What delays are you all using? I upped mine to 100 and it got rid of those errant clock messages seemingly.

Offline
Sweden
cyberic wrote:

Wouldn'it be even more simple if lsdj itself would send a CC corresponding (somehow) to the phrase number?, or to the song row number?

Yes, that would be great. This would let LSDJ be master for a DAW or other sequencers/gear listening to row number.


On play, LSDJ could send both row number + a message containing the current tempo, and then ticks for a few beats.

The aboy can send midi clock using the tempo message the first beat, and the tick interval after that.
It would be even more awesome if new ticks were sent if tempo is changed during a track, keeping the sync.


Maybe I'm overlooking something.. But this should be possible, shouldnt it?