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 rv0 on Tue Apr 18, 2017 7:09 am

evilgap wrote:it's a shame i can't install nonx0x2 on my unit, but thanks for the info anyways!

you can.. but it's not free as you need the x0xlarge cpu and a panel.

rv0
 
Posts: 383
Joined: Tue Jul 14, 2009 4:50 pm

Re: offset delay in midisync problem

by Nordcore on Wed Apr 26, 2017 5:33 pm

antto wrote: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)


In maros 1.5 I did a major rework of the code.

Even if some parts look similar to what was there before, the complete timing is rearranged.
I changed the code to have one main loop doing all the work, the interrupts just fill or empty buffers and set some flags.
This removed a ton of synchronization problems.

I eliminated all "nearly duplicated" code parts, as most of them where not complete (lacking features in some modes) and contained different bugs. So I did one version, removed the bugs and upgraded to all needed features. This code is slightly longer than one of the originals, but in total it is shorter. And you don't have this strange behavior that some things do work, for example, in play but not in edit.

The midi state engine is now complete and really keeps track with the midi state. Same in all modes - as there is only *one* receiver function.
As we need the midi clock anyway in a global way, there really is not much sense in reading midi bytes directly. My implementation reads the interface, processes the real time data and midi "running status", and just puts the resulting rest (note on/off, wheel...) in a buffer, from where the consumers (selected by our beloved mode switch) will evaluate them.

I'm not sure if the maros 1.5 does fix the problem here, but its worth a try.

Nordcore
 
Posts: 71
Joined: Sat May 23, 2015 3:14 pm

Re: offset delay in midisync problem

by evilgap on Thu Apr 27, 2017 6:23 am

Nordcore wrote:
antto wrote: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)


In maros 1.5 I did a major rework of the code.

Even if some parts look similar to what was there before, the complete timing is rearranged.
I changed the code to have one main loop doing all the work, the interrupts just fill or empty buffers and set some flags.
This removed a ton of synchronization problems.

I eliminated all "nearly duplicated" code parts, as most of them where not complete (lacking features in some modes) and contained different bugs. So I did one version, removed the bugs and upgraded to all needed features. This code is slightly longer than one of the originals, but in total it is shorter. And you don't have this strange behavior that some things do work, for example, in play but not in edit.

The midi state engine is now complete and really keeps track with the midi state. Same in all modes - as there is only *one* receiver function.
As we need the midi clock anyway in a global way, there really is not much sense in reading midi bytes directly. My implementation reads the interface, processes the real time data and midi "running status", and just puts the resulting rest (note on/off, wheel...) in a buffer, from where the consumers (selected by our beloved mode switch) will evaluate them.

I'm not sure if the maros 1.5 does fix the problem here, but its worth a try.


i tried it again to make sure and it doesn't seem to work.
with maros 1.5 in midi sync mode when x0xb0x recieves start/stop message nothing happens, although sending midi note from my octatrack starts the x0xb0x sequencer (but i'm unable to change patterns while the sequencer is playing)
also i had tr606 connected to x0xb0x through dinsync and with sokkos at least x0xbox and 606 were in perfect sync and now even 606 messed up.

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

Re: offset delay in midisync problem

by Nordcore on Thu Apr 27, 2017 6:46 am

Did you set up the midi start/stop behavior to "classic"?
(In "USER C" mode (=configuration setting), select setting bank "D#". Setting "C" Led must be ON, this is *not* default. See documentation for details.)

The so called "advanced" mode, which is default would give you the behavior you observed.

(And no, I did not decide to make "advanced" the default ... )

Nordcore
 
Posts: 71
Joined: Sat May 23, 2015 3:14 pm

Re: offset delay in midisync problem

by evilgap on Thu Apr 27, 2017 7:10 am

Nordcore wrote:Did you set up the midi start/stop behavior to "classic"?
(In "USER C" mode (=configuration setting), select setting bank "D#". Setting "C" Led must be ON, this is *not* default. See documentation for details.)

The so called "advanced" mode, which is default would give you the behavior you observed.

(And no, I did not decide to make "advanced" the default ... )


okay now, the classic mode worked for the x0xb0x! lag is gone when in midi sync mode but, the 606 is still messed up, only when a pattern with notes is played on x0xb0x, strangely 606 works fine when i play the empty pattern on x0x, so it seems like 606 is picking up notes from x0x? (i'm not sure if that's even possible) or is every note of the x0x sequence restarting the 606 sequencer?
sorry if all this sounds stupid, i'm just a musician.

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

Re: offset delay in midisync problem

by Nordcore on Thu Apr 27, 2017 7:38 am

I just got a 606 so I *can* check *exactly that* now ... but don't expect that before the weekend ... haven't worked on this for a year or so ... I'll let you know ASAP ...

Note: DIN-SNYC jack does not and can not transmit notes, but it is of course possible to mess it up the way you described (... get some gate signal on the midi jack pins... )
Last edited by Nordcore on Thu Apr 27, 2017 7:41 am, edited 1 time in total.

Nordcore
 
Posts: 71
Joined: Sat May 23, 2015 3:14 pm

Re: offset delay in midisync problem

by evilgap on Thu Apr 27, 2017 7:40 am

Nordcore wrote:I just got a 606 so I *can* check *exactly that* now ... but don't expect that before the weekend ... haven't worked on this for a year or so ... I'll let you know ASAP ...


thanks! looking forward.

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

Re: offset delay in midisync problem

by Nordcore on Sat Apr 29, 2017 6:29 pm

Ok, looks like I had just forgotten to clean out some debugging code ... had used pin 4 & 5 of DIN SYNC jack for some timing checks (if the software runs as I expect it to, how long do some actions take and so on) with the scope. What was put on these pins was complete unrelated to DIN SYNC...
Note: Neither MarOs nor Sokkos nor the Stock firmware do use the pins 4/5 for their regular function, as they are optional in the DIN SYNC world.

EDIT: Version 1.5.1 removed (obsolete), see posting: viewtopic.php?f=13&t=33914&p=583356#p583356 (and following) for solved and unsolved issues and latest version.
Last edited by Nordcore on Fri May 05, 2017 1:54 pm, edited 1 time in total.

Nordcore
 
Posts: 71
Joined: Sat May 23, 2015 3:14 pm

Re: offset delay in midisync problem

by evilgap on Sun Apr 30, 2017 3:39 am

Nordcore wrote:Ok, looks like I had just forgotten to clean out some debugging code ... had used pin 4 & 5 of DIN SYNC jack for some timing checks (if the software runs as I expect it to, how long do some actions take and so on) with the scope. What was put on these pins was complete unrelated to DIN SYNC...
Note: Neither MarOs nor Sokkos nor the Stock firmware do use the pins 4/5 for their regular function, as they are optional in the DIN SYNC world.


hey, i just tried 1.5.1 and it works!
midisync lag: fixed
dinsync problem: fixed

thanks so much!

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

Re: offset delay in midisync problem

by Nordcore on Wed May 03, 2017 2:16 am

Good to hear that it works now.

I worked a little more on the code, read the thread(s) here and found two or three minor issues, which I'll straighten out.

Nordcore
 
Posts: 71
Joined: Sat May 23, 2015 3:14 pm

Please be positive and constructive with your questions and comments.