It should be a universal build. let me check…
Cabbage3 alpha release
New version just built that should now offer both arm64, and x86_64 archs Thanks for sticking with this, it never crossed my mind.
I’m getting things going today. I’ve downloaded VS Code, got csound 7, got the vscode extension, the csound vscode plugin.
I click “run cabbage” in VS Code and get this:
Cabbage extension is now active!
Found a find free port: 9991
DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (908) addDevicesToSettings Thread ID: 0x1f14e9f00]
Stopping audio stream...
DEBUG: RtApiCore::stopStream(): the stream is closed! [CabbageAudioApp.cpp (616) errorCallback Thread ID: 0x1f14e9f00]
Closing MIDI input device...
Closing MIDI output device...
Audio and MIDI devices successfully deinitialised
Attempting to connect to WebSocket at ws://localhost:9991 (client instance: 0x12000d2b0)
Websocket connection established. Waiting for file to be sent from VS-Code.
I think that looks OK.
Then I load keyboard.csd. I do command-S to get the UI going. Here is what I get in the console:
DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (908) addDevicesToSettings Thread ID: 0x1f14e9f00]
DEBUG: Attempting to start audio with the following settings:
SR: 44100
Buffer Size: 512
Input device: Built-in Input
Number of input channels: 16
Output device: Built-in Output
Number of output channels: 2 [CabbageAudioApp.cpp (529) initialiseAudio Thread ID: 0x1f14e9f00]
DEBUG: 16-2 [CabbageAudioApp.cpp (433) createCabbageProcessor Thread ID: 0x1f14e9f00]
DEBUG: csdFileAndPath:/Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/examples/keyboard.csd [CabbageAudioApp.cpp (434) createCabbageProcessor Thread ID: 0x1f14e9f00]
DEBUG: Resetting csound ...
csound = 0x121006180 [Cabbage.cpp (113) setupCsound Thread ID: 0x1f14e9f00]
DEBUG: Num widgets : 7 [CabbageAudioApp.cpp (442) createCabbageProcessor Thread ID: 0x1f14e9f00]
UnifiedCSD: /Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/examples/keyboard.csd
The UI appears, but when I play the keyboard with the mouse the sound is either non-existent or horribly distorted. Any clues what I should check?
I looked in the settings for Cabbage, but don’t see anything obvious. For output it says, “Use command palette to change.” I don’t know what command palette that refers to. EDIT: I guess that means “command shift P” and then find the appropriate command.
I would suggest having a basic example .csd file in the documentation that would confirm audio output/input is working correctly.
You need to select your audio and input. The most important key combination in VS Code to know is Ctrl+Shift+P (win) or Cmd+Shift+P (mac) , which brings up the Command Palette. From there, type cabbage, and it will list all the commands. Then setup your audio devices. Cabbage will choose the default audio devices, but as you know, these aren’t always the best.
I think I understand that part, but I’m still not getting any audio. I had distorted audio for a bit, but can’t get back to that. I’ve rebooted a few times, hoping that would resolve things.
I’m also getting UI issues where widgets are stacked on top of each other. horizontalslider.csd for example has all eight sliders on top of each other. Maybe there’s a setting I missed?
Thanks. Can you send me your settings.json file? The one with the selected audio devices? I assume tried setting the buffer sizes, and ksmps and things like that to get the best audio you can? Also, can you open the activity monitor and see that there isn’t a zombie CabbageApp process running in the background?
There were three CabbageApp processes, so I force quit those. Where is the settings.json file stored?
~/Library/Application SUpporty/Cabbage
, take a look there and see if anything seems odd in that file. I’m not sure why the processes don’t stop sometimes. Even if you forget to stop the Cabbage server, it should kill itself once vscode is closed.
I’ve played with a few things. SSL 12 is my preferred device, but I’ve also tried the basic system audio.
{
"currentConfig": {
"audio": {
"outputDevice": "Solid State Logic: SSL 12"
},
"jsSourceDir": "/Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/src",
"midi": {}
},
"systemAudioMidiIOListing": {
"audioDrivers": "CoreAudio",
"audioInputDevices": {
"Apple Inc.: SSL Cycles": {
"deviceId": 132,
"numChannels": 16
},
"Apple Inc.: SSL Samples": {
"deviceId": 133,
"numChannels": 16
},
"Apple Inc.: SSL Samples Cycles": {
"deviceId": 134,
"numChannels": 16
},
"Solid State Logic: SSL 12": {
"deviceId": 130,
"numChannels": 16
}
},
"audioOutputDevices": {
"Apple Inc.: Mac mini Speakers": {
"deviceId": 131,
"numChannels": 2,
"sampleRates": [
44100,
48000,
88200,
96000
]
},
"Apple Inc.: SSL Cycles": {
"deviceId": 132,
"numChannels": 8,
"sampleRates": [
44100,
48000,
88200,
96000,
176400,
192000
]
},
"Apple Inc.: SSL Samples": {
"deviceId": 133,
"numChannels": 8,
"sampleRates": [
44100,
48000,
88200,
96000,
176400,
192000
]
},
"Apple Inc.: SSL Samples Cycles": {
"deviceId": 134,
"numChannels": 8,
"sampleRates": [
44100,
48000,
88200,
96000,
176400,
192000
]
},
"DEL: DELL S3222DGM": {
"deviceId": 129,
"numChannels": 2,
"sampleRates": [
32000,
44100,
48000
]
},
"Solid State Logic: SSL 12": {
"deviceId": 130,
"numChannels": 8,
"sampleRates": [
44100,
48000,
88200,
96000,
176400,
192000
]
}
},
"midiInputDevices": {},
"midiOutputDevices": {}
}
}
And any tips about the stacked widget issue? That seems like a Cabbage issue, right?
Thank you Rory for your work and patience! I tested a widget example and as far as i see it runs fine!
Yes @Bryan_T, that’s a timing issue with Cabbage. I can’t recreate it here however. If you save a few times does the problem persist? With regards to the audio, can you try setting the output buffer size to see if that makes it into the settings file? I’m not sure what the default is, but I’ve a feeling it is still being used
Before resaving, what should I be doing in VSCode? Just closing the tab for the rendered interface? Ending and relaunching the Cabbage session?
Maybe there are some clues in what happens after a reboot.
Rebooted, launched VS Code. Run Cabbage. Saved keyboard.csd which launches the keyboard UI tab in VSCode. Before playing a note I get high-pitched audio out of the right speaker - the meter on my interface’s output is at max for the right channel. If I play a note the squeal goes away. No audio comes out when trying to play the keys with the mouse.
Then I close the keyboard UI. Resave keyboard.csd. I get the Cabbage splash screen but no longer see the keyboard or get any audio.
I then quit VSCode and killed the CabbageApp process in Activity Monitor.
Relaunch VS Code. Run Cabbage:
Cabbage extension is now active!
Found a find free port: 9991
DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (908) addDevicesToSettings Thread ID: 0x202a0df00]
Stopping audio stream...
DEBUG: RtApiCore::stopStream(): the stream is closed! [CabbageAudioApp.cpp (616) errorCallback Thread ID: 0x202a0df00]
Closing MIDI input device...
Closing MIDI output device...
Audio and MIDI devices successfully deinitialised
Attempting to connect to WebSocket at ws://localhost:9991 (client instance: 0x14180c2b0)
Websocket connection established. Waiting for file to be sent from VS-Code.
Save keyboard.csd. High-pitched maxed out audio starts again … on the left channel.
DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (908) addDevicesToSettings Thread ID: 0x202a0df00]
DEBUG: Attempting to start audio with the following settings:
SR: 48000
Buffer Size: 512
Input device: Built-in Input
Number of input channels: 16
Output device: Solid State Logic: SSL 12
Number of output channels: 8 [CabbageAudioApp.cpp (529) initialiseAudio Thread ID: 0x202a0df00]
DEBUG: 16-8 [CabbageAudioApp.cpp (433) createCabbageProcessor Thread ID: 0x202a0df00]
DEBUG: csdFileAndPath:/Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/examples/keyboard.csd [CabbageAudioApp.cpp (434) createCabbageProcessor Thread ID: 0x202a0df00]
DEBUG: Resetting csound ...
csound = 0x13ff17b80 [Cabbage.cpp (113) setupCsound Thread ID: 0x202a0df00]
DEBUG: Num widgets : 7 [CabbageAudioApp.cpp (442) createCabbageProcessor Thread ID: 0x202a0df00]
UnifiedCSD: /Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/examples/keyboard.csd
No audio when I try to play the keys on the keyboard with the mouse.
Hold on, you’re trying to run 8 audio outs? I haven’t got past testing stereo IO yet…
But to answer your question, closing the web panel in VS Code that houses the UI, and hitting save again will recompile the instrument. You don’t need to close the server until you finish your session.
Not trying to run 8 outs but the SSL 12 has 8 available. I’ll switch back to the Mac’s internal speaker to simplify that.
I definitely do not get the expected behavior when recompiling an instrument with an active Cabbage server.
So it seems that the Cabbage server might be attempting to open the max number of channels it can. Can you try setting the audio config in your form object? SOmehting like this:
{
"type": "form",
"caption": "Effect",
"size": {
"height": 300,
"width": 580
},
"pluginId": "def1",
"channelConfig":"2-2"
}
This will set the number of inputs and outputs to 2. Hopefully this helps. If you’re hearing some random noise, it’s likely rubbish in a channel buffer that’s not being written to.
Tried that with keyboard.csd, saving it to my own folder.
Here’s the output:
DEBUG: Devices successfully added to settings file. [CabbageAudioApp.cpp (908) addDevicesToSettings Thread ID: 0x1f8079f00]
DEBUG: Attempting to start audio with the following settings:
SR: 48000
Buffer Size: 32
Input device: Built-in Input
Number of input channels: 16
Output device: Solid State Logic: SSL 12
Number of output channels: 8 [CabbageAudioApp.cpp (529) initialiseAudio Thread ID: 0x1f8079f00]
DEBUG: 16-8 [CabbageAudioApp.cpp (433) createCabbageProcessor Thread ID: 0x1f8079f00]
DEBUG: csdFileAndPath:/Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/bt_test/keyboard.csd [CabbageAudioApp.cpp (434) createCabbageProcessor Thread ID: 0x1f8079f00]
DEBUG: Resetting csound ...
csound = 0x14e9172a0 [Cabbage.cpp (113) setupCsound Thread ID: 0x1f8079f00]
DEBUG: Num widgets : 7 [CabbageAudioApp.cpp (442) createCabbageProcessor Thread ID: 0x1f8079f00]
UnifiedCSD: /Users/bryantysinger/.vscode/extensions/cabbageaudio.vscabbage-1.0.65-alpha/bt_test/keyboard.csd
--Csound version 7.0 (double samples) Jan 7 2025
[commit: 6f7dfd8d3434c9c6f8be3d02110be2fcc5613cfb]
backtrace() returned 10 addresses
0 CsoundLib64 0x0000000103867fe4 signal_handler + 52
1 CsoundLib64 0x000000010389cb0c csoundFindVariableWithName + 40
2 CabbageApp 0x0000000102c5296c _ZN15CabbageAudioApp13audioCallbackEPvS0_jdjS0_ + 512
3 CabbageApp 0x0000000102c9d258 _ZN9RtApiCore13callbackEventEjPK15AudioBufferListS2_ + 524
4 CabbageApp 0x0000000102c9c368 _ZL15callbackHandlerjPK14AudioTimeStampPK15AudioBufferListS1_PS2_S1_Pv + 44
5 CoreAudio 0x000000018ce5c830 _ZN19HALC_ProxyIOContext10IOWorkLoopEv + 11636
6 CoreAudio 0x000000018ce593a8 ___ZN19HALC_ProxyIOContextC2Ejj_block_invoke + 172
7 CoreAudio 0x000000018d00337c _ZN13HALC_IOThread5EntryEPv + 88
8 libsystem_pthread.dylib 0x0000000189f6ac0c _pthread_start + 136
9 libsystem_pthread.dylib 0x0000000189f65b80 thread_start + 8
Process exited with code 1 and signal null
Process exited with code 1 and signal null
Same issue with squealing output. That goes away with a mouse click, but I never get audio.
Resaving keyboard.csd gets a black screen in the keyboard tab.
What is the most simple .csd file I might try to get working? Something with a single UI widget that would produce audio.
can you paste the output for me with the default mac speakers set?