Cabbage Logo
Back to Cabbage Site

[FIXED] Chnset not working Cabbage-wide

I can do that for sure. It guess it makes sense as some people may still want to simple install it locally. Are you going to continue to maintain an AUR pacakge for Csound? If so I can update the csound page to let people know it’s available?

I’m baffled as to why chnset is not working. I’ve created a new branch called archDebugBuild. Can you check it out from git and rebuild Cabbage in debug mode. The handiest way would be to open the CabbageIDE.jucer file in the Projucer and hit save. Then run make from the Cabbage LinuxMakefiles dir. That will build Cabbage ind ebug mode. When the program launches, run the instrument above once more. Then go to the console and see what text is being printed. It should be printing out a list of messages like this:

(...)
IdentifierText:label1
IdentifierText:text("0.002301")
IdentifierText:label1
IdentifierText:
IdentifierText:label1
(...)

Let’s see if your build does too. I won’t be at the PC all day today, but I’ll check back in now and then to see where you’re at.

Sure thing! I can give it a shot a bit later on and let you know what happens.

Also, I realize it was a bit silly of me not to suggest—if you like I can just make a pull request for the build script changes, since I already made that patch and so on. Making an install script to go with the modified build script wouldn’t take long at all.

EDIT: Oh, also, regarding the Csound package, I do plan on maintaining it now that it’s there. You’re welcome to update the page with it if you like. Should I email the mailing list as well? It’s not a particularly big thing I’d say—the main Csound package is in the official repos. There’s a tradition in Arch of having two packages for software, one that installs the latest official release and one that just gets the latest code from the VCS and builds it, so mine is in the latter category. I don’t know how much use it will really get, since most people will probably prefer to use the official package.

I’d send an email to the list. Would be good to make it known at least. I’m happy to take the pull request.

Sorry it took me longer than I expected to get around to this.

I’m getting errors trying to build Cabbage as you described; I managed to fix some of them but I’m stuck on this:

Compiling AudioGraph.cpp
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘void AudioGraph::setDefaultConnections(int)’:
../../Source/Audio/Graph/AudioGraph.cpp:228:103: error: no matching function for call to ‘juce::AudioProcessorGraph::addConnection(int, int, int&, int)’
     bool connectInput1 = graph.addConnection (internalNodeIds[InternalNodes::AudioInput], 0, nodeID, 0);
                                                                                                       ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note: candidate: ‘bool juce::AudioProcessorGraph::addConnection(const juce::AudioProcessorGraph::Connection&)’
     bool addConnection (const Connection&);
          ^~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp:229:103: error: no matching function for call to ‘juce::AudioProcessorGraph::addConnection(int, int, int&, int)’
     bool connectInput2 = graph.addConnection (internalNodeIds[InternalNodes::AudioInput], 1, nodeID, 1);
                                                                                                       ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note: candidate: ‘bool juce::AudioProcessorGraph::addConnection(const juce::AudioProcessorGraph::Connection&)’
     bool addConnection (const Connection&);
          ^~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp:231:102: error: no matching function for call to ‘juce::AudioProcessorGraph::addConnection(int&, int, int, int)’
     bool connection1 = graph.addConnection (nodeID, 0, internalNodeIds[InternalNodes::AudioOutput], 0);
                                                                                                      ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note: candidate: ‘bool juce::AudioProcessorGraph::addConnection(const juce::AudioProcessorGraph::Connection&)’
     bool addConnection (const Connection&);
          ^~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp:232:102: error: no matching function for call to ‘juce::AudioProcessorGraph::addConnection(int&, int, int, int)’
     bool connection2 = graph.addConnection (nodeID, 1, internalNodeIds[InternalNodes::AudioOutput], 1);
                                                                                                      ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note: candidate: ‘bool juce::AudioProcessorGraph::addConnection(const juce::AudioProcessorGraph::Connection&)’
     bool addConnection (const Connection&);
          ^~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp:237:172: error: no matching function for call to ‘juce::AudioProcessorGraph::addConnection(int, juce::AudioProcessorGraph::<unnamed enum>, int&, juce::AudioProcessorGraph::<unnamed enum>)’
     bool connection3 = graph.addConnection (internalNodeIds[InternalNodes::MIDIInput], AudioProcessorGraph::midiChannelIndex, nodeID, AudioProcessorGraph::midiChannelIndex);
                                                                                                                                                                            ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note: candidate: ‘bool juce::AudioProcessorGraph::addConnection(const juce::AudioProcessorGraph::Connection&)’
     bool addConnection (const Connection&);
          ^~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘int AudioGraph::getNumConnections() const’:
