Aratu music written to play, and to change while it plays

17. Sound and effects

▶ Open in Aratu to hear and change the examples

Each part has a sound and a chain of effects, written as signal flow:

bass: synth.saw -> lowpass -> reverb
bass = | c2 _ c2 eb2 | f2 _ g2 bb1 |
bass {
  reverb.mix = 0.42
  lowpass.cutoff = 800 Hz
  lowpass.resonance = 0.3
}

Every number that sets a parameter is also a control: the editor draws a knob beside it, shaped by the parameter (a cutoff knob reads in hertz on a logarithmic scale, a mix knob from 0 to 1). Turning the knob rewrites the number, so saving the text saves the performance. Hold Shift for finer steps. A number written in another unit keeps it: 1.2 kHz turns in kilohertz, 40% in percent.

The effects are Manguebyte's, and go in the chain in any order (bass: synth.saw -> eq -> chorus -> delay); the engine always runs them in the same order, from the filter to the delay:

Effect Parameters
the part volume (0 to 1), pan (-1 left to 1 right), reverb.mix (how much goes to the mix's reverb, 0 to 1)
highpass, lowpass cutoff (20 to 20000 Hz), resonance (0 to 1)
eq low_gain, mid_gain, high_gain (-24 to 24 dB), low_freq, mid_freq, high_freq, mid_q
drive amount (0 to 36 dB), output, mix, shape (0 smooth, 1 soft, 2 hard, 3 folded)
bitcrush bits (1 to 16), rate (Hz), mix
compressor threshold, ratio, attack, release, knee, makeup, mix
chorus, flanger, phaser mix, rate, depth, and more: voices, feedback, stages…
tremolo, autopan rate, depth, shape (0 sine, 1 triangle, 2 square, 3 and 4 saw), sync (in beats)
delay time (in s or ms), feedback, mix, damping, pingpong, sync (in beats)

Sounds. Each sound has a code, written at the head of the chain: bass: bass.slap -> reverb, drums: drums.808, piano: piano.grand. The Sounds panel, beside the messages in Play, lists them all by family (drum kits, keyboards, mallets and bells, plucked strings, basses, winds, synthesizers), plays a bar of each and puts the code in the text with a click. A code that does not exist is reported, with the closest one: "did you mean bass.slap?". Without a code, drums, guitar and chords pick their own.

Some sounds play the accent their own way: in bass.slap a plain note is the thumb and an upper-case one is a pop, the string pulled (| e2 E3 e2 E3 |); in bass.acid upper case opens the filter, like the TB-303's accent.

The sounds marked recorded (pianos, harpsichord, pipe organ, harp, marimba, vibraphone, xylophone, glockenspiel, kalimba, tubular bells, tenor sax, harmonica, recorder and the acoustic kit) are recordings from the Versilian Community Sample Library, in the public domain (CC0), fetched the first time a piece uses them. While they arrive, a similar synthesized sound plays instead.

Alesson's recorded kit (drums.alesson) was recorded by Alesson Queiroz and is in the public domain too (CC0). Its kick, snare and crash are recordings, with several takes of each that take turns; on the snare, a ghost note (s) and the softest dynamics play a light stroke, and accents a harder one. The other drums (hi-hats, ride, toms) are synthesized.

Manguebyte's engine. Every sound in the panel plays through Manguebyte's engine, the ecosystem's audio engine, running in the browser: the recorded ones in a sampler; guitars and basses (guitar.nylon, guitar.steel, bass.finger, bass.slap) as modelled strings; the electric piano and the bell (keys.epiano, keys.bell) in FM; the organ (keys.organ) through its rotating speaker, whose speed is organ.rotary (0 stopped, 1 slow, 2 fast); the 808 (drums.808), the 808 bass (bass.808), the acid (bass.acid) and the synthesizers (synth.*). Each part has its effects in the engine, and the mix goes through a shared reverb, a glue compressor and a limiter. The Brazilian percussion and the golpe still play in a stand-in until Manguebyte has them; if something goes wrong in a performance, the switch in the Sounds panel turns Manguebyte off and everything plays in the stand-in.

A sound plays only once it has been downloaded. When you press Play or Listen, Aratu waits for the piece's sounds to arrive, and a notice at the bottom of the screen shows which are downloading. A sound changed while the music plays comes in when it arrives; until then the one before goes on. If a download fails, or gets no answer in 60 seconds, the same notice says which sound, why, and what plays instead: the stand-in engine's copy or a similar sound.

Parameters can change by bar like anything else: at bar 16: bass.reverb.mix = 0.65.