Fix Audio Problems
Find the message or the symptom, then work through the fix. Quoted blocks are what resonon prints.
Device settings live in ~/.resonon/preferences.toml — see
Set Up This Machine.
No output device
Section titled “No output device”No audio output device found
- Check that the system has an output device and that it is turned on. On macOS, open Audio MIDI Setup and look for it there.
- Close any app that holds the device for itself.
The stream does not start
Section titled “The stream does not start”Failed to build stream: … / Failed to start stream: …
- Close other audio apps: DAWs, browser tabs that play audio.
- Check that the device can run the sample rate in
[audio] sample_rate. - Name another device in
[audio] output. - Run
reload_preferences()after the change, or restart.
Input and output disagree on the sample rate
Section titled “Input and output disagree on the sample rate”This session runs at 48000 Hz, which Scarlett 2i2 cannot. It reports 44100 Hz; see audio_input_devices().
[audio] sample_rateis holding the session at 48000 Hz. Scarlett 2i2 and MacBook Pro Speakers both run at 44100 Hz: remove that line to let the session take a rate they share, or set it to 44100.
A session has one sample rate. Resonon picks one that both devices can run, so this appears only when
they share none, or when [audio] sample_rate sets one the input cannot run. Playback still works;
recording and monitoring are off.
- Remove
[audio] sample_rate, and let resonon choose a rate the two share. Or set the rate the message names. - Or name an output device in
[audio] outputthat shares a rate with the input. - Run
reload_preferences().
To see what each device can run:
print(audio_input_devices()); // each device's sample_rates and buffer_framesprint(audio_output_devices());The audio crackles, or reacts late
Section titled “The audio crackles, or reacts late”The block size is the trade. A smaller one reacts sooner and leaves less time to compute each block; too small, and blocks are late and crackle.
-
Measure the load:
print(audio_cpu_load()); // load and peak, from 0.0 to 1.0A
loadnear1.0means the blocks are too short for the work. -
Crackles: raise
[audio] buffer_size. Late reaction: lower it. 128 and 256 are the usual starting points.[audio]buffer_size = 256 -
Run
reload_preferences()and listen again. A size the device does not take is refused, and the message names the range it takes.
print(audio_buffer_size()); // the size the device delivers nowprint(audio_latency()); // buffer_ms, device_ms and the restA sample file is not found
Section titled “A sample file is not found”Sample file ‘kick.wav’ not found. Looked for: /Users/you/song/src/kick.wav
Sample("…") takes a path, and the message names the only place resonon looked.
- The path is relative to the
.nonfile that names it, not to the folder you started resonon in. A piece insrc/that saysSample("kick.wav")needssrc/kick.wav. ../and absolute paths work. A sample outside the project does not travel with it.- A kit folder does not help: kit folders are searched for
Kit("…")names, never forSamplepaths. - For one sound out of a kit, name it as the kit does:
Sampler(Kit("CR-78")).sample("bd").
A sample does not load
Section titled “A sample does not load”Failed to load sample: …
The file was found, but it is not a WAV file resonon can read.
- Resonon reads WAV only. Convert MP3, OGG and FLAC files to WAV.
- Check the file opens in another app.
A kit does not load
Section titled “A kit does not load”Failed to parse kit.toml: TOML parse error at line 1, column 5 …
- Fix the line the message names — usually a missing comma, quote or bracket.
- Check that every sample path in
kit.tomlpoints to a WAV file that exists.
Without a kit.toml, files named like General MIDI drums (bd, sd, hh, …) get those notes, and
the other files get notes counting up from C2. Every key: kit.toml.
A name is not in the kit
Section titled “A name is not in the kit”Sample ‘clap’ not found in kit ‘CR-78’. Available: [“bd”, “rs”, “sd”, …]
The kit loaded, but it has no sound by that name. Use a name from the list, or add the sound to the
kit’s kit.toml.
A melodic sample has no root note
Section titled “A melodic sample has no root note”Sample ‘piano’ has no root note; add root to kit.toml or pass one to .load_sample()
A melodic sampler needs to know which note the sample plays, to pitch it.
- Set
rootfor the sample in the kit’skit.toml, or - pass it when you load the sample:
keys.load_sample("piano", C4).load_sampletakes the sample’s name in the kit, not a file path.
A track plays somewhere unexpected
Section titled “A track plays somewhere unexpected”A track is silent, doubled, or heard through the wrong effects: its output or a send is not what you think.
-
Print the routing — every track, the ones you name, or one track:
routing_report();routing_report(drums, bass);drums.routing_report(); -
Put a track back to its default — output on
master, no sends — withreset_routing(), then route it again. It chains:drums.reset_routing().set_send(reverb_bus, 0.5);
A modulated parameter clicks
Section titled “A modulated parameter clicks”A signal that jumps — steps, a controller’s 128 values — makes a parameter it drives click. Smooth
it with .smooth(ms):
use "std/instruments" { Sampler, Kit };use "std/effects" { Delay };use "std/signals" { signal };
let drums = AudioTrack("drums");drums.set_instrument(Sampler(Kit("CR-78")));drums << [bd sd bd sd];
let delay = Delay("delay", 0.25, 0.4);drums.set_effects(#[delay]);
delay.parameter("Time") << signal([0.1 0.2 0.35 0.15]).smooth(10);How much to smooth depends on the parameter; see Step a Parameter Through Values.
Related
Section titled “Related”- Set Up This Machine — choose the device, rate and block size
- Preferences — every
[audio]key - Play Samples — kits, samples and melodic samplers
- Fix Plugin Problems — plugins that are not found or do not load