Sync offset between Seq3 and Logic

When Logic and Seq3 are playing together, say Seq3 is in slave mode, if Logic is played not from the song beginning, a 5 steps delay happens between the two.

Example: Logic is at location 10, then Seq is at location 5/15 and step A1.5 and not A1.1.

Only if a start from the actual beginning, both of them are in exact sync.

If I place Logic at any given location and hit play, Seq3 starts immediately, but starting from location **.5

Strangely enough, the 16 LED sequence are in sync with Logic, but the Song is not, meaning Seq3 is not in sync between the 16 LEDs and the Song position when Seq3 is in slave mode.

Any ideas?

Whomper

Well, after some more checking it seems like a display only problem, where the right LCD is “not in sync” while presenting song pos with the sound or the LED sequence.

Whomper

In Seq2 there was a repeat action of 16 times, but in Seq3 I see only 15 times repeat.

Any reason for that?

Whomper

Yes, I’m aware of this issue - the reason is, that for a proper synchronisation the internal song/step and clock divider counters have to be prepared for the next step, so that the correct step is played with the next incoming MIDI clock. Since Logic can send more song positions in addition (e.g. while scrubbing the song position pointer over the arranger window), I found it more useful to prepare, but not to execute the next step, just to save some CPU time and to prevent unnecessary delays (in worst case, a MIDI In buffer overflow could happen)

Therefore the LCD and LEDs will show the scenario before the actual selected song position - just waiting for the first clock so that the engine will properly update all variables.

Btw.: the receive handler for the song position pointer is not able to recalculate all parameters, especially the progression parameters and the clock dividers - this is too difficult, as there is no simple “formula” which allows to determine exactly such variables based on the song position. You will find a lot of inconsistencies here… :-/

Best Regards, Thorsten.

This is clearly a bug and I will fix this soon. Did you (or anybody else) find other issues which are worth for being fixed in the first “service pack”?

Best Regards, Thorsten.

After some more testing, the issue is even trickier; although the song plays in good sync, the fact that the LCD shows a permanent offset also influences when patterns play.

Imaging an offset of 5 steps, which is a constant one BTW and there is no catchup. As the LEDs play in sync with Logic, the LCD shows a positive delta of 5 steps and thus plays the last 5 steps of the patterns which should switch to before they actually start (5 steps before to be exact).

A1 - 1..15, A2 - 10-15, A2 1-15.

From usability standpoint, it would be great to scrub Logic’s arrange and see how it translates to SEQ3 song structures.

Erez

ok, got it! The whole synchronisation is not working properly anymore, seems that I messed up something during the “last quick changes” this week.

I will check this and propably release a testing build today

Best Regards, Thorsten.

Ok, I think I found the location which needs to be improved.

Could you please try the following: open seq_core.inc, search for “SEQ_CORE_Reset”, and replace all lines between SEQ_CORE_Reset and SEQ_CORE_Reset_NotMaster by:

SEQ_CORE_Reset
;; play off events of all tracks
call	SEQ_CORE_Hlp_PlayAllOffEvnts

;; init the reference counters
SET_BSR SEQ_BASE
setf	SEQ_CLK_TICK_CTR, BANKED
setf	SEQ_CLK_STEP_CTR, BANKED

BIFSET	SEQ_CFG0, SEQ_CFG0_BPM_CLK_SLAVE, BANKED, rgoto SEQ_CORE_Reset_NotMaster
SEQ_CORE_Reset_Master
;; clear all sequencer requests (i.E. a stop event!)
clrf	SEQ_REQ, BANKED

;; cancel all requested clocks (only relevant for master mode)
clrf	SEQ_CLK_REQ_CTR, BANKED
movlw	3
movwf	SEQ_SENT_CLK_CTR, BANKED
SEQ_CORE_Reset_NotMaster
[/code]









For the slave the "clock counter reset" has to be done at a different place, so that it works in all cases. But for a first try this works ok







It would be interesting if this works with your Logic version? (I'm using PC v5.5)







Best Regards, Thorsten.

While reviewing the code, I noticed that the song position parser can be realized on a much more robust way by moving it into the NotifyRx handler of MIOS (which will be triggered immediately on received events)

For a quick test, I scrubbed over the arrange window of Logic at various BPM rates, and the sequencer always got in sync with Logic again - so I think that it’s working stable now :slight_smile:

The release candidate can be downloaded from this location:

http://www.ucapps.de/tmp/midibox_seq_v3_0a_rc1.zip

Please note: I also added the “x16 loop action”, which means, that songs have to be overworked.

“jump pos” is shifted to x16

“jump song” is shifted to “jump pos”

“mixer map” is shifted to “jump song”

So - songs have to be adapted if they are using these actions! Just increment the action by one

Best Regards, Thorsten.

Thanks for the quick patch!

I have tested it, and the seq still always starts at step 5 of the pattern. Is there a setting I might need to tweak?

Thanks for the x16!

Whomper

This should also work now (step position counter was divided by 4 on incoming song position messages from Logic)

-> http://www.ucapps.de/tmp/midibox_seq_v3_0a_rc3.zip

Best Regards, Thorsten.

Thanks!

From preliminary testing, it works like a charm!

Whomper

Now that the slave mode synchronizers correctly, there is one issue I had noticed; when switching patterns, the first step or two does not play right after the switch, rather only after a full pattern cycle is finished, then all plays correctly.

Whomper

Thanks for testing! I wasn’t able to reproduce this yet, but I will try this again with different sequencers after my holiday. So, a new release candidate can be expected in ca. 2 weeks

Best Regards, Thorsten.

As the ratio of patterns vs. songs is in favor of patterns (i.e. you get tons of patterns, but only 16 songs, or 32 in a future revision with 512 backstick) It would be great if there will be an option to assign other banksticks in the format section to Song as well. That way, the user will have the choice for more songs in favor of patterns.

Whomper

Another issue that is worth testing is as follows:

Pat A1; track 1 is 32 steps. Song 1 has Pat A1 looping x 16.

If I start Logic at measure 2, Pat A1 starts playing from Step 1 instead of step 17.

Whomper

Copy:

When using copy with pattern that has more than 16 steps, there is no way to set the right boundary as the rightmost rotary is 16.

Paste:

I have copied an 8 step sequence from a track that is 16 steps long, extended the length to 32 and hit paste, the track length reverts to 16 steps although I have copied only part of it. There should be a difference between copying a part of a pattern, by which only the relevant steps with their associated info like volume should be copied to the scenario where I had requested to copy an entire track.

Whomper

If you start it at measure 3 or 4, does the track play from step 1 or step 17?

When changing a pattern in one of the groups per any given Pos, if the cursor is left on the pattern change (i.e. it blinks) and the Seq starts playing (Start button or slave seq), then the entire group is empties from start position till song end.

Whomper

Hey whomper I think it’s awesome that you’re giving these bug reports for v3, but it might be best to put them all in the same thread, so that when TK returns he can see them all quickly and easily :slight_smile: