0

offset delay in midisync problem
Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.

Re: offset delay in midisync problem

by dallegre on Sun Feb 10, 2013 5:41 pm

I have the same problem. Have a x0xb0x synced to ableton with an mbf503 also attached via the midi though on the x0xb0x.

The mfb syncs up perfectly. Spot on every time with zero software delay necessary. The x0xb0x needs 30ms delay to sound right.

It's not the software. It's not the interface. It's the x0xb0x.

Reaper does the same thing. There's also no significant latency when sending midi notes to the x0x in "midi in play" mode or whatever it is. The sync latency is also constant over different tempos from the DAW. Updated to 1.05 and sokkos 1.9.1, still no dice.
dallegre
 
Posts: 1
Joined: Sun Feb 10, 2013 5:34 pm

Re: offset delay in midisync problem

by jmejia on Sat Feb 16, 2013 2:13 pm

I have the same problem with my x0xb0x and I'm NOT using software in my chain at all.

I get a delayed start (1 tick I think) from my octatrack - and/or from my mpc. The x0x is one tick behind which isn't super obvious at a normal (120-125sh) bpm.. but it is noticable, and when I chain drum machines off it it's VERY apparent. Example setup: octatrack master, midi clock out to x0xb0x, midi thru to a drum module, and din sync out of the x0x to tr808. The drum hits that are midi notes sent to the module are right on time with the octatrack, the x0x is slightly late, an the 808 is slightly late.. overlapping kick drums sound phasey at 130, flammed at 120, and a whole beat behind at much slower tempos.

I have seen posts all over the forum about this and people often blame software.. but something is wrong with the midi start receieve on the x0x. I've tried many different firmware - same problem on all of them. Currently I'm on the latest sokkos.

I'm super frustrated here - anyone have any knowledge on this?
jmejia
 
Posts: 11
Joined: Mon Aug 25, 2008 4:15 pm

Re: offset delay in midisync problem

by aminoacid on Sun Feb 17, 2013 9:26 pm

Just some random suggestions...

If using ableton, you have to choose the right midi setting (song/pattern) and midi delay compensate.

Try a different midi cable.

Try heating some solder joints ön some caps and resistors around the micro (i think this actually helpd Me once)
aminoacid
 
Posts: 352
Joined: Tue Jun 20, 2006 5:27 am
Location: acidburg

Re: offset delay in midisync problem

by jmejia on Wed Feb 20, 2013 5:51 pm

I'm not using software.

This is a firmware problem. It's all over the forums. I'm not the only one. I don't see how reflowing solder would help a consistent 1 tick behind start issue.

This apparent consensus oversight is baffling me....
jmejia
 
Posts: 11
Joined: Mon Aug 25, 2008 4:15 pm

Re: offset delay in midisync problem

by aminoacid on Wed Feb 20, 2013 6:50 pm

Whats a tick?

Midi is built on soft and hardware so any cold solder joint can screw anything.

Im using sokkos and syncing with some hardware. Works god for many years.

But i do recall having some random issues. This prob had to do with old firmware and/or loose solder joints.
my machines kills fascists!
aminoacid
 
Posts: 352
Joined: Tue Jun 20, 2006 5:27 am
Location: acidburg

Re: offset delay in midisync problem

by antto on Wed Feb 20, 2013 6:52 pm

yes, i suspect midisync has a bug with the start/stop and how it should behave according to what the MIDI specification is saying about it
but it's kinda hard for me to debug it at this stage
and even if the bug is fixed, it might not fit into sokkos since it uses every available byte from the flash space

this bug however is going to be hunted down in the CPU mod, since size is no excuse there
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. http://forums.adafruit.com/viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: http://forums.adafruit.com/viewtopic.php?f=12&t=24759 (do it the EASY way)

antto
 
Posts: 1547
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: offset delay in midisync problem

by evilgap on Wed Apr 12, 2017 5:20 am

exactly the same problem here..
i have x0x slaved to the octatrack and when i hit play on ot - x0x sequencer starts delayed, although there is no latency when i trigger the x0x notes from the ot.

has anyone got more clues?

evilgap
 
Posts: 9
Joined: Mon Apr 10, 2017 4:53 am

Re: offset delay in midisync problem

by antto on Fri Apr 14, 2017 4:47 pm

test whether the issue is related to clock counting
you can test that by slowing the tempo down a lot, the time difference would then grow as well

also try another firmware

antto
 
Posts: 1547
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: offset delay in midisync problem

by evilgap on Sat Apr 15, 2017 8:15 am

antto wrote:test whether the issue is related to clock counting
you can test that by slowing the tempo down a lot, the time difference would then grow as well

also try another firmware


the delay time increases significantly when reducing the tempo.
i did not know what firmware my unit was running, so i tried sokkos 2.0 and maros 1.5.0. none of them have fixed the issue :(

evilgap
 
Posts: 9
Joined: Mon Apr 10, 2017 4:53 am

Re: offset delay in midisync problem

by antto on Sat Apr 15, 2017 11:34 am

so if it increases when you lower the tempo - it's probably related to clock counting
so there are a few possible cases:
1) the x0xb0x sequencer is not counting properly
2) the sync master is not counting properly (running in advance) or not generating the sync clock properly
3) a combination of both

are you syncing via midisync or dinsync?

antto
 
Posts: 1547
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: offset delay in midisync problem

by evilgap on Sat Apr 15, 2017 7:01 pm

