greyboxaudio / SG-323

Ursa Major Stargate 323
GNU General Public License v3.0
43 stars 1 forks source link

Looping in Reaper causes mayhem o.O #14

Open greyboxaudio opened 1 year ago

greyboxaudio commented 1 year ago

apparently this also happens in Ableton 10.1.43 on Windows 10 and in projects at 48kHZ. Need to investigate.

greyboxaudio commented 1 year ago

finally found the root of the issue and am working on a patch

maxxatgit commented 1 year ago

This plugin sounds GREAT! I am a Reaper user, so I do hope you find a solution to this issue.

Many thanks!

maxxatgit commented 1 year ago

Just a quick note, there are a lot of great coders in the Reaper community. Most are supportive and willing to help. Justin (the main Reaper dev) occasionally comments and offers advice/solutions as well. The developer forum is here: https://forum.cockos.com/forumdisplay.php?s=c4722b0d4fccb159ca13bb96d78dc7b7&f=3

greyboxaudio commented 11 months ago

Thanks! It will probably be a couple of months before I'll have time to work on the code again, but I'll definitely ask in the Reaper forums next year.

maxxatgit commented 6 months ago

Hi! Offering a friendly reminder of this issue. Here is a recent bug report where Justin actually reached out to a Linux dev to solve the problem: https://forum.cockos.com/showthread.php?t=290406

greyboxaudio commented 6 months ago

Thanks for the reminder. I'm actually working on a rewrite of the delay algorithm. The current implementation is woefully inefficient because it's working on a single sample at a time and I'm also running into several issues with the development for aax.

maxxatgit commented 2 months ago

Greetings! Would it be possible to release an update for the non aax versions?

greyboxaudio commented 2 months ago

I just recently made an attempt to fix the overflowing feedback buffer but haven't had much success yet (it's in the feedback-fix branch). This would definitely be easier if someone with more juce debugging experience than me could contribute.

maxxatgit commented 2 months ago

I just posted this on the Linux Musicians forum. Lots of experienced people there. I hope someone can help (I'm not a coder).

https://linuxmusicians.com/viewtopic.php?t=27461

shimpe commented 1 month ago

I haven't tried to actually simulate or debug any problem in this code, but one fishy line of code caught my eye (I don't know anything about the algorithm you're implementing, so maybe the code is completely innocent, but I've had similar problems in completely different code bases before and they are notoriously difficult to find...):

    long writePosition = static_cast<int>(calculateAddress(rowInput, columnInput));

If writePosition is long, you should probably implement all of the calculateAddress internals using long directly and not cast to int anywhere. This reads like the kind of stuff that could overflow at some point, then result e.g. in a negative number being stored in the writePosition and then cause a crash due to accessing buffers out of bounds.

If nothing else, perhaps worth giving a try?