Latency running a guitar through SC


#1

I’m trying to run my guitar into SC (through a M-Audio MobilePre interface) and I’m getting a huge latency just using SoundIn.ar. When I boot the server it says “Latency (in/out): 0.013 / 0.091 sec”, but it is clearly much more than that.
I’ve tried reducing the server latency with s.latency, but that seems to have no effect on the sound latency.
Any ideas?


#2

Hello,
s.latency is not the latency you’re looking for.
The in-to-out latency is controlled by hardware buffer size (s.options.hardwareBufferSize) and also by the driver used, especially if you’re on Windows (MME/WDMKS/ASIO etc).
On Windows the best is to use ASIO drivers (dedicated to the audio interface, or if these are not available, install ASIOA4ALL), and then control buffer size/latency in the ASIO control panel. You also need to select the ASIO driver/device using s.options.device.
Also, this pull request will eventually allow somewhat better control over selected driver in Windows.
Cheers,
Marcin


#3

Yes, I’m on Windows. My default device was MME. When I try to change it to ASIO (that shows up in device options when I boot) I get the following:

(
s.options.device = “ASIO : Realtek ASIO”;
s.reboot;
)

Booting with:
In: ASIO : Realtek ASIO
Out: ASIO : Realtek ASIO
SC_PortAudioDriver: PortAudio failed at Pa_OpenStream with error: ‘Unanticipated host error’
could not initialize audio.
RESULT = -1073740791

What now?
I’m quite unexperienced with the more technical side of things, so thanks a lot for the help!


#4

I once tried Realtek ASIO and couldn’t get it to work. You can try changing buffer size and sampleRate (try 44100 and 4800) - both in s.options - but if not I’d suggest giving ASIO4ALL a try. Web search should lead you to it easily.