retornz / ToneZ

ToneZ free plugin made in Cabbage www.retornz.com/plugins/tonez
https://www.retornz.com/plugins/tonez
GNU General Public License v3.0
37 stars 5 forks source link

Make a Linux version #4

Open jpcima opened 5 years ago

jpcima commented 5 years ago

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.

jpcima commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

It turns out the plugin size issue is non-existent now. I think it was something to do with my display setup and swapping between the laptop and PC monitors.

On Wed, 28 Aug 2019 at 22:05, T0NIT0 RMX notifications@github.com wrote:

@jpcima https://github.com/jpcima regarding your issue, where you can't see the controls but blank space, can you see no tabs are checked ? @rorywalsh https://github.com/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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGNNGPXQOFI7EVLWSHDQG3SDPA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5MPCDI#issuecomment-525922573, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGM2YOL2XHKYGXBECQTQG3SDPANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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 commented 5 years ago

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.

https://github.com/rorywalsh/cabbage/issues/55

jpcima commented 5 years ago

@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 commented 5 years ago

I'll take a look. Can you confirm that this didn't happen with the older version, when the SR was set to 44100 and you could access the GUI of ToneZ.csd?

On Fri, 6 Sep 2019 at 11:11, JP Cimalando notifications@github.com wrote:

@rorywalsh https://github.com/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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGMSPGRQMU3W2PXZBODQIIUF3A5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CM6VI#issuecomment-528797525, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGJTUU36YUUJ2TKHRXLQIIUF3ANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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 commented 5 years ago

It could have something to do with the move to remove all the ScopedPointers. I'll try it a little later and see if I can see what's going on. First I'll check if this was happening before the big changes.

On Fri 6 Sep 2019, 13:18 JP Cimalando, notifications@github.com wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGL2JJX6NSEZMGCQVWDQIJDALA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CVLVQ#issuecomment-528831958, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGLGL3RRLFMZIJCNM3TQIJDALANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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 commented 5 years ago

OK, good to know!

On Fri 6 Sep 2019, 13:54 JP Cimalando, notifications@github.com wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGI32CG34ABYC25BNATQIJHILA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CYB3Y#issuecomment-528842991, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGKWIAXIN6W3JUY5TJTQIJHILANCNFSM4IPRI3EA .

rorywalsh commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

What version of Csound are you using? Are you building from source?

On Sun 8 Sep 2019, 13:54 JP Cimalando, notifications@github.com wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGJQ7SH6LXT34GQAJNDQITYZDA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FPGPI#issuecomment-529199933, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGPAAHFU3D3HL5UIHLLQITYZDANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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 commented 5 years ago

Same version. I'm on Xubuntu. I'll try to get my hands on an Arch Linux box during the week and see if I can recreate the issues there. Are you running everything through jack?

On Sun 8 Sep 2019, 14:32 JP Cimalando, notifications@github.com wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGOBEYV474GDJV2KUETQIT5FPA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FQAPI#issuecomment-529203261, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGIOXQIHZLZUPGKLSBTQIT5FPANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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 commented 5 years ago

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

rorywalsh commented 5 years ago

Sure, but pardon my ignorance, will debian based binaries work in Arch? Either way I can send it later.

On Sun 8 Sep 2019, 15:40 JP Cimalando, notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGLNBRSZKGOAK6PSJWLQIUFHNA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FRLQI#issuecomment-529208769, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGLVVGCJ5D5UARRMFQDQIUFHNANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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

rorywalsh commented 5 years ago

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

jpcima commented 5 years ago

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

rorywalsh commented 5 years ago

This issue is still present?

trebmuh commented 5 years ago

@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 commented 5 years ago

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

rorywalsh commented 5 years ago

OK. Leave it with me.

On Sat 28 Sep 2019, 08:18 JP Cimalando, notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/T0NIT0RMX/ToneZ/issues/4?email_source=notifications&email_token=AAUQWGJHE552EOUKBT3RAZLQL3ZLXA5CNFSM4IPRI3EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD72SAIQ#issuecomment-536158242, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUQWGM2WXHKE7ZGDWAZJBDQL3ZLXANCNFSM4IPRI3EA .

jpcima commented 5 years ago

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

jpcima commented 5 years ago

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