Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a Linux version #4

Open
jpcima opened this issue Aug 26, 2019 · 39 comments
Open

Make a Linux version #4

jpcima opened this issue Aug 26, 2019 · 39 comments
Labels
bug Something isn't working

Comments

@jpcima
Copy link

jpcima commented Aug 26, 2019

The linux version has runtime problems in various configurations.
It is related to a development version of Cabbage, older versions work fine.

In development versions, it's possible to place resource files under /usr/share.
When the csd was placed next to the plugin file, the problems were still experienced.

  • UI is not loading fully, some graphical parts are missing
  • Preset doesn't appear to load, no sound from plugin (maybe as consequence). Volume knob is observed to stay at value 0
@T0NIT0RMX T0NIT0RMX added the bug Something isn't working label Aug 27, 2019
@jpcima
Copy link
Author

jpcima commented Aug 28, 2019

Hi @T0NIT0RMX, a question: How do you set plugin name and manufacturer?
I assume you edit these in Cabbage's source, is it correct?

@T0NIT0RMX
Copy link
Collaborator

T0NIT0RMX commented Aug 28, 2019

Hi @jpcima, yes ! I opened CabbagePluginSynth.jucer and edited these field
Then I opened the AppConfig.h file in JuceLibraryCode folder and and made modifications to plug-in name / plug-in manufacturer

@jpcima
Copy link
Author

jpcima commented Aug 28, 2019

Ok then, it makes sense, I understand binary builds of Cabbage are not going to be globally reusable.
It's maybe a good idea to add this AppConfig into the repository, no ?

I've done some work into https://github.com/jpcima/juce-linux-patches
I will add a Juce version with a VST update, which I finished but didn't check yet to be working. Unfortunately, it needed to make a lot of changes.

@jpcima
Copy link
Author

jpcima commented Aug 28, 2019

I think VST work in JUCE is complete to permit having a nice automatic build.

Unfortunately, the problem observed in the latest Linux binary remains present in the current develop branch of cabbage. When I last tried using the master branch, I didn't encounter the issue.

There is no sound produced, the controls don't take effect, and UI is lacking many parts.

Does it ring a bell @rorywalsh, by any chance?

Capture du 2019-08-28 22-07-15

@rorywalsh
Copy link
Contributor

For me it's loading fine with the latest dev branch. I can load it into Carla, and playing shows movement in the output meter, although i don't have access to any speakers right now. The only issue I face here is the plugin window size is all messed up. I'm using 16.04. I've had this issue before. You'll see on the JUCE forums. It pops up from time to time. You guys not seeing this on your end no?

Screenshot_2019-08-28_21-42-24

@jpcima
Copy link
Author

jpcima commented Aug 28, 2019

This resizing problem is not something I've ever seen myself.
I have developed a plugin with JUCE C++ and run tests in Carla as well.

Concerning cabbage, I have an unidentified source of problem which prevents normal display and operation of the ToneZ synth, where I managed it to run before.

Did you install resource files in system directories, or did you keep them at the side of the plugin itself?

@T0NIT0RMX
Copy link
Collaborator

T0NIT0RMX commented Aug 28, 2019

@rorywalsh, no here in Linux Lubuntu 16.04 (in my VM), when I run ToneZ through Carla in LMMS this is what I see :
image

As you can notice, there is a slight issue with the size of the text (OSC1 is cropped as OS... like there is not enough space, while on Windows and MAC there is no issue, but it may be specific to my VM)

From here, I can't hear the sound in the VM but the meter moves in LMMS so I guess it works

@T0NIT0RMX
Copy link
Collaborator

T0NIT0RMX commented Aug 28, 2019

@jpcima regarding your issue, where you can't see the controls but blank space, you can see that no tabs are checked, like there is no init value.
@rorywalsh seems there is an initialization issue with some parameters on Linux, like the OSC tabs (they are radio buttons) where nothing is checked, but in the code set the OSC1 tab button to "value(1)" to make it selected, works great on Windows but not on Linux, or is it a change you made recently on the radio buttons ? We already faced something like that last time if you remember, and you had to reverse the commit

@rorywalsh
Copy link
Contributor

@T0NIT0RMX, that radio buttons change was completely reverted back to the way it was when it worked. The fact that it works on Windows and not on Linux leads me to think the issue is elsewhere..

@rorywalsh
Copy link
Contributor

rorywalsh commented Aug 29, 2019 via email

@jpcima
Copy link
Author

jpcima commented Aug 29, 2019

This display size issue has made me think about high-dpi display.
When looking at it, it seems to cut at the exact half of the dimension.
It suggests an issue of scaling.

@rorywalsh
Copy link
Contributor

You were right about the scaling. Looks like Xubuntu doesn't handle this very well. Changing the screen resolution fixes everything. The main issue being discussed here should be fixed now.

rorywalsh/cabbage#55

@jpcima
Copy link
Author

jpcima commented Sep 6, 2019

@rorywalsh the UI issue is fixed by a new CabbagePluginSynth build!

There is however other trouble. It's not sure whether it's just from ToneZ, or some Csound version, or anything about the latest Cabbage has to do with it, so I report here.

I open ToneZ.so, which is the fresh build of the PluginSynth, in carla-single.
It shows, I play the keys, and it plays sawtooth. So far so good.

I pick the second preset, known as "BS CleanSub". I can play some notes on the graphical keyboard.
After a few then it goes silent.

