hi! I’m finally digging in but I’m having some trouble setting up. Sorry if I missed anything key in that long thread!
I’m on MacOS. I’ve got the vscode extension running (figured out the whole jsSourceDir
thing), and if I run Cabbage: Compile Cabbage Instrument
, I can run the examples. Here I’m running the keyboard example. My midi keyboard triggers sound just fine, and tweaking the rotary knobs does update the values and affect the sound. However clicking the keys on the keyboard widget doesn’t create sound and throws an error in the console (see below)
But my main problem is that cabbage doesn’t reload/recompile when I save changes in the CSD.
I can get it to reload by manually running Cabbage: Compile cabbage instrument
again, but after about 10 of those, I seem to run out of ports and have to restart VS Code.
Here is my settings.json file:
{
"currentConfig": {
"audio": {
"buffer": 512,
"driver": 0,
"in1": 1,
"in2": 2,
"inputDevice": "RME-Audio: Babyface Pro (73043870)",
"out1": 1,
"out2": 2,
"outputDevice": "RME-Audio: Babyface Pro (73043870)",
"sr": 48000
},
"jsSourceDir": "/Users/luba/.vscode/extensions/cabbageaudio.vscabbage-1.0.23-alpha/src/",
"midi": {
"inChan": 0,
"inputDevice": "KOMPLETE KONTROL S61 MK2 Port 1",
"outChan": 0,
"outputDevice": "off"
}
},
"systemAudioMidiIOListing": {
"audioDrivers": "CoreAudio",
"audioInputDevices": {
"Apple Inc.: EVO for Reaper": {
"deviceId": 140,
"numChannels": 16
},
"Apple Inc.: MacBook Pro Microphone": {
"deviceId": 134,
"numChannels": 1
},
"Apple Inc.: Worms Microphone": {
"deviceId": 129,
"numChannels": 1
},
"CalDigit, Inc.: CalDigit Thunderbolt 3 Audio": {
"deviceId": 132,
"numChannels": 2
},
"Existential Audio Inc.: BlackHole 16ch": {
"deviceId": 133,
"numChannels": 16
},
"RME-Audio: Babyface Pro (73043870)": {
"deviceId": 136,
"numChannels": 14
},
"Rogue Amoeba Software, Inc.: EVO Headphones": {
"deviceId": 139,
"numChannels": 2
},
"Rogue Amoeba Software, Inc.: EVO Mic 3/4": {
"deviceId": 138,
"numChannels": 2
}
},
"audioOutputDevices": {
"Apple Inc.: EVO for Reaper": {
"deviceId": 140,
"numChannels": 16,
"sampleRates": [
44100,
48000,
88200,
96000,
176400,
192000
]
},
"Apple Inc.: MacBook Pro Speakers": {
"deviceId": 135,
"numChannels": 2,
"sampleRates": [
44100,
48000,
88200,
96000
]
},
"CalDigit, Inc.: CalDigit Thunderbolt 3 Audio": {
"deviceId": 131,
"numChannels": 2,
"sampleRates": [
8000,
11025,
16000,
22050,
32000,
44100,
48000,
88200,
96000
]
},
"Default Device": {
"numChannels": 2,
"sampleRates": [
32000,
44100,
48000,
88200,
96000,
176400,
192000
]
},
"Existential Audio Inc.: BlackHole 16ch": {
"deviceId": 133,
"numChannels": 16,
"sampleRates": [
8000,
16000,
44100,
48000,
88200,
96000,
176400,
192000,
352800,
384000,
705600,
768000
]
},
"RME-Audio: Babyface Pro (73043870)": {
"deviceId": 136,
"numChannels": 14,
"sampleRates": [
32000,
44100,
48000,
88200,
96000,
176400,
192000
]
},
"Rogue Amoeba Software, Inc.: EVO Headphones": {
"deviceId": 139,
"numChannels": 2,
"sampleRates": [
44100,
48000,
88200,
96000,
176400,
192000
]
},
"SAM: U28E590": {
"deviceId": 130,
"numChannels": 2,
"sampleRates": [
32000,
44100,
48000
]
},
"Sonarworks: SoundID Reference": {
"deviceId": 137,
"numChannels": 2,
"sampleRates": [
32000,
44100,
48000,
88200,
96000,
176400,
192000
]
}
},
"midiInputDevices": {
"IAC Driver Daw2StreamDeck": {
"deviceId": 1
},
"IAC Driver Reaper2Touchdesigner": {
"deviceId": 2
},
"IAC Driver StreamDeck2Daw": {
"deviceId": 0
},
"KOMPLETE KONTROL S61 MK2 Port 1": {
"deviceId": 3
},
"KOMPLETE KONTROL S61 MK2 Port 2": {
"deviceId": 4
},
"Komplete Kontrol DAW - 1": {
"deviceId": 6
},
"USB MIDI Device": {
"deviceId": 5
}
},
"midiOutputDevices": {
"IAC Driver Daw2StreamDeck": {
"deviceId": 1
},
"IAC Driver Reaper2Touchdesigner": {
"deviceId": 2
},
"IAC Driver StreamDeck2Daw": {
"deviceId": 0
},
"KOMPLETE KONTROL S61 MK2 Port 1": {
"deviceId": 3
},
"KOMPLETE KONTROL S61 MK2 Port 2": {
"deviceId": 4
},
"Komplete Kontrol DAW - 1": {
"deviceId": 6
},
"USB MIDI Device": {
"deviceId": 5
}
}
}
}
and here’s the output from the Cabbage console when I first compile:
Cabbage VERBOSE: Resetting csound ...
csound = 0x0x15b31e120Cabbage.cpp (110) setupCsound [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: IPlugAPPHost::IPlugAPPHostCabbageAPP_host.cpp (42) IPlugAPPHost [Thread ID: 0x1f9670f40]
Cabbage VERBOSE:
RtAudio Version 6.0.1CabbageAPP_host.cpp (659) ProbeAudioIO [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: RtApiCore::probeDeviceInfo: system error (CoreAudio unknown error) getting sample rate info.CabbageAPP_host.cpp (1279) errorCallback [Thread ID: 0x1f9670f40]
Cabbage INFO: UnifiedCSD: /Users/luba/Audio/Cabbage/sliceman-c3/keyboard-example.csd
Cabbage INFO: --Csound version 7.0 (double samples) Jan 7 2025[commit: 6f7dfd8d3434c9c6f8be3d02110be2fcc5613cfb]
Cabbage INFO: libsndfile-1.2.2
Cabbage INFO: sr = 48000.0,
Cabbage INFO: kr = 1500.000,
Cabbage INFO: ksmps = 32
Cabbage INFO: 0dBFS level = 1.0,
Cabbage INFO: A4 tuning = 440.0
Cabbage INFO: audio buffered in 1024 sample-frame blocks
Cabbage INFO: SECTION 1:
Cabbage VERBOSE: RtApiCore::probeDeviceInfo: system error (CoreAudio unknown error) getting sample rate info.CabbageAPP_host.cpp (1279) errorCallback [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: RtApiCore::probeDeviceInfo: system error (CoreAudio unknown error) getting sample rate info.CabbageAPP_host.cpp (1279) errorCallback [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: Assigning called host callback function.CabbageAPP_host.cpp (136) InitProcessor [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: RtApiCore::probeDeviceInfo: system error (CoreAudio unknown error) getting sample rate info.CabbageAPP_host.cpp (1279) errorCallback [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: RtApiCore::probeDeviceInfo: system error (CoreAudio unknown error) getting sample rate info.CabbageAPP_host.cpp (1279) errorCallback [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: RtApiCore::probeDeviceInfo: system error (CoreAudio unknown error) getting sample rate info.CabbageAPP_host.cpp (1279) errorCallback [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: Attempting to start audio with the following settings:
SR: 48000
Buffer Size: 512
Input device: RME-Audio: Babyface Pro (73043870)
Number of channels: 2
Output device: RME-Audio: Babyface Pro (73043870)
Number of channels: 2CabbageAPP_host.cpp (1005) InitAudio [Thread ID: 0x1f9670f40]
Cabbage VERBOSE: Connection establishedCabbageAPP_host.cpp (302) operator() [Thread ID: 0x16db1f000]
Cabbage VERBOSE: Interface has loaded.CabbageProcessor.cpp (151) interfaceHasLoaded [Thread ID: 0x16db1f000]
and here’s the dev tools console (sorry, couldn’t think of a better way than a screenshot, let me know which parts are of most interest and I can copy paste the text)
At the bottom is what happens when I click a key on the keyboard widget. No sound plays. I wonder if this is related to the csd not reloading? This is the message:
Uncaught TypeError: vscode.postMessage is not a function
at Cabbage.sendMidiMessageFromUI (cabbage.js:71:14)
at MidiKeyboard.noteOn (keyboard.js:102:15)
at MidiKeyboard.pointerDown (keyboard.js:61:12)
When I save the CSD in VS Code, nothing happens in either the Cabbage output console or the dev tools console.
Here’s what I see in dev tools when I re-compile manually:
ERR [Extension Host] Cabbage: Failed to find free port: Error: listen EADDRINUSE: address already in use :::9991
at Server.setupListenHandle [as _listen2] (node:net:1908:16)
at listenInCluster (node:net:1965:12)
at Server.listen (node:net:2067:7)
at /Users/luba/.vscode/extensions/cabbageaudio.vscabbage-1.0.23-alpha/dist/extension.js:2:57483
at new Promise (<anonymous>)
at u.findFreePort (/Users/luba/.vscode/extensions/cabbageaudio.vscabbage-1.0.23-alpha/dist/extension.js:2:57204)
at /Users/luba/.vscode/extensions/cabbageaudio.vscabbage-1.0.23-alpha/dist/extension.js:2:43317
And then:
Then the rest seems to be as before.
Just to be sure, I created a new profile in VS Code and disabled all extensions except for cabbage and Csound from kunstmusik but it didn’t solve the issue.
Let me know if there’s anything you’d like me to try.
Looking forward to tinkering! Cheers