antto wrote:so if it increases when you lower the tempo - it's probably related to clock counting
so there are a few possible cases:
1) the x0xb0x sequencer is not counting properly
2) the sync master is not counting properly (running in advance) or not generating the sync clock properly
3) a combination of both

are you syncing via midisync or dinsync?


dinsync works fine, i use it with tr-606, has no issues.
problem is only present when x0xb0x is slaved to octatrack with midi in.
there is no latency when x0xb0x is a clock master, but for my setup, i need x0x to be a slave device.

evilgap
 
Posts: 9
Joined: Mon Apr 10, 2017 4:53 am

Re: offset delay in midisync problem

by antto on Sun Apr 16, 2017 6:11 am

okay i just dug out my old cpu to test this
flashed sokkos2(atmega162) from viewtopic.php?f=13&t=43270

for a clock master i used my other x0xb0x running n0nx0x2, midisync from it going to Korg ES-1 (for reference) and also to the sokkos2 x0x

for some reason the patterns were playing with quasi-random pitches o_O maybe the cpu doesn't make decent contact in the socket, or its related to the memory (the memory contents are from n0nx0x2)

conclusion: it ran late, consistently missing (not properly counting) one MIDI_CLOCK message
for reference: n0nx0x2 has been tested with a bunch of other "respected" gear in both master/slave scenarios, via MIDIsync, dinsync, and sync conversion, and so far there are no evidence for bad clock counting

and while at it, i also tested it in master scenario, just ran the MIDI output from sokkos2 into the Korg ES-1
conclusion: it ran properly, no clocks were miscounted

so there's an issue when it's slaved to midisync

antto
 
Posts: 1547
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: offset delay in midisync problem

by evilgap on Sun Apr 16, 2017 6:26 am

antto wrote:okay i just dug out my old cpu to test this
flashed sokkos2(atmega162) from viewtopic.php?f=13&t=43270

for a clock master i used my other x0xb0x running n0nx0x2, midisync from it going to Korg ES-1 (for reference) and also to the sokkos2 x0x

for some reason the patterns were playing with quasi-random pitches o_O maybe the cpu doesn't make decent contact in the socket, or its related to the memory (the memory contents are from n0nx0x2)

conclusion: it ran late, consistently missing (not properly counting) one MIDI_CLOCK message
for reference: n0nx0x2 has been tested with a bunch of other "respected" gear in both master/slave scenarios, via MIDIsync, dinsync, and sync conversion, and so far there are no evidence for bad clock counting

and while at it, i also tested it in master scenario, just ran the MIDI output from sokkos2 into the Korg ES-1
conclusion: it ran properly, no clocks were miscounted

so there's an issue when it's slaved to midisync


well yeah :D this sounds exactly the same as my problem. so i guess there's no fix for this?

evilgap
 
Posts: 9
Joined: Mon Apr 10, 2017 4:53 am

Re: offset delay in midisync problem

by antto on Sun Apr 16, 2017 6:52 am

this seems like a common bug in MIDIsync implementations, it probably originates from the stock firmware, and it has made its way into the modified variants (sokkos, etc..)

the whole sync scheme in the stock firmware is weird
the code deals with external midisync, external dinsync, and internal sync generation all in sepparate ways (you can see that has even reflected itself on the FUNC selector)
so it's not easily fixable
btw, speaking of convoluted FUNC selector and sync bugs, the Yocto sequencer also suffers from this sort of thing - it works acceptably as a master, but doesn't count properly when it's slaved

an easier thing to do is to rewrite the sync-related stuff so that all the different kinds of sync are handled equally, then if it's counting clocks improperly - it would be doing so in all scenarios (so it'll be easy to diagnose) and it can be fixed from one single place
that's what was done in n0nx0x2

i think at least two other recent and popular firmwares are derived from sokkos (maros and omskos), which would also contain this bug (if they haven't fixed it)

it might be possible to fix the issue, but this might introduce other bugs if not done carefuly
sadly if you fix it in sokkos, this doesn't mean that you can use the same "fix" to fix the other firmwares derived from it
some (most?) of these firmwares have funky things like shuffle, adjustable gate length, and other such stuff which is tied to the sync code and/or clock counting

"unifying" the sync handling (like i did in n0nx0x2) is a drastic change and (depending on how it's done) limits how crazy you can go with certain things

antto
 
Posts: 1547
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: offset delay in midisync problem

by evilgap on Sun Apr 16, 2017 6:59 am

antto wrote:this seems like a common bug in MIDIsync implementations, it probably originates from the stock firmware, and it has made its way into the modified variants (sokkos, etc..)

the whole sync scheme in the stock firmware is weird
the code deals with external midisync, external dinsync, and internal sync generation all in sepparate ways (you can see that has even reflected itself on the FUNC selector)
so it's not easily fixable

an easier thing to do is to rewrite the sync-related stuff so that all the different kinds of sync are handled equally, then if it's counting clocks improperly - it would be doing so in all scenarios (so it'll be easy to diagnose) and it can be fixed from one single place
that's what was done in n0nx0x2

i think at least two other recent and popular firmwares are derived from sokkos (maros and omskos), which would also contain this bug (if they haven't fixed it)


it's a shame i can't install nonx0x2 on my unit, but thanks for the info anyways!
i hope this bug will be fixed someday.

evilgap
 
Posts: 9
Joined: Mon Apr 10, 2017 4:53 am

Please be positive and constructive with your questions and comments.