diff --git a/CHANGELOG.md b/CHANGELOG.md index 387bdc6..5674b5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,19 @@ GitHub are its section here (`tools/release.sh` copies them), so add to pitch when hit hard, cymbals bloom into a wash, and a closed hat chokes an open one. Five presets. See docs/41. +- **Fretwire gets pickups, wiring and bodies.** The bass and guitar have + a second page. Choose the neck pickup, the bridge pickup, both, or both + out of phase. Pick single coil, P-90, humbucker or split coil, and set + how close the magnets sit. Real tone and volume pots roll the tone into + the mids and clean up an amp's drive. The strings now share a body, + SOLID, SEMI, HOLLOW or ACOUSTIC, that colors their decay and can be + miked (AIR). There is also an under-saddle piezo, and open strings that + ring in sympathy. New presets include twin-humbucker, p90-crunch, + semi-hollow, out-of-phase and acoustic guitars, and jazz-both, p-bass, + hollow and acoustic basses. Saved bass and guitar parts now sound + slightly different on the default solid body's dead spots; set COUPLE + to 0 for the old sound. See docs/41. + - **Separate STOP and PLAY.** Pressing STOP again while stopped returns to the loop's start, or to the song's start with the loop off. diff --git a/bench/golden/bass.txt b/bench/golden/bass.txt index 3411973..3b3c59f 100644 --- a/bench/golden/bass.txt +++ b/bench/golden/bass.txt @@ -1,6 +1,6 @@ # bench goldens for bass: case sha256(f32 L ++ f32 R) [nonharm_db thd_db] -notes 6937fb38af3c6ab2b3f575df95592cb75bfaa4e2ade23b32783fe0673f6625ec -velocity 8f5a032f4c439643181d79611e3c5100dc02797ac9f5d7031fa1a55fd966949d -held a4caf9e0aeeda62291a25bb51a33fef6a531452d7d77156581ca48d9b97aa09c -72.0 -1.0 -high 84f46ca1cfca042bd39e28fcba891fa91d158445cb51123e6585f0aaba350f8e -72.8 -29.3 -chord 4296a539b9dec08c355bfd665e1ec945bf353d3bdeff374fc2024f2f654fe8a4 2.5 6.5 +notes 26c8fbcd88dbabbc9293e7517398a1f47c0541fcf173d9577be80527060133bc +velocity e60975486103d37400cd3dbccc162edc2d735a715ee420e854138f9311b9aff8 +held 8125b1ff57d4f10926925f91d130a37e639735d320634c49e9465917fc07247e -72.2 -4.9 +high 4b58d8ef0d9247e475265d5bd28b4d393fee6135ab007aab86bb60a33c0a7205 -73.0 -30.3 +chord f0e284d9782fc34fdeaad0e3fecc6f463ca87c55a344069b7a6ed4d56fb5db52 2.8 5.4 diff --git a/bench/golden/guitar.txt b/bench/golden/guitar.txt index ffdfa19..922a33f 100644 --- a/bench/golden/guitar.txt +++ b/bench/golden/guitar.txt @@ -1,6 +1,6 @@ # bench goldens for guitar: case sha256(f32 L ++ f32 R) [nonharm_db thd_db] -notes f27519fbf925fbf57bf4fd274367307371289a1fdf90937b267b14889ebcf57d -velocity 089cd20ccd61b8cddcbb6afefe6152e92a7a17da4f780ce44941e5443067fa0c -held aaac8b719a9606f6517274cd64d52951f0b01b0f3be3fda4a29eaec92efcf8eb -73.6 -3.3 -high 8cadbe64df4d354ea25f585a7be87a4014bfc5e93a637802ac220d588d9ebe04 -73.0 -14.6 -chord 8a259ffabb8aff4de7e3ee795a06933fd11fc4b31f8c588182e32ad9ba398807 2.2 0.8 +notes 1e054305a36bbbda110a7127422c00e903ad5dfb591ddc043808769719bb3979 +velocity 6180d5c8e7ed78bfb59c802bb6e54d58257caa61d8d6d36ee4d9dbb2666cce49 +held 1a969eb89554e1597baf03dec5bfd3aa46b7da92fa843037a8840aae3d40f8aa -73.7 -3.8 +high 281079ab8def8d9e675ae3021844ed1b4d4390f41aec4a11c2baedc35e78b80e -73.1 -14.9 +chord 968bddfb42b804497d8ac22a62bed88de9514a0d2a842b82de239d0ec510d208 1.9 0.4 diff --git a/docs/20-machine-reference.md b/docs/20-machine-reference.md index 2232f31..fc46d04 100644 --- a/docs/20-machine-reference.md +++ b/docs/20-machine-reference.md @@ -60,10 +60,22 @@ project or preset stores (docs/19): real units for knobs, the option | `bs-soft` | PLUCK | SOFT | 0.05 … 6 | 2 | exp | | `bs-shape` | PLUCK | SHAPE | 0 … 1 | 0 | linear | | `bs-noise` | PLUCK | NOISE | 0 … 1 | 0.15 | pow | -| `bs-pickup` | PICKUP | POS | 0.04 … 0.5 | 0.2 | linear | -| `bs-hand` | PICKUP | HAND | 0 … 12 | 5 | linear | -| `bs-tone` | PICKUP | TONE | 300 … 12000 | 3200 | exp | -| `bs-res` | PICKUP | RES | 0 … 1 | 0.3 | linear | +| `bs-hand` | PLUCK | HAND | 0 … 12 | 5 | linear | +| `bs-pickup` | PICKUPS | NECK | 0.04 … 0.5 | 0.2 | linear | +| `bs-pickup-b` | PICKUPS | BRIDGE | 0.04 … 0.5 | 0.1 | linear | +| `bs-sel` | PICKUPS | SELECT | 0 NECK / 1 BOTH / 2 BRIDGE / 3 OUT | 0 | switch | +| `bs-type-n` | PICKUPS | N TYPE | 0 SINGLE / 1 SPLIT / 2 HUMBUCK | 0 | switch | +| `bs-type-b` | PICKUPS | B TYPE | 0 SINGLE / 1 SPLIT / 2 HUMBUCK | 0 | switch | +| `bs-height` | PICKUPS | HEIGHT | 0 … 1 | 0 | linear | +| `bs-tone` | WIRING | RESO | 300 … 12000 | 3200 | exp | +| `bs-res` | WIRING | PEAK | 0 … 1 | 0.3 | linear | +| `bs-tpot` | WIRING | TONE | 0 … 1 | 1 | linear | +| `bs-vol` | WIRING | VOL | 0 … 1 | 1 | linear | +| `bs-body` | BODY | BODY | 0 SOLID / 1 HOLLOW / 2 ACOUSTIC | 0 | switch | +| `bs-couple` | BODY | COUPLE | 0 … 2 | 1 | linear | +| `bs-air` | BODY | AIR | 0 … 1 | 0 | pow | +| `bs-piezo` | BODY | PIEZO | 0 … 1 | 0 | pow | +| `bs-symp` | BODY | SYMP | 0 … 1 | 0 | linear | | `bs-thump` | FEEL | THUMP | 0 … 1 | 0.5 | linear | | `bs-buzz` | FEEL | BUZZ | 0 … 1 | 0 | linear | | `bs-motion` | FEEL | MOTION | 0 AUTO / 1 BEND / 2 SLIDE | 0 | switch | @@ -74,13 +86,17 @@ project or preset stores (docs/19): real units for knobs, the option Presets: +- `acoustic` — An acoustic bass guitar, miked, with some piezo and the open strings in sympathy - `default` — Fingers on the neck pickup: roundwounds, direct - `fingers-bridge` — Fingers over the bridge pickup: nasal, growly, more mids - `flatwound` — Old flatwounds, tone rolled off: short, thumpy, dub and Motown +- `hollow` — A hollow violin bass on flatwounds: short, woody, a little air +- `jazz-both` — Both single coils of a Jazz-type bass, fingers: fitted to Karoryfer's Growlybass +- `p-bass` — A split-coil P-type pickup, roundwounds, tone a little back: the punchy middle of a mix - `palm-mute` — Muted with the palm: a short pick thud - `pick` — Played with a pick near the bridge: bright attack, click, rounder sustain -- `pop` — Popped string: pulled and snapped, hard push, buzz -- `slap` — Thumb slap over the end of the neck: narrow strike, fret rattle, bright +- `pop` — Popped string over a bridge humbucker: pulled and snapped, hard push, buzz +- `slap` — Thumb slap over the end of the neck, a bridge humbucker: narrow strike, fret rattle, bright ## concoction @@ -671,10 +687,22 @@ Presets: | `gt-soft` | PLUCK | SOFT | 0.05 … 6 | 1 | exp | | `gt-shape` | PLUCK | SHAPE | 0 … 1 | 0.4 | linear | | `gt-noise` | PLUCK | NOISE | 0 … 1 | 0.15 | pow | -| `gt-pickup` | PICKUP | POS | 0.04 … 0.5 | 0.24 | linear | -| `gt-hand` | PICKUP | HAND | 0 … 12 | 0 | linear | -| `gt-tone` | PICKUP | TONE | 300 … 12000 | 4500 | exp | -| `gt-res` | PICKUP | RES | 0 … 1 | 0.4 | linear | +| `gt-hand` | PLUCK | HAND | 0 … 12 | 0 | linear | +| `gt-pickup` | PICKUPS | NECK | 0.04 … 0.5 | 0.24 | linear | +| `gt-pickup-b` | PICKUPS | BRIDGE | 0.04 … 0.5 | 0.07 | linear | +| `gt-sel` | PICKUPS | SELECT | 0 NECK / 1 BOTH / 2 BRIDGE / 3 OUT | 0 | switch | +| `gt-type-n` | PICKUPS | N TYPE | 0 SINGLE / 1 P-90 / 2 HUMBUCK | 0 | switch | +| `gt-type-b` | PICKUPS | B TYPE | 0 SINGLE / 1 P-90 / 2 HUMBUCK | 0 | switch | +| `gt-height` | PICKUPS | HEIGHT | 0 … 1 | 0 | linear | +| `gt-tone` | WIRING | RESO | 300 … 12000 | 4500 | exp | +| `gt-res` | WIRING | PEAK | 0 … 1 | 0.4 | linear | +| `gt-tpot` | WIRING | TONE | 0 … 1 | 1 | linear | +| `gt-vol` | WIRING | VOL | 0 … 1 | 1 | linear | +| `gt-body` | BODY | BODY | 0 SOLID / 1 SEMI / 2 HOLLOW / 3 ACOUSTIC | 0 | switch | +| `gt-couple` | BODY | COUPLE | 0 … 2 | 1 | linear | +| `gt-air` | BODY | AIR | 0 … 1 | 0 | pow | +| `gt-piezo` | BODY | PIEZO | 0 … 1 | 0 | pow | +| `gt-symp` | BODY | SYMP | 0 … 1 | 0 | linear | | `gt-thump` | FEEL | THUMP | 0 … 1 | 0.3 | linear | | `gt-buzz` | FEEL | BUZZ | 0 … 1 | 0 | linear | | `gt-motion` | FEEL | MOTION | 0 AUTO / 1 BEND / 2 SLIDE | 0 | switch | @@ -685,13 +713,18 @@ Presets: Presets: +- `acoustic` — A flat-top acoustic, miked, with a little under-saddle piezo and the open strings ringing along - `bridge` — Picked on the bridge pickup: thin, bright, cutting; for crunch and leads into an amp - `default` — Picked, neck pickup, open position: the clean electric - `fingers` — Fingerstyle, thumb and fingers over the neck: round and soft -- `funk` — Bright, tight, short: bridge-and-middle funk chops -- `jazz` — Archtop jazz: neck pickup, tone rolled off, flatwound thump -- `palm-mute` — Palm-muted picking: a short chug, give it a high-gain amp +- `funk` — Middle and bridge single coils together: the bright, quacky funk chop +- `jazz` — Archtop jazz: a hollow body, the neck humbucker, tone rolled back, a little air +- `out-of-phase` — Neck and middle out of phase: the thin, hollow, nasal tone +- `p90-crunch` — A bridge P-90 set close to the strings: fat, raw mids that break up early in an amp +- `palm-mute` — Palm-muted picking on a bridge humbucker: a short, tight chug for a high-gain amp +- `semi-hollow` — A semi-hollow with two humbuckers: warm, woody, a touch of sympathetic ring - `slide` — Bottleneck slide: long sustain, pitch curves glide fret by fret with the rasp +- `twin-humbucker` — Two humbuckers together, picked near the bridge, direct: fitted to Karoryfer's Emily ## jp8 diff --git a/docs/21-production-guide.md b/docs/21-production-guide.md index c1e9aae..5fd21f6 100644 --- a/docs/21-production-guide.md +++ b/docs/21-production-guide.md @@ -404,6 +404,13 @@ Leave pads alone; they're already even. or `bass-grind`. Guitars: `guitar-clean`, `guitar-crunch`, `guitar-lead`, `guitar-heavy`. Leave CAB on unless another cabinet follows, and use BLEND, not a parallel track, to keep the DI's low end. +- **Pick the instrument before the amp.** Fretwire's GUITAR or BASS page + is the instrument: pickups (SELECT, TYPE, HEIGHT), wiring (TONE and VOL + pots) and BODY (docs/41). Start from a preset: `twin-humbucker` or + `p90-crunch` for a driven amp, `funk` for chops, `jazz` or + `semi-hollow` for warm clean parts; on bass, `jazz-both`, `p-bass` or + `hollow`. Roll VOL back to clean up an amp's drive. The `acoustic` + presets are miked bodies with a little piezo: skip Ampstack for them. - `chorus2`: `juno-i` / `juno-ii` for pads and keys. Never on bass or kick; it smears the low end out of mono. - **Share spaces with sends.** Put a fully wet reverb on a bus and send diff --git a/docs/41-physical-models.md b/docs/41-physical-models.md index da7008f..ada3277 100644 --- a/docs/41-physical-models.md +++ b/docs/41-physical-models.md @@ -1,4 +1,4 @@ -# 41 — Physical models: Hammerwork Grand and Skinwork Kit +# 41 — Physical models: Hammerwork Grand, Skinwork Kit, Fretwire bodies Two machines synthesize their sound by simulating the instrument's mechanics, sample by sample: @@ -8,6 +8,10 @@ mechanics, sample by sample: - `kit` (**Skinwork Kit**) is a drum kit: sticks and beaters strike membranes and cymbals. +Fretwire's bass and guitar (`bass`, `guitar`) build the instrument around +their waveguide strings the same way: pickups, wiring and a body every +string shares (§Fretwire: pickups, wiring and bodies). + They share a small layer of physical-modeling kernels, `kernels/10-physical/`. **Status:** built 2026-10-16 on branch `claude/physical-piano-drums`. @@ -25,6 +29,9 @@ Code: modes, generated by `tools/fit/bessel.py`. - `kernels/06-voices/piano.fy` and `machines/grand/`: the piano. - `kernels/06-voices/kit.fy` and `machines/kit/`: the kit. +- `kernels/06-voices/string.fy` (the strings and pickups), + `kernels/06-voices/string_body.fy` (bridge, body, wiring, open strings) + and `machines/bass/`, `machines/guitar/`: Fretwire. ## The building blocks (`kernels/10-physical`) @@ -151,19 +158,137 @@ The lower note of each tom pair, and the second kick, sit a little lower **Cost:** about 530 ns per sample in Debug for the bench hit sequence. The render word, like the piano's, renders without NEON lanes. +## Fretwire: pickups, wiring and bodies + +**Status:** built 2026-10-16 on branch `claude/fretwire-bodies`, stacked +on `claude/physical-piano-drums` (it needs shared state, docs/04). + +Fretwire's strings were already waveguides fitted to recordings. What +they lacked was the instrument: one pickup point and a resonant lowpass +stood for every electric, and nothing joined the strings. Each machine +now has a second page (GUITAR or BASS) with three sections, and every +string drives one shared body through the bridge. The shared word +(`fw-body-render`, period 1) runs after the strings each sample. + +### Pickups + +Two pickups, NECK and BRIDGE, each at its own point along the string +(a fraction of the open string, from the bridge). A coil hears the string +where it sits, so its comb notches move string to string and up the neck, +as on the instrument. SELECT picks NECK, BOTH, BRIDGE, or OUT (both, the +bridge coil reversed). Two coils in parallel share the output by +inductance, each heard in the proportion of the other's. + +| TYPE | Taps | Inductance | Sounds | +|---|---|---|---| +| SINGLE | one point | 1x | the bright, glassy single coil | +| P-90 (guitar) | a wide bobbin's edges, 0.036 of the string apart | 1.8x | fatter, rawer mids | +| HUMBUCK | two coils 18 mm apart | 1.8x | warmer: the two coils' views cancel near an open string's 36th harmonic (3 dB down at the 18th), and the resonance drops to 0.75x | +| SPLIT (bass) | one point, the low strings' half 1.2% further toward the neck | 1.4x | a P-type bass | + +HEIGHT moves the magnets toward the strings. The coil's output is the +string's velocity times 1 / [1 - k x]^2, x the string's displacement over +it [Horton and Moore 2009]. A string swinging toward the magnet sees more +flux than swinging away, so loud notes gain even harmonics and some +level. + +### Wiring + +The coils drive the cable's capacitance, the pots and the amp's input: + + H(s) = 1 / (1 + (R + sL) (sC + G + sCt / (1 + s Rt Ct))) + +- **RESO** and **PEAK** (the old TONE and RES, same ids) are a single + coil's loaded resonance with the tone pot open. C and G are solved from + them for the selected coils' L and R, so a humbucker or two coils in + parallel move the resonance by the square root of their inductance. +- **TONE** is the tone pot: down from 1 its resistance (250 k, audio + taper) brings in the tone capacitor (22 nF guitar, 47 nF bass). At 0 + the resonance drops to around 700 Hz: the "woman tone". At 1 the + branch is open, the filter is the old 2-pole one, and the output nulls + against the old Fretwire's at the 24-bit floor (COUPLE 0). +- **VOL** is the volume pot: an audio taper, plus the treble its wiper + resistance loses into the cable. Turning it down cleans up Ampstack's + drive the way a guitarist does. + +The 3rd-order H goes to z by the bilinear transform, prewarped at the +resonance, once a block. + +### Body + +Every string pushes on the bridge with the wave arriving there and moves +with the bridge's velocity [Gough 1981; Woodhouse 2004]. The bridge is +the body's modes: 8 low modes per body (the air cavity, the first top and +back modes), then 40 dense modes spread evenly to a few kHz with +overlapping bandwidths. A mode takes energy from string partials near it, +so notes there decay faster and swell into the body: dead spots on a +solid body, the wood of a hollow one. The 12-mode board taught us the +dense part matters: a dozen peaks alone sound boxy and honky. + +| BODY | Coupling | Character | +|---|---|---| +| SOLID | weak, high Q | neck and body dead spots; almost no air | +| SEMI (guitar) | a centre block | some wood, sustain kept | +| HOLLOW | an archtop, or a violin bass | woody, shorter, an air resonance near 110 Hz (bass 88) | +| ACOUSTIC | a flat-top, or an acoustic bass guitar | strong: 98 Hz air, 196 Hz top (bass 72 / 128) | + +The low modes follow published guitar mobility and radiation +measurements in shape, not any one instrument (our own estimates). + +- **COUPLE** scales the bridge coupling. 0 is a rigid bridge, the old + Fretwire. +- **AIR** mixes in the body's radiated sound: its modes' acceleration + and, above them, the bridge force as a resistance. At 1 on an acoustic + body it sits at the pickups' level. A solid body radiates about 40 dB + less, as an unplugged electric does. +- **PIEZO** mixes an under-saddle piezo: the bridge force itself, bright + and direct. +- **SYMP** rings the open strings in sympathy. Each open string is a + delay loop in the shared region, driven by the bridge and pushing back + on it. A string a note is played on is muted. The strings are heard + through the pickups and the body. + +### Fitted against recordings + +`tools/fit/string_fit.py` measures the attack spectrum (harmonics 1-16, +20-80 ms) and each harmonic's T60. A coordinate-descent fit over the +pickup, pluck, wiring and decay knobs, scored on both, set two presets: + +| Preset | Reference | Error per harmonic, start → fit | +|---|---|---| +| `guitar` twin-humbucker | Karoryfer Emily, C3, both humbuckers, direct | 11.0 → 7.5 dB | +| `bass` jazz-both | Karoryfer Growlybass, C2 (their c3), both pickups, direct | 12.8 → 7.8 dB | + +What still differs: the guitar reference's spectrum falls smoothly where +ours keeps the pluck's and pickups' comb notches. The bass reference +shows them (its 5th harmonic is 30 dB down), so they are real. But a pick +and two pickups fill them in more than the model does. + +### Cost + +The shared body makes the strings render in lockstep, one voice at a +time. In ReleaseFast the guitar's chord case went from 176 to 480 ns per +sample (2.3% of a core). SYMP adds about 100 ns while it is up. + ## Presets - `grand`: default, bright-pop, felt-ballad, honky-tonk, sustain-wash, dry-studio. - `kit`: default, jazz, rock, funk-dry, gong-wash. +- `guitar` (new or reworked here): twin-humbucker, p90-crunch, + semi-hollow, out-of-phase, acoustic; jazz is now a hollow archtop on + the neck humbucker, funk the middle and bridge single coils together. +- `bass`: jazz-both, p-bass, hollow, acoustic; pop and slap are on a + bridge humbucker. ## Next - **Fretwire and Rhodes.** Fretwire could take `contact-solve` for the - pluck and fret buzz, and moving-bridge coupling for its two-stage decay. - Rhodes could become a struck tine-and-tonebar mode pair with an - implicit hammer. + pluck and fret buzz. Its moving bridge and sympathetic strings are + built (§Fretwire). Rhodes could become a struck tine-and-tonebar mode + pair with an implicit hammer. - **Lane mode.** Splitting the render into a lane-eligible word, or raising the stash limit, would roughly halve the cost. -- **Sympathetic strings.** These need a shared board across voices: a - host-side bus or a single-voice piano. +- **Sympathetic strings in the Grand.** Fretwire's open strings show the + way: a shared region holding the undamped strings, driven by the + bridge. diff --git a/kernels/06-voices/string.fy b/kernels/06-voices/string.fy index 92d2ea6..c114819 100644 --- a/kernels/06-voices/string.fy +++ b/kernels/06-voices/string.fy @@ -94,6 +94,16 @@ ustruct: StringState f64 vib-t ( finger vibrato depth asked for, 0..1 [expression slide] ) f64 vib ( the depth, smoothed ) f64 vib-ph + ( pickups and bridge [string_body.fy] ) + f64 si ( string the note is on, 0 = lowest ) + f64 z ( string impedance relative to the low string: ref-hz / open hz ) + f64 pn1 f64 pn2 ( neck pickup taps, samples ) + f64 pb1 f64 pb2 ( bridge pickup taps ) + f64 xn f64 xb ( string displacement over each pickup, for HEIGHT ) + f64 nw ( this sample's ring write, for the pickup stage ) + f64 wc ( the index it was written at ) + f64 yb ( the wave arriving at the bridge this sample ) + f64 fade ( the old note's read, fading out ) ; ustruct: StringParams @@ -118,12 +128,30 @@ ustruct: StringParams f64 slide ( 0..1 slide noise: the finger on the windings, fret ticks ) f64 vib-rate ( Hz: finger vibrato ) f64 vib-depth ( semitones at full depth: how far the finger bends the string ) + f64 sel ( pickup selector: 0 NECK, 1 BOTH, 2 BRIDGE, 3 BOTH out of phase ) + f64 pickup-b ( bridge pickup point, fraction of the open string from the bridge ) + f64 type-n ( neck pickup: 0 SINGLE, 1 WIDE [P-90], 2 HUMBUCK, 3 SPLIT ) + f64 type-b ( bridge pickup ) + f64 height ( 0..1 how close the magnets sit: output and magnetic pull ) + f64 tpot ( tone pot 0..1; 1 is open and unloaded ) + f64 vol ( volume pot 0..1 ) + f64 body ( body: index into this instrument's bodies ) + f64 couple ( bridge coupling, x the body's own ) + f64 air ( the body's radiated sound, mixed in ) + f64 piezo ( an under-saddle piezo: the bridge force, mixed in ) + f64 symp ( the open strings ringing in sympathy, 0..1 ) ( the instrument, set by the machine [const-f64] ) f64 ref-hz ( the pitch HF DEC, SOFT and THUMP are stated at: the low string ) f64 b-ref ( the pitch STIFF's B is stated at ) f64 hf-track ( HF DEC scales as [ref-hz / f]^hf-track: 0.75 a bass, 0 a guitar ) f64 out-g ( output gain: LEVEL 0.55 sits with the other instruments ) f64 o1 f64 o2 f64 o3 f64 o4 f64 o5 f64 o6 ( open strings, low to high, Hz; unused 1e9 ) + f64 n-str ( strings on the instrument ) + f64 body-base ( this instrument's first body in the body tables ) + f64 coil-k ( pickup coil widths and spacing, x the guitar's: the scale's share ) + f64 l-coil ( H: a single coil's inductance ) + f64 r-coil ( ohm: its resistance ) + f64 c-tone ( F: the tone capacitor ) ( derived — string-block-prepare ) f64 sr f64 inv-sr @@ -132,8 +160,49 @@ ustruct: StringParams f64 tens-a f64 sl-hpa f64 sl-lpa f64 sl-dec f64 vib-inc f64 vib-a + f64 on1 f64 on2 f64 ob1 f64 ob2 ( tap offsets per pickup, fraction of the string ) + f64 split-n f64 split-b ( 1 if that pickup is a split coil ) + f64 wn f64 wb ( selector weights: each pickup's share of the output ) + f64 ht-k f64 ht-a ( HEIGHT: magnetic pull per displacement, displacement leak ) + f64 l-eff ( the selected coils' inductance, x a single coil's ) ; + +( The body every string shares [string_body.fy]: the bridge, the body's + modes, the wiring and the open strings. Voices add their bridge force + and pickup signal; the body word [period 1] reads them, steps, and + clears them. ) +:: BM 48 ; ( body modes: 8 measured-style low modes, 40 dense ) +:: BMF 48.0 ; +:: SYM-N 6 ; ( open strings ringing in sympathy, at most ) +:: SYM-RL 4096 ; ( cells per open string's ring ) +:: SYM-RLF 4096.0 ; +ustruct: FwBody + f64 f ( bridge force this step: voices and open strings add ) + f64 pu ( pickup signal this step: voices and open strings add ) + f64 vb ( bridge velocity the last step left ) + f64 vba ( bridge velocity being summed ) + f64 rada ( radiated sound being summed ) + f64 mute 8 ( a note is on that string: its open ring stops ) + f64 q 48 f64 v 48 ( body modes: displacement, velocity at the bridge ) + f64 mc 48 f64 msw 48 f64 mws 48 f64 mrho 48 f64 mb1 48 f64 mb2 48 + f64 mal 48 ( drive per unit force: 2 sigma x the mode's peak coupling ) + f64 mr 48 ( radiation weight ) + f64 ea1 f64 ea2 f64 ea3 f64 eb0 f64 eb1 f64 eb2 f64 eb3 ( wiring, tone pot down ) + f64 eg f64 ed ( wiring, tone pot open: the pickup's resonance ) + f64 e1 f64 e2 f64 e3 ( wiring states ) + f64 s1 f64 s2 + f64 vl f64 va f64 vg ( volume pot: cable lowpass state, coefficient, gain ) + f64 pz-lp f64 pz-a ( piezo: DC block ) + f64 rf-lp f64 rf-a f64 rflat ( the body's flat radiation above its modes ) + f64 rv ( radiating velocity, the last step's ) + f64 air-g f64 pz-g f64 mag-g ( output gains ) + f64 sw 8 f64 sd 8 f64 sg 8 f64 sla 8 f64 slp 8 f64 sz 8 f64 spn 8 f64 spb 8 + ( the open strings' rings follow the struct: SYM-N x SYM-RL cells, + FW-RING-BYTES, at FwBody.size [a ustruct tops out at 64 KB] ) +; +:: FW-RING-BYTES 196608 ; + ( |x| <= 1: atan to ~1e-5 rad, enough for phase-delay tuning. ) dsp: st-atan-small | x -- y | x x f* | z | @@ -150,7 +219,23 @@ dsp: st-atan | x -- y | select ; -dsp: string-block-prepare | ctx:Ctx state params:StringParams | +( type -- offset : a coil type's taps either side of its centre, as a + fraction of the guitar's open string: a wide P-90 bobbin's edges, a + humbucker's two coils 18 mm apart; a single coil and a split coil are + one point. ) +dsp: st-coil-off | t -- o | + t 0.5 f> t 1.5 f< and 0.018 t 1.5 f> t 2.5 f< and 0.014 0.0 select select +; + +( type -- l : a coil type's inductance, x a single coil's. ) +dsp: st-coil-l | t -- l | + t 0.5 f> t 1.5 f< and 1.8 t 1.5 f> t 2.5 f< and 1.8 t 2.5 f> 1.4 1.0 select select select +; + +( HEIGHT: magnetic pull per unit displacement at full height ) +:: HT-K 600.0 ; + +dsp: st-prep-core | ctx:Ctx state params:StringParams | ctx.sr | sr | sr -> params.sr 1.0 sr f/ -> params.inv-sr @@ -166,6 +251,27 @@ dsp: string-block-prepare | ctx:Ctx state params:StringParams | params.vib-rate params.inv-sr f* -> params.vib-inc ( vibrato depth follows its curve over ~30 ms: the 32-sample steps vanish ) sr 5.0 svf-dc-coeff -> params.vib-a + ( the pickups: each type's tap offsets, inductance and output, then + the selector. Two coils in parallel split the signal by inductance: + each is heard in the share of the other's. ) + params.type-n st-coil-off params.coil-k f* | on | + on fneg -> params.on1 on -> params.on2 + params.type-b st-coil-off params.coil-k f* | ob | + ob fneg -> params.ob1 ob -> params.ob2 + params.type-n 2.5 f> mask>f -> params.split-n + params.type-b 2.5 f> mask>f -> params.split-b + params.type-n st-coil-l | ln | params.type-b st-coil-l | lb | + 1.0 params.height 0.5 f* f+ | hg | + ln fsqrt hg f* | sn | lb fsqrt hg f* | sb | + ln lb f+ | lt | + params.sel | sel | + sel 0.5 f< | neck | sel 1.5 f> sel 2.5 f< and | bridge | + sel 2.5 f> 1.0 -1.0 select | ph | + neck sn bridge 0.0 sn lb f* lt f/ select select -> params.wn + neck 0.0 bridge sb sb ln f* lt f/ ph f* select select -> params.wb + neck ln bridge lb ln lb f* lt f/ select select -> params.l-eff + params.height HT-K f* params.inv-sr f* -> params.ht-k + 1.0 sr 5.0 svf-dc-coeff f- -> params.ht-a ; ( params hz hand -- ratio : how much shorter than open the vibrating @@ -186,6 +292,17 @@ dsp: st-fret | params:StringParams hz hand -- ratio | 1.0 fmax ; +( params hz hand -- i : the string st-fret puts the note on, 0 = lowest. ) +dsp: st-string | params:StringParams hz hand -- i | + hand 0.08333333333333333 f* exp2 | h | + 0.0 + hz params.o2 h f* f>= 1.0 rot select + hz params.o3 h f* f>= 2.0 rot select + hz params.o4 h f* f>= 3.0 rot select + hz params.o5 h f* f>= 4.0 rot select + hz params.o6 h f* f>= 5.0 rot select +; + ( Per-note loop coefficients from hz and the knobs. Runs at note-on, on note-expr, and every 64 samples [control!] so the knobs act live. @@ -241,7 +358,22 @@ dsp: string-tune | state:StringState params:StringParams -- | ac -> state.apc 1.0 ac sw f* 1.0 ac cw f* f+ f/ st-atan 2.0 f* w0 f/ f- | pda | n pdl f- pda AP-NF f* f- 4.0 state.buf-len 16.0 f- fclamp -> state.dl-tgt - params.pickup params hz params.hand st-fret f* 0.5 fmin n f* 1.0 fmax -> state.pk + params hz params.hand st-fret | ratio | + params.pickup ratio f* 0.5 fmin n f* 1.0 fmax -> state.pk + ( the pickups' taps: each coil sees the string at its own point, a + humbucker's two coils or a wide coil's edges either side of it, a + split coil's half nearer the neck under the low strings ) + params hz params.hand st-string | si | + si -> state.si + hz ratio f/ | fo | + params.ref-hz fo f/ -> state.z + si params.n-str 0.5 f* f< 1.0 -1.0 select | side | + params.pickup params.split-n side f* 0.012 f* params.coil-k f* f+ | cn | + params.pickup-b params.split-b side f* 0.012 f* params.coil-k f* f+ | cb | + cn params.on1 f+ ratio f* 0.5 fmin n f* 1.0 fmax -> state.pn1 + cn params.on2 f+ ratio f* 0.5 fmin n f* 1.0 fmax -> state.pn2 + cb params.ob1 f+ ratio f* 0.5 fmin n f* 1.0 fmax -> state.pb1 + cb params.ob2 f+ ratio f* 0.5 fmin n f* 1.0 fmax -> state.pb2 ( THUMP: pitch rises with displacement squared, velocity / f ) params.ref-hz hz f/ dup f* params.thump f* THUMP-K f* -> state.th-k ; @@ -273,6 +405,8 @@ dsp: string-note-on | ctx:Ctx state:StringState params:StringParams -- | state.apx& | xs | state.apy& | ys | 0.0 AP-N [ | i | leg xs i f@i 0.0 select xs i f!i leg ys i f@i 0.0 select ys i f!i i 1.0 f+ ] times drop leg state.tens 0.0 select -> state.tens + leg state.xn 0.0 select -> state.xn + leg state.xb 0.0 select -> state.xb leg state.vib-t 0.0 select -> state.vib-t leg state.vib 0.0 select -> state.vib ctx.vel 0.0001 1.0 fclamp log2 1.3 f* exp2 | a | @@ -366,7 +500,7 @@ dsp: string-excite | state:StringState params:StringParams -- e | state.nz-env state.nz-k f* -> state.nz-env ; -dsp: k-string-voice | io:Io ctx state:StringState params:StringParams -- | +dsp: st-loop | io ctx:Ctx state:StringState params:StringParams -- | state.buf& p@64 | buf | state.buf-len 4.0 f- | len | state.age | t | t state.clear-n f>= | live | @@ -407,20 +541,64 @@ dsp: k-string-voice | io:Io ctx state:StringState params:StringParams -- | [ y ] ifte | y | state params string-excite state params st-slide-noise f+ | e | - y e f+ | nw | + ( the bridge: the string pushes on it with the wave arriving there, and + moves with it [string_body.fy] ) + ctx.shared& p@64 | body:FwBody | + body.vb | vb | + body.f y 2.0 f* vb f+ state.z f* f- -> body.f + y e f+ vb f+ | nw | nw buf w f!i + nw -> state.nw + w -> state.wc w 1.0 f+ dup len f>= 0.0 rot select -> state.w state.tens nw fabs state.tens f- params.tens-a f* f+ -> state.tens - ( pickup comb, linear tap ) - w state.pk f- len f+ | pp | + ( old note fading out while the ring refills ) + r 1.0 t 0.015625 f* f- 0.0 fmax f* live 0.0 rot select -> state.fade + t 1.0 f+ -> state.age + state.et 1.0 f+ -> state.et +; + +( buf len w nw d -- y : the string seen d samples back along the ring + from this sample's write: the pickup comb, a linear tap. ) +dsp: st-tap | buf len w nw d -- y | + w d f- len f+ | pp | pp floor | pi | pp pi f- | pf | buf pi dup len f>= len 0.0 select f- f@i | p0 | buf pi 1.0 f+ dup len f>= len 0.0 select f- f@i | p1 | nw p1 p0 f- pf f* p0 f+ f- - ( old note fading out while the ring refills ) - r 1.0 t 0.015625 f* f- 0.0 fmax f* live 0.0 rot select f+ | o | - state.s1& state.s2& o params.pk-g params.pk-d tpt-svf-lp-step | out | - io.out-l out params.level f* params.out-g f* f+ -> io.out-l - t 1.0 f+ -> state.age - state.et 1.0 f+ -> state.et +; + +( x y k -- y' : a pickup's magnetic pull. The string swinging toward the + magnet sees more flux than swinging away, so the coil's output is the + string's velocity times 1 / [1 - k x]^2, x its displacement there: + even harmonics that grow with the swing [Horton and Moore 2009]. ) +dsp: st-magnet | x y k -- o | + 1.0 x k f* -0.5 0.5 fclamp f- | g | + y g g f* f/ +; + +( io ctx state params -- : the pickups. Each coil sees the string at its + taps; the selector mixes them as the wiring would; the result joins the + other strings' on the body's pickup line, ahead of the shared wiring. ) +dsp: st-pickup | io ctx:Ctx state:StringState params:StringParams -- | + ctx.shared& p@64 | body:FwBody | + state.buf& p@64 | buf | state.buf-len 4.0 f- | len | + state.wc | w | state.nw | nw | + buf len w nw state.pn1 st-tap buf len w nw state.pn2 st-tap f+ 0.5 f* | yn | + buf len w nw state.pb1 st-tap buf len w nw state.pb2 st-tap f+ 0.5 f* | yb | + params.height 0.0 f> + [ state.xn params.ht-a f* yn f+ | xn | xn -> state.xn + state.xb params.ht-a f* yb f+ | xb | xb -> state.xb + xn yn params.ht-k st-magnet xb yb params.ht-k st-magnet ] + [ yn yb ] + ifte | yn yb | + body.pu yn params.wn f* yb params.wb f* f+ state.fade f+ f+ -> body.pu + 1.0 body.mute& state.si f!i +; + +( io ctx state params -- : one voice sample. It is heard through the + body word: its pickup signal and bridge force go there. ) +dsp: k-string-voice | io ctx state params | + io ctx state params call: st-loop + io ctx state params call: st-pickup ; diff --git a/kernels/06-voices/string_body.fy b/kernels/06-voices/string_body.fy new file mode 100644 index 0000000..13480fe --- /dev/null +++ b/kernels/06-voices/string_body.fy @@ -0,0 +1,357 @@ +( string_body.fy - the instrument around Fretwire's strings: the bridge + and body every string shares, the pickups' wiring, and the open strings + that ring in sympathy [docs/41 §Fretwire bodies]. + + The voices [string.fy] are strings. Each one, every sample, pushes on + the bridge with the wave arriving there and moves with the bridge's + velocity, and hands its pickup signal to the shared pickup line. This + file is the machine's shared word [shared-size!, period 1], which then: + + * rings the open strings no note is on [SYMP]: each a delay loop + driven by the bridge's motion and pushing back on it, so a held + chord's partials wake the strings tuned to them; + + * steps the body: BM modes, each a damped oscillator driven by the + summed bridge force, whose velocities add to the bridge's. A mode + takes energy from a string partial near it, so notes there decay + faster and swell into the body [dead spots on a solid body, the + wood of a hollow one]. The first 8 are the body's low modes [the + air cavity, the top's and back's first plate modes]; above them + the body is modally dense, so the rest are spread evenly to a few + kHz with overlapping bandwidths. A dozen peaks alone make the + honky, boxy colour the Hammerwork Grand's board taught us to avoid; + + * runs the pickup line through the wiring: the coil's inductance and + resistance against the cable's capacitance and the pots' load, a + resonant lowpass [RESO, PEAK], and the tone pot's capacitor, which + as TONE comes down pulls that resonance down into the mids; the + volume pot then loses treble into the cable as it turns down; + + * mixes the pickups with the body's radiated sound [AIR: its modes' + acceleration, plus the flat radiation above them] and an + under-saddle piezo [PIEZO: the bridge force itself]. + + Physics, all textbook: the bridge as a moving string termination + [Gough 1981; Woodhouse 2004], modal body mobility [Cremer, The Physics + of the Violin], and a passive pickup circuit [Lemme, Electric Guitar + Sound Secrets]. Coupling is explicit: a voice uses the bridge velocity + the last sample left, which is stable at any coupling these bodies + reach because each mode's drive per sample is small. ) + +include "string.fy" +include "../10-physical/modal.fy" + +( The bodies. 0-3 a guitar's: SOLID, SEMI [a centre block], HOLLOW [an + archtop] and ACOUSTIC [a flat-top]; 4-6 a bass's: SOLID, HOLLOW, + ACOUSTIC. Per body, 8 low modes: Hz, Q, peak coupling to the low + string [x 1e-4: the share of the string's wave the bridge passes on at + resonance], radiation weight [x 0.01, signed: a back plate moves + against the top]. Then the dense modes: from, to [Hz], Q, coupling, + radiation. The low modes follow published guitar mobility and + radiation measurements in shape, not any one instrument. ) +table: fw-bf 56 f>i [ + 148 232 330 410 520 640 790 960 + 118 190 255 330 420 520 640 780 + 108 175 228 296 380 470 575 700 + 98 196 228 285 380 455 540 660 + 98 176 262 345 430 560 720 900 + 88 140 205 275 360 450 560 690 + 72 128 178 240 310 400 500 620 620 ] swap qnth i>f ; +table: fw-bq 56 f>i [ + 60 70 80 80 90 90 100 100 + 30 35 40 40 45 45 50 50 + 25 28 32 35 38 40 42 45 + 18 22 30 30 35 35 40 40 + 60 70 80 80 90 90 100 100 + 25 28 32 35 38 40 42 45 + 16 20 26 30 32 35 38 40 40 ] swap qnth i>f ; +table: fw-bb 56 f>i [ + 30 50 20 25 15 15 10 10 + 60 110 80 70 60 50 40 35 + 100 180 120 100 90 70 60 50 + 220 400 160 140 130 110 90 80 + 40 30 20 20 15 12 10 10 + 120 200 120 100 80 70 60 50 + 250 400 180 150 130 110 90 80 80 ] swap qnth i>f ; +table: fw-br 56 f>i [ + 5 4 -3 3 -2 2 -2 2 + 40 60 -35 30 -25 20 -18 15 + 70 90 -50 45 -40 30 -25 20 + 100 100 -40 50 -45 35 -30 25 + 5 4 -3 3 -2 2 -2 2 + 70 90 -50 45 -40 30 -25 20 + 100 100 -50 50 -40 35 -30 25 25 ] swap qnth i>f ; +table: fw-bd 35 f>i [ + 1100 5000 60 6 1 + 950 5000 35 25 5 + 850 5000 28 40 7 + 800 6000 20 60 10 + 1000 4000 60 5 1 + 850 4500 28 40 7 + 750 5000 20 60 10 10 ] swap qnth i>f ; +( AIR and PIEZO at 1 sit near the pickups at LEVEL's level on an + acoustic body: the scale from the body's units to the pickups'. ) +:: AIR-K 2500.0 ; +:: PZ-K 1.1 ; +:: SYM-A 0.2 ; ( an open string's loss lowpass: y += [1 - a] [x - y] ) + +( ctx state params -- : the wiring. A coil of inductance L and + resistance R into a shunt of the cable's capacitance C, the pots' and + amp's load G, and the tone branch Rt + Ct: + + H[s] = 1 / [1 + [R + sL] [sC + G + sCt / [1 + s Rt Ct]]] + + With the tone pot open the branch is gone and H is the resonant lowpass + RESO and PEAK describe, so C and G are solved from them [for L and R + of the selected coils]; RESO is a single coil's, and a humbucker or two + coils in parallel move it by the square root of their inductance. The + tone pot's 3rd-order H goes to z by the bilinear transform prewarped at + the resonance. The volume pot is its taper's attenuation and the + lowpass of its wiper's resistance into the cable. ) +dsp: fw-prep-wiring | ctx:Ctx state params:StringParams | + ctx.shared& p@64 | body:FwBody | + ctx.sr | sr | + params.tone params.l-eff fsqrt f/ 20.0 20000.0 fclamp | f0 | + f0 sr svf-g | g | + g -> body.eg + params.pk-d -> body.ed + 6.283185307179586 f0 f* | w0 | + params.l-coil params.l-eff f* | l | + params.r-coil params.l-eff f* | r | + 2.0 params.pk-d f* w0 f/ | a | + 1.0 w0 w0 f* f/ | b | + a r b f* l f/ f- l r r f* b f* l f/ f+ a r f* f- f/ 0.0 fmax | gl | + b 1.0 r gl f* f+ f* l f/ | c | + params.c-tone | ct | + params.tpot dup f* 250000.0 f* 1000.0 fmax ct f* | tau | + 1.0 r gl f* f+ | a0 | + tau c gl tau f* f+ ct f+ r f* f+ l gl f* f+ | a1 | + r c f* tau f* c gl tau f* f+ ct f+ l f* f+ | a2 | + l c f* tau f* | a3 | + w0 g f/ | k | + k k f* | k2 | k2 k f* | k3 | + a1 k f* | p1 | a2 k2 f* | p2 | a3 k3 f* | p3 | + a0 p1 f+ p2 f+ p3 f+ | d0 | + 1.0 d0 f/ | id | + 3.0 a0 f* p1 f+ p2 f- 3.0 p3 f* f- id f* -> body.ea1 + 3.0 a0 f* p1 f- p2 f- 3.0 p3 f* f+ id f* -> body.ea2 + a0 p1 f- p2 f+ p3 f- id f* -> body.ea3 + a0 tau f* k f* | q1 | + a0 q1 f+ id f* -> body.eb0 + 3.0 a0 f* q1 f+ id f* -> body.eb1 + 3.0 a0 f* q1 f- id f* -> body.eb2 + a0 q1 f- id f* -> body.eb3 + ( the volume pot: an audio taper, and its wiper's resistance into the cable ) + params.vol 0.0 1.0 fclamp | v | + v v f* v f* | ga | + ga -> body.vg + 250000.0 ga f* 1.0 ga f- f* 1.0 fmax | rs | + 1.0 6.283185307179586 rs f* 0.7 c f* f* f/ 0.45 sr f* fmin | fc | + sr fc svf-dc-coeff -> body.va + sr 40.0 svf-dc-coeff -> body.pz-a + ( above the dense modes the body radiates like a resistance: the + bridge force times the dense modes' own coupling and radiation ) + params.body-base params.body f+ 5.0 f* | di | + sr fw-bd di 1.0 f+ f@i svf-dc-coeff -> body.rf-a + fw-bd di 3.0 f+ f@i 0.0001 f* fw-bd di 4.0 f+ f@i 0.01 f* f* -> body.rflat + params.level params.out-g f* | lv | + lv -> body.mag-g + ( the radiated pressure is the radiating velocity's rate of change, + stated per sample and scaled to a 1 kHz velocity; a body an octave + lower radiates its notes an octave lower, so the register's low + string [ref-hz, against a guitar's E] keeps AIR at the pickups' level ) + lv params.air f* AIR-K f* sr f* 0.00015915494309189535 f* + params.ref-hz 82.41 f/ f* -> body.air-g + lv params.piezo f* PZ-K f* -> body.pz-g +; + +( body params bi h sr j -- : body mode j's step coefficients. j < 8 is a + low mode from the tables; above, the dense modes run evenly from the + dense band's bottom to its top, each placed a little off its slot + [a golden-ratio sequence, so no two bodies' spacings line up], with a + coupling that falls as the plate's mobility does and a radiation sign + and size of its own. ) +dsp: fw-prep-mode | body:FwBody params:StringParams bi h sr j -- | + bi 8.0 f* j 7.0 fmin f+ | ti | + bi 5.0 f* | di | + fw-bd di f@i | fd0 | + j 8.0 f- 0.0 fmax | kk | + kk 0.6180339887498949 f* ffrac 0.5 f- 0.8 f* kk f+ 0.5 f+ 0.025 f* | fr | + fw-bd di 1.0 f+ f@i fd0 f- fr f* fd0 f+ | fdn | + j 8.0 f< | low | + low fw-bf ti f@i fdn select | fq | + low fw-bq ti f@i fw-bd di 2.0 f+ f@i select | q | + low fw-bb ti f@i fw-bd di 3.0 f+ f@i fd0 fq f/ fsqrt f* select 0.0001 f* | beta | + kk 0.7548776662466927 f* ffrac 0.5 f> 1.0 -1.0 select + kk 0.5698402909980532 f* ffrac 0.5 f+ f* fw-bd di 4.0 f+ f@i f* | rd | + low fw-br ti f@i rd select 0.01 f* | rad | + fq 0.45 sr f* f< | ok | + fq 0.45 sr f* fmin 6.283185307179586 f* | w | + w h zoh-coefs | c sw ws b1 b2 | + w 2.0 q f* f/ | sig | + c body.mc& j f!i sw body.msw& j f!i ws body.mws& j f!i + b1 body.mb1& j f!i b2 body.mb2& j f!i + sig h f* fneg exp body.mrho& j f!i + ok 2.0 sig f* beta f* params.couple f* 0.0 select body.mal& j f!i + ok rad 0.0 select body.mr& j f!i +; + +dsp: fw-prep-modes-0 | ctx:Ctx state params:StringParams | + ctx.shared& p@64 | body | ctx.sr | sr | 1.0 sr f/ | h | + params.body-base params.body f+ | bi | + 0.0 16 [ | j | body params bi h sr j fw-prep-mode j 1.0 f+ ] times drop +; +dsp: fw-prep-modes-1 | ctx:Ctx state params:StringParams | + ctx.shared& p@64 | body | ctx.sr | sr | 1.0 sr f/ | h | + params.body-base params.body f+ | bi | + 16.0 16 [ | j | body params bi h sr j fw-prep-mode j 1.0 f+ ] times drop +; +dsp: fw-prep-modes-2 | ctx:Ctx state params:StringParams | + ctx.shared& p@64 | body | ctx.sr | sr | 1.0 sr f/ | h | + params.body-base params.body f+ | bi | + 32.0 16 [ | j | body params bi h sr j fw-prep-mode j 1.0 f+ ] times drop +; + +( ctx state params -- : the open strings: each tuned to its open pitch, + losing DECAY's share a period, heard at the pickups' points. SYMP + scales how hard the bridge drives them and they push back. ) +dsp: fw-prep-sym | ctx:Ctx state params:StringParams | + ctx.shared& p@64 | body:FwBody | + ctx.sr | sr | + 0.0 SYM-N [ | s | + params.o1& s f@i | fo | + fo 100000000.0 f< s params.n-str f< and | on | + on fo 1000.0 select | fo | + sr fo f/ | n | + 6.283185307179586 fo f* sr f/ 3.0 fmin | w | + SYM-A w sin f* 1.0 SYM-A w cos f* f- f/ st-atan w f/ | pd | + n pd f- 2.0 SYM-RLF 4.0 f- fclamp body.sd& s f!i + on -6.907755278982137 params.decay fo f* f/ exp 0.0 select body.sg& s f!i + on params.ref-hz fo f/ params.symp f* 0.0 select body.sz& s f!i + params.pickup n f* 0.5 n f* fmin 1.0 fmax body.spn& s f!i + params.pickup-b n f* 0.5 n f* fmin 1.0 fmax body.spb& s f!i + s 1.0 f+ ] times drop +; + +( ctx state params -- : every block. The string coefficients and the + pickups, the wiring, the body's modes, the open strings. ) +dsp: string-block-prepare | ctx state params | + ctx state params call: st-prep-core + ctx state params call: fw-prep-wiring + ctx state params call: fw-prep-modes-0 + ctx state params call: fw-prep-modes-1 + ctx state params call: fw-prep-modes-2 + ctx state params call: fw-prep-sym +; + +( rings base pos -- y : an open string's ring read at pos [cells from its + start, wrapped], linear. ) +dsp: fw-ring-read | rings base pos -- y | + pos 0.0 f< SYM-RLF 0.0 select pos f+ | p | + p SYM-RLF f>= SYM-RLF 0.0 select p swap f- | p | + p floor | i | p i f- | fr | + i 1.0 f+ dup SYM-RLF f>= SYM-RLF 0.0 select f- | i1 | + rings base i f+ f@i | y0 | + rings base i1 f+ f@i | y1 | + y1 y0 f- fr f* y0 f+ +; + +( io ctx body params -- : the open strings, one sample. ) +dsp: fw-sym | io ctx body:FwBody params:StringParams | + params.symp 0.0 f> + [ body.vb params.symp f* | vin | + body FwBody.size ptr+ | rings | + 0.0 0.0 0.0 SYM-N [ | s fs ps | + s SYM-RLF f* | base | + body.sw& s f@i | w | + rings base w body.sd& s f@i f- fw-ring-read | r | + body.slp& s f@i | l0 | + r l0 f- 1.0 SYM-A f- f* l0 f+ | l | + l body.slp& s f!i + body.mute& s f@i 0.5 f> 0.5 1.0 select body.sg& s f@i f* l f* | y | + y vin f+ | nw | + nw rings base w f+ f!i + w 1.0 f+ dup SYM-RLF f>= 0.0 rot select body.sw& s f!i + 0.0 body.mute& s f!i + nw rings base w body.spn& s f@i f- fw-ring-read f- | yn | + nw rings base w body.spb& s f@i f- fw-ring-read f- | yb | + s 1.0 f+ + fs y 2.0 f* body.sz& s f@i f* f- + ps yn params.wn f* yb params.wb f* f+ f+ + ] times + | s fs ps | + body.f fs f+ -> body.f + body.pu ps f+ -> body.pu + 0.0 ] + [ 0.0 ] + ifte drop +; + +( body F vba rada j -- vba' rada' : body mode j, one sample, driven by + the bridge force F: its velocity joins the bridge's, its acceleration + the radiating velocity. ) +dsp: fw-mode | body:FwBody fb vba rada j -- vba rada | + body.q& j f@i | q | body.v& j f@i | v | + body.mal& j f@i fb f* | fm | + q v body.mc& j f@i body.msw& j f@i body.mws& j f@i body.mrho& j f@i + fm body.mb1& j f@i body.mb2& j f@i modal-step | qn vn | + qn body.q& j f!i vn body.v& j f!i + vba vn f+ + rada vn body.mr& j f@i f* f+ +; + +dsp: fw-modes-0 | io ctx body:FwBody params | + body.f | fb | + body.vba body.rada 0.0 16 [ | vba rada j | body fb vba rada j fw-mode j 1.0 f+ ] times drop + | vba rada | vba -> body.vba rada -> body.rada +; +dsp: fw-modes-1 | io ctx body:FwBody params | + body.f | fb | + body.vba body.rada 16.0 16 [ | vba rada j | body fb vba rada j fw-mode j 1.0 f+ ] times drop + | vba rada | vba -> body.vba rada -> body.rada +; +dsp: fw-modes-2 | io ctx body:FwBody params | + body.f | fb | + body.vba body.rada 32.0 16 [ | vba rada j | body fb vba rada j fw-mode j 1.0 f+ ] times drop + | vba rada | vba -> body.vba rada -> body.rada +; + +( io ctx body params -- : the wiring and the outputs; clears the step's sums. ) +dsp: fw-out | io:Io ctx body:FwBody params:StringParams | + body.vba -> body.vb + body.pu | pu | + params.tpot 0.999 f< + [ body.eb0 pu f* body.e1 f+ | y | + body.eb1 pu f* body.ea1 y f* f- body.e2 f+ -> body.e1 + body.eb2 pu f* body.ea2 y f* f- body.e3 f+ -> body.e2 + body.eb3 pu f* body.ea3 y f* f- -> body.e3 + y ] + [ body.s1& body.s2& pu body.eg body.ed tpt-svf-lp-step ] + ifte | el | + params.vol 0.999 f< + [ body.vl el body.vl f- body.va f* f+ | vl | vl -> body.vl vl body.vg f* ] + [ el ] + ifte | el | + body.f | fb | + body.pz-lp fb body.pz-lp f- body.pz-a f* f+ | pl | + pl -> body.pz-lp + body.rf-lp fb body.rf-lp f- body.rf-a f* f+ | rl | + rl -> body.rf-lp + fb rl f- body.rflat f* body.rada f+ | rv | + rv body.rv f- | rad | + rv -> body.rv + el body.mag-g f* rad body.air-g f* f+ fb pl f- body.pz-g f* f+ | o | + ( the wiring rings down far below hearing in the body's last block + before it sleeps: flush it rather than hand on denormals ) + io.out-l o fabs 1.0e-25 f< 0.0 o select f+ -> io.out-l + 0.0 -> body.f 0.0 -> body.pu 0.0 -> body.vba 0.0 -> body.rada +; + +( io ctx body params -- : the shared word, once a sample after the strings. ) +dsp: fw-body-render | io ctx body params | + io ctx body params call: fw-sym + io ctx body params call: fw-modes-0 + io ctx body params call: fw-modes-1 + io ctx body params call: fw-modes-2 + io ctx body params call: fw-out +; diff --git a/machines/bass/bass.fy b/machines/bass/bass.fy index dde35b7..3ebef68 100644 --- a/machines/bass/bass.fy +++ b/machines/bass/bass.fy @@ -7,7 +7,7 @@ Panel: STRING [how it rings] | PLUCK [how it is played] | PICKUP [where it is heard] | FEEL. ) -include "../../kernels/06-voices/string.fy" +include "../../kernels/06-voices/string_body.fy" include "../lib/manifest.fy" : manifest @@ -23,6 +23,10 @@ include "../lib/manifest.fy" 5.0 legato-span! StringState.size state-size! StringParams.size params-size! + ( the bridge, body and wiring all strings share [string_body.fy] ) + FwBody.size FW-RING-BYTES + shared-size! + "fw-body-render" 1 shared! + StringState.tens voice-level! "ring" StringState.buf StringState.buf-len 0.045 buffer ( a four-string bass in standard tuning; B, HF DEC, SOFT, THUMP stated at its low end ) StringParams.ref-hz 41.2 const-f64 @@ -32,6 +36,14 @@ include "../lib/manifest.fy" StringParams.o1 41.2 const-f64 StringParams.o2 55.0 const-f64 StringParams.o3 73.42 const-f64 StringParams.o4 98.0 const-f64 StringParams.o5 1000000000.0 const-f64 StringParams.o6 1000000000.0 const-f64 + StringParams.n-str 4.0 const-f64 + StringParams.body-base 4.0 const-f64 + ( a 34-inch scale: coils and their spacing are a smaller share of it ) + StringParams.coil-k 0.75 const-f64 + ( a Jazz-type single coil: 3.5 H, 7.5 k; a 47 nF tone cap ) + StringParams.l-coil 3.5 const-f64 + StringParams.r-coil 7500.0 const-f64 + StringParams.c-tone 4.7e-08 const-f64 520.0 panel-w! "STRING" "DECAY" "bs-decay" StringParams.decay 0.3 40.0 12.0 curve-exp knob @@ -45,13 +57,33 @@ include "../lib/manifest.fy" "PLUCK" "SOFT" "bs-soft" StringParams.soft 0.05 6.0 2.0 curve-exp knob "PLUCK" "SHAPE" "bs-shape" StringParams.shape 0.0 1.0 0.0 curve-lin knob "PLUCK" "NOISE" "bs-noise" StringParams.noise 0.0 1.0 0.15 curve-pow knob - "PLUCK" 2 strip + "PLUCK" "HAND" "bs-hand" StringParams.hand 0.0 12.0 5.0 curve-lin knob + "PLUCK" 3 strip - "PICKUP" "POS" "bs-pickup" StringParams.pickup 0.04 0.5 0.2 curve-lin knob - "PICKUP" "HAND" "bs-hand" StringParams.hand 0.0 12.0 5.0 curve-lin knob - "PICKUP" "TONE" "bs-tone" StringParams.tone 300.0 12000.0 3200.0 curve-exp knob - "PICKUP" "RES" "bs-res" StringParams.res 0.0 1.0 0.3 curve-lin knob - "PICKUP" 2 strip + "PICKUPS" "NECK" "bs-pickup" StringParams.pickup 0.04 0.5 0.2 curve-lin knob + "PICKUPS" "BRIDGE" "bs-pickup-b" StringParams.pickup-b 0.04 0.5 0.1 curve-lin knob + "PICKUPS" "SELECT" "bs-sel" StringParams.sel 0.0 switch + "NECK" 0.0 opt "BOTH" 1.0 opt "BRIDGE" 2.0 opt "OUT" 3.0 opt as-list span-rows + "PICKUPS" "N TYPE" "bs-type-n" StringParams.type-n 0.0 switch + "SINGLE" 0.0 opt "SPLIT" 3.0 opt "HUMBUCK" 2.0 opt as-list + "PICKUPS" "B TYPE" "bs-type-b" StringParams.type-b 0.0 switch + "SINGLE" 0.0 opt "SPLIT" 3.0 opt "HUMBUCK" 2.0 opt as-list + "PICKUPS" "HEIGHT" "bs-height" StringParams.height 0.0 1.0 0.0 curve-lin knob + "PICKUPS" 3 strip + + "WIRING" "RESO" "bs-tone" StringParams.tone 300.0 12000.0 3200.0 curve-exp knob + "WIRING" "PEAK" "bs-res" StringParams.res 0.0 1.0 0.3 curve-lin knob + "WIRING" "TONE" "bs-tpot" StringParams.tpot 0.0 1.0 1.0 curve-lin knob + "WIRING" "VOL" "bs-vol" StringParams.vol 0.0 1.0 1.0 curve-lin knob + "WIRING" 2 strip + + "BODY" "BODY" "bs-body" StringParams.body 0.0 switch + "SOLID" 0.0 opt "HOLLOW" 1.0 opt "ACOUSTIC" 2.0 opt as-list span-rows + "BODY" "COUPLE" "bs-couple" StringParams.couple 0.0 2.0 1.0 curve-lin knob + "BODY" "AIR" "bs-air" StringParams.air 0.0 1.0 0.0 curve-pow knob + "BODY" "PIEZO" "bs-piezo" StringParams.piezo 0.0 1.0 0.0 curve-pow knob + "BODY" "SYMP" "bs-symp" StringParams.symp 0.0 1.0 0.0 curve-lin knob + "BODY" 2 strip "FEEL" "THUMP" "bs-thump" StringParams.thump 0.0 1.0 0.5 curve-lin knob "FEEL" "BUZZ" "bs-buzz" StringParams.buzz 0.0 1.0 0.0 curve-lin knob @@ -65,13 +97,19 @@ include "../lib/manifest.fy" "VIBRATO" "DEPTH" "bs-vibdepth" StringParams.vib-depth 0.0 2.0 0.5 curve-lin knob "VIBRATO" 1 strip - 1.0 row - 1.0 cell "STRING" 1.0 item - 1.0 cell "PLUCK" 1.0 item - 1.0 row - 1.0 cell "PICKUP" 1.0 item - 1.0 cell "FEEL" 1.0 item - 0.5 cell "VIBRATO" 1.0 item + "PLAY" page + 1.0 row + 1.0 cell "STRING" 1.0 item + 1.0 cell "PLUCK" 1.0 item + 1.0 row + 1.0 cell "FEEL" 1.0 item + 0.5 cell "VIBRATO" 1.0 item + "BASS" page + 1.0 row + 1.2 cell "PICKUPS" 1.0 item + 0.8 cell "WIRING" 1.0 item + 1.0 row + 1.0 cell "BODY" 1.0 item machine-desc ; diff --git a/machines/bass/presets/acoustic.preset b/machines/bass/presets/acoustic.preset new file mode 100644 index 0000000..a247888 --- /dev/null +++ b/machines/bass/presets/acoustic.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "bass", "note": "An acoustic bass guitar, miked, with some piezo and the open strings in sympathy", "params": {"bs-decay": 5.0, "bs-hfdec": 0.6, "bs-knee": 6.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.14, "bs-soft": 2.0, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 3200.0, "bs-res": 0.3, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.396, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 0.0, "bs-body": 2, "bs-couple": 1.0, "bs-air": 1.0, "bs-piezo": 0.3, "bs-symp": 0.3}} diff --git a/machines/bass/presets/default.preset b/machines/bass/presets/default.preset index 89f9390..b4ad412 100644 --- a/machines/bass/presets/default.preset +++ b/machines/bass/presets/default.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Fingers on the neck pickup: roundwounds, direct", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.14, "bs-soft": 2.0, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 3200.0, "bs-res": 0.3, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.546, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Fingers on the neck pickup: roundwounds, direct", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.14, "bs-soft": 2.0, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 3200.0, "bs-res": 0.3, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.546, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/fingers-bridge.preset b/machines/bass/presets/fingers-bridge.preset index 928b427..e073d2a 100644 --- a/machines/bass/presets/fingers-bridge.preset +++ b/machines/bass/presets/fingers-bridge.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Fingers over the bridge pickup: nasal, growly, more mids", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.09, "bs-soft": 1.4, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.07, "bs-hand": 5.0, "bs-tone": 4200.0, "bs-res": 0.4, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.397, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Fingers over the bridge pickup: nasal, growly, more mids", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.09, "bs-soft": 1.4, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 4200.0, "bs-res": 0.4, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.397, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 2, "bs-pickup-b": 0.07, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/flatwound.preset b/machines/bass/presets/flatwound.preset index b8a1dc9..0f790fe 100644 --- a/machines/bass/presets/flatwound.preset +++ b/machines/bass/presets/flatwound.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Old flatwounds, tone rolled off: short, thumpy, dub and Motown", "params": {"bs-decay": 5.0, "bs-hfdec": 0.25, "bs-knee": 4.0, "bs-stiff": 2.5, "bs-release": 0.2, "bs-pos": 0.14, "bs-soft": 3.5, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.25, "bs-hand": 2.0, "bs-tone": 900.0, "bs-res": 0.15, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.738, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Old flatwounds, tone rolled off: short, thumpy, dub and Motown", "params": {"bs-decay": 5.0, "bs-hfdec": 0.25, "bs-knee": 4.0, "bs-stiff": 2.5, "bs-release": 0.2, "bs-pos": 0.14, "bs-soft": 3.5, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.25, "bs-hand": 2.0, "bs-tone": 900.0, "bs-res": 0.15, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.738, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/hollow.preset b/machines/bass/presets/hollow.preset new file mode 100644 index 0000000..cb4b4c5 --- /dev/null +++ b/machines/bass/presets/hollow.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "bass", "note": "A hollow violin bass on flatwounds: short, woody, a little air", "params": {"bs-decay": 3.0, "bs-hfdec": 0.4, "bs-knee": 4.0, "bs-stiff": 2.5, "bs-release": 0.2, "bs-pos": 0.14, "bs-soft": 3.5, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.3, "bs-hand": 2.0, "bs-tone": 3200.0, "bs-res": 0.2, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.539, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 2, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 0.6, "bs-vol": 1.0, "bs-body": 1, "bs-couple": 1.0, "bs-air": 0.3, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/jazz-both.preset b/machines/bass/presets/jazz-both.preset new file mode 100644 index 0000000..9ac21ce --- /dev/null +++ b/machines/bass/presets/jazz-both.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Both single coils of a Jazz-type bass, fingers: fitted to Karoryfer's Growlybass", "params": {"bs-decay": 25.9, "bs-hfdec": 2.8, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.12, "bs-soft": 2.0, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.183, "bs-hand": 5.0, "bs-tone": 1710.0, "bs-res": 0.63, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.77, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 1, "bs-pickup-b": 0.098, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/p-bass.preset b/machines/bass/presets/p-bass.preset new file mode 100644 index 0000000..247b051 --- /dev/null +++ b/machines/bass/presets/p-bass.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "bass", "note": "A split-coil P-type pickup, roundwounds, tone a little back: the punchy middle of a mix", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.14, "bs-soft": 2.0, "bs-shape": 0.0, "bs-noise": 0.15, "bs-pickup": 0.175, "bs-hand": 5.0, "bs-tone": 3000.0, "bs-res": 0.3, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.41, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 1, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 0.7, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/palm-mute.preset b/machines/bass/presets/palm-mute.preset index 974abfd..35d5a26 100644 --- a/machines/bass/presets/palm-mute.preset +++ b/machines/bass/presets/palm-mute.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Muted with the palm: a short pick thud", "params": {"bs-decay": 0.9, "bs-hfdec": 0.15, "bs-knee": 3.0, "bs-stiff": 4.0, "bs-release": 0.05, "bs-pos": 0.14, "bs-soft": 0.4, "bs-shape": 0.5, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 2000.0, "bs-res": 0.3, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.491, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Muted with the palm: a short pick thud", "params": {"bs-decay": 0.9, "bs-hfdec": 0.15, "bs-knee": 3.0, "bs-stiff": 4.0, "bs-release": 0.05, "bs-pos": 0.14, "bs-soft": 0.4, "bs-shape": 0.5, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 2000.0, "bs-res": 0.3, "bs-thump": 0.5, "bs-buzz": 0.0, "bs-level": 0.491, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/pick.preset b/machines/bass/presets/pick.preset index 3a8b964..74b7d9d 100644 --- a/machines/bass/presets/pick.preset +++ b/machines/bass/presets/pick.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Played with a pick near the bridge: bright attack, click, rounder sustain", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.1, "bs-soft": 0.3, "bs-shape": 0.7, "bs-noise": 0.3, "bs-pickup": 0.12, "bs-hand": 5.0, "bs-tone": 4800.0, "bs-res": 0.45, "bs-thump": 0.6, "bs-buzz": 0.0, "bs-level": 0.424, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Played with a pick near the bridge: bright attack, click, rounder sustain", "params": {"bs-decay": 12.0, "bs-hfdec": 1.2, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.1, "bs-soft": 0.3, "bs-shape": 0.7, "bs-noise": 0.3, "bs-pickup": 0.12, "bs-hand": 5.0, "bs-tone": 4800.0, "bs-res": 0.45, "bs-thump": 0.6, "bs-buzz": 0.0, "bs-level": 0.424, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 0, "bs-pickup-b": 0.1, "bs-type-n": 0, "bs-type-b": 0, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/pop.preset b/machines/bass/presets/pop.preset index a77f32c..e533f84 100644 --- a/machines/bass/presets/pop.preset +++ b/machines/bass/presets/pop.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Popped string: pulled and snapped, hard push, buzz", "params": {"bs-decay": 12.0, "bs-hfdec": 0.8, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.28, "bs-soft": 0.12, "bs-shape": 1.0, "bs-noise": 0.15, "bs-pickup": 0.12, "bs-hand": 5.0, "bs-tone": 6500.0, "bs-res": 0.45, "bs-thump": 0.9, "bs-buzz": 0.75, "bs-level": 0.458, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Popped string over a bridge humbucker: pulled and snapped, hard push, buzz", "params": {"bs-decay": 12.0, "bs-hfdec": 0.8, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.28, "bs-soft": 0.12, "bs-shape": 1.0, "bs-noise": 0.15, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 8700.0, "bs-res": 0.45, "bs-thump": 0.9, "bs-buzz": 0.75, "bs-level": 0.353, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 2, "bs-pickup-b": 0.12, "bs-type-n": 0, "bs-type-b": 2, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/bass/presets/slap.preset b/machines/bass/presets/slap.preset index b2a04cd..688af7c 100644 --- a/machines/bass/presets/slap.preset +++ b/machines/bass/presets/slap.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "bass", "note": "Thumb slap over the end of the neck: narrow strike, fret rattle, bright", "params": {"bs-decay": 12.0, "bs-hfdec": 0.7, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.32, "bs-soft": 0.3, "bs-shape": 0.8, "bs-noise": 0.25, "bs-pickup": 0.12, "bs-hand": 5.0, "bs-tone": 5000.0, "bs-res": 0.5, "bs-thump": 0.8, "bs-buzz": 0.55, "bs-level": 0.458, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "bass", "note": "Thumb slap over the end of the neck, a bridge humbucker: narrow strike, fret rattle, bright", "params": {"bs-decay": 12.0, "bs-hfdec": 0.7, "bs-knee": 9.0, "bs-stiff": 4.0, "bs-release": 0.12, "bs-pos": 0.32, "bs-soft": 0.3, "bs-shape": 0.8, "bs-noise": 0.25, "bs-pickup": 0.2, "bs-hand": 5.0, "bs-tone": 6700.0, "bs-res": 0.5, "bs-thump": 0.8, "bs-buzz": 0.55, "bs-level": 0.348, "bs-motion": 0, "bs-slide": 0.4, "bs-vibrate": 5.0, "bs-vibdepth": 0.5, "bs-sel": 2, "bs-pickup-b": 0.12, "bs-type-n": 0, "bs-type-b": 2, "bs-height": 0.0, "bs-tpot": 1.0, "bs-vol": 1.0, "bs-body": 0, "bs-couple": 1.0, "bs-air": 0.0, "bs-piezo": 0.0, "bs-symp": 0.0}} diff --git a/machines/guitar/guitar.fy b/machines/guitar/guitar.fy index e6b1ba4..57d6e27 100644 --- a/machines/guitar/guitar.fy +++ b/machines/guitar/guitar.fy @@ -6,7 +6,7 @@ both pickups, direct] with tools/fit/string_fit.py. Pitch curves bend or slide [MOTION]. Put Ampstack after it. ) -include "../../kernels/06-voices/string.fy" +include "../../kernels/06-voices/string_body.fy" include "../lib/manifest.fy" : manifest @@ -22,6 +22,10 @@ include "../lib/manifest.fy" 5.0 legato-span! StringState.size state-size! StringParams.size params-size! + ( the bridge, body and wiring all strings share [string_body.fy] ) + FwBody.size FW-RING-BYTES + shared-size! + "fw-body-render" 1 shared! + StringState.tens voice-level! "ring" StringState.buf StringState.buf-len 0.03 buffer ( a six-string guitar in standard tuning; HF DEC, SOFT, THUMP and B are stated at its low E ) @@ -32,6 +36,13 @@ include "../lib/manifest.fy" StringParams.o1 82.41 const-f64 StringParams.o2 110.0 const-f64 StringParams.o3 146.83 const-f64 StringParams.o4 196.0 const-f64 StringParams.o5 246.94 const-f64 StringParams.o6 329.63 const-f64 + StringParams.n-str 6.0 const-f64 + StringParams.body-base 0.0 const-f64 + StringParams.coil-k 1.0 const-f64 + ( a Strat-type single coil: 2.5 H, 6 k; a 22 nF tone cap ) + StringParams.l-coil 2.5 const-f64 + StringParams.r-coil 6000.0 const-f64 + StringParams.c-tone 2.2e-08 const-f64 520.0 panel-w! "STRING" "DECAY" "gt-decay" StringParams.decay 0.3 40.0 12.0 curve-exp knob @@ -45,13 +56,33 @@ include "../lib/manifest.fy" "PLUCK" "SOFT" "gt-soft" StringParams.soft 0.05 6.0 1.0 curve-exp knob "PLUCK" "SHAPE" "gt-shape" StringParams.shape 0.0 1.0 0.4 curve-lin knob "PLUCK" "NOISE" "gt-noise" StringParams.noise 0.0 1.0 0.15 curve-pow knob - "PLUCK" 2 strip + "PLUCK" "HAND" "gt-hand" StringParams.hand 0.0 12.0 0.0 curve-lin knob + "PLUCK" 3 strip - "PICKUP" "POS" "gt-pickup" StringParams.pickup 0.04 0.5 0.24 curve-lin knob - "PICKUP" "HAND" "gt-hand" StringParams.hand 0.0 12.0 0.0 curve-lin knob - "PICKUP" "TONE" "gt-tone" StringParams.tone 300.0 12000.0 4500.0 curve-exp knob - "PICKUP" "RES" "gt-res" StringParams.res 0.0 1.0 0.4 curve-lin knob - "PICKUP" 2 strip + "PICKUPS" "NECK" "gt-pickup" StringParams.pickup 0.04 0.5 0.24 curve-lin knob + "PICKUPS" "BRIDGE" "gt-pickup-b" StringParams.pickup-b 0.04 0.5 0.07 curve-lin knob + "PICKUPS" "SELECT" "gt-sel" StringParams.sel 0.0 switch + "NECK" 0.0 opt "BOTH" 1.0 opt "BRIDGE" 2.0 opt "OUT" 3.0 opt as-list span-rows + "PICKUPS" "N TYPE" "gt-type-n" StringParams.type-n 0.0 switch + "SINGLE" 0.0 opt "P-90" 1.0 opt "HUMBUCK" 2.0 opt as-list + "PICKUPS" "B TYPE" "gt-type-b" StringParams.type-b 0.0 switch + "SINGLE" 0.0 opt "P-90" 1.0 opt "HUMBUCK" 2.0 opt as-list + "PICKUPS" "HEIGHT" "gt-height" StringParams.height 0.0 1.0 0.0 curve-lin knob + "PICKUPS" 3 strip + + "WIRING" "RESO" "gt-tone" StringParams.tone 300.0 12000.0 4500.0 curve-exp knob + "WIRING" "PEAK" "gt-res" StringParams.res 0.0 1.0 0.4 curve-lin knob + "WIRING" "TONE" "gt-tpot" StringParams.tpot 0.0 1.0 1.0 curve-lin knob + "WIRING" "VOL" "gt-vol" StringParams.vol 0.0 1.0 1.0 curve-lin knob + "WIRING" 2 strip + + "BODY" "BODY" "gt-body" StringParams.body 0.0 switch + "SOLID" 0.0 opt "SEMI" 1.0 opt "HOLLOW" 2.0 opt "ACOUSTIC" 3.0 opt as-list span-rows + "BODY" "COUPLE" "gt-couple" StringParams.couple 0.0 2.0 1.0 curve-lin knob + "BODY" "AIR" "gt-air" StringParams.air 0.0 1.0 0.0 curve-pow knob + "BODY" "PIEZO" "gt-piezo" StringParams.piezo 0.0 1.0 0.0 curve-pow knob + "BODY" "SYMP" "gt-symp" StringParams.symp 0.0 1.0 0.0 curve-lin knob + "BODY" 2 strip "FEEL" "THUMP" "gt-thump" StringParams.thump 0.0 1.0 0.3 curve-lin knob "FEEL" "BUZZ" "gt-buzz" StringParams.buzz 0.0 1.0 0.0 curve-lin knob @@ -65,13 +96,19 @@ include "../lib/manifest.fy" "VIBRATO" "DEPTH" "gt-vibdepth" StringParams.vib-depth 0.0 2.0 0.8 curve-lin knob "VIBRATO" 1 strip - 1.0 row - 1.0 cell "STRING" 1.0 item - 1.0 cell "PLUCK" 1.0 item - 1.0 row - 1.0 cell "PICKUP" 1.0 item - 1.0 cell "FEEL" 1.0 item - 0.5 cell "VIBRATO" 1.0 item + "PLAY" page + 1.0 row + 1.0 cell "STRING" 1.0 item + 1.0 cell "PLUCK" 1.0 item + 1.0 row + 1.0 cell "FEEL" 1.0 item + 0.5 cell "VIBRATO" 1.0 item + "GUITAR" page + 1.0 row + 1.2 cell "PICKUPS" 1.0 item + 0.8 cell "WIRING" 1.0 item + 1.0 row + 1.0 cell "BODY" 1.0 item machine-desc ; diff --git a/machines/guitar/presets/acoustic.preset b/machines/guitar/presets/acoustic.preset new file mode 100644 index 0000000..ce1289f --- /dev/null +++ b/machines/guitar/presets/acoustic.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "A flat-top acoustic, miked, with a little under-saddle piezo and the open strings ringing along", "params": {"gt-decay": 6.0, "gt-hfdec": 0.5, "gt-knee": 6.0, "gt-stiff": 1.6, "gt-release": 0.12, "gt-pos": 0.18, "gt-soft": 1.0, "gt-shape": 0.6, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 4500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.68, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 0, "gt-pickup-b": 0.07, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 0.0, "gt-body": 3, "gt-couple": 1.0, "gt-air": 1.0, "gt-piezo": 0.15, "gt-symp": 0.4}} diff --git a/machines/guitar/presets/bridge.preset b/machines/guitar/presets/bridge.preset index 4f48533..0509c0d 100644 --- a/machines/guitar/presets/bridge.preset +++ b/machines/guitar/presets/bridge.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Picked on the bridge pickup: thin, bright, cutting; for crunch and leads into an amp", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.12, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.07, "gt-hand": 0.0, "gt-tone": 5500.0, "gt-res": 0.5, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.503, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Picked on the bridge pickup: thin, bright, cutting; for crunch and leads into an amp", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.12, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 5500.0, "gt-res": 0.5, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.503, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 2, "gt-pickup-b": 0.07, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/default.preset b/machines/guitar/presets/default.preset index 3552e8d..8bb605e 100644 --- a/machines/guitar/presets/default.preset +++ b/machines/guitar/presets/default.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Picked, neck pickup, open position: the clean electric", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 4500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.509, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Picked, neck pickup, open position: the clean electric", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 4500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.509, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 0, "gt-pickup-b": 0.07, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/fingers.preset b/machines/guitar/presets/fingers.preset index 66c25c6..d729463 100644 --- a/machines/guitar/presets/fingers.preset +++ b/machines/guitar/presets/fingers.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Fingerstyle, thumb and fingers over the neck: round and soft", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.3, "gt-soft": 2.2, "gt-shape": 0.0, "gt-noise": 0.1, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 3500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.271, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Fingerstyle, thumb and fingers over the neck: round and soft", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.3, "gt-soft": 2.2, "gt-shape": 0.0, "gt-noise": 0.1, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 3500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.271, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 0, "gt-pickup-b": 0.07, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/funk.preset b/machines/guitar/presets/funk.preset index c2c51e8..85a3627 100644 --- a/machines/guitar/presets/funk.preset +++ b/machines/guitar/presets/funk.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Bright, tight, short: bridge-and-middle funk chops", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.04, "gt-pos": 0.1, "gt-soft": 0.5, "gt-shape": 0.6, "gt-noise": 0.15, "gt-pickup": 0.12, "gt-hand": 5.0, "gt-tone": 5000.0, "gt-res": 0.55, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.441, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Middle and bridge single coils together: the bright, quacky funk chop", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.04, "gt-pos": 0.1, "gt-soft": 0.5, "gt-shape": 0.6, "gt-noise": 0.15, "gt-pickup": 0.156, "gt-hand": 5.0, "gt-tone": 3800.0, "gt-res": 0.55, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.931, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 1, "gt-pickup-b": 0.063, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/jazz.preset b/machines/guitar/presets/jazz.preset index aa1cd1a..15c6885 100644 --- a/machines/guitar/presets/jazz.preset +++ b/machines/guitar/presets/jazz.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Archtop jazz: neck pickup, tone rolled off, flatwound thump", "params": {"gt-decay": 12.0, "gt-hfdec": 0.4, "gt-knee": 4.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.8, "gt-shape": 0.2, "gt-noise": 0.15, "gt-pickup": 0.28, "gt-hand": 5.0, "gt-tone": 1500.0, "gt-res": 0.2, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.601, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Archtop jazz: a hollow body, the neck humbucker, tone rolled back, a little air", "params": {"gt-decay": 12.0, "gt-hfdec": 0.4, "gt-knee": 4.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.8, "gt-shape": 0.2, "gt-noise": 0.15, "gt-pickup": 0.28, "gt-hand": 5.0, "gt-tone": 4500.0, "gt-res": 0.3, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.445, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 0, "gt-pickup-b": 0.07, "gt-type-n": 2, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 0.45, "gt-vol": 1.0, "gt-body": 2, "gt-couple": 1.0, "gt-air": 0.2, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/out-of-phase.preset b/machines/guitar/presets/out-of-phase.preset new file mode 100644 index 0000000..4fb27ae --- /dev/null +++ b/machines/guitar/presets/out-of-phase.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Neck and middle out of phase: the thin, hollow, nasal tone", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.247, "gt-hand": 0.0, "gt-tone": 4000.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.509, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 3, "gt-pickup-b": 0.156, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/p90-crunch.preset b/machines/guitar/presets/p90-crunch.preset new file mode 100644 index 0000000..df7bc67 --- /dev/null +++ b/machines/guitar/presets/p90-crunch.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "A bridge P-90 set close to the strings: fat, raw mids that break up early in an amp", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.12, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 5600.0, "gt-res": 0.45, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.402, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 2, "gt-pickup-b": 0.07, "gt-type-n": 0, "gt-type-b": 1, "gt-height": 0.5, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/palm-mute.preset b/machines/guitar/presets/palm-mute.preset index d7c138c..26f6ce5 100644 --- a/machines/guitar/presets/palm-mute.preset +++ b/machines/guitar/presets/palm-mute.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Palm-muted picking: a short chug, give it a high-gain amp", "params": {"gt-decay": 0.8, "gt-hfdec": 0.12, "gt-knee": 3.0, "gt-stiff": 1.2, "gt-release": 0.04, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.3, "gt-noise": 0.15, "gt-pickup": 0.08, "gt-hand": 0.0, "gt-tone": 4500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.774, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Palm-muted picking on a bridge humbucker: a short, tight chug for a high-gain amp", "params": {"gt-decay": 0.8, "gt-hfdec": 0.12, "gt-knee": 3.0, "gt-stiff": 1.2, "gt-release": 0.04, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.3, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 5800.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.526, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 2, "gt-pickup-b": 0.08, "gt-type-n": 0, "gt-type-b": 2, "gt-height": 0.3, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/semi-hollow.preset b/machines/guitar/presets/semi-hollow.preset new file mode 100644 index 0000000..999e16f --- /dev/null +++ b/machines/guitar/presets/semi-hollow.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "A semi-hollow with two humbuckers: warm, woody, a touch of sympathetic ring", "params": {"gt-decay": 12.0, "gt-hfdec": 0.8, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 4800.0, "gt-res": 0.35, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 0.835, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 1, "gt-pickup-b": 0.065, "gt-type-n": 2, "gt-type-b": 2, "gt-height": 0.0, "gt-tpot": 0.8, "gt-vol": 1.0, "gt-body": 1, "gt-couple": 1.0, "gt-air": 0.15, "gt-piezo": 0.0, "gt-symp": 0.15}} diff --git a/machines/guitar/presets/slide.preset b/machines/guitar/presets/slide.preset index 4981a95..9e4171e 100644 --- a/machines/guitar/presets/slide.preset +++ b/machines/guitar/presets/slide.preset @@ -1 +1 @@ -{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Bottleneck slide: long sustain, pitch curves glide fret by fret with the rasp", "params": {"gt-decay": 20.0, "gt-hfdec": 1.4, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.08, "gt-hand": 5.0, "gt-tone": 4500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 2, "gt-slide": 0.7, "gt-level": 0.463, "gt-vibrate": 5.0, "gt-vibdepth": 0.8}} \ No newline at end of file +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Bottleneck slide: long sustain, pitch curves glide fret by fret with the rasp", "params": {"gt-decay": 20.0, "gt-hfdec": 1.4, "gt-knee": 5.0, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.17, "gt-soft": 1.0, "gt-shape": 0.4, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 5.0, "gt-tone": 4500.0, "gt-res": 0.4, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 2, "gt-slide": 0.7, "gt-level": 0.463, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 2, "gt-pickup-b": 0.08, "gt-type-n": 0, "gt-type-b": 0, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}} diff --git a/machines/guitar/presets/twin-humbucker.preset b/machines/guitar/presets/twin-humbucker.preset new file mode 100644 index 0000000..947cf2e --- /dev/null +++ b/machines/guitar/presets/twin-humbucker.preset @@ -0,0 +1 @@ +{"slab": "preset", "schema": 1, "machine": "guitar", "note": "Two humbuckers together, picked near the bridge, direct: fitted to Karoryfer's Emily", "params": {"gt-decay": 6.1, "gt-hfdec": 0.6, "gt-knee": 4.6, "gt-stiff": 1.2, "gt-release": 0.12, "gt-pos": 0.058, "gt-soft": 1.0, "gt-shape": 0.48, "gt-noise": 0.15, "gt-pickup": 0.24, "gt-hand": 0.0, "gt-tone": 2120.0, "gt-res": 0.78, "gt-thump": 0.3, "gt-buzz": 0.0, "gt-motion": 0, "gt-slide": 0.4, "gt-level": 1.0, "gt-vibrate": 5.0, "gt-vibdepth": 0.8, "gt-sel": 1, "gt-pickup-b": 0.058, "gt-type-n": 2, "gt-type-b": 2, "gt-height": 0.0, "gt-tpot": 1.0, "gt-vol": 1.0, "gt-body": 0, "gt-couple": 1.0, "gt-air": 0.0, "gt-piezo": 0.0, "gt-symp": 0.0}}