surge-synthesizer / stochas

The Stochas Sequencer
https://stochas.org
GNU General Public License v3.0
404 stars 35 forks source link

Stochas hangs in FLStudio when playing song finish and jumps to the beginning. #76

Closed parduz closed 3 years ago

parduz commented 3 years ago

I've set a pattern in Stochas, made it start playing at 17th bar using the C6 key in its track. Everything works well when i start/stop/jump around in the song, but when the bar reaches the end of the song and jumps back to the very beginning FLStudio hangs for about 4-5 seconds, with a peak in the CPU meter. If meanwhile i press the stop button, at the end of that hangs i get a short "burst" of audio, then the song playing stops and i can recommence. If i don't stop, after that short burst FL hangs definitely and i can only kill it. I deleted one VST after all until everything worked as normal when i deleted Stockas.

I repeat: this happens only when the songs play jumps from the end to the beginning. Playing in patterns mode does not have any problem.

rudeog commented 3 years ago

Is this FLStudio on Windows? If so, can you share a flstudio project (or exact steps to create one where the problem occurs).

parduz commented 3 years ago

Sure, here it is.

Stochas bug.zip

It includes https://www.kvraudio.com/product/drumatic-3-by-e-phonic as a receveir of the Stochas events.

rudeog commented 3 years ago

Thanks for the project. I appreciate it. I've managed to reproduce this in the debugger. It seems to occur only with manual playback, and I get a bunch of assertions because the playback position is negative. Probably FL when looping back around allows this value to be negative. I should probably be able to fix this soon.

parduz commented 3 years ago

Great! thanks!

Probably FL when looping back around allows this value to be negative.

Could it 'cause delay compensation? I (vaguely) know that FL Studio manages the delay that each plugin "declares" to have.... Dunno, really :D

Thanks again.

rudeog commented 3 years ago

It turns out that this is a problem with manual playback start position being later than current position when looping back. So it has nothing to do with FL studio specifically (also is a problem on other hosts), it's just that FL studio seems to have a worse reaction. I should hopefully have a fix for this today or tomorrow.

rudeog commented 3 years ago

This is now fixed in the latest developer release.

parduz commented 3 years ago

This is now fixed in the latest developer release.

Is the latest one the Dev Release 2021-06-01 31e65cb?

'cause if is it, then the problem is still there.

rudeog commented 3 years ago

Yep that should include it. The developer download link you should be looking at is https://github.com/surge-synthesizer/stochas/releases/download/developer/stochas_windows_installer.exe and you should see 1.3.5.HEAD.31e65cb when you go to the settings tab in Stochas. I just downloaded, installed it and tested against your test project (which was previously crashing, but now loops and plays fine). If you are still seeing the issue with that version, then we'd have to see what other settings differ between our environments.

parduz commented 3 years ago

You're right, my test project now works. But, please, slide the pattern that starts Stochas to bar 6, and the last of the empy ones at bar 9 and it will hangs again:

image

The only difference is that i downloaded the zip file and overwritten the previous VST3 file, i've not run the installer again.

parduz commented 3 years ago

Also, pls check about the first note in the Stochas pattern being played double when the bar loops back and/or when it pass on the "play note" again. To me is clearly audible that the first note is doubled.

Thanks :)

rudeog commented 3 years ago

Ok, should be fixed now. I have opened a separate issue for the double triggering, as I was not able to isolate it, however I did reproduce it intermittently.