Instruments
Instruments are named voice definitions. You assign them to channels and reference them from patterns and sequences. Field names and legal type= values depend on the active chip.
In BeatBax Desktop, you can also edit instruments graphically with the Instrument Editor (Experimental). With Live edit on (default), valid field changes rewrite the same inst lines described here; turn it off to audition a panel draft, then Apply to the editor or Revert to discard panel edits.
Syntax
inst <name> type=<type> [<field>=<value> ...]
| Concept | Notes |
|---|---|
name | Identifier used in channel … => inst <name> and as a pattern token when note= is set |
type= | Chip-specific voice (e.g. Game Boy pulse1, NES triangle, SMS tone1) |
| Fields | Chip-specific parameters (duty, env, wave=, macros, …) |
channel 1 => inst lead seq melody
Shared ideas (all chips)
| Feature | Where documented |
|---|---|
Software macros (vol_env, pitch_env, arp_env, duty_env, …) | Instrument macros |
Default pitch / named drum tokens (note=, Game Boy uge_note=) | Instrument note mapping |
Reusable .ins libraries | Imports |
Chip pages list which types accept which fields.
Chip-specific settings
Instrument type= and hardware fields live in Sound Chip Plugins:
| Chip | Guide |
|---|---|
| Game Boy | Game Boy |
| NES | NES |
| SMS / Game Gear | SMS |
| Spectrum 128 / CPC | Spectrum 128 |
Minimal example
Interactive playback loads in the browser.
…inst lead type=pulse1 duty=50 env=gb:13,down,1 # pulse 1 — melodyinst bass type=pulse2 duty=25 env=gb:10,down,1 # pulse 2 — bass
pat lead_p = E5 . G5 C6 . G5 E5 .pat bass_p = C3:4 G2:4…Importing instrument libraries
Pull shared definitions from a .ins file so songs stay short:
import "local:lib/drums.ins" # CLI / desktop
import "github:user/repo/main/melodic.ins" # CLI, desktop, browser
import "https://example.com/kit.ins" # CLI, desktop, browser
Merging is last-wins: a local inst with the same name overrides an imported one. Full syntax, platforms, and security rules: Imports.
The playable kit below is the result of a shared drum library (instruments inlined so the demo runs in the docs player):
Interactive playback loads in the browser.
…# Shared kit (same idea as importing a .ins file)inst kick type=noise gb:width=7 uge_note=C-6 length=16 pitch_env=[0,-2,-4,-6] vol_env=[15,12,8,4]inst snare type=noise gb:width=7 env=gb:13,down,1 length=16 uge_note=C-7 note=C6 pitch_env=[0,7,0] vol_env=[13,10,6,2]inst hat type=noise gb:width=15 env=gb:5,down,1 uge_note=C-8 note=C6
pat drums = kick . hat . snare . hat hat # instrument names as tokens…See also
- Instrument Editor — graphical editing in Desktop
- Instrument macros
- Instrument note mapping
- Channels
- Tutorial — Instruments