Skip to content

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 audio output device found

  1. 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.
  2. Close any app that holds the device for itself.

Failed to build stream: … / Failed to start stream: …

  1. Close other audio apps: DAWs, browser tabs that play audio.
  2. Check that the device can run the sample rate in [audio] sample_rate.
  3. Name another device in [audio] output.
  4. 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_rate is 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.

  1. Remove [audio] sample_rate, and let resonon choose a rate the two share. Or set the rate the message names.
  2. Or name an output device in [audio] output that shares a rate with the input.
  3. Run reload_preferences().

To see what each device can run:

print(audio_input_devices()); // each device's sample_rates and buffer_frames
print(audio_output_devices());

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.

  1. Measure the load:

    print(audio_cpu_load()); // load and peak, from 0.0 to 1.0

    A load near 1.0 means the blocks are too short for the work.

  2. Crackles: raise [audio] buffer_size. Late reaction: lower it. 128 and 256 are the usual starting points.

    [audio]
    buffer_size = 256
  3. 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 now
print(audio_latency()); // buffer_ms, device_ms and the rest

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.

  1. The path is relative to the .non file that names it, not to the folder you started resonon in. A piece in src/ that says Sample("kick.wav") needs src/kick.wav.
  2. ../ and absolute paths work. A sample outside the project does not travel with it.
  3. A kit folder does not help: kit folders are searched for Kit("…") names, never for Sample paths.
  4. For one sound out of a kit, name it as the kit does: Sampler(Kit("CR-78")).sample("bd").

Failed to load sample: …

The file was found, but it is not a WAV file resonon can read.

  1. Resonon reads WAV only. Convert MP3, OGG and FLAC files to WAV.
  2. Check the file opens in another app.

Failed to parse kit.toml: TOML parse error at line 1, column 5 …

  1. Fix the line the message names — usually a missing comma, quote or bracket.
  2. Check that every sample path in kit.toml points 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.

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.

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.

  1. Set root for the sample in the kit’s kit.toml, or
  2. pass it when you load the sample: keys.load_sample("piano", C4). load_sample takes the sample’s name in the kit, not a file path.

A track is silent, doubled, or heard through the wrong effects: its output or a send is not what you think.

  1. Print the routing — every track, the ones you name, or one track:

    routing_report();
    routing_report(drums, bass);
    drums.routing_report();
  2. Put a track back to its default — output on master, no sends — with reset_routing(), then route it again. It chains:

    drums.reset_routing().set_send(reverb_bus, 0.5);

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.