Cabbage Logo
Back to Cabbage Site

Live Mic Input?

Hello! Does someone know an example of how to start working with an input mic?
It is possible to get the values of the input as an f-table?

Cheers!

If you go create a new effect in Cabbage it will automatically give you access to the microphone input, which is the audio input for a VST. If you wish to write the value to a function table you will need to use one of the table writing opcodes. It’s pretty trivial. The file player to function table example I posted some weeks ago does the same thing, only with a file instead of a live input.

1 Like

Thank you for your answer. I just created a new effect but it doesn’t seem work. I have an USB Mic. I went to Cabbage’s settings to see if I’m using the Mic as an input and yes, everything looks normal (it says front panel). It runs but I can’t hear my voice.

Can you post the .csd file you are using? When you create a basic effect you will need to turn up the gain slider to hear anything…

Yes, I know. The code I use is the basic fx code.

<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginid("def1")
rslider bounds(296, 162, 100, 100), channel("gain"), range(0, 1, 0, 1, .01), text("Gain"), trackercolour("lime"), outlinecolour(0, 0, 0, 50), textcolour("black")

</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d 
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
ksmps = 32
nchnls = 2
0dbfs = 1


instr 1
kGain chnget "gain"

a1 inch 1
a2 inch 2

outs a1*kGain, a2*kGain
endin

</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7] 
</CsScore>
</CsoundSynthesizer>

That looks fine. When you go into the audio settings do you see any movement in the simple level meter when you speak into the mic? I use a simple USB mic with Cabbage from time to time and haven’t noticed any issues with it. What audio drivers are you using? Could it be that Cabbage is trying to use the ASIO drivers, but these aren’t set to use the USB mic?

I have Mac, so is Coreaudio I think? No, I don’t see any movement. It is An “Usb pnp sound device”.

I will try on my mac when next our paths cross. I don’t get to see it much these days because of other commitments, but I’ll try to get to it soon. I take it that the mic works fine in all other applications?

Yes, it works in other applications. Ok, thank you.

Did you sort this out? I just tested here on my OSX machine and I have no problems seeing the live input from my USB mic. Here are a few screens of my settings…


Hey thank you! Sorry for the late response, I’ve been really busy lately. I tried and no. I didn’t get any response from the volume meter. Perhaps because is a “USB PnP Device” it works differently? I tried with Csound command line and it worked.