../../Source/Audio/Graph/AudioGraph.cpp:385:18: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getNumConnections’; did you mean ‘getConnections’?
     return graph.getNumConnections();
                  ^~~~~~~~~~~~~~~~~
                  getConnections
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘const juce::AudioProcessorGraph::Connection* AudioGraph::getConnection(int) const’:
../../Source/Audio/Graph/AudioGraph.cpp:390:18: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getConnection’; did you mean ‘getConnections’?
     return graph.getConnection (index);
                  ^~~~~~~~~~~~~
                  getConnections
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘const juce::AudioProcessorGraph::Connection* AudioGraph::getConnectionBetween(uint32, int, uint32, int) const’:
../../Source/Audio/Graph/AudioGraph.cpp:396:18: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getConnectionBetween’; did you mean ‘getConnections’?
     return graph.getConnectionBetween (sourceFilterUID, sourceFilterChannel,
                  ^~~~~~~~~~~~~~~~~~~~
                  getConnections
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘bool AudioGraph::canConnect(uint32, int, uint32, int) const’:
../../Source/Audio/Graph/AudioGraph.cpp:404:62: error: ‘bool juce::AudioProcessorGraph::canConnect(juce::AudioProcessorGraph::Node*, int, juce::AudioProcessorGraph::Node*, int) const’ is private within this context
                              destFilterUID, destFilterChannel);
                                                              ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:397:10: note: declared private here
     bool canConnect (Node* src, int sourceChannel, Node* dest, int destChannel) const noexcept;
          ^~~~~~~~~~
../../Source/Audio/Graph/AudioGraph.cpp:403:30: error: invalid conversion from ‘uint32’ {aka ‘unsigned int’} to ‘juce::AudioProcessorGraph::Node*’ [-fpermissive]
     return graph.canConnect (sourceFilterUID, sourceFilterChannel,
                              ^~~~~~~~~~~~~~~
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:397:28: note:   initializing argument 1 of ‘bool juce::AudioProcessorGraph::canConnect(juce::AudioProcessorGraph::Node*, int, juce::AudioProcessorGraph::Node*, int) const’
     bool canConnect (Node* src, int sourceChannel, Node* dest, int destChannel) const noexcept;
                      ~~~~~~^~~
../../Source/Audio/Graph/AudioGraph.cpp:404:30: error: invalid conversion from ‘uint32’ {aka ‘unsigned int’} to ‘juce::AudioProcessorGraph::Node*’ [-fpermissive]
                              destFilterUID, destFilterChannel);
                              ^~~~~~~~~~~~~
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:397:58: note:   initializing argument 3 of ‘bool juce::AudioProcessorGraph::canConnect(juce::AudioProcessorGraph::Node*, int, juce::AudioProcessorGraph::Node*, int) const’
     bool canConnect (Node* src, int sourceChannel, Node* dest, int destChannel) const noexcept;
                                                    ~~~~~~^~~~
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘bool AudioGraph::addConnection(uint32, int, uint32, int)’:
../../Source/Audio/Graph/AudioGraph.cpp:411:78: error: no matching function for call to ‘juce::AudioProcessorGraph::addConnection(uint32&, int&, uint32&, int&)’
                                              destFilterUID, destFilterChannel);
                                                                              ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note: candidate: ‘bool juce::AudioProcessorGraph::addConnection(const juce::AudioProcessorGraph::Connection&)’
     bool addConnection (const Connection&);
          ^~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:243:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘void AudioGraph::removeConnection(int)’:
../../Source/Audio/Graph/AudioGraph.cpp:450:34: error: no matching function for call to ‘juce::AudioProcessorGraph::removeConnection(const int&)’
     graph.removeConnection (index);
                                  ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:246:10: note: candidate: ‘bool juce::AudioProcessorGraph::removeConnection(const juce::AudioProcessorGraph::Connection&)’
     bool removeConnection (const Connection&);
          ^~~~~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:246:10: note:   no known conversion for argument 1 from ‘const int’ to ‘const juce::AudioProcessorGraph::Connection&’
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘void AudioGraph::removeConnection(uint32, int, uint32, int)’:
../../Source/Audio/Graph/AudioGraph.cpp:458:65: error: no matching function for call to ‘juce::AudioProcessorGraph::removeConnection(uint32&, int&, uint32&, int&)’
                                 destFilterUID, destFilterChannel))
                                                                 ^
