Cabbage Logo
Back to Cabbage Site

Sampling rate problem with USB mic - no simutaneous input/output

Good morning, new community (to me)… I joined the forum to post this. I first tried Cabbage yesterday and, since I have many basic csound skills, I was quickly building some fun real-time instruments. Now that I feel lik Cabbage is something I can commit to, I’m interested in testing all the features, and when I discovered my girlfriend’s Shure X2U microphone USB adapter I was all set to build some live vocal FX but…

Cabbage is refusing to give me both live input through the mic adapter (a USB device with its driver installed) and also output through the laptop’s Realtek speakers at the same time. Let me explain in more details.

I noticed the problem because the example csound file that loads automatically when you click “new effect” was playing but not making any sound, and weirdly after I would run it, my other csound files that had been working fine would go silent too (but still run without an error).

Iferring that the problem had to do with the X2U device that had just been installed/connected, I went to Settings>Audio and MIDI.

SO then I see whats going on. Turns out that my Output had been changed from the usual Realtek speakers (built in laptop speakers) to . But I didn’t do that. Weird. The Input device is listed as the Shure X2U microphone, so that seems to be working. WHy did Cabbage turn off my speaker output when it turned on my Mic input?

*Note: at this point the monitoring signal display that you can see on the Settings>Audio and MIDI page next to “input” was lighting up when I would speak into the microphone, so Cabbage seemed to be getting a signal from my microphone.

SO I did the obvious thing, try to set the Output back to the speakers (only available output device I have right now) so I can hear my csound files again. WHen I do that I get an error message:

Error when trying to open audio device! The input and output devices don’t share a common sample rate!

This error is consistent and does exactly what it sounds like: prevents you from setting the microphone as the input at the same time as the speaker output, no matter what order you set them in. The microphone is apparently sampling at 44.1 kHz an the speakers running at 48 kHz. The official specs for the Shure X2U says it can sample at up to 48 kHz… whomp whomp. Also, the X2U seems to have a built in output that is selectable in Cabbage as the output device instead of the speakers. BUT the X2U output is at 48000 Hz (like the speakers) while the X2U input is at 44100 Hz, so you get the same error regardless of what you choose for the output device.

I supposed I could go hunt down some a new 44100 Hz sound card or get a different audio interface to fix this, and in a way it is a more elegant solution to simply always use devices that work at the same sampling rate, but I don’t want to buy any new devices right now, I want to use this nifty Shure thing with my laptop’s speakers to do some concept work and hone my Cabbage chops. Perhaps there’s a third party software fix? I have heard of something called an ASIO driver that can convert sampling rates for audio devices?

Obviously it’s not exactly a bug (or is it?), but I’m almost surprised I couldn’t find any documentation about this, but then again this is Cabbage, the docs are still pretty bare bones.

Thanks in advance for any contributions.

OP update – I discovered the solution (for WIndows 10).

You can change the sampling rate of the Shure X2U device through the windows control panel. I went to Settings>Sound. I went to the Recording tab. My recording devices are listed. Highlight the Shure device by clicking on it, click on Properties to open the device’s properties. Go to the Advanced tab and under “Default Format - select the sample rate and bit rate…” I choose the settings for Sample Rate (48000 to match my speakers), bit rate (there was only one bit rate option, 16) and channels (2 for stereo - selecting 1 channel resulted in sound in only one ear).

Perhaps other users could post the equivalent solution for Mac and Linux.

1 Like

I’m glad you got it sorted, and thanks for posting the solution.

You think? In what way? http://cabbageaudio.com/docs/introduction/ shows a full entry for each and every widget, along with a getting started guide and lots of other miscellaneous topics. In terms of open source projects, I find it quite good. @Karamel1 helped me update the current docs, and I think they are much improved over the earlier ones. Of course, the docs could always be better. That will be always be true. If you have anything that you wish me to add please let me know. Of if you like, fork the repo and make a pull request. Help is always welcome :wink:

I had the same problem with Shure SM7B.
Thank you for your solution. It seems that Cabbage has something against Shure’s microphones. :slight_smile: