BRUME
Lua 5.4
  Studies  /  Lua scripting  /  six progressive pieces

Hear it in
one line.

Brume ships with six tutorial scripts. Each makes sound immediately on load and teaches one concept through commented, modifiable code. Start with Study 1, change a number, save the file, hear it via hot-reload.

LanguageLua 5.4
Location~/brume/scripts/
Hot-reloadwithin 2 s
TransportClock-aware
Study 01
Sound
note_on
Study 02
Rhythm
clock.sync
Study 03
Chords
brume.chord
Study 04
Control
add_param
Study 05
Layers
coroutines
Study 06
Effects
set_fx

Study 01 · Sound

One line makes sound.

The simplest script in Brume. A single call to brume.note_on is enough to play a note. Load this script on the SCRIPT page and a steady A3 plays through the Timbral engine.

Change the number to try a different note. Save — Brume hot-reloads within two seconds and you hear the change.

Transport  ·  110 bpmbeat 1 / 4
Conceptbrume.note_on
Length3 lines
Makes soundImmediately
Time to edit~30 seconds

    
◆ Reference

A small, expressive surface.

Notes
brume.note_on(part, note, vel)
Trigger a MIDI note on a part. Velocity is 0.0 – 1.0.
Notes
brume.note_off(part, note)
Release a MIDI note on a part.
Parameters
brume.set_param(part, name, val)
Set any of the 52 synthesis parameters. Names match the UI.
Music
brume.chord(root, type)
Returns a table of MIDI notes. maj, min, maj7, dom7, sus4, 9, …
Music
brume.scale(root, intervals)
Build a scale from a root and interval table.
Transport
brume.schedule(beat, fn)
Call a function at an absolute beat position.
Clock
clock.run(fn)
Launch a coroutine on the transport clock.
Clock
clock.sync(beats)
Yield for a musical duration. 1/4 = quarter note.
DSP
dsp.delay(max)
Delay line with linear interpolation. :process, :set_time.
DSP
dsp.allpass(max, gain)
Schroeder allpass for reverb diffusion.
DSP
dsp.lowpass(cutoff)
One-pole lowpass filter. :process, :set_cutoff.
Screen
screen.fill_circle(x, y, r)
Custom 20fps visualizer canvas for Lua FX panel.