In file included from ../../JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:116,
                 from ../../JuceLibraryCode/../JuceLibraryCode/JuceHeader.h:20,
                 from ../../Source/Audio/Graph/AudioGraph.h:23,
                 from ../../Source/Audio/Graph/AudioGraph.cpp:20:
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:246:10: note: candidate: ‘bool juce::AudioProcessorGraph::removeConnection(const juce::AudioProcessorGraph::Connection&)’
     bool removeConnection (const Connection&);
          ^~~~~~~~~~~~~~~~
../../JuceLibraryCode/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h:246:10: note:   candidate expects 1 argument, 4 provided
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘juce::XmlElement* AudioGraph::createXml() const’:
../../Source/Audio/Graph/AudioGraph.cpp:644:31: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getNumConnections’; did you mean ‘getConnections’?
     for (int i = 0; i < graph.getNumConnections(); ++i)
                               ^~~~~~~~~~~~~~~~~
                               getConnections
../../Source/Audio/Graph/AudioGraph.cpp:646:65: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getConnection’; did you mean ‘getConnections’?
         const AudioProcessorGraph::Connection* const fc = graph.getConnection (i);
                                                                 ^~~~~~~~~~~~~
                                                                 getConnections
../../Source/Audio/Graph/AudioGraph.cpp: In member function ‘juce::XmlElement* AudioGraph::createConnectionsXml() const’:
../../Source/Audio/Graph/AudioGraph.cpp:665:31: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getNumConnections’; did you mean ‘getConnections’?
     for (int i = 0; i < graph.getNumConnections(); ++i)
                               ^~~~~~~~~~~~~~~~~
                               getConnections
../../Source/Audio/Graph/AudioGraph.cpp:667:65: error: ‘const class juce::AudioProcessorGraph’ has no member named ‘getConnection’; did you mean ‘getConnections’?
         const AudioProcessorGraph::Connection* const fc = graph.getConnection (i);
                                                                 ^~~~~~~~~~~~~
                                                                 getConnections
In file included from ../../Source/Audio/Graph/AudioGraph.cpp:21:
../../Source/Audio/Graph/../../Application/CabbageMainComponent.h: In member function ‘FileTab* CabbageMainComponent::getFileTabForNodeId(int32)’:
../../Source/Audio/Graph/../../Application/CabbageMainComponent.h:113:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
make: *** [Makefile:188: build/intermediate/Debug/AudioGraph_b22f6a5b.o] Error 1

The errors I managed to get around were things like ComboBoxListener needing to be ComboBox::Listener in CabbagePluginEditor.h and attempts to access things like sourceNodeID on a juce::AudioProcessorGraph::Connection needing to be directed to its NodeAndChannel source and destination members. I’m not really sure what’s going on with the above errors, though, since they seem to be trying to call things like getNumConnections() on a juce::AudioProcessorGraph that I can’t find signs of or analogs for in the JUCE library code. I could easily be missing something, of course, since I don’t really know my way around the library. I sort of wonder if this Cabbage code was written against a different version of JUCE or something like that? The version I have is 5.3.2; it looks like you bundled JUCE along with Cabbage but maybe when I opened and saved the project from the Projucer it changed things.

I’ll be out for a while, but I’ll try to get you that pull request this evening.

Can you check out version 5.2.0 of JUCE, build the Projucer and try again? I should get some time soon to update to 5.2.2, but in the meantime we’re stuck with .5.2.0

Okay! I got the pull request to you. Let me know if you have any questions or would like me to change anything.

Also I did get the debug version building. Sorry I missed the bit about the JUCE version in the readme. Here’s the output from opening the program, opening the more recent chnsetTest.csd, pressing the “play” button, pressing the “stop” button, then closing the program:

