Hi there, I’m new to Cabbage although relatively experienced with Jack Audio Connection Kit. Even though Jack is running and is running all the audio applications on Windows, how do I setup Cabbage to use it as the default audio device? When jackd is running on the computer, I would expect to see it as an audio device, but only seem to have JACK ASIO available?
Jack Not Available (Windows)
Hi @Sam_Hocking, welcome to the forum. I don’t think Jack is supported on Windows. TBH, I never thought about adding it considering most people just use ASIO for low latency audio. I can look into adding support for it with Cabbage 3.
I see, thanks for the reply, just wanted to make sure there wasn’t something I missed. To be honest so many otherwise Jack native software skips instigating Jack on Windows, but I’ve never understood why, Jack is far more flexible and just as stable as ASIO or WASAPI on Windows in my experience.
I’ve rarely ever used Jack on Windows, but my experience with it is the same as yours when I have. Rock solid and dependable. I guess a lot of people use ASIO because drivers usually get installed along with their soundcards.
Yes, and Jack isn’t the easiest to setup on Windows unless you’re familiar with portaudio already I guess. I got Cabbage all working via JackRouter ASIO and also via VST3 today so not bad for a beginner!
Struggling to work out what will return me the realtime playback position as seconds/samples/smpte etc but apart from that, got what I needed quite quickly really.
<Cabbage>
form caption("16-Channel_Player") size(380, 260), guiMode("queue"), colour(2, 145, 209) pluginId("mcpl")
filebutton bounds(10, 10, 117, 40) channel("loadfile"), text("Load Sample"), corners(5)
button bounds(140, 10, 80, 40) channel("play"), text("Play", "Stop"), corners(5)
soundfiler bounds(10, 76, 360, 157), channel("soundfiler1"), showScrubber(0), colour(147, 210, 0), tableBackgroundColour(0, 0, 0, 0)
label bounds(10, 230, 360, 24) visible(0), channel("warningLabel"), fontColour("white"), text("Please load 16 channel file first"), colour(147, 210, 0)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 16 ; Set to 16 channels
0dbfs = 1
; Load a sample and play the 16-channel file
instr 1
; Load the selected file into the soundfiler widget and dismiss warning if showing
SFilename, kLoadFile cabbageGetValue "loadfile"
cabbageSet kLoadFile, "soundfiler1", "file", SFilename
cabbageSet kLoadFile, "warningLabel", "visible", 0
; Trigger playback of the sample when play button is clicked
kPlayState, kPlayTrig cabbageGetValue "play"
if kPlayTrig == 1 then
if kPlayState == 1 then
event "i", "SamplePlayback", 0, -1
else
turnoff2 nstrnum("SamplePlayback"), 0, 0
endif
endif
endin
instr SamplePlayback
; Get the file path from the load file button
SFile cabbageGetValue "loadfile"
; Check if the file is empty
if strlen(SFile) == 0 then
cabbageSet "warningLabel", "visible", 1
turnoff
else
; Load the 16-channel file and play it
asignal[] diskin2 SFile, 1, 0, 1
outs asignal[0], asignal[1], asignal[2], asignal[3], asignal[4], asignal[5], asignal[6], asignal[7],
asignal[8], asignal[9], asignal[10], asignal[11], asignal[12], asignal[13], asignal[14], asignal[15]
endif
endin
</CsInstruments>
<CsScore>
; Causes Csound to run
f0 z
; Starts instrument 1 and runs it for a week
i1 0 z
</CsScore>
</CsoundSynthesizer>
If you look at teh host_info example it will show you how to access timing data from a host
Many thanks Rory. Just one other thing I don’t seem to be able to show is the soundfiler playback position? In the Soundfiler example it all works in terms of functionalitly but soundfiler says no audio file is loaded? Anything I need to configure there? In some of the help videos Soundfiler usually shows a cursor position moving during playback?
Look for scrubber position in the code. Sorry, I’m on a short break at the moment and won’t have access to a PC for a week or so.