Bug Description:
I discovered Surge a few days ago.
In the process of making a patch while getting to know the synth I came across some strange behaviour. I don't know if it's user error, intended behaviour or a bug.
Anyway;
S-SEQ seems to skip steps/play the sequence backwards,...or in another way different each pass/loop. You can remedy this behaviour by making the sequence 5 steps long, so it 'skips' the 5th step. But when you want to use a 16 step sequence there is no 17th step to use this methode.
Surge Version
Reproduction Steps:
Go to an S-LFO (in my instance S_LFO5)
set the rate to synced: 1/2 note
Phase/shuffle: 0%
Amplitude: 100%
Deform: 0%
Freerun on
Unipolar on
Step seq on
Select 4 steps in the window: (start marker in front of first step, end marker after 4th step)
First step at 100%, second step at 0%, step 3 at 50% and step 4 at 0%
assign the S-SEQ to scene pitch. (for instance)
Expected Behavior:
I expect the Sequence to be played from start to finish, all steps that are selected, in order, in a loop.
As said, if, in the previous example, when you select 5 steps the outcome of selecting 4 steps will occur.
Screenshots:

Computer Information (please complete the following information):
Additional Information:
Reaper file as an example in ZIP folder:
Freerun mode might be tripping you up. If you want the sequence to always start exactly at step 1, you need to set LFO trigger mode to Keytrigger. In Freerun mode the LFO virtually keeps on running based on song position pointer.
I tried out this sample project and it does appear to be a bug to me as well.
The sequence in his Freerun sequencer is four steps long and set to 1/2 notes, so it should repeat every two bars regardless of note input right?
This doesn't seem to be happening.
The sequence plays the 4 steps once in order and then plays the steps in a different order two times:
step 2, step 3, step 4, step 1
step 3, step 4, step 1, step 2
And this restarts on bar 7.
It's not lining up with the song position as expected.
Sounds like there's a problem with songpos and step sequencers with loop points set. Let me tag this into the 18 milestone to look.
Yeah I can definitely get it to do the wrong thing in reaper vst3 with freerun step sequencers
I'll look in the next few days or so. But there's some real bug here.
The bug might be that the VST3 song position is incorrect. I'll test in logic also when I get a chance.
Freerun mode might be tripping you up. If you want the sequence to always start exactly at step 1, you need to set LFO trigger mode to Keytrigger. In Freerun mode the LFO virtually keeps on running based on song position pointer.
I don't want it to retrigger every keypress, I want it to repeat over and over like a looper, hence freerun. As other stated, it loops, but it mangles up the order of the steps.
I tried out this sample project and it does appear to be a bug to me as well.
The sequence in his Freerun sequencer is four steps long and set to 1/2 notes, so it should repeat every two bars regardless of note input right?
This doesn't seem to be happening.The sequence plays the 4 steps once in order and then plays the steps in a different order two times:
step 2, step 3, step 4, step 1
step 3, step 4, step 1, step 2
And this restarts on bar 7.
It's not lining up with the song position as expected.
It's not even that organized, I've had it go
step 3, step 1, step 2, step 4 as well.
I haven't found the exact order of the mangling yet. I've been convinced that it played backwards, phase switched,...
I'll give it a go with a melodic sequence some time later, that way it should be easier to hear what it does exactly.
Yeah it’s definitely off in the vst3. The attack from songpos is wrong somehow. Need to check the au and debug it which I can do soon. Thanks for the excellent report!
The sequence in his Freerun sequencer is four steps long and set to 1/2 notes, so it should repeat every two bars regardless of note input right?
This doesn't seem to be happening.
That is some other quirk, in synced mode it's not the step length you set, but rather the fase length? Anyway when you choose 1/2 note, 2 steps equal a 1/2 note. So 4 steps is one bar 4/4 instead of 2 bars 4/4.
But I guess that's more of a quirk then a bug. It might however be part of the problem. If under the hood the software expects 1/2 note to be one step in one place and 2 steps in another.
Thanks for the excellent report!
You're welcome, but more importantly: thank you, love the support!
@TomC-SyncA can you share the surge preset?
So on the rate: For the LFOs other than env and step sequencer, one phase is one cycle. For env the rate concept doesn't really apply. And for SS the rate is setting the duration of one step, not one cycle.
@K0rrid0r here's the one I made which I could make do the wrong thing super easily in VST3 reaper. Haven't had a chance to check AU logic yet. If you want to see if it works VST2/FL that would be super handy. Basically I put a 3 beat note and then next to it another 3 beat note and the second 3 beat note is in the wrong place in the SS when it triggers. (If I put in a 6 beat note it does the right thing). So the attack phase (where we read th esongpos to get the step) is doing something wrong.
@TomC-SyncA can you share the surge preset?
The included zip file should contain a reaper project with the correct settings. Or did you mean something else?
I need the .fxp file that is generated by surge itself when you "store" a preset.
Paul shared his, buts let's try your original one also.
Also it's good to try this issue over different daws.
AU has the same problem LPX Mac
So we must be mis-interpreting songpos in the attack
I should be able to find this pretty easily
Oooh it's not just the step sequencer which is off
Make a square wave S-LFO
don't temposync it and set the rate to something which doesn't line up with your beat (I chose 0.45hz and 170bpm)
set it in freerun
Modulate pitch
Now in your midi window draw a middle C for 2 measures, then a middle C for 3 beats adjacent, then a middle C for 5 beats adjacent
The note switches should not be audible in the modulation
But they are
Ha even better: in that case if you add a second note for 4 measures (so you have a chord) the S-LFO doesn't retrigger and it works.
So something something SLFO Retrigger something something is the answer here.
Wonder if a VLFO does the same? Checking.
Right so a VLFO in freerun mode acts like the SLFO without the chord.
So it seems: freerun mode is pretty broken!?
@K0rrid0r can you play around with it and see if it is doing what you expect?
I need the .fxp file that is generated by surge itself when you "store" a preset.
Paul shared his, buts let's try your original one also.
Also it's good to try this issue over different daws.
Yep figured it out, I was in transit and not thinking straight ;)
I'm home now, here's mine:
1st.zip
Original BPM was set at 100
I've confirmed that songpos is set correctly AU and VST3; so it must just be the calculation in LFOModulationSource has it wrong. Super close.
double ipart; //,tsrate = localcopy[rate].f;
phase = (float)modf(
phaseslider + 0.5f * storage->songpos * pow(2.0, (double)localcopy[rate].f), &ipart);
int i = (int)ipart;
that 0.5 is, I think, 60/120. And at 120bpm my single LFO version works.
So i think that code is just wrong.
Seems like I got you guys allot of work, sorry for that ;)
nah i'm close. will have it fixed this morning.
PR above fixes it.
Should be in the nightlies later this morning.
Thanks for the report. This was a real and an important bug. I'm amazed we hadn't caught it before.
Ok, going to work out how to install the nightly.
Cheers and thx for the update!
Yup. Found one more edge case so hold off. I'll put instructions on this issue when it's merged.
So for @K0rrid0r and @mkruselj here's the state in 1.7.1
With above that's all fixed.
I think people didn't notice this perhaps because tempo synced freerun LFOs worked just fine. But still a real bug.
@TomC-SyncA you can get the nightly any time at https://surge-synthesizer.github.io/nightly but it usually takes 30 minute or so from merge to update. So check back later this morning. (or later this 'whatever time period it happens to be wherever you are in the world; it is morning in new york right now').
OK all merged and fixed. @TomC-SyncA when that nightly page says "4623dbbca" you are good to go (or really if it says anything other than drag n drop fx, which is the commit before fix). Probably about 30-40 minutes from now.
works great! thx!