JUCE v5.2.0
Plugin constructor
0dBFS level = 32768.0
--Csound version 6.12 (double samples) May 25 2018
[commit: 302c15aff34ef904ca9bd7896adcc6b93ab7d284]
libsndfile-1.0.28
Plugin destructor
0dBFS level = 32768.0
--Csound version 6.12 (double samples) May 25 2018
[commit: 302c15aff34ef904ca9bd7896adcc6b93ab7d284]
libsndfile-1.0.28
UnifiedCSD:  /tmp/temp_de96d86e.csoundCabbageCsdText
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
sample rate overrides: esr = 44100.0000, ekr = 1378.1250, ksmps = 32
Elapsed time at end of orchestra compile: real: 0.001s, CPU: 0.001s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.001s, CPU: 0.001s
displays suppressed
0dBFS level = 1.0
orch now loaded
audio buffered in 256 sample-frame blocks
SECTION 1:
new alloc for instr 1:

Shutdown
Plugin destructor

It seems to be almost the same as the output from the release build; as far as I can tell the only differences are the JUCE version number and the plugin constructor/destructor messages. The IdentiferText messages don’t seem to be showing up for me.

Sorry, I should have said that these messages will be printed to the terminal window, if you launch Cabbage from the terminal. Thanks for the PR. I’ll get around to merging that soon.

Oh, yeah, that actually was the terminal output. Sorry, I didn’t really specify that.

EDIT: Sure thing about the pull request :slight_smile:

I merged that pull request. Sorry for the delay. Back to the problem reported here, I think it’s caused by the same issue preventing the GUI editor from passing on property updates to the editor. The troubling thing is that both of thee mechanism rely on the use of JUCE’s ValueTree class. I think the first thing I should do is update Cabbage so it builds with the latest version of JUCE. If we’re lucky it will resolve itself!

I think this should be Ok now in git. If you want to try to build and let me know. Note there is still a small issue in the master branch with the plugin size, but it should be relatively simple to fix. I just won’t have time to do it until tomorrow.

[edit] Note I haven’t given it a proper run through at all since I updated to JUCE 5.3.2 I think it’s fair to expect a few issues…

Okay, I’ll give it a shot! Sorry it took me a few days to respond. We’ll see what happens! :smile:

Well, lovely news, the problem is indeed fixed! Your chnsetTest files from earlier work fine now. Hurrah!! :smile: That’s great—there’s a feature in the project I’ve been working on that hadn’t been functional for a while due to this so I’m quite pleased. :smiley:

So far I haven’t noticed any obvious new problems except for one—I don’t seem to be able to output sound via JACK from the Cabbage standalone application. It might be worth making a new thread for this, I guess. Basically, the only possible output I have is the PulseAudio sink (I use Cadence) and Cabbage doesn’t seem to really run sound through it anyhow.

Before the update, I could output sound via JACK, although it would have a lot of pops and clicks.

Thanks so much for your hard work, though! Very glad the issue did indeed disappear with the new version of JUCE.

I may need to enable jack in the AppConfig.h file. You can try it. Is listed in the JuceLibraryCode folder. Set it to 1 and rebuild, it should be OK after that.

Hmmm, looks like it’s set to 1 already?

Let me boot into Arch and take a look…

Hmm, that’s odd. It’s all working fine for me here. Did you do a clean before building?

Hi, sorry for the delay in responding—one of the DIMMs in my workstation went bad, so I’m having to RMA it, and as a result my free time in the last few days has been dedicated to getting a backup computer ready so I have something to use while I’m waiting on the replacement memory.

Rather unfortunately, I tried building Cabbage here on the backup computer, with a new install of Arch and everything, and am still having the same issue. Both here and on my main computer, I was building it using the AUR cabbage-git package, so it was from a freshly checked-out instance of the git repo. Maybe there’s an unlisted dependency you happen to have already installed or something like that?

I think I’m going to make a new thread to track this issue so as not to clutter up this one. :stuck_out_tongue: Will edit with the link in a moment.

EDIT: Okay, here it is.

Hi !
I’m having the exact same issue, I’m running Cabbage on Windows and the chnset opcode doesn’t work in the GUI, no way to see the slider moving !
Could you please explain how you fixed it please ?
Thanks !

Can you check that you have selected a valid audio device? I’ve tried quite a few examples here on Windows and they all run fine, so long as I select an appropriate audio type and device.

1 Like

Thanks ! I was at 96kHz, going back to 44,1kHz did the trick !