kmatheussen / radium

A graphical music editor. A next generation tracker.
http://users.notam02.no/~kjetism/radium/
GNU General Public License v2.0
843 stars 36 forks source link

audio cuts out below a certain threshold #1424

Closed ghost closed 8 months ago

ghost commented 8 months ago

1. Steps to reproduce the problem.

2. Which version of Radium are you using? Do you know if an earlier version has worked?

latest commit

3. If relevant, which operating system did you run Radium on?

pop!_os. i'm using pipewire, though i also encountered this bug under jack. this does not affect other programs i've tried (ardour and lmms)

ghost commented 8 months ago

changing the internal block size doesn't change the cutting, however if i set it to 64 instead of a click there is a strange zipper noise

so maybe this has something to do with the block size?

kmatheussen commented 8 months ago

Have you tried more than one compressor?

On Wed, Jan 10, 2024 at 1:49 AM acheney @.***> wrote:

changing the internal block size doesn't change the cutting, however if i set it to 64 instead of a click there is a strange zipper noise

so maybe this has something to do with the block size?

— Reply to this email directly, view it on GitHub https://github.com/kmatheussen/radium/issues/1424#issuecomment-1884020187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIX3J4NZCAV456MT4X53U3YNXQS3AVCNFSM6AAAAABBSEVLZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGAZDAMJYG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kmatheussen commented 8 months ago

(sorry, forget last question, I didn't read the description well enough)

On Thu, Jan 11, 2024 at 2:46 PM Kjetil Matheussen @.***> wrote:

Have you tried more than one compressor?

On Wed, Jan 10, 2024 at 1:49 AM acheney @.***> wrote:

changing the internal block size doesn't change the cutting, however if i set it to 64 instead of a click there is a strange zipper noise

so maybe this has something to do with the block size?

— Reply to this email directly, view it on GitHub https://github.com/kmatheussen/radium/issues/1424#issuecomment-1884020187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIX3J4NZCAV456MT4X53U3YNXQS3AVCNFSM6AAAAABBSEVLZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGAZDAMJYG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kmatheussen commented 8 months ago

I think I can reproduce it. Can you check the attached song and see if we are talking about the same thing? popsout.rad.gz

ghost commented 8 months ago

I think I can reproduce it. Can you check the attached song and see if we are talking about the same thing? popsout.rad.gz

yes! this is it

kmatheussen commented 8 months ago

I'm boosting volume by 35dB though! Which is a lot. I wonder if other DAWs using 32 bits float internally handles this... Need to check Ardour or something.

On Thu, Jan 11, 2024 at 3:25 PM acheney @.***> wrote:

I think I can reproduce it. Can you check the attached song and see if we are talking about the same thing? popsout.rad.gz

yes! this is it

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kmatheussen commented 8 months ago

No, it's probably something else. I can almost hear when the velocity reaches 9, and definitely when it reaches 5. Really strange.

kmatheussen commented 8 months ago

(I meant to write: I can almost hear a click when velocity reaches 9, and definitely when it reaches 5.)

kmatheussen commented 8 months ago

popsout.rad.gz

kmatheussen commented 8 months ago

Have to do something else now, but here's a dirty quick-fix. Unfortunately it causes all meters to show full volume, plus that it disables various optimizations that may cause higher CPU usages, but at least it sounds correctly I think.

diff --git a/audio/SoundProducer.cpp b/audio/SoundProducer.cpp
index e8c0fcddb..532b5b8d6 100644
--- a/audio/SoundProducer.cpp
+++ b/audio/SoundProducer.cpp
@@ -526,7 +526,10 @@ static float RT_get_max_val(const float *array, const int num_elements){

 #else

-#define RT_get_max_val JUCE_get_max_val
+//#define RT_get_max_val JUCE_get_max_val
+static float RT_get_max_val(const float *array, const int num_elements){
+  return 1.0;
+}

 #endif
kmatheussen commented 8 months ago

Should be fixed now.

kmatheussen commented 8 months ago

And thank you very much for reporting the bug. I guess this one was hard both to find and to fix. The same problem existed in the demo song (the first one), I think, but I didn't know where to start trying to find out what's happening.

kmatheussen commented 8 months ago

Just checked the demo song before and after, and before you can clearly hear the bug after the song had ended but fading out.