I get crackling/popping audio with v2.5 under Linux with ALSA. It’s related to the Buffer size, the smaller the buffer, the higher the popping frequency. It pops even with very high buffer sizes like 4096x3. It sounds like not the entire audio buffer is filled or something. CPU usage is at ~4%. It first happened with one of the 2.5 betas, don’t remember which one. It didn’t happen with earlier versions. It doesn’t happen all the time – sometimes it crackles, then over time it gets somewhat better, then everything is fine, later the crackling starts again. Everything seems to work okay when using JACK. I’m using an ES1371 card. Other audio apps don’t crackle.
Using a 3ghz AMD dualcore, Kernel 2.6.31-16-386 SMP (non-RT), Ubuntu 9.10, ALSA 1.0.20.
Well yes, that is imho quite a natural behavior that the smaller your buffer-size becomes, the larger the risk is that crackling occurs.
It does not necessarily have to relate to cpu but can also be that more amount of samples have to be processed than the buffer-size allows to (that indeed depends which kind of samples or instruments you use and what bitrate and frequency)
I have no idea how this Alsa / host synergy could be best optimized though.
… do you have the same problem when disabling the capture/recording device in Renoises Audio prefs, only using an output device?
It seems that with some drivers synchronizing the recording and playback device causes a lot of troubles. We might try out some alternative ways to do so in Renoise, if Jack does a better job here. unfortunately this changes with every driver, aka every driver seems to behave different here.
Opened Renoise, played back a pattern, crackling. Disabled In Device in Prefs, played back a ~4 minute song, with no crackling.
I guess that’s it!
Edit: I’ll use that workaround for now. If it still crackles with In Device disabled I’ll post here.
When you say “sync the recording and playback device”, do you mean you read from the input and write to the output in one go (ie, in one callback function)? I can see why that might cause trouble. What if the input device doesn’t use exactly the same sampling rate? Might be driven by a different quartz… The ES1371 has (apparently) 2 DACs and 1 ADC, and I wouldn’t rely on any of them being at the exact same rate. Which device I choose for the output, hw:0,0 or hw:0,1 doesn’t seem to make a difference for the crackling.
The ES137* are relatively common chips. Good old Creative Labs stuff
I also have crackles when I set a recording AND output device for my SB Audigy 2. (Ubuntu 9.10 / Alsa 1.0.20) When I only set the Audigy in the output device and leave the input/recording device blank, no crackles occur.
Hope this can/will be fixed in a upcoming release.
If I want to record I use Pulseaudio. I route the output into gnome’s sound recorder and save the file. Then I import the sample in Renoise.
It should be nicer to record from inside renoise ofcourse. But this is a workaround for now.
Jack performs much better than running alsa in full duplex mode. When I use alsa with the output device only (and set the input device to none), I notice no big differences in performance in comparision with jack. Since I prefer alsa instead of jack I hope you can fix the full duplex problem with alsa. I don’t like jack and jackctl. I think it’s too complicated. Alsa is easier.
@taktik: is it possible to use Renoise with Pulseaudio to record in the sample editor? When I now want to record, I use the gnome sound recorder. This program will show up on the pavucontrol window so that I can record the audio output. When I start Renoise, Renoise itself doesn’t show up in the pavucontrol window, so I cannot record directly into Renoise. Does Renoise not support Pulseaudio (yet)?
I’m very happy with this setup. PulseAudio works regardless of if Jack is running or not. When Jack is started, everything from PulseAudio is available for other applications like Renoise, so recording to Renoise is no problem. It even enables recording directly from Spotify (via wine->jack) into Renoise. Which might of course be illegal, but at any rate is technically possible. The same goes for recording from Youtube or other media viewed in your browser.
I have added a few more things to the qjackctl scripts. Mainly to kill any processes that might stop pulseaudio from shutting down when starting Jack. Currently my “Execute script on Startup” looks like: