kmatheussen / radium

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

[Bug] LV2 MIDI plugins with no audio outputs, combined with automation, the warning window pops up on almost every play #1437

Open kramlie opened 4 months ago

kramlie commented 4 months ago

1. Steps to reproduce the problem.

  1. Start Radium.
  2. Make a "MIDI messages" module
  3. Make an LV2 module that has no audio outputs. I use the "MIDI CC Map" by Robert Gareus, available on Ubuntu in the x42-plugins package. However, I have tested many plugins, it seems that any LV2 plugin without audio outputs will do.
  4. Connect the first module to the second with a MIDI connection.
  5. Set the MIDI Messages Damper (cc=64) to any value except the NoValue.
  6. Add an automation point in the editor track for the MIDI Messages Damper (cc=64).
  7. Play song from the beginning using AltGr + Space. This works.
  8. Play song from the beginning using AltGr + Space again. This soft crashes for me.

Alternatively, you can also load the track I have provided here: crash-example.rad.gz

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

Radium version 7.4.79. I have not tested earlier versions.

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

Ubuntu 20.04 x86_64.

kmatheussen commented 4 months ago

Thanks for the thorough report. I'm not able to reproduce though. Maybe you can make a more complicated example that is more likely to reproduce the warning? Also, maybe you can just paste the output of the warning window here? (I didn't get an email in case you clicked "Send", sometimes the email server doesn't work, although it seems to work right now.)

kramlie commented 4 months ago

Thanks for the quick reply!

Darn, I thought the example was a sure thing, so I skipped the app-report to keep the noise level down. I have sent it now!

kmatheussen commented 4 months ago

Thank you. Got it. Yes, I've seen that one a few times. But I don't understand what happens. I probably need to be able to reproduce it.

Maybe these configurations can make me reproduce it:

  1. What internal blocksize do you use? (Preferences -> Audio)
  2. Do you use jack for audio?
  3. Which samplerate do you use?
  4. Which audio buffer size do you use?

On Tue, Jul 16, 2024 at 8:39 PM kramlie @.***> wrote:

Thanks for the quick reply!

Darn, I thought the example was a sure thing, so I skipped the app-report to keep the noise level down. I have sent it now!

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

kramlie commented 4 months ago
  1. 64.
  2. Yes. But I tried without Jack, and indeed the problem is gone then.
  3. 44100.
  4. 256.
kramlie commented 4 months ago

What the...

Github really messed up the rendering there. Again:

  1. Blocksize: 64
  2. Running with Jack. But I tried without Jack, and indeed the problem is gone then.
  3. Samplerate: 44100
  4. Audio buffer size: 256
kmatheussen commented 4 months ago

Hmm! I still can't reproduce it. Can you post which version of jack you are using, and the command line you use to start jack? Also, can you try to temporarily rename your ~/.radium catalog to something else, and see if the problem goes away?

kramlie commented 4 months ago

Also, can you try to temporarily rename your ~/.radium catalog to something else, and see if the problem goes away?

Nice, this worked!

I'll dig a little bit, diff the configs and see if I can find out which option is causing it.

kmatheussen commented 4 months ago

Maybe jack transport? (under preferences -> sequencer)

On Wed, Jul 17, 2024 at 10:42 AM kramlie @.***> wrote:

Also, can you try to temporarily rename your ~/.radium catalog to something else, and see if the problem goes away?

Nice, this worked!

I'll dig a little bit, diff the configs and see if I can find out which option is causing it.

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

kramlie commented 4 months ago

Yes, that's it!

I am indeed using Jack1 :see_no_evil:, even though Radium advises me not to. Unfortunately, for reasons unrelated to Radium, I'm not able to upgrade to Jack2 at this time, at least not without significant effort. It has worked perfectly well apart from this issue though. Do you think Jack1 could be the reason, or is it the Jack transport in general?

PS! The reason I had it on in the first place is because of #1436. I was trying to record MIDI into a different DAW, export it as a MID file, and then import that into Radium. An extremely inconvenient workaround, but it does work. That is, except for the crash we're talking about above.

kmatheussen commented 4 months ago

Yes, I can reproduce it with jack2. It seems to always happen when jack transport is enabled. I did try to enable jack transport earlier, don't know why I didn't see it then, but I see it now.

Anyway, the code looks wrong, it's using the special "play block"-seqtrack for timing when sending out midi messages from plugins, when playing song. So it doesn't look like something is very wrong underneath.

Until the bug has been fixed, you can probably just safely ignore the warning window when it pops up. There will (almost) never be more than one warning window open at the same time, so when you see it, just hide it somewhere, and things should work fine.

kmatheussen commented 4 months ago

And by "fine", I meant "almost fine". The only problem you will have is that you won't get sub-block accuracy for the timing of the messages sent out from the plugins. I.e. the granularity will be 64 frames, which is almost always more than good enough.

On Wed, Jul 17, 2024 at 11:13 AM kramlie @.***> wrote:

Yes, that's it!

I am indeed using Jack1 🙈, even though Radium advises me not to. Unfortunately, for reasons unrelated to Radium, I'm not able to upgrade to Jack2 at this time, at least not without significant effort. It has worked perfectly well apart from this issue though. Do you think Jack1 could be the reason, or is it the Jack transport in general?

PS! The reason I had it on in the first place is because of #1436 https://github.com/kmatheussen/radium/issues/1436. I was trying to record MIDI into a different DAW, export it as a MID file, and then import that into Radium. An extremely inconvenient workaround, but it does work. That is, except for the crash we're talking about above.

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

kramlie commented 4 months ago

Thanks @kmatheussen, hiding the window works!