Physical Instruments
Piano, Guitar and Violin — strings, bodies, hammers, picks and bows
Physical Instruments
Three instruments in bahn are physical models rather than samples or oscillators: Piano, Guitar and Violin. Each one simulates strings, a resonant body and the thing that sets the strings moving — a hammer, a pick or a bow.
That has two consequences you will notice immediately. Every control changes
the instrument rather than filtering its output, so a hard pluck is brighter
because the string bends further and not because a filter opened. And you can
move any control while a note is sounding without a click, including
Scale, which resizes the whole instrument.
What Scale does
Scale resizes the instrument. It moves three things together:
- Stiffness falls as the instrument grows. A longer string is less dominated by its own bending, which is why a concert grand sounds purer than a spinet and a dreadnought purer than a parlor guitar.
- Ring time lengthens. More string means more stored energy.
- The body's resonances fall. A bigger box resonates lower.
Scale never changes pitch. A bigger piano is not a lower piano — it is a
piano whose strings are longer at the same tuning. If you want a lower
instrument, write lower notes.
You can sweep it or throw it across its full range mid-note. Neither clicks.
Piano
An 88-key compass of stiff strings in unison groups over a soundboard. It plays any note the tracker sends; only the physics is fitted to MIDI 21–108, so a note outside that range still sounds at the pitch you asked for.
Maximum: 12 voices of 3 strings, 48 partials each.
Node parameters
| # | Name | What it does |
|---|---|---|
| 0 | Scale |
Spinet to concert grand |
| 1 | Brightness |
How far up the partial series the hammer reaches |
| 2 | Strike |
Where the hammer lands along the string |
| 3 | Detune |
Spread across the strings of a unison. This is the aftersound |
| 4 | Decay |
String ring time |
| 5 | BodyDecay |
Soundboard ring time |
| 6 | Hardness |
Hammer felt. Harder felt is brighter at every velocity |
| 7 | Gain |
Output level |
| 8 | Pedal |
Sustain. 0x81 and above lifts the dampers |
Lane parameters
| # | Name | What it does |
|---|---|---|
| 9 | Note |
The key |
| 10 | Velocity |
How hard. Loud is bright, because the felt compresses |
The pedal is not optional bookkeeping. A tracker row carries no key release, so without the pedal control a note has a damper resting on it and rings about half as long. Put the pedal down for a sustained passage.
Guitar
Six strings by default, each carrying one note at a time. The compass reaches down to B1 so seven-string and baritone tunings work.
Maximum: 7 voices of 1 string, 64 partials each.
One note per string
This is the part that makes it play like a guitar rather than a keyboard. A string carries one note. Play a second note on the same string and the first one stops, because the finger that stops the new note is on the same wire.
The instrument picks the string for you: the highest-pitched one that can
reach the note, then downward if that string is busy. Use the String lane
parameter when you want to choose — a chord voicing is a decision about where
on the neck you are playing, and the automatic rule cannot know your intent.
Tunings
Tuning |
Name | Open strings |
|---|---|---|
| Low | Standard E | E2 A2 D3 G3 B3 E4 |
| Drop D | D2 A2 D3 G3 B3 E4 | |
| Seven-string, low B | B1 E2 A2 D3 G3 B3 E4 | |
| High | Baritone B | B1 E2 A2 D3 F#3 B3 |
The seven-string table sounds seven strings. The others sound six.
Node parameters
| # | Name | What it does |
|---|---|---|
| 0 | Scale |
Parlor to dreadnought |
| 1 | Tuning |
The table above |
| 2 | Brightness |
Pick hardness. A plastic pick reaches further than a thumb |
| 3 | PickPos |
Over the soundhole through near the bridge |
| 4 | Decay |
String ring time |
| 5 | BodyDecay |
Body ring time |
| 6 | Sympathy |
How much an open string rings when another is plucked |
| 7 | Damp |
Palm mute |
| 8 | Gain |
Output level |
Lane parameters
| # | Name | What it does |
|---|---|---|
| 9 | Note |
The pitch |
| 10 | Velocity |
Pluck strength |
| 11 | String |
Which string. FF chooses for you |
Sympathy is worth finding. Pluck one string and the others start to
ring, because the bridge carries energy between them. It is most of what
separates this from a sampled guitar. It is filtered by pitch agreement, so a
chord thickens rather than turning to mush — and a string you have muted takes
nothing.
Violin
Four strings — G3, D4, A4, E5 — driven by a bow, not by a pluck. The bow is a continuous stick-slip friction loop, so a note does not decay while you are bowing it.
Maximum: 4 voices of 1 string, 64 partials each.
The bow is three per-row controls
A bow stroke belongs to a note, so the bow's controls are lane parameters rather than node parameters. You write them per row, and you can change them mid-note to swell, lean in or lift.
| # | Name | What it does |
|---|---|---|
| 7 | Note |
The pitch |
| 8 | BowSpeed |
How fast the bow travels. Zero lifts the bow |
| 9 | BowForce |
Pressure, relative to what plays at this speed |
| 10 | BowPos |
Fingerboard through bridge |
BowSpeed at zero is how you end a note. A tracker row carries no key
release, and a bowed note never decays on its own, so without this a note runs
forever. NOTE_OFF also works and stops everything at once.
BowForce is relative, not absolute. The pressure that makes a note speak
depends on how fast you are bowing and how close to the bridge you are, so this
control is a multiple of whatever is right for the current speed and position.
The middle of its range plays. Below it the tone thins toward a surface sound;
above it the bow holds the string so hard it cannot break away and the note
chokes. Both of those are sounds players use.
Node parameters
| # | Name | What it does |
|---|---|---|
| 0 | Scale |
Violin body through cello body |
| 1 | Rosin |
Grip. Low whistles, high scratches |
| 2 | Brightness |
How much of the bridge resonance reaches the output |
| 3 | BodyDecay |
Corpus ring time |
| 4 | VibratoRate |
Cycles per second |
| 5 | VibratoDepth |
Cents either way |
| 6 | Gain |
Output level |
Vibrato costs nothing here. It moves the pitch and leaves the level alone, which is a property of how the strings are modelled rather than something the instrument works to achieve.
Three things these models do not claim
- The body tables are partly measured and partly plausible. The violin's five signature modes and the guitar's three coupled low resonances come from published measurements. The higher modes in both are a generic upper body with no source behind them.
- The bow uses a velocity-dependent friction curve. It is not the thermal friction model, which is better physics and would need measurements this project does not have.
Scaleis not a size simulator. It moves three quantities together. It does not model a different instrument's plate thickness, bracing or varnish.
Quality under load
These instruments simplify rather than stutter when the machine is busy. See Audio Engine → Render quality under load for what that changes and what it never changes.