On the third preset "BS DarkProg" it goes crazier. Pressing the key, it seems to emit a short noise artifact, and then to NaN (or Inf) the signal output, as the other sound software stop being heard also until closing the synth.

It was ToneZ 1.3, Cabbage cffe7db, Csound 6.13.0

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 6, 2019 via email

@jpcima
Copy link
Author

jpcima commented Sep 6, 2019

Tried right now, it also happens with the older version: the master commit 0902c08, 2 away from the current HEAD, previously to the "sample rate" commit.

I tried also with soundcard at 44.1 kHz. Exact same problem behavior.

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 6, 2019 via email

@jpcima
Copy link
Author

jpcima commented Sep 6, 2019

No! I do not confirm the bug as develop-branch-only.
The master branch, which I tested and observed as not working, has the scoped pointers.

It's possible that this problem was always there in my experiments, and not related to any recent development.

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 6, 2019 via email

@rorywalsh
Copy link
Contributor

Hi @jpcima. I just tried this now and couldn't recreate the problems you reported. What host are you using? I tried in Bitwig, Carla and Reaper, all seemed to behave just as I would expect?

@jpcima
Copy link
Author

jpcima commented Sep 6, 2019

It was in fact a Carla git, the version 8385b5ee.
I typed carla-single native vst ToneZ.so.

I retried in Reaper, now there is a bit more information.

I put ToneZ on a new track. At the first instantiation, I set the patch "DarkProg" (ie., the one which NaNs in my case). The synth goes silent and unplayable, but not corrupting the entire audio output, as I assume Reaper must protect this case of unclean buffers.

Now, I remove ToneZ, I put it back, set the same patch: this time, it's playing.

This reproduction of the bug does not appear to come out as this every time, but very often.
Sometimes, the first try has been working.

(I'm suspecting that something may lack initializing, which might be a source of trouble.)

@rorywalsh
Copy link
Contributor

I still can't recreate the issue. I've tried everything I can think of but still it works fine for me. I assume if you attempt the following, it quickly stops making any sound?

ToneZReaperLinux

@jpcima
Copy link
Author

jpcima commented Sep 7, 2019

What's shown in video is precisely what I did.
I created a new track with ToneZ, (in my case "CabbageEffectNam", which I didn't rename)
and I clicked+moved mouse over keyboard, like shown.

Today as I tried, behavior turned slightly different, so it's not strictly deterministic.
CleanSub has turned to silence directly after I have pressed the first key.

From Valgrind, I didn't obtain any particular relevant information.
Is there some method which can help me trace the problem?

I made the recording so you can see yourself.
out

@rorywalsh
Copy link
Contributor

How strange. This is the method that is producing the sound. You could step through it and make sure csoundPerformKsmps() is being hit Ok. It's always tricky to debug this method considering how often it fires, but it might lead to something.

@jpcima
Copy link
Author

jpcima commented Sep 8, 2019

It didn't give me valuable info, it validated what I reported previously.
I printed the csoundPerformKsmps() return code, and the first buffer sample.

In all cases I observed return 0.
CleanSub has showed me samples in the magnitude of 1e-4.
DarkProg has showed me -nan.

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 8, 2019 via email

@jpcima
Copy link
Author

jpcima commented Sep 8, 2019

It's Csound 6.13.0, arch linux package.
I wanted to ask about: what Csound version do you use?
If it's a different one, I'll make it run on this version and report you if it's a success or not.

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 8, 2019 via email

@jpcima
Copy link
Author

jpcima commented Sep 8, 2019

Yes, using jack (version 2). It doesn't seem to matter which host.
Other thing: I used default AppConfig.h from CabbagePluginSynth. Can it be a problem?

@jpcima
Copy link
Author

jpcima commented Sep 8, 2019

Oh, and, mind sharing your own binary, to check if I have identical problems running it?

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 8, 2019 via email

@jpcima
Copy link
Author

jpcima commented Sep 8, 2019

It's not guaranteed compatibility, it works if libs major versions are matching and >= libc.
In experience, it works quite often.

@rorywalsh
Copy link
Contributor

Cool, here you go. Let me know how it goes.

@jpcima
Copy link
Author

jpcima commented Sep 8, 2019

Tried your version, I confirm to have experienced identical problems.

@rorywalsh
Copy link
Contributor

This issue is still present?

@trebmuh
Copy link

trebmuh commented Sep 27, 2019

@rorywalsh FYI, jpcima seems to have been out of the web (at least for what I know) for the last 2 weeks. Hopefully he's alright and in vacation. Fingers crossed.

@jpcima
Copy link
Author

jpcima commented Sep 28, 2019

Hi, After having pulled Cabbage develop branch at 0603dbb, I have still the problem unfortunately, and symptoms identical.

@rorywalsh
Copy link
Contributor

rorywalsh commented Sep 28, 2019 via email

@jpcima
Copy link
Author

jpcima commented Oct 4, 2019

From some tracing inside csound code, it appears ToneZ is producing division by 0 during the execution of opcode SsplinePort.

@jpcima
Copy link
Author

jpcima commented Oct 4, 2019

To add, I have impression that I receive bad values from the control. (still "BS Darkprog")
I have been able to log such an operand, which seemed arriving from "choruswidth" if I'm not mistaken.

mulaa: 0,500000 * -5486124068873210445588960243682892870359454172549082081269977249875439498450530608481829736532482212550881929053150599861406478595121674729324160965665746675952409952613381490567235017715679668230311379032918639874384375900517443469363980679948746539362679355976183938475470978590331407354983321197084672,000000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants