From 7a90c35f53eb447ade8892a20ec2dbe642ab290a Mon Sep 17 00:00:00 2001 From: illuminus5 <2672794+illuminus5@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:01:53 -0500 Subject: [PATCH] Skiff 2.1: chord follow, and QUANTIZE SOLO for a tune on the black keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Chord follow: SCL › FOLLOW (SEL a third time). A track set to FOLLOW another plays in that track's chords: KEY moves its notes by the chord's note's distance from its ROOT, SCALE by as many steps of its own scale, FIT to the chord's nearest note; NOTE picks the chord's ROOT, LOW, HIGH or LAST note. Its steps, keys, MIDI IN and arpeggio follow; what you record stays what you played. STOP clears the chords; drum kits neither follow nor lead. The web editor has the page under SCALE. - #74: QUANTIZE SOLO: chords on the white keys (as WHITE, CHORD's chords too), single notes of the same scale on the black ones, five to an octave, C#4 the ROOT; with the ARP on they sound directly. --- DESIGN.md | 4 + README.md | 50 ++++- SMK37.md | 4 +- design/TIER_B.md | 6 +- firmware/src/core.h | 15 +- firmware/src/felucca.c | 2 +- firmware/src/follow.c | 201 +++++++++++++++++ firmware/src/icons.c | 4 + firmware/src/midi_control.c | 5 +- firmware/src/motion.c | 5 +- firmware/src/params.c | 18 +- firmware/src/seq.c | 175 +++++++++++---- firmware/src/ui_draw.c | 4 + firmware/src/ui_graph.c | 62 ++++++ firmware/src/ui_input.c | 18 +- firmware/src/upreset.c | 60 ++--- firmware/src/voice.c | 7 + tests/backup_test.c | 10 +- tests/chord_test.c | 31 ++- tests/conv_test.c | 7 +- tests/follow_test.c | 432 ++++++++++++++++++++++++++++++++++++ tests/persistence_test.c | 14 +- tests/project_test.c | 7 +- tests/ratchet_test.c | 4 +- tests/run_tests.sh | 4 + tests/scale_test.c | 52 +++++ tests/smk_ui_test.c | 56 +++++ tests/ui_golden.txt | 266 ++++++++++++++-------- tests/ui_render.c | 22 +- tests/ui_test.c | 148 +++++++++++- tests/upreset_test.c | 80 ++++--- web/EDITOR_PROTOCOL.md | 10 +- web/editor.html | 17 +- web/emu/felucca_web.c | 48 ++++ web/learn/index.html | 4 +- web/test_web.mjs | 45 ++-- 36 files changed, 1590 insertions(+), 307 deletions(-) create mode 100644 firmware/src/follow.c create mode 100644 tests/follow_test.c diff --git a/DESIGN.md b/DESIGN.md index d9bc76b..733c9e1 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -308,6 +308,10 @@ Add a combo here before adding it to the code. Every SHIFT combo has to appear o **The FX layer's map** (phase 9): fourteen effects, seven a row, an octave each (F3 .. E4 over F4 .. E5), in 30 px cells; the REPEATs' rate written 8, 16, 32 (the "1/" doesn't fit beside the key's letter). The four new ones, in the white keys after OCT DN (`perform.c`): GATE (the mix chopped on the sixteenths, open their first half; DEPTH how deep), DUB (the dry mix into the delay, its feedback up to 0.94 and its return at MIX's default while held; the echoes ring out after), FLANGE and VINYL (buffer effects: a jet sweep 0.3 .. 6 ms, a bar each way, fed back; a 0.555 Hz wow of ±0.4 %, a 4.5 kHz low-pass and crackle). Their icons, Fukiai's: a pulse, echoes trailing off, a comb, a record. +**QUANTIZE SOLO** (2.1, #74, kovacsarnold's request; `seq.c` `kb_pitch`, `kb_solo`): the white keys play as WHITE (C4 the root, a scale degree a key, CHRD's chords), the black keys single notes of the same scale, five to an octave: C# D# F# G# A# are 0..4, plus (note / 12 − 5) × 5, so C#4 is the root, F#3 G#3 A#3 the three degrees below it, F#5 seven above, and the SMK-37's C#3 D#3 G#5 A#5 carry the run on. One walk for both (`kb_degree`); the black keys an octave above the white ones' is a constant (`SOLO_OCT`, 0: the same octave). A black key is no chord's: it plays its note alone (`key_on`, step entry's `chord_make`); KBD HOLD doesn't hold it (the SMK-37's pedal does, and its release ends it), pressing one doesn't start a new chord, and one down doesn't make a white key join the held chord; with the ARP on it sounds directly (`input_on`, recorded as with the ARP off), its notes and the ARP's kept apart (`midi_local_held`): a note both play ends with the black key, not with the ARP's step or a white key let go (`kb_sol_held`). Each key keeps what it was pressed as (`kb_sol`), so QUANTIZE turned while it is held leaves nothing hanging. SCALE LEDS light the black keys too, the roots brighter. The stored value 5 is appended; firmware before 2.1 clamps it to SEQ+T (`param_fit`): the keys snapped. + +**Chord follow** (2.1, SCL > FOLLOW, `follow.c`): three track settings, `P_FOLLOW` (OFF, T1..T6: the track whose chords it follows; never itself, as DUCK's BY), `P_FMODE` (KEY, SCALE, FIT) and `P_FNOTE` (ROOT, LOW, HIGH, LAST), kept by sound loads (`param_kept`), never automated (`motion_param`), stored ids 143..145 (`sid_p`: a parameter after the lane pans takes its P_* + 8). Every track keeps the chord it leads with (`fol_src`): its latest step's notes as they sound (`seq_step` → `fol_step`), or the keys and MIDI notes it holds (`input_on` / `input_off` → `fol_key`: a note with none held starts a new chord; QNT SOLO's black keys are none of it); a muted track leads, a kit doesn't; STOP and a panic clear it. Its root: the note with a fifth above it, then a third, then a flat fifth, a tie to the first from the lowest note up (`fol_root`). A following track's notes move as they start, at the voice (`trk_note_on` → `fol_on`): KEY by the chord's note's distance from its ROOT the nearest way (−5..+6), SCALE by as many steps of its own scale (`fol_shift`, `fol_walk` over SOLO's `kb_degree`), FIT to the chord's nearest note, a tie down. `fol_map` keeps the sounding note of each note played, so a note-off ends exactly it (`fol_off`; 255 while another note of the track sounds it too: FIT's two onto one), a retrigger where the chord has moved ends the old pitch first, and tied notes keep theirs; recording, TAKES and step entry keep the notes as played. The followed tracks tick first (`fol_order`, `events_block`), so on one step the chord comes before the note that follows it. The helpers are not inlined (`fm1_alnk0_irq` 7,997 of 8,441). User presets past 144 parameters are version 6 only: `UP_PUT` stages one directly and passes its pattern over (`up_parse`). + ## LEDs | LED | Meaning | diff --git a/README.md b/README.md index c5b415f..088ce1c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,10 @@ synths and drums, patterns and songs, live performance, and a screen that shows Hardware: M-VAVE FM-1 | SMK-37 Pro

-

New in 2.0.3: KBD HOLD, whole chords into the arpeggiator on MONO sounds, sampled notes +

New in 2.1: chord follow, a bass line or an arp that moves with another track's chords, and +QUANTIZE SOLO, chords on the white keys and a tune on the black ones · +the release notes
+New in 2.0.3: KBD HOLD, whole chords into the arpeggiator on MONO sounds, sampled notes struck again without a click, Learn's videos re-made on 2.0, and fixes from your issues · the release notes
New in 2.0.2: notes up to 128 steps long, the way back to the official firmware takes V16 too, @@ -66,12 +69,12 @@ Custom firmware, at your own risk; the way back to the official firmware is belo connect the FM-1 by USB and follow it. The same page takes the FM-1 back to the official firmware (V15 or V16: the version it had before Skiff), saving a complete backup of your music first. -**With Python 3:** download `skiff-2.0.3.fwsc` from the [latest release](https://github.com/illuminus5/skiff/releases/latest) +**With Python 3:** download `skiff-2.1.fwsc` from the [latest release](https://github.com/illuminus5/skiff/releases/latest) and, with this repository's `tools/` folder, ``` pip install mido python-rtmidi -python tools/fm1_install.py skiff-2.0.3.fwsc +python tools/fm1_install.py skiff-2.1.fwsc ``` It takes about two minutes and the FM-1 restarts on Skiff. @@ -83,7 +86,7 @@ October 21 (Skiff 2.0.2 and later; done on a unit: back to V16, then on to Skiff [fm1_open repository](https://github.com/m-vave/fm1_open) as `sdk/firmware/FM-1_015.fwsc`. The official firmware writes its Bluetooth settings anew on its first start, so pair Bluetooth devices again if they don't connect. -**On the SMK-37 Pro:** the same installer finds the keyboard and picks its build (`skiff-2.0.3-smk37.fwsc` for +**On the SMK-37 Pro:** the same installer finds the keyboard and picks its build (`skiff-2.1-smk37.fwsc` for Python). Two steps come first: M-VAVE's firmware V016 on the keyboard, and a backup of its flash, which holds the keyboard's own key calibration. [SMK37.md](SMK37.md#install) has both, the way back and what to do if it does not start. @@ -372,7 +375,10 @@ Felucca) first, and lists what it converted. arpeggiator on MONO, LEGATO and UNISON sounds too. **KBD HOLD** (2.0.3): ARP 2 › HOLD ON with the ARP's MODE OFF holds the notes you play without an arpeggio: let go and they go on sounding; the next key you press with no key down starts a new chord, keys pressed while others are still down join it. HOLD off, the ARP on or another track - ends them + ends them. **QUANTIZE SOLO** (2.1, #74): chords on the white keys, a tune on the black ones, single notes of the + same scale (see [Scale keyboard](#scale-keyboard)). **Chord follow** (2.1): a track set to FOLLOW another plays in + that track's chords: a bass or an arp written in C moves to F as the chord track plays F (see + [Chord follow](#chord-follow)) - **MOD** (2.0: one page, LFO › MOD): KNOB 1 picks the route, 1 to 11. The first seven are fixed, drawn as a grid: the LFO's depths to PITCH, CUT, SHAPE and AMP and the envelope's to PITCH, CUT and SHAPE (1.x's LFO DEST and ENV DEST pages), only their AMOUNT turning; routes 8 to 11 are the modulation matrix @@ -667,6 +673,14 @@ notes; the octave buttons shift them by full octaves. Set QNT to OFF for the nor the keys like SNAP and also maps the sequenced notes onto the current ROOT / SCALE as they play (the steps are not changed; drum kits are never quantized). +QNT **SOLO** (2.1, #74) plays chords on the white keys and a tune on the black ones. The white keys play as with +WHITE, CHRD's chords too. The black keys walk the same scale one note at a time, five to an octave: C#4 plays ROOT, +F#3, G#3 and A#3 the three scale notes below it, and the run goes up to F#5, seven scale notes above (on the SMK-37, +C#3, D#3, G#5 and A#5 carry it on). A black key never plays a chord, in live recording and step entry too; KBD HOLD +doesn't hold it, and pressing one leaves the held chord sounding (the SMK-37's sustain pedal still holds every key); +with the ARP on it sounds directly, and is recorded so, while the white keys' chords go into the arpeggio. SCALE +LEDS light the black keys too. A Skiff before 2.1 opens a SOLO track as SEQ+T: every key snapped to the scale. + Scales: chromatic (CHR), major (MAJ), natural minor (MIN), Dorian (DOR), Mixolydian (MIX), major pentatonic (PEN), minor pentatonic (MPEN), harmonic minor (HARM), Phrygian (PHRY), Lydian (LYD), Locrian (LOC), ascending melodic minor (MEL), minor blues (BLUES), whole tone (WHOLE), half-whole diminished (DIMHW) and whole-half diminished (DIMWH). Scales @@ -674,6 +688,30 @@ with other than seven notes continue across the white keys without repeating not their own note mapping. Press **SEL** again for the **CHORD** page: CHRD picks the chord keys (OFF, the scale's triads or sevenths, or a fixed shape) and VOIC the voicing. +### Chord follow + +Press **SEL** a third time for the **FOLLOW** page (2.1). Write a bass line or an arp once, in the track's own key +(its ROOT), and let another track's chords move it. Only the following track is set; the chord track needs nothing. + +- **FOLLOW** (KNOB 1): OFF, or the track whose chords this one follows (T1..T6; never itself). +- **MODE** (KNOB 2): **KEY** moves every note by the distance from this track's ROOT to the chord's note, the nearest + way (up to six semitones up, five down): C E G under an F chord plays F A C. **SCALE** moves the notes along this + track's own SCALE by as many scale steps, so they stay in key: C E G in C major under Am plays A C E. **FIT** moves + each note to the nearest note of the chord itself (a tie goes down), for arps and pads over any chord. +- **NOTE** (KNOB 3, for KEY and SCALE): which note of the chord counts: its **ROOT** (worked out from its notes, + inversions too: F for A C F), its lowest (**LOW**: A for A C F), its highest (**HIGH**) or the one started last + (**LAST**). + +The chord is the notes of the chord track's latest step (as they sound), or the keys and MIDI notes it holds: a key +pressed with none held starts a new chord, the ones pressed while it is held join it (an arpeggio's held chord, not +each of its notes; QUANTIZE SOLO's black keys are a tune, not the chord). It stays until the next one, and a muted +chord track still leads. Every note the following track sounds moves as it starts: its steps, its keys, MIDI IN and +its ARP. A note already sounding, or tied on, keeps its pitch; on a step where the chord changes, the chord comes +first. What you record or enter is what you played, so a take plays back as you heard it and moves again with the +chords. STOP clears the chords: the following tracks play as written until their chord track plays again. Drum kits +neither follow nor lead. MIDI OUT sends the keys as pressed. The page shows the chord, the note it goes by and what +the track does with it ("T2 KEY +5"). A Skiff before 2.1 ignores FOLLOW: the tracks play as written. + ## Build from source [BUILDING.md](BUILDING.md): the toolchain, the JieLi AC79 SDK the package needs three files from, `./build.sh` @@ -702,7 +740,7 @@ On the SMK-37: [SMK37.md](SMK37.md#if-it-does-not-start). **The screen says UPDATE MODE, or stays black while a computer sees a USB MIDI device named "Felucca Update":** an install was cut off, and the FM-1 waits in Skiff's update loader at every power-on. Nothing is lost. Connect it by USB and run the [Skiff installer](https://illuminus5.github.io/skiff/webapp/installer/) again -(or `python tools/fm1_install.py skiff-2.0.3.fwsc`): it finishes the install. If the installer can't find it, plug +(or `python tools/fm1_install.py skiff-2.1.fwsc`): it finishes the install. If the installer can't find it, plug the FM-1 straight into the computer: a USB hub or USB-sharing software can lose it when it switches to update mode. M-VAVE's own updater does not see the FM-1 in this state. (Since 1.3.2 the loader says UPDATE MODE on the screen; one an older Skiff left there keeps it black.) diff --git a/SMK37.md b/SMK37.md index b77ed3d..0d25698 100644 --- a/SMK37.md +++ b/SMK37.md @@ -14,7 +14,7 @@ keyboard; the Starrykey 37 Play is not supported yet. its Bluetooth pairings, which no download can replace. Skiff never writes them, but a backup is the way back if anything else goes wrong. 3. **Install:** the [Skiff installer](https://illuminus5.github.io/skiff/webapp/installer/) (Chrome or Edge) finds the - keyboard and picks its build, or `python tools/fm1_install.py skiff-2.0.3-smk37.fwsc` (`-elite`, `-mke` for those + keyboard and picks its build, or `python tools/fm1_install.py skiff-2.1-smk37.fwsc` (`-elite`, `-mke` for those models, not tried on a keyboard yet). About two minutes. Keep it plugged in and switched on while it writes. If the cable or the power is cut anyway, the keyboard stays in @@ -29,7 +29,7 @@ This needs a computer with Windows or Linux, Python 3, this repository's `tools/ reads the whole 1 MiB through the chip's built-in boot mode: 1. With the keyboard on M-VAVE's V016 (or on Skiff) and connected: - `python tools/fm1_install.py --uboot skiff-2.0.3-smk37.fwsc`. The keyboard starts Skiff's update loader without + `python tools/fm1_install.py --uboot skiff-2.1-smk37.fwsc`. The keyboard starts Skiff's update loader without writing the firmware, then switches to the chip's boot mode: the computer sees a USB disk named `WL82 UBOOT1.00`. **If Windows offers to format it, cancel.** 2. In an **administrator** terminal (on Linux: with `sudo`, and `/dev/sgN` as the device), from jl-uboot-tool's folder, diff --git a/design/TIER_B.md b/design/TIER_B.md index c08408b..6d8af60 100644 --- a/design/TIER_B.md +++ b/design/TIER_B.md @@ -320,7 +320,8 @@ references there); the counted parts follow, then zeros up to the name. - `parts` and `phys` aren't stored: every project since 1.0 has `PROJ_PARTS` and `PROJ_PHYS`, which the reader sets. - #30, an entry's sound: byte 0 = 0 none, 1..NENGINES a factory preset of engine byte0 - 1 (byte 1 its index), 0x80 + slot a user preset (byte 1 0). What it does when the entry comes in is the feature's spec, after Tier B. -- #36's lane pans are 8 track parameters (SIDs 135–142): no bytes of their own. +- #36's lane pans are 8 track parameters (SIDs 135–142): no bytes of their own. (2.1) The chord follow's three (SIDs + 143–145, P_COUNT 146) take 18 bytes: 2,294 + 18 of the 2,560 in use, room for about 41 more a track. - A project holds no steps or automation (the pool does, as since SKF2): `project_t` drops `step[]`, the old chain and its motion store (`proj_scratch` 8,140 -> about 2,850 bytes). That waits for step 5: until the old readers leave, they decode steps into `project_t` (`proj_migrate` makes patterns of them), and `proj_slot` holds the older @@ -385,7 +386,8 @@ references there); the counted parts follow, then zeros up to the name. - `UP_VER_SID` 6 in the same 192-byte record and bank (UPB1, record size unchanged): the values by SID over the value area and the old pattern's 32 bytes (`sid[]`, 176 bytes, room for 41 more parameters); `np` is how many. `up_set_sound` writes one; SAVE › USER and the editor's `UP_PUT` both do (the pattern an editor sends is not kept). - `UP_GET` of one answers 16 rests and kind 0. + `UP_GET` of one answers 16 rests and kind 0. (2.1) With P_COUNT 146 a record by count (versions 4, 5) no longer holds + every value beside its pattern: `up_parse` stages UP_PUT as version 6 directly (30 ids of room left). - `up_params` reads it by SID (a newer record's ids passed over, an older one's at their defaults); `up_bank_check` leaves its bytes alone (no pattern to normalize, no PHYS DRUM / SAMPLE PERC migration: 2.0 writes neither). - Versions 1–5 are still read until step 5 moves 1–3 to the converter. diff --git a/firmware/src/core.h b/firmware/src/core.h index 2859c95..0225347 100644 --- a/firmware/src/core.h +++ b/firmware/src/core.h @@ -120,6 +120,8 @@ enum { /* per-track parameters */ P_ESYNC, /* (1.3, from Felucca 1.5) ENV SYNC: ATK DEC REL as note values of the tempo */ P_LPAN0, P_LPAN1, P_LPAN2, P_LPAN3, P_LPAN4, P_LPAN5, P_LPAN6, P_LPAN7, /* (2.0, #36) the drum lanes' PAN (voice.c * lpan_render): stored ids 135..142, after the engine values' (sid_p) */ + P_FOLLOW, P_FMODE, P_FNOTE, /* (2.1) chord follow (follow.c): the track whose chords it follows, how, + * by which of their notes; stored ids 143..145 */ P_E0, P_E1, P_E2, P_E3, P_E4, P_E5, P_E6, P_E7, P_COUNT }; @@ -159,17 +161,20 @@ static void params_by_count(int16_t *out, const int16_t *in, uint32_t np, const /* (Skiff 2.0, Tier B: design/TIER_B.md 4) stored parameter ids (SID): a parameter's number in a record, fixed for good. * One added later takes the next free number wherever it goes in the enum; one removed keeps its own, retired; 0..254. * 2.0's first records had the P_* positions (P_LEVEL 0 .. P_E7 134). (#36) The lane pans came before P_E0 (P_LPAN0 127): - * their SIDs are the next free, 135..142, and the engine values keep 127..134, so sid_p swaps those two blocks of - * eight (its own inverse: p_sid). The globals likewise (GSID: today's G_*) */ + * their SIDs are the next free, 135..142, and the engine values keep 127..134. (2.1) Every parameter since, before P_E0 + * too, likewise: its SID is its P_* + 8 (the chord follow's 143..145). The globals likewise (GSID: today's G_*) */ #define SID_COUNT ((uint32_t)P_COUNT) /* the SIDs this firmware knows: 0 .. SID_COUNT - 1 */ #define GSID_COUNT ((uint32_t)G_COUNT) #define SID_E0 127u /* the engine values' first SID (P_E0 before #36): frozen */ -_Static_assert(P_LPAN0 == SID_E0 && P_E0 == SID_E0 + 8u && P_COUNT == P_E0 + 8u, "sid_p: the lane pans, then E0..E7"); +_Static_assert(P_LPAN0 == SID_E0 && P_COUNT == P_E0 + 8u, "sid_p: the lane pans and those after them, then E0..E7"); static uint32_t sid_p(uint32_t sid) /* P_COUNT: not one of ours */ { - return sid < SID_E0 ? sid : sid < SID_E0 + 8u ? sid + 8u : sid < SID_COUNT ? sid - 8u : P_COUNT; + return sid < SID_E0 ? sid : sid < SID_E0 + 8u ? P_E0 + (sid - SID_E0) : sid < SID_COUNT ? sid - 8u : P_COUNT; +} +static uint32_t p_sid(uint32_t p) /* .. back */ +{ + return p < SID_E0 ? p : p >= P_E0 ? SID_E0 + (p - P_E0) : p + 8u; } -#define p_sid(p) sid_p(p) /* (a swap: its own inverse) */ static uint32_t gsid_g(uint32_t sid) { return sid < GSID_COUNT ? sid : G_COUNT; } /* a track's parameters p into b by SID: their count, then each value + 64. How many bytes; 0 for a value no record * holds (below -64, above 127) */ diff --git a/firmware/src/felucca.c b/firmware/src/felucca.c index d895e32..5eae471 100644 --- a/firmware/src/felucca.c +++ b/firmware/src/felucca.c @@ -46,7 +46,7 @@ #endif #endif #ifndef FELUCCA_VERSION -#define FELUCCA_VERSION "v2.0.3" /* Skiff's; shown in the menu, the console and the editor; build.py --release X.Y */ +#define FELUCCA_VERSION "v2.1" /* Skiff's; shown in the menu, the console and the editor; build.py --release X.Y */ #endif #if FELUCCA_OTA && !FELUCCA_FLASH #error "FELUCCA_OTA needs FELUCCA_FLASH" diff --git a/firmware/src/follow.c b/firmware/src/follow.c new file mode 100644 index 0000000..c7d7ca0 --- /dev/null +++ b/firmware/src/follow.c @@ -0,0 +1,201 @@ +/* SPDX-License-Identifier: GPL-3.0-only */ +/* (Skiff 2.1) Chord follow (SCL > FOLLOW: P_FOLLOW, P_FMODE, P_FNOTE; DESIGN.md). A track set to FOLLOW another plays + * in that track's chords: every note it sounds (its steps, keys, MIDI IN, ARP) moves as it starts. + * The chord a track leads with (fol_src): the notes of its latest step as they sound (seq_step, after its QNT SEQ: + * fol_step), or the keys and MIDI notes it holds (input_on / input_off, before the ARP; a note with none held starts + * a new chord, the others join it: fol_key; QNT SOLO's black keys, a tune, are none of it). Every track keeps its own: + * any track leads, a muted one too, a kit never. STOP and a panic of the track clear it: its followers play as + * written until it plays again. + * MODE KEY: the note moves by the distance from the follower's ROOT to the chord's note (NOTE: its ROOT, LOW, HIGH + * or LAST), the nearest way (-5..+6); SCALE: as many steps of the follower's own scale (ROOT, SCALE), the nearest + * way, so it stays in key (CHR: as KEY); FIT: to the nearest note of the chord (a tie: the lower). + * A note moves as it starts (voice.c trk_note_on: fol_on) and fol_map keeps where it went, so its end (trk_note_off: + * fol_off) ends that note however the chord has moved since: notes sounding, or tied on, keep their pitch. Recording, + * TAKES and step entry keep the notes as played: a take moves again with the chords. A kit (chord_kit) neither + * follows nor leads. The tracks followed tick first (fol_order): on one step the chord comes before the note that + * follows it. + * Included by seq.c after chord.c; runs in the audio ISR with the rest of the note input. Not inlined: out of the + * audio ISR's own cost (tests/target_budget.txt) */ +enum { FM_KEY, FM_SCALE, FM_FIT }; /* P_FMODE (params.c N_FMODE) */ +enum { FN_ROOT, FN_LOW, FN_HIGH, FN_LAST }; /* P_FNOTE (N_FNOTE) */ + +/* each track's chord as it leads: its pitch classes (bit i: i semitones above C; 0: none), its lowest, highest and + * last notes and its root (a pitch class); how many keys and MIDI notes hold it (none: the next note starts anew) */ +typedef struct { uint16_t pc; uint8_t lo, hi, last, root, held; } fol_src_t; +static fol_src_t fol_src[NTRK] __attribute__((section(".pool"))); +/* per follower, per note played: the note it sounds + 1 (0: none kept, as played) */ +static uint8_t fol_map[NTRK][128] __attribute__((section(".pool"))); + +/* the root of the pitch classes pc, lo its lowest note: the one with a fifth above it wins, then one with a third, + * then a flat fifth; on a tie the first from the lowest note up */ +static uint32_t fol_root(uint32_t pc, uint32_t lo) +{ + uint32_t i, best = lo % 12u, top = 0; + for (i = 0; i < 12u; i++) { + uint32_t r = (lo + i) % 12u, m, s; + if (!((pc >> r) & 1u)) + continue; + m = (pc >> r | pc << (12u - r)) & 0xFFFu; /* the chord from r: bit i, i semitones above it */ + s = ((m >> 7) & 1u) * 4u + (((m >> 3) | (m >> 4)) & 1u) * 2u + ((m >> 6) & 1u); + if (s > top) { + top = s; + best = r; + } + } + return best; +} + +/* note into track k's chord: a new chord (fresh), or one more note of the one it plays */ +static void fol_add(uint32_t k, uint32_t note, int fresh) +{ + fol_src_t *s = &fol_src[k]; + if (fresh || !s->pc) { + s->pc = 0; + s->lo = 127; + s->hi = 0; + } + s->pc |= (uint16_t)(1u << (note % 12u)); + s->lo = (uint8_t)(note < s->lo ? note : s->lo); + s->hi = (uint8_t)(note > s->hi ? note : s->hi); + s->last = (uint8_t)note; + s->root = (uint8_t)fol_root(s->pc, s->lo); +} + +/* a step of track t starts its n notes (as they sound; not the lane hits): its chord now */ +static __attribute__((noinline)) void fol_step(const track_t *t, const uint8_t *nn, uint32_t n) +{ + uint32_t i; + if (chord_kit(t)) + return; + for (i = 0; i < n; i++) + fol_add(trk_index(t), nn[i], !i); +} + +/* a key's or MIDI note's note of track t goes down (on) or up: the chord it holds */ +static __attribute__((noinline)) void fol_key(const track_t *t, uint32_t note, int on) +{ + fol_src_t *s = &fol_src[trk_index(t)]; + if (!on) { + s->held = (uint8_t)(s->held - (s->held != 0u)); + return; + } + if (chord_kit(t)) + return; + fol_add(trk_index(t), note, !s->held); + s->held = (uint8_t)(s->held + (s->held < 255u)); +} + +/* the notes of a scale (mask: bit j, j semitones above its root) at or below i semitones, and in all */ +static void fol_count(uint32_t mask, int32_t i, int32_t *below, int32_t *all) +{ + uint32_t j; + *below = *all = 0; + for (j = 0; j < 12u; j++) + if ((mask >> j) & 1u) { + ++*all; + *below += (int32_t)j <= i; + } +} + +/* how far track t moves for the chord s (its NOTE d semitones above t's ROOT): KEY semitones, SCALE scale steps (to + * the scale note at or below it), the nearest way */ +static int32_t fol_shift(const track_t *t, const fol_src_t *s) +{ + int32_t d = t->p[P_FNOTE] == FN_LOW ? s->lo : t->p[P_FNOTE] == FN_HIGH ? s->hi : t->p[P_FNOTE] == FN_LAST ? s->last : s->root; + int32_t below, all; + d = (d - t->p[P_ROOT] + 120) % 12; + if (t->p[P_FMODE] != FM_SCALE) + return d > 6 ? d - 12 : d; + fol_count(scale_mask(t), d, &below, &all); + return below - 1 > all / 2 ? below - 1 - all : below - 1; +} + +/* note x moved along track t's scale (ROOT, SCALE) by steps; a note off the scale keeps its semitones above the scale + * note below it */ +static int32_t fol_walk(const track_t *t, int32_t x, int32_t steps) +{ + uint32_t mask = scale_mask(t); + int32_t rel = x - 60 - t->p[P_ROOT], wo = rel >= 0 ? rel / 12 : -((11 - rel) / 12), pcr = rel - 12 * wo; + int32_t off = 0, below, all; + while (pcr > 0 && !((mask >> pcr) & 1u)) { /* (the root is on every scale) */ + pcr--; + off++; + } + fol_count(mask, pcr, &below, &all); + return kb_degree(t, wo * all + below - 1 + steps) + off; +} + +/* the note track t sounds for note: moved into the chord of the track it follows (FOLLOW, MODE, NOTE); as played + * with FOLLOW OFF or itself, no chord there yet, or on a kit */ +static uint32_t fol_note(const track_t *t, uint32_t note) +{ + uint32_t l = (uint32_t)t->p[P_FOLLOW] - 1u, pc, i; + int32_t x = (int32_t)note; + const fol_src_t *s; + if (l >= NTRK || l == trk_index(t) || !(pc = fol_src[l].pc) || chord_kit(t)) + return note; + s = &fol_src[l]; + if (t->p[P_FMODE] == FM_FIT) { + for (i = 0; i <= 6u; i++) { /* the nearest of its notes; a tie: the lower */ + if ((pc >> ((note + 120u - i) % 12u)) & 1u) + return (uint32_t)clamp(x - (int32_t)i, 0, 127); + if ((pc >> ((note + i) % 12u)) & 1u) + return (uint32_t)clamp(x + (int32_t)i, 0, 127); + } + return note; /* (never: a note of it is 6 semitones away at most) */ + } + x = t->p[P_FMODE] == FM_SCALE ? fol_walk(t, x, fol_shift(t, s)) : x + fol_shift(t, s); + return (uint32_t)clamp(x, 0, 127); +} + +/* (voice.c trk_note_on) a note track t plays starts: the note it sounds, kept for its end while it follows. Struck + * again while what it sounded is elsewhere now: that ends first (unless another note of the track sounds it) */ +static __attribute__((noinline)) uint32_t fol_on(track_t *t, uint32_t note) +{ + uint8_t *m = fol_map[trk_index(t)]; + uint32_t x = fol_note(t, note & 127u); + if (m[note & 127u] && m[note & 127u] != x + 1u) + trk_note_off(t, note); + if (t->p[P_FOLLOW] || m[note & 127u]) + m[note & 127u] = (uint8_t)(x + 1u); + return x; +} + +/* (voice.c trk_note_off) a note track t plays ends: the note it sounded (the note itself when none is kept); 255 + * while another note of the track sounds it too (FIT: two onto one), which ends it */ +static __attribute__((noinline)) uint32_t fol_off(track_t *t, uint32_t note) +{ + uint8_t *m = fol_map[trk_index(t)]; + uint32_t o = m[note & 127u], i; + if (!o) + return note; + m[note & 127u] = 0; + for (i = 0; i < 128u; i++) + if (m[i] == o) + return 255u; + return o - 1u; +} + +/* (voice.c trk_all_off) track t lets go of everything: nothing kept, and no chord to lead with */ +static __attribute__((noinline)) void fol_drop(const track_t *t) +{ + memset(fol_map[trk_index(t)], 0, sizeof fol_map[0]); + memset(&fol_src[trk_index(t)], 0, sizeof fol_src[0]); +} + +/* the order the tracks tick in, 4 bits each from bit 0: the ones another track follows first (on one step their + * chord comes before the note that follows it), then the others, each in its own order */ +static __attribute__((noinline)) uint32_t fol_order(void) +{ + uint32_t i, l, led = 0, ord = 0, at = 0, pass; + for (i = 0; i < NTRK; i++) + if ((l = (uint32_t)trk[i].p[P_FOLLOW] - 1u) < NTRK && l != i) + led |= 1u << l; + for (pass = 0; pass < 2u; pass++) + for (i = 0; i < NTRK; i++) + if (((led >> i) & 1u) != pass) { + ord |= i << at; + at += 4u; + } + return ord; +} diff --git a/firmware/src/icons.c b/firmware/src/icons.c index d6fa0cd..3aff7ad 100644 --- a/firmware/src/icons.c +++ b/firmware/src/icons.c @@ -248,6 +248,10 @@ static uint32_t param_icon(const param_desc_t *d, int32_t v) return ICON_DIVISION; /* arp / SLICER RATE is a note division, not Hz */ if (d->names == N_TRIO_MODE) return ICON_CUTOFF; /* TRIO's MODE is the filter type, not the arp mode */ + if (d->names == N_FMODE) + return ICON_TRANSPOSE; /* ((2.1) FOLLOW's MODE: how the notes move, not the arp mode) */ + if (d == &TP[P_FOLLOW]) + return ICON_SCALE; /* ((2.1) the track whose chords it follows, as CHORD's) */ if (d->names == N_NOISE_MODE) return ICON_NOISE; /* NOISE's MODE is the source; its CLK the register clock */ if (d == &NOISE_CLK) diff --git a/firmware/src/midi_control.c b/firmware/src/midi_control.c index a48db29..8625198 100644 --- a/firmware/src/midi_control.c +++ b/firmware/src/midi_control.c @@ -61,12 +61,13 @@ static int midi_note_held(const track_t *t, uint32_t note) return mchord_held(id, note); } -/* a key held on track t sounds note (the key's own note, or a tone of its chord) */ +/* a key held on track t sounds note (the key's own note, or a tone of its chord). (2.1, #74) With the ARP on, the SOLO + * black keys' notes (seq.c kb_sol, sounding) and the others' (the ARP's) are apart: the keys of in_solo's kind */ static int midi_local_held(const track_t *t, uint32_t note) { uint32_t k, i; for (k = 0; k < KB_N; k++) - if (kb_chn[k] && kb_trk[k] == trk_index(t)) + if (kb_chn[k] && kb_trk[k] == trk_index(t) && (!t->p[P_AMODE] || kb_sol[k] == in_solo)) for (i = 0; i < kb_chn[k]; i++) if (kb_chord[k][i] == note) return 1; diff --git a/firmware/src/motion.c b/firmware/src/motion.c index 8ad24eb..f790626 100644 --- a/firmware/src/motion.c +++ b/firmware/src/motion.c @@ -38,10 +38,11 @@ static int motion_param(uint32_t id) return id < P_COUNT && (id <= P_REL || (id >= P_ED_FLT && id <= P_LD_AMP) || (id >= P_DIST && id <= P_REV) || id == P_GLIDE || id == P_PAN || id == P_DETUNE || (id >= P_FM1_ATK && id <= P_FM4_LEVEL) || (id >= P_LN0 && id != P_DIR && id != P_DKSRC && - (id < P_LSYNC || id > P_LPOL) && id != P_ESYNC) || id == P_SGATE); + (id < P_LSYNC || id > P_LPOL) && id != P_ESYNC && (id < P_FOLLOW || id > P_FNOTE)) || id == P_SGATE); /* (not the chord keys; the DRUM lane levels, E0..E7; (Skiff) not DIR: the pattern's; ducking's DEPTH and RELEASE, * not the track it ducks under: routing; GATE, the note length: a step's own as a lock, SEQ > NOTES' LENGTH; (1.3) - * not LFO SYNC TRIG POLARITY nor ENV SYNC: settings; SPREAD and the INSERT, its TYPE too: a lock switches it) */ + * not LFO SYNC TRIG POLARITY nor ENV SYNC: settings; SPREAD and the INSERT, its TYPE too: a lock switches it; (2.1) + * not the chord follow: settings) */ } static int motion_valid(const motion_store_t *m) { diff --git a/firmware/src/params.c b/firmware/src/params.c index 35fcfe8..1058817 100644 --- a/firmware/src/params.c +++ b/firmware/src/params.c @@ -14,8 +14,9 @@ static const char *const N_SCALE[] = {"CHR", "MAJ", "MIN", "DOR", "MIX", "PEN", "PHRY", "LYD", "LOC", "MEL", "BLUES", "WHOLE", "DIMHW", "DIMWH"}; static const char *const N_ONOFF[] = {"OFF", "ON"}; /* seq.c kb_map; 1 = SNAP (stored projects: the former ON); 3 = SEQ: SNAP, and the sequencer's notes snap too as - * they play (seq.c seq_step; the steps keep what was written). Append-only: older projects hold 0..2 */ -static const char *const N_QUANT[] = {"OFF", "SNAP", "WHITE", "SEQ", "SEQ+T"}; /* ((1.3) SEQ+T appended) */ + * they play (seq.c seq_step; the steps keep what was written). Append-only: older projects hold 0..2. (2.1, #74) SOLO: + * the white keys as WHITE, the black keys single notes of the scale (seq.c kb_pitch, kb_solo) */ +static const char *const N_QUANT[] = {"OFF", "SNAP", "WHITE", "SEQ", "SEQ+T", "SOLO"}; /* ((1.3) SEQ+T appended) */ /* chord keys (chord.c): OFF, the diatonic triad / seventh of the track's ROOT and SCALE on the key, fixed shapes */ static const char *const N_CHRD[] = {"OFF", "DIA3", "DIA7", "MAJ", "MIN", "DOM7", "MAJ7", "MIN7", "SUS4", "POW"}; static const char *const N_VOIC[] = {"CLOSE", "OPEN", "INV1", "INV2", "+OCT"}; /* VC_CLOSE .. VC_BASS */ @@ -26,6 +27,9 @@ static const char *const N_ALLOC[] = {"ROT", "REUSE"}; static const char *const N_DIR[] = {"FWD", "RVRS", "PING", "RAND"}; /* ((Skiff U4, L2) RVRS: REV is reverb) */ /* (Skiff) DIR_* (seq.c seq_next) */ static const char *const N_DKSRC[] = {"OFF", "T1", "T2", "T3", "T4", "T5", "T6"}; /* (Skiff) P_DKSRC: the track ducked under */ _Static_assert(sizeof N_DKSRC / sizeof N_DKSRC[0] == NTRK + 1u, "DUCK's BY: OFF and every track"); +/* (2.1) chord follow (follow.c): P_FOLLOW names the track as DUCK's BY does; P_FMODE FM_*, P_FNOTE FN_* (append-only) */ +static const char *const N_FMODE[] = {"KEY", "SCALE", "FIT"}; +static const char *const N_FNOTE[] = {"ROOT", "LOW", "HIGH", "LAST"}; static const char *const N_DTYPE[] = {"SOFT", "HARD", "FOLD", "CRUSH", "FUZZ"}; /* (Skiff phase 9) P_DTYPE: DT_* (fx.c) */ #define TRK_STR_(n) #n #define TRK_STR(n) TRK_STR_(n) @@ -189,6 +193,9 @@ static const param_desc_t TP[P_COUNT] = { #define LANE3(k) [P_LPAN0 + (k)] = PD("PAN", F_BIPCT, -64, 63, 0) LANE3(0), LANE3(1), LANE3(2), LANE3(3), LANE3(4), LANE3(5), LANE3(6), LANE3(7), #undef LANE3 + [P_FOLLOW] = PE("FOLLOW", N_DKSRC, 0), /* (2.1) chord follow (follow.c): OFF, as before */ + [P_FMODE] = PE("MODE", N_FMODE, 0), + [P_FNOTE] = PE("NOTE", N_FNOTE, 0), }; static const param_desc_t GP[G_COUNT] = { @@ -294,7 +301,8 @@ static int param_kept(uint32_t i) { return i == P_LEVEL || i == P_PAN || i == P_MUTE || (i >= P_AMODE && i <= P_SGATE) || (i >= P_SLCR && i <= P_SLDEPTH) || i == P_CHRD || i == P_VOIC || i == P_DIR || /* ((Skiff) DIR: the pattern's; */ - (i >= P_DKSRC && i <= P_DKREL); /* the ducking: the mix's) */ + (i >= P_DKSRC && i <= P_DKREL) || /* the ducking: the mix's; */ + (i >= P_FOLLOW && i <= P_FNOTE); /* (2.1) the chord follow: SCL's) */ } /* a knob moved an F_ENUM from `from` to v: past any alias in that direction (back to `from` at the end) */ @@ -488,7 +496,8 @@ enum { GR_NONE, GR_ADSR, GR_LFO, GR_STEPS, GR_ARP, GR_SCALE, GR_FX, GR_ROLL, GR_ GR_DRIVE, /* (Skiff phase 9) FX > DRIVE: the TYPE's transfer at the drive (ui_pgraph.c) */ GR_INS, /* (Skiff 1.3) FX > INSERT: its TYPE's transfer or sweep (ui_pgraph.c graph_insert) */ GR_SMIX, /* (Skiff, #21) EDIT > SAMPLES: a user sample's LEVEL, REVERB, DELAY (ui.c smx_zone) */ - GR_LMIX }; /* (2.0, #36, the user's pick 1A) EDIT > LANE MIX: a kit's lane levels and pans */ + GR_LMIX, /* (2.0, #36, the user's pick 1A) EDIT > LANE MIX: a kit's lane levels and pans */ + GR_FOLLOW }; /* (2.1) SCL > FOLLOW: the chord it follows, as CHORD's (ui_graph.c graph_follow) */ typedef struct { const char *title; @@ -516,6 +525,7 @@ static const page_t PAGES[] = { {"DUCK", FAM_FX, SC_TRACK, GR_DUCK, {P_DKSRC, P_DKAMT, P_DKREL, 0xFF}}, /* (Skiff) ducking (duck.c) */ {"SCALE", FAM_SCL, SC_TRACK, GR_SCALE, {P_ROOT, P_SCALE, P_QUANT, P_TRANS}}, /* ((#8) was SCL) */ {"CHORD", FAM_SCL, SC_TRACK, GR_CHORD, {P_CHRD, P_VOIC, 0xFF, 0xFF}}, /* SEL again: the chord keys (chord.c) */ + {"FOLLOW", FAM_SCL, SC_TRACK, GR_FOLLOW, {P_FOLLOW, P_FMODE, P_FNOTE, 0xFF}}, /* (2.1) again: the chord follow */ {"EDIT 1", FAM_EDIT, SC_ENGINE, GR_NONE, {P_E0, P_E1, P_E2, P_E3}}, {"EDIT 2", FAM_EDIT, SC_ENGINE, GR_NONE, {P_E4, P_E5, P_E6, P_E7}}, {"OPERATOR", FAM_EDIT, SC_TRACK, GR_FMOP, {0xFF, 0xFF, 0xFF, 0xFF}}, /* (FM6 LAB) FM6 only: an operator's values */ diff --git a/firmware/src/seq.c b/firmware/src/seq.c index af18fe0..f9a4b20 100644 --- a/firmware/src/seq.c +++ b/firmware/src/seq.c @@ -48,10 +48,13 @@ static uint32_t kb_semi(uint32_t k) { return k < 27u ? k : k < 32u ? k - 32u : k #define KB_IN(k) ((k) < 27u ? (k) + 1u : 0u) #else #define KB_N 27u +static uint32_t kb_semi(uint32_t k) { return k; } #define KB_VEL(k) 100u #define KB_IN(k) ((k) + 1u) #endif static uint8_t kb_note[KB_N], kb_trk[KB_N]; /* per key: the note it started and on which track */ +static uint8_t kb_sol[KB_N], in_solo; /* (2.1, #74) per key: a black key of QNT SOLO (key_on); in_solo: the notes going + * into input_on / input_off now are one's (they never go into the ARP) */ static uint8_t in_key; /* the key (+ 1) whose notes go into input_on now (key_on), 0: none (MIDI IN) */ /* (Skiff 1.3, from Felucca 1.5 #191) where each track's held[i] came from, so the arp maps it again as it plays * (arp_list: TRN, ROOT, SCALE, QNT as they are now). held_key: the key + 1 (bits 0..4) and the octave buttons then + 3 @@ -109,8 +112,12 @@ static int32_t scale_snap(const track_t *t, int32_t n) return n; } -enum { QN_OFF, QN_SNAP, QN_WHITE, QN_SEQ, QN_SEQT }; /* P_QUANT ((1.3, from Felucca 1.5.6) SEQ+T: appended; older - * firmware loads SEQ) */ +enum { QN_OFF, QN_SNAP, QN_WHITE, QN_SEQ, QN_SEQT, QN_SOLO }; /* P_QUANT ((1.3, from Felucca 1.5.6) SEQ+T: appended; + * older firmware loads SEQ. (2.1, #74) SOLO appended: firmware + * before loads it as SEQ+T, the keys snapped) */ +#ifndef SOLO_OCT +#define SOLO_OCT 0 /* (2.1, #74) QNT SOLO: the black keys this many octaves above the white */ +#endif /* the engine's own key map (DRUM's GM map, slices) for key k, -1 none */ static int32_t kb_engine(const track_t *t, uint32_t k) @@ -119,37 +126,47 @@ static int32_t kb_engine(const track_t *t, uint32_t k) return e->keys ? e->keys(t, k) : -1; } +/* the note of the scale's degree d (ROOT, SCALE; 0 the root at C4, below it negative), before TRN and the octave: QNT + * WHITE's and SOLO's keys. Scales with 5, 6, 8 or 12 notes still have no duplicated degrees. Not inlined: its loops and + * divide stay out of the audio ISR's own cost (tests/target_budget.txt) */ +static __attribute__((noinline)) int32_t kb_degree(const track_t *t, int32_t degree) +{ + uint32_t mask = scale_mask(t), i; + int32_t count = 0, wo; + for (i = 0; i < 12u; i++) + count += (mask >> i) & 1u; + wo = degree / count; + degree %= count; + if (degree < 0) { + degree += count; + wo--; + } + for (i = 0; i < 12u; i++) + if ((mask >> i) & 1u) { + if (!degree) + break; + degree--; + } + return 60 + t->p[P_ROOT] + 12 * wo + (int32_t)i; +} + /* key k's note with the octave buttons at oct: QNT, ROOT, SCALE, TRN (KB_SILENT: a black key under WHITE). The keys * (kb_map) and the arp's latched keys (arp_list: as the keys play now, the octave they were pressed in) */ static uint32_t kb_pitch(const track_t *t, uint32_t k, int32_t oct) { - static const int8_t DEGREE[12] = {0, -1, 1, -1, 2, 3, -1, 4, -1, 5, -1, 6}; - int32_t n = 53 + (int32_t)k; - if (t->p[P_QUANT] == QN_SNAP || t->p[P_QUANT] >= QN_SEQ) /* SNAP (and SEQ, SEQ+T): every key, rounded down */ + static const int8_t PLACE[12] = {0, 0, 1, 1, 2, 3, 2, 4, 3, 5, 4, 6}; /* among the keys of its colour from C */ + int32_t n = 53 + (int32_t)k, q = t->p[P_QUANT]; + if (q == QN_SNAP || q == QN_SEQ || q == QN_SEQT) /* SNAP (and SEQ, SEQ+T): every key, rounded down */ return (uint32_t)clamp(scale_snap(t, n + 12 * oct + t->p[P_TRANS]), 0, 127); - if (t->p[P_QUANT] == QN_WHITE) { /* WHITE: white keys walk the scale, black keys are silent */ - uint32_t mask = scale_mask(t), i; - int32_t count = 0, degree = DEGREE[n % 12], wo; - if (degree < 0) + if (q == QN_WHITE || q == QN_SOLO) { + /* WHITE: C4 is the root, the white keys walk the scale (below C4 too), the black keys are silent. (2.1, #74) + * SOLO: the white keys as WHITE; the black keys walk it too, five an octave, C#4 the root (SOLO_OCT up) */ + if (!key_black(k)) + n = kb_degree(t, PLACE[n % 12] + (n / 12 - 5) * 7); + else if (q == QN_SOLO) + n = kb_degree(t, PLACE[n % 12] + (n / 12 - 5) * 5) + 12 * SOLO_OCT; + else return KB_SILENT; - /* C4 is the root. Walk scale degrees on successive white keys, including - * below C4; scales with 5, 6, 8 or 12 notes still have no duplicated degrees. */ - degree += (n / 12 - 5) * 7; - for (i = 0; i < 12u; i++) - count += (mask >> i) & 1u; - wo = degree / count; - degree %= count; - if (degree < 0) { - degree += count; - wo--; - } - for (i = 0; i < 12u; i++) - if ((mask >> i) & 1u) { - if (!degree) - break; - degree--; - } - n = 60 + t->p[P_ROOT] + 12 * wo + (int32_t)i; } return (uint32_t)clamp(n + 12 * oct + t->p[P_TRANS], 0, 127); } @@ -160,7 +177,15 @@ static uint32_t kb_map(const track_t *t, uint32_t k) return n >= 0 ? (uint32_t)n : kb_pitch(t, k, song.octave); } +/* (2.1, #74) key k (as kb_map takes it) of track t is a black key of QNT SOLO: its note alone (no chord), never into the + * ARP, held by the SMK's pedal only (not KBD HOLD). Not where the engine maps the keys itself */ +static int kb_solo(const track_t *t, uint32_t k) +{ + return t->p[P_QUANT] == QN_SOLO && key_black(k) && kb_engine(t, k) < 0; +} + #include "chord.c" +#include "follow.c" /* (2.1) chord follow */ /* ------------------------------------------------------------- arp --- */ static void arp_add(track_t *t, uint32_t note) @@ -314,6 +339,22 @@ static void arp_forget(track_t *t) /* (its notes ended otherwise: t->arp_note = t->arp_ch[0] = t->arp_ch[1] = t->arp_ch[2] = 0; } +/* (2.1, #74) a SOLO black key of track t sounds note (with the ARP on, beside it): the ARP's note-offs and the other + * keys' leave it to the key's release. Not inlined: its loop stays out of the audio ISR's own cost */ +static __attribute__((noinline)) int kb_sol_held(const track_t *t, uint32_t note) +{ + uint32_t k; + for (k = 0; k < KB_N; k++) + if (kb_sol[k] && kb_chn[k] && kb_trk[k] == trk_index(t) && kb_chord[k][0] == note) + return 1; + return 0; +} +static void arp_note_off(track_t *t, uint32_t note) +{ + if (!kb_sol_held(t, note)) + trk_note_off(t, note); +} + /* CHORD's notes. Not inlined: they run once an arp step, and kept out of the audio ISR's loop over the tracks * (tests/target_budget.py) */ static __attribute__((noinline)) void arp_chord_off(track_t *t, int rec) /* the other notes end */ @@ -325,7 +366,7 @@ static __attribute__((noinline)) void arp_chord_off(track_t *t, int rec) /* th rec_release(t, t->arp_ch[i]); else take_note(t, t->arp_ch[i], 0); /* (Skiff: TAKES) */ - trk_note_off(t, t->arp_ch[i]); + arp_note_off(t, t->arp_ch[i]); t->arp_ch[i] = 0; } } @@ -355,7 +396,7 @@ static void arp_silence(track_t *t) /* the sounding arp note(s) end { if (t->arp_ch[0] | t->arp_ch[1] | t->arp_ch[2]) arp_chord_off(t, 0); - trk_note_off(t, t->arp_note); + arp_note_off(t, t->arp_note); t->arp_note = 0; } @@ -363,7 +404,7 @@ static void arp_off(track_t *t) /* the sounding arp note(s) end { if (t->arp_ch[0] | t->arp_ch[1] | t->arp_ch[2]) arp_chord_off(t, rec_on(t)); - trk_note_off(t, t->arp_note); + arp_note_off(t, t->arp_note); if (rec_on(t)) rec_release(t, t->arp_note); else @@ -787,7 +828,7 @@ static void rec_release(track_t *t, uint32_t note) static __attribute__((noinline)) void cin_keep(track_t *t, uint32_t note, uint32_t vel) { uint32_t i = trk_index(t), k; - if (cin_left != 1u || cin_pos < click_beat_len() / 2u || !((song.rec >> i) & 1u) || t->p[P_AMODE]) + if (cin_left != 1u || cin_pos < click_beat_len() / 2u || !((song.rec >> i) & 1u) || (t->p[P_AMODE] && !in_solo)) return; for (k = 0; k < cin_n[i] && cin_note[i][k] != note; k++) ; @@ -803,15 +844,18 @@ static __attribute__((noinline)) void cin_keep(track_t *t, uint32_t note, uint32 static void input_on(track_t *t, uint32_t note, uint32_t vel) { + uint32_t arp = t->p[P_AMODE] && !in_solo; /* ((2.1, #74) a SOLO black key's: as with the ARP off) */ + if (!in_solo) + fol_key(t, note, 1); /* ((2.1) the chord it holds, for the tracks following it) */ last_note = (uint8_t)note; last_hits++; if (cin_left) cin_keep(t, note, vel); - if (rec_on(t) && !t->p[P_AMODE]) /* (ARP on: arp_tick records its notes) */ + if (rec_on(t) && !arp) /* (ARP on: arp_tick records its notes) */ rec_note(t, note, vel); - else if (!t->p[P_AMODE]) + else if (!arp) take_note(t, note, vel); /* (Skiff) not recorded: TAKES' log (take.c) */ - if (t->p[P_AMODE]) + if (arp) arp_add(t, note); else trk_note_on(t, note, vel); @@ -821,6 +865,8 @@ static int midi_note_held(const track_t *t, uint32_t note); static int midi_local_held(const track_t *t, uint32_t note); static void input_off(track_t *t, uint32_t note) { + if (!in_solo) + fol_key(t, note, 0); /* ((2.1) one fewer holding its chord) */ if (midi_note_held(t, note)) return; if (cin_left) { /* a kept note let go before step 1: recorded, then let go */ @@ -830,10 +876,12 @@ static void input_off(track_t *t, uint32_t note) cin_up[i] |= (uint8_t)(1u << k); } rec_release(t, note); - if (!t->p[P_AMODE]) + if (!t->p[P_AMODE] || in_solo) take_note(t, note, 0); /* (Skiff: its end, for TAKES' holds) */ - arp_remove(t, note); /* both: the note may have started in the */ - trk_note_off(t, note); /* other mode (ARP switched while held) */ + if (!in_solo) /* ((2.1, #74) a SOLO black key's never was the ARP's) */ + arp_remove(t, note); /* both: the note may have started in the */ + if (!t->p[P_AMODE] || !kb_sol_held(t, note)) /* other mode (ARP switched while held); ((2.1, #74) */ + trk_note_off(t, note); /* the ARP on: not one a SOLO black key sounds) */ } /* the effect of key k in the FX layer (PF_N none): the first PF_M1 white keys (F3 .. E5) in order, black keys @@ -844,11 +892,20 @@ static uint32_t perf_key(uint32_t k) return !key_black(k) ? (p < PF_M1 ? p : PF_N) : p < NTRK ? PF_M1 + p : PF_N; } -/* key k plays kb_note[k] on track t: its chord (chord.c; the note alone with CHRD OFF). A note another key - * holds already sounds: it is not started again (nor sent to MIDI OUT); the key keeps its notes */ +/* (2.1, #74) the notes key k plays on track t into kb_chord[k], their number: its chord (chord_build), a SOLO black key's + * note alone (in_solo set for them). Not inlined: out of the audio ISR's own cost (tests/target_budget.txt) */ +static __attribute__((noinline)) uint32_t kb_chord_of(uint32_t k, track_t *t) +{ + kb_sol[k] = in_solo = (uint8_t)kb_solo(t, kb_semi(k)); + kb_chord[k][0] = kb_note[k]; + return in_solo ? 1u : chord_build(t, kb_note[k], kb_chord[k]); +} + +/* key k plays kb_note[k] on track t: its chord (chord.c; the note alone with CHRD OFF, (2.1, #74) a SOLO black key). A + * note another key holds already sounds: it is not started again (nor sent to MIDI OUT); the key keeps its notes */ static void key_on(uint32_t k, track_t *t) { - uint32_t n = chord_build(t, kb_note[k], kb_chord[k]), i, mc = trk_midi_ch(trk_index(t)); + uint32_t n = kb_chord_of(k, t), i, mc = trk_midi_ch(trk_index(t)); kb_chn[k] = 0; in_key = (uint8_t)KB_IN(k); /* (the arp keeps the key: arp_add) */ for (i = 0; i < n; i++) { @@ -858,7 +915,7 @@ static void key_on(uint32_t k, track_t *t) input_on(t, x, KB_VEL(k)); midi_out_event(0x09u | (0x90u | mc) << 8 | x << 16 | KB_VEL(k) << 24); } - in_key = 0; + in_key = in_solo = 0; kb_chn[k] = (uint8_t)n; last_note = kb_note[k]; /* (step entry, the SAMPLE zone: the key's note) */ } @@ -868,6 +925,7 @@ static void key_off(uint32_t k, track_t *t) { uint32_t n = kb_chn[k], i, mc = trk_midi_ch(trk_index(t)); kb_chn[k] = 0; + in_solo = kb_sol[k]; for (i = 0; i < n; i++) { uint32_t x = kb_chord[k][i]; if (midi_local_held(t, x)) @@ -875,6 +933,7 @@ static void key_off(uint32_t k, track_t *t) input_off(t, x); midi_out_event(0x08u | (0x80u | mc) << 8 | x << 16); } + in_solo = 0; } #ifdef FM1_INPUT_LAT @@ -900,7 +959,8 @@ static __attribute__((noinline)) void kb_lat(uint32_t k) * selected track let go keeps its notes (kb_ped) until the hold ends (the pedal up; HOLD off, or the ARP on), another * track is selected, the track lets go of what it plays (panic_req: a preset, engine or project load) or the key is * pressed again (its notes end first); with KBD HOLD a key pressed with no key down starts a new chord (kb_fresh). A - * DRUM track's keys end as they are let go */ + * DRUM track's keys end as they are let go. (2.1, #74) QNT SOLO's black keys (kb_sol): the pedal holds them, KBD HOLD + * doesn't, and they are no chord's (one pressed leaves the chord held, one down doesn't make a key pressed join) */ static uint8_t kb_ped[KB_N], kb_ped_trk; /* the keys held; their track + 1 (0: none) */ static int kb_pedal(void) { @@ -911,12 +971,14 @@ static int kb_pedal(void) #endif } static int kb_hold_on(const track_t *t) { return kb_pedal() || (t->p[P_AHOLD] && !t->p[P_AMODE]); } +static uint8_t kb_ped_sol; /* (2.1, #74) a SOLO black key among the keys held (kb_sol_up) */ static void kb_up(uint32_t k) /* key k let go */ { track_t *t = &trk[kb_trk[k] % NTRK]; if (kb_trk[k] == song.sel && !drum_track(t) && kb_hold_on(t)) { kb_ped[k] = 1; kb_ped_trk = (uint8_t)(song.sel + 1u); + kb_ped_sol |= kb_sol[k]; } else key_off(k, t); } @@ -942,10 +1004,24 @@ static __attribute__((noinline)) void kb_ped_end(void) } } } +/* (2.1, #74) the SOLO black keys held end, unless the SMK's pedal is down: KBD HOLD holds none (kb_up holds them as the + * others; they end here, a block on). Not inlined, as kb_ped_end */ +static __attribute__((noinline)) void kb_sol_up(void) +{ + uint32_t k; + kb_ped_sol = 0; + for (k = 0; k < KB_N; k++) + if (kb_ped[k] && kb_sol[k]) { + kb_ped[k] = 0; + key_off(k, &trk[kb_trk[k] % NTRK]); + } +} /* events_block, before the keys: the hold ended, another track selected or pr (panic_req's bits) for its track */ static void kb_ped_block(uint32_t pr) { uint32_t i = kb_ped_trk - 1u; + if (kb_ped_sol && !kb_pedal()) + kb_sol_up(); if (!kb_ped_trk || (i == song.sel && kb_hold_on(&trk[song.sel]) && !((pr >> i) & 1u))) return; kb_ped_end(); @@ -955,10 +1031,10 @@ static void kb_ped_block(uint32_t pr) static __attribute__((noinline)) void kb_fresh(uint32_t k) { uint32_t j; - if (!kb_ped_trk || kb_pedal()) + if (!kb_ped_trk || kb_pedal() || kb_solo(&trk[kb_trk[k]], kb_semi(k))) return; for (j = 0; j < KB_N; j++) - if (j != k && kb_chn[j] && !kb_ped[j]) + if (j != k && kb_chn[j] && !kb_ped[j] && !kb_sol[j]) return; kb_ped_end(); } @@ -1198,6 +1274,7 @@ static void seq_stop(void) trk[i].rat_left = 0; trk[i].nud = 0; /* (Skiff) no NUDGE pending */ } + memset(fol_src, 0, sizeof fol_src); /* ((2.1) no chords: the followers as written until theirs play) */ motion_end(); } @@ -1242,7 +1319,7 @@ static __attribute__((noinline)) void seq_step(track_t *t, const step_t *s, uint * or another engine that maps the keys itself. (1.3, from Felucca 1.5.6) SEQ+T: moved by TRN first, as the keys * are. seq_notes keeps the notes that sound: their note-offs match */ const engine_t *e = ENGINES[eng_idx(t->eng_req)]; - uint32_t qseq = t->p[P_QUANT] >= QN_SEQ && !(e->keys && e->keys(t, 0) >= 0); + uint32_t qseq = (t->p[P_QUANT] == QN_SEQ || t->p[P_QUANT] == QN_SEQT) && !(e->keys && e->keys(t, 0) >= 0); int32_t qtrn = qseq && t->p[P_QUANT] == QN_SEQT ? t->p[P_TRANS] : 0; if (!(skip & SEQ_REP)) { t->rat_left = 0; @@ -1301,6 +1378,8 @@ static __attribute__((noinline)) void seq_step(track_t *t, const step_t *s, uint tn |= ((ties >> i) & 1u) << m; m++; } + if (m && !miss && !(skip & SEQ_REP)) + fol_step(t, nn, m); /* ((2.1) its chord now, for the tracks following it) */ for (i = 0; i < NLANE; i++) if ((s->hit >> i) & 1u) { nn[m] = DRUM_LANE_NOTE[i]; @@ -1656,7 +1735,7 @@ static int32_t click_beat_now(void) /* everything that happens between two rendered blocks */ static void events_block(uint32_t n) { - uint32_t i, pr, seq_n = n; + uint32_t i, pr, ord, seq_n = n; uint32_t clock_mode = (uint32_t)song.g[G_CLOCK]; if (midi_clock.mode != clock_mode) { seq_stop(); @@ -1763,8 +1842,8 @@ static void events_block(uint32_t n) launch_clock(seq_n); /* (Skiff) the steps a BAR / BEAT launch waits for */ if (aud_req) seq_audition(); /* ((1.3) STEP PREVIEW: a step sounds, stopped) */ - for (i = 0; i < NTRK; i++) - seq_tick(&trk[i], seq_n); + for (i = 0, ord = fol_order(); i < NTRK; i++, ord >>= 4) /* ((2.1) the tracks followed first: follow.c) */ + seq_tick(&trk[ord & 15u], seq_n); if (cin_flush) cin_record(); if (song.playing) diff --git a/firmware/src/ui_draw.c b/firmware/src/ui_draw.c index d4f17cb..ca062ec 100644 --- a/firmware/src/ui_draw.c +++ b/firmware/src/ui_draw.c @@ -560,6 +560,10 @@ static int card_dead(const page_t *pg, uint32_t c) return 1; if (id == P_SPRD && trk_vmode(t) != V_POLY && trk_vmode(t) != V_UNISON) /* ((1.3) SPREAD: POLY / UNISON only) */ return 1; + if ((id == P_FMODE || id == P_FNOTE) && /* ((2.1) FOLLOW OFF (or itself): MODE, NOTE do nothing; */ + ((uint32_t)t->p[P_FOLLOW] - 1u >= NTRK || (uint32_t)t->p[P_FOLLOW] - 1u == song.sel % NTRK || + (id == P_FNOTE && t->p[P_FMODE] == FM_FIT))) /* FIT takes the whole chord: NOTE nothing) */ + return 1; return pg->scope == SC_ENGINE && t->eng_req % NENGINES == ENGI_DRUM && id == P_E6 && drum_kit_plays(t->p[P_E0]) != DK_STD; } diff --git a/firmware/src/ui_graph.c b/firmware/src/ui_graph.c index 43be889..1be1252 100644 --- a/firmware/src/ui_graph.c +++ b/firmware/src/ui_graph.c @@ -762,6 +762,59 @@ static void graph_chord(const track_t *t, uint16_t c) !on ? T_RAISE : note % 12u == (uint32_t)r % 12u ? T_ACCENT : c, T_SURF); } } +/* (2.1) FOLLOW (SCL 3): the chord of the track it follows, as CHORD draws one: its name over the keys from the C below + * its lowest note, its notes in that track's colour, the note this track goes by (NOTE) ACCENT; on the name's baseline + * what this track does with it ("T2 KEY +5", "T2 SCALE -2", "T2 FIT"). OFF, a kit to follow, no chord yet: notes */ +static void graph_follow(const track_t *t) +{ + static const uint8_t BLACK[12] = {0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0}; + uint32_t l = (uint32_t)t->p[P_FOLLOW] - 1u, i, lo, cnt, w, by, rel; + const fol_src_t *s; + char b[12], cap[24]; + if (l >= NTRK || l == trk_index(t)) { + panel_note("FOLLOW OFF", "[K1] A TRACK TO FOLLOW", 0); + return; + } + s = &fol_src[l]; + str_cpy(cap, N_DKSRC[l + 1u], sizeof cap); + if (chord_kit(&trk[l])) { + str_cpy(cap + str_len(cap), " PLAYS A KIT", sizeof cap - str_len(cap)); + panel_note(cap, "NO CHORDS TO FOLLOW", 0); + return; + } + if (!s->pc) { + str_cpy(cap + str_len(cap), ": NO CHORD YET", sizeof cap - str_len(cap)); + panel_note(cap, "PLAYS AS WRITTEN", 0); + return; + } + rel = (s->pc >> s->root | (uint32_t)s->pc << (12u - s->root)) & 0xFFFu; /* (its notes above its root) */ + if (rel == 1u) + str_cpy(b, N_NOTE[s->root % 12u], sizeof b); /* (a single note: its name) */ + else + chord_name(b, s->root, rel); + cv_text_on(14, 8, &AF_M, b, T_TEXT, T_SURF); + str_cpy(cap + str_len(cap), " ", sizeof cap - str_len(cap)); + str_cpy(cap + str_len(cap), N_FMODE[t->p[P_FMODE] % 3], sizeof cap - str_len(cap)); + if (t->p[P_FMODE] != FM_FIT) { + int32_t sh = fol_shift(t, s); + str_cpy(cap + str_len(cap), sh > 0 ? " +" : " ", sizeof cap - str_len(cap)); + fmt_int(cap + str_len(cap), sh); + } + GFX_HOOK_ALIGN(0, 0, 0, 8 + AF_M.asc, AL_B, "follow caption on the name's baseline"); + cv_text_r(226, 8 + AF_M.asc - AF_S.asc, &AF_S, cap, T_MID, T_SURF); + by = t->p[P_FMODE] == FM_FIT || t->p[P_FNOTE] == FN_ROOT ? 128u + s->root : /* (the note it goes by: 128 + a */ + t->p[P_FNOTE] == FN_LOW ? s->lo : t->p[P_FNOTE] == FN_HIGH ? s->hi : s->last; /* pitch class, every octave) */ + lo = s->lo - s->lo % 12u; + cnt = s->hi - lo < 24u ? 24u : 36u; + w = 216u / cnt; + GFX_HOOK_ALIGN(0, 0, 240, 0, AL_H | AL_CELLS | AL_N(cnt), "follow keys centred"); + for (i = 0; i < cnt; i++) { + uint32_t note = lo + i, on = note >= s->lo && note <= s->hi && ((s->pc >> (note % 12u)) & 1u); + int32_t x = 13 + (int32_t)(i * w); + cv_rrect(x, BLACK[note % 12u] ? 36 : 62, (int32_t)w - 2, 48, w > 6u ? 3 : 2, + !on ? T_RAISE : (by >= 128u ? note % 12u == by - 128u : note == by) ? T_ACCENT : T_TRK(l), T_SURF); + } +} /* the four sends as faders under their cards: a RAISE slot, the THEME fill from the bottom, a cap */ static void graph_fx(const track_t *t, uint16_t c) { @@ -1533,6 +1586,11 @@ static uint32_t graph_signature(void) h = (h ^ chord_last[song.sel].note[i]) * 16777619u; h ^= (uint32_t)t->engine * 389u; /* (MONO and kits follow the sounding engine) */ } + if (pg->graph == GR_FOLLOW) { /* ((2.1) the chord of the track it follows, that track's sound) */ + const fol_src_t *s = &fol_src[(uint32_t)(t->p[P_FOLLOW] + NTRK - 1) % NTRK]; + h = (h ^ (s->pc + 4099u * s->lo + 257u * s->hi + 65537u * s->last)) * 16777619u; + h ^= (uint32_t)trk[(uint32_t)(t->p[P_FOLLOW] + NTRK - 1) % NTRK].engine * 389u; + } if (pg->graph == GR_MOD) h ^= (mod_ui_route + 1u) * 40503u; if (sheet_of(pg->graph)) /* (Skiff phase 7; FM6 LAB) a sheet's: what it edits (SHEETS) */ @@ -2573,6 +2631,10 @@ static void draw_graph(void) cv_oy = pad; graph_chord(t, c); break; + case GR_FOLLOW: /* ((2.1) as CHORD's) */ + cv_oy = pad; + graph_follow(t); + break; case GR_FX: graph_fx(t, c); break; diff --git a/firmware/src/ui_input.c b/firmware/src/ui_input.c index 2284ddc..912a69a 100644 --- a/firmware/src/ui_input.c +++ b/firmware/src/ui_input.c @@ -299,8 +299,9 @@ static int keys_own(void) /* Discussion #127 (1.2): MENU > SCALE LEDS ON, the keys of the selected track's scale (ROOT, SCALE), bit k = key k, as * the keys play now: the note a key gives with TRN (QNT SNAP / SEQ: the key's own note; the others round down onto - * the scale); QNT WHITE every white key (they walk the scale; the black ones are silent). *root: the keys of the - * scale's root. None where the engine maps the keys itself (DRUM's GM map, the slices): 0 there, and OFF */ + * the scale); QNT WHITE every white key (they walk the scale; the black ones are silent), (2.1, #74) SOLO every key + * (the black ones walk it too). *root: the keys of the scale's root. None where the engine maps the keys itself (DRUM's + * GM map, the slices): 0 there, and OFF */ static uint32_t scale_leds(uint32_t *root) { const track_t *t = TSEL; @@ -313,7 +314,7 @@ static uint32_t scale_leds(uint32_t *root) for (k = 0; k < 27u; k++) { if (e->keys && e->keys(t, k) >= 0) continue; - if (t->p[P_QUANT] == QN_WHITE) { + if (t->p[P_QUANT] == QN_WHITE || t->p[P_QUANT] == QN_SOLO) { if ((note = kb_map(t, k)) > 127u) continue; /* (a black key: silent) */ pc = (int32_t)note - t->p[P_TRANS]; /* (WHITE walks the scale before TRN) */ @@ -1593,8 +1594,8 @@ static void edit_param(uint32_t slot, int32_t steps) if (!d || !vp || d->max == d->min) return; v = param_turn(d, *vp, accel(EN_K1 + slot, steps, d->fmt == F_ENUM ? 0 : d->max - d->min)); - if (vp == &TSEL->p[P_DKSRC] && v == (int32_t)(song.sel % NTRK) + 1) /* (Skiff) DUCK BY: never the track itself */ - v = v == d->max ? *vp : v + (steps > 0 ? 1 : -1); + if ((vp == &TSEL->p[P_DKSRC] || vp == &TSEL->p[P_FOLLOW]) && v == (int32_t)(song.sel % NTRK) + 1) + v = v == d->max ? *vp : v + (steps > 0 ? 1 : -1); /* (Skiff) DUCK BY, (2.1) FOLLOW: never the track itself */ *vp = (int16_t)v; if (pg->scope != SC_GLOBAL) { motion_capture(TSEL, (uint32_t)(vp - TSEL->p), *vp); @@ -1760,7 +1761,8 @@ static void entry_open(track_t *t, uint32_t i) /* SEQ step entry = step recording (1.2, Discussion #133: only with the track armed and the transport stopped), acid * style: the keys pressed together (POLY: up to 4 notes, MONO: the last one) become the cursor step; releasing all * keys moves on past it ((2.0, #31) PRESETS meanwhile its LENGTH, its ties: past them; wrapping inside LEN). With CHRD - * on a key writes what it sounds, as live recording does: POLY its chord, MONO the chord's root */ + * on a key writes what it sounds, as live recording does: POLY its chord, MONO the chord's root; (2.1, #74) a black key + * of QNT SOLO its note alone */ static void seq_entry(uint32_t pressed) { track_t *t = TSEL; @@ -1787,7 +1789,9 @@ static void seq_entry(uint32_t pressed) st->time = ST_NOTE; } } - n = chord_make(t, note, ch, &r, &mask); /* (CHRD OFF, a kit: the note alone; MONO: the root) */ + ch[0] = (uint8_t)note; /* (CHRD OFF, a kit, (2.1) a SOLO black key: the note */ + r = (int32_t)note; /* alone; MONO: the root) */ + n = kb_solo(t, k) ? 1u : chord_make(t, note, ch, &r, &mask); if (t->p[P_VOICE] && !ENGINES[t->engine]->oneshot) { /* (drums: hits stack as a chord) */ st->note[0] = (uint8_t)clamp(r, 0, 127); /* (the chord's root: (2.0.3) with the ARP on, ch is the chord) */ st->n = 1; diff --git a/firmware/src/upreset.c b/firmware/src/upreset.c index e94292e..48cee23 100644 --- a/firmware/src/upreset.c +++ b/firmware/src/upreset.c @@ -76,9 +76,10 @@ typedef struct { up_rec_t r[UP_PER_BANK]; } up_bank_t; _Static_assert(sizeof(up_rec_t) == 192, "user preset record layout"); -_Static_assert(P_COUNT <= UP_PMAX * 2u && SID_COUNT <= UP_SIDS, "user preset record: P_COUNT, the SIDs"); +_Static_assert(SID_COUNT <= UP_SIDS, "user preset record: the SIDs"); /* (Skiff) packed[132..143] held the pattern's NUDGE (see the top); (phase 5) a user preset holds no pattern and nothing - * reads one, so (1.3) the parameters may pass 132 into it: firmware before maps them by count, as any np */ + * reads one, so (1.3) the parameters may pass 132 into it: firmware before maps them by count, as any np. (2.1) Past + * UP_PMAX * 2 (P_COUNT 146) only version 6 holds them all: SAVE and UP_PUT write nothing else */ static up_bank_t up_bank[UP_SLOTS / UP_PER_BANK]; static up_rec_t *up_rec(uint32_t k) { return &up_bank[k / UP_PER_BANK].r[k % UP_PER_BANK]; } @@ -160,7 +161,7 @@ static void up_bank_check(uint32_t b, int len) /* the record's values in today's P_* order (mapped by count, see above; (2.0) v6 by stored id); def = the defaults */ static void up_params(const up_rec_t *r, int16_t *out, const int16_t *def) { - int16_t values[UP_PMAX * 2u]; + int16_t values[UP_SIDS]; /* (a record by count's np: up_valid keeps it below) */ uint32_t i; if (r->ver >= UP_VER_SID) { for (i = 0; i < P_COUNT; i++) @@ -207,12 +208,14 @@ static void up_pat_norm(uint8_t *note, uint8_t *flags) /* tie: no note; rest: } } -/* UP_PUT arguments: slot, engine, name, P_COUNT x v14, 16 x (note, flags) [, kind, 16 x hi] -> *r (values not - * yet clamped); 0 ok, 1 bad arguments. *slot gets the slot byte when there is one. kind 1 (and its 16 bytes): - * a drum grid, the pairs the low 7 bits of each step's hits and accents, hi bit 0 / 1 their bit 7 (lane 8) */ +/* UP_PUT arguments: slot, engine, name, P_COUNT x v14, 16 x (note, flags) [, kind, 16 x hi] -> *r, a version 6 + * record (values not yet clamped); 0 ok, 1 bad arguments (*r as it was). *slot gets the slot byte when there is one. + * The pattern (kind 1 and its 16 bytes: a drum grid) is checked and passed over: (2.0) a user preset holds none, and + * (2.1) past UP_PMAX * 2 values a record by count has no room left for one */ static int up_parse(const uint8_t *a, uint32_t na, up_rec_t *r, uint32_t *slot) { - uint32_t i, n, k, end; + uint32_t i, n, k, end, engine; + int16_t v[P_COUNT]; if (na < 3u) return 1; *slot = a[0]; @@ -223,40 +226,23 @@ static int up_parse(const uint8_t *a, uint32_t na, up_rec_t *r, uint32_t *slot) if (a[0] >= UP_SLOTS || a[1] >= NENGINES || (!FELUCCA_LEGACY && !FELUCCA_FM4 && a[1] == ENGI_DIGITAL) || 2u + n >= na || !up_name_ok(a + 2, n) || (na != end && (na != end + 17u || a[end] > 1u))) return 1; /* ((2.0) DIGITAL: none, as up_valid) */ - up_rec_t staged, *target = r; - r = &staged; + for (i = 0; i < P_COUNT; i++, k += 2u) { + int32_t value = (int32_t)((a[k] & 127u) | (a[k + 1] & 127u) << 7) - 8192; + if (value < -64 || value > 127) + return 1; + v[i] = (int16_t)value; + } + engine = a[1]; +#if FELUCCA_LEGACY + if (drum_from_phys(engine, &v[P_E0]) || drum_from_perc(engine, &v[P_E0])) + engine = ENGI_DRUM; /* (an editor of before the DRUM engine) */ +#endif memset(r, 0, sizeof *r); r->used = UP_USED; - r->ver = UP_VER; - r->engine = a[1]; - r->np = P_COUNT; + r->engine = (uint8_t)engine; for (i = 0; i < n; i++) r->name[i] = (char)a[2 + i]; - for (i = 0; i < P_COUNT; i++, k += 2u) - { - int32_t value = (int32_t)((a[k] & 127u) | (a[k + 1] & 127u) << 7) - 8192; - if (value < -64 || value > 127) return 1; - up_set_value(r, i, (int16_t)value); - } - if (na >= k + 33u + 16u && a[k + 32u] == 1u) { /* a drum grid */ - r->ver = UP_VER_GRID; - for (i = 0; i < 16u; i++) { - uint32_t hi = a[k + 33u + i]; - r->note[i] = (uint8_t)((a[k + 2u * i] & 127u) | (hi & 1u) << 7); - r->flags[i] = (uint8_t)(((a[k + 2u * i + 1u] & 127u) | (hi & 2u) << 6) & r->note[i]); - } - *target = *r; - return 0; - } - for (i = 0; i < 16u; i++, k += 2u) { - r->note[i] = a[k]; - r->flags[i] = a[k + 1]; - up_pat_norm(&r->note[i], &r->flags[i]); - } -#if FELUCCA_LEGACY - up_migrate(r); /* (an editor of before the DRUM engine) */ -#endif - *target = *r; + up_set_sound(r, v); return 0; } diff --git a/firmware/src/voice.c b/firmware/src/voice.c index 62acb30..208635d 100644 --- a/firmware/src/voice.c +++ b/firmware/src/voice.c @@ -413,6 +413,10 @@ static __attribute__((noinline)) void lfo_restart(track_t *t) t->lfo_fade = 0; t->lfo_t = 0; } +/* (2.1) chord follow (follow.c, in seq.c): the note a note played sounds, the note its end ends, a track letting go */ +static uint32_t fol_on(track_t *t, uint32_t note); +static uint32_t fol_off(track_t *t, uint32_t note); +static void fol_drop(const track_t *t); static void trk_note_on(track_t *t, uint32_t note, uint32_t vel) { uint32_t any = 0, i, mode = trk_vmode(t); @@ -428,6 +432,7 @@ static void trk_note_on(track_t *t, uint32_t note, uint32_t vel) t->xp_vel[i] = (uint8_t)vel; return; } + note = fol_on(t, note); /* ((2.1) a follower's: into the chord it follows) */ duck_note(t, note); /* (Skiff) a hit another track may duck under */ t->hits++; /* ((Skiff Q6) QUARK's event display) */ vel = mod_note(t, note, vel); /* the matrix's VEL / KEY / RAND ((1.3) VEL as a destination) */ @@ -468,6 +473,7 @@ static void trk_note_off(track_t *t, uint32_t note) t->xp_vel[k++] = t->xp_vel[i]; } t->xp_n = (uint8_t)k; + note = fol_off(t, note); /* ((2.1) the note it sounded; 255: another still sounds it) */ mono_remove(t, note); /* a mode change must not retain a released key */ if (mode != V_POLY) { uint32_t nv = mode == V_UNISON ? trk_nvoice(t) : 1u; @@ -502,6 +508,7 @@ static void trk_all_off(track_t *t) t->nmono = 0; t->mono_note = 0; t->xp_n = 0; + fol_drop(t); /* ((2.1) nothing kept, no chord to lead with) */ } /* engine switch, at each block start (events_block), before any note of the block. The UI writes diff --git a/tests/backup_test.c b/tests/backup_test.c index 56b50c6..1d35683 100644 --- a/tests/backup_test.c +++ b/tests/backup_test.c @@ -403,16 +403,18 @@ int main(void) static const int16_t SL[5] = {FM6_NFACTORY + 2, 1, FM6_NFACTORY + 4, FM6_NFACTORY + 2, FM6_NFACTORY + 2}; memset(&ub, 0, sizeof ub); ub.magic = UP_BANK_MAGIC; ub.rsize = sizeof(up_rec_t); ub.nslot = UP_PER_BANK; + const uint32_t np = 91u; /* ((2.1) 1.0.2's records by count: E0..E7 the last eight) */ for (uint32_t k = 0; k < 5u; k++) { /* slots 1..5: B3, F2, B5 (empty), B3 on DRUM, B3 */ up_rec_t *r = &ub.r[k]; uint32_t e = k == 3u ? ENGI_DRUM : ENGI_FM6; - r->used = UP_USED; r->ver = UP_VER; r->engine = (uint8_t)e; r->np = P_COUNT; + r->used = UP_USED; r->ver = UP_VER; r->engine = (uint8_t)e; r->np = (uint8_t)np; r->name[0] = (char)('A' + k); - for (uint32_t i = 0; i < P_COUNT; i++) up_set_value(r, i, param_desc_of(e, i)->def); - up_set_value(r, P_E7, SL[k]); /* (the raw stored value: B slots as 1.0.2 wrote them) */ + for (uint32_t i = 0; i < np; i++) + up_set_value(r, i, param_desc_of(e, i < np - 8u ? i : P_E0 + i - (np - 8u))->def); + up_set_value(r, np - 1u, SL[k]); /* (E7, the raw stored value: B slots as 1.0.2 wrote them) */ } ub.r[4].name[1] = 'X'; - up_set_value(&ub.r[4], P_E0, 3); /* (another sound than slot 1's) */ + up_set_value(&ub.r[4], np - 8u, 3); /* (E0: another sound than slot 1's) */ memset(&bk, 0, sizeof bk); bk.magic = FM6_BANK_MAGIC; bk.ver = 1; bk.nslot = FM6_BANK_N; bk.used = 1u << 2; memcpy(bk.v[2], FM6_FACTORY[5], FM6_PACKED); diff --git a/tests/chord_test.c b/tests/chord_test.c index 165de87..d91c3e9 100644 --- a/tests/chord_test.c +++ b/tests/chord_test.c @@ -326,9 +326,38 @@ static int kits(void) return bad; } +/* (2.1, #74) QNT SOLO: a white key plays its chord (as WHITE), a black key its note alone, whatever CHRD and VOIC are */ +static int solo(void) +{ + int bad = 0, ok; + track_t *t = &trk[0]; + uint32_t before, gen; + reset(); + t->p[P_QUANT] = QN_SOLO; + t->p[P_CHRD] = CH_DIA3; + t->p[P_SCALE] = 2; t->p[P_ROOT] = 9; /* A minor: C4 plays the root, A4 */ + key_down(K_C4); + bad += check("QNT SOLO: a white key as WHITE, its chord (A minor: C4 -> A4, A C E)", + ngated(t) == 3u && gate_note(t, 69) && gate_note(t, 72) && gate_note(t, 76)); + key_up(K_C4); + before = mo_w; + key_down(K_D4 + 1u); /* D#4: the scale's 2nd degree, B */ + ok = ngated(t) == 1u && gate_note(t, 71u + 12u * SOLO_OCT) && kb_chn[K_D4 + 1u] == 1u && mo_w == before + 1u; + key_up(K_D4 + 1u); + bad += check(" a black key: its note alone, one MIDI note out (D#4: B4); its release ends it", ok && !ngated(t)); + t->p[P_CHRD] = CH_MAJ7; t->p[P_VOIC] = VC_BASS; /* a fixed shape, a 4-note voicing */ + gen = chord_last[0].gen; + key_down(K_C4 + 1u); /* C#4: the root, A */ + bad += check(" CHRD MAJ7 +OCT: a black key still one note (C#4: A4), the CHORD page keeps the last chord", + ngated(t) == 1u && gate_note(t, 69u + 12u * SOLO_OCT) && chord_last[0].gen == gen); + key_up(K_C4 + 1u); + t->p[P_CHRD] = CH_OFF; t->p[P_VOIC] = VC_CLOSE; t->p[P_QUANT] = QN_OFF; + return bad; +} + int main(void) { - int bad = theory() + shapes_voicings() + keys() + arp_rec() + midi_in() + kits(); + int bad = theory() + shapes_voicings() + keys() + arp_rec() + midi_in() + kits() + solo(); printf("%s\n", bad ? "CHORD TEST FAILED" : "chord keys test passed"); return bad != 0; } diff --git a/tests/conv_test.c b/tests/conv_test.c index 2c76703..b524639 100644 --- a/tests/conv_test.c +++ b/tests/conv_test.c @@ -137,6 +137,7 @@ static persist_t per_from(uint32_t magic_, uint32_t palette) /* Felucca's sett p.magic = magic_; p.palette = palette_to_stored(palette); p.lowcut = 1; p.panel = PANEL_DEFAULT; return p; } +#define NP_14 135u /* ((2.1) 1.4's records by count: today's P_COUNT is past them */ static up_rec_t rec_of(uint32_t ver, uint32_t engine, const char *name, uint32_t np, int32_t base) { up_rec_t r; @@ -258,7 +259,7 @@ int main(int argc, char **argv) static up_bank_t b; memset(&b, 0, sizeof b); b.magic = UP_BANK_MAGIC; b.rsize = sizeof(up_rec_t); b.nslot = UP_PER_BANK; - b.r[0] = rec_of(UP_VER_GRID, ENGI_DRUM, "DRUM 01", P_COUNT, 0); + b.r[0] = rec_of(UP_VER_GRID, ENGI_DRUM, "DRUM 01", NP_14, 0); memcpy(in[6].b, &b, sizeof b); in[6].len = sizeof b; } for (id = 0; id < 32u; id++) @@ -326,8 +327,8 @@ int main(int argc, char **argv) b.r[0] = rec_of(2, 0, "OLD ANALOG", 69, -20); b.r[1] = rec_of(3, ENGI_DRUM, "OLD GRID", 69, 0); b.r[1].note[0] = 9; b.r[1].flags[0] = 1; /* (a grid's hits and accents: gone with the pattern) */ - b.r[2] = rec_of(UP_VER, ENGI_DIGITAL, "OLD DIGITAL", P_COUNT, 0); - b.r[3] = rec_of(UP_VER_GRID, ENGI_DRUM, "KEPT V5", P_COUNT, 3); + b.r[2] = rec_of(UP_VER, ENGI_DIGITAL, "OLD DIGITAL", NP_14, 0); + b.r[3] = rec_of(UP_VER_GRID, ENGI_DRUM, "KEPT V5", NP_14, 3); b.r[4] = rec_of(2, ENGI_FM6, "OLD FM6", 69, 0); up_bank[0] = b; /* (its patch, tied to the record as it is: upf_tag) */ upf_empty(); diff --git a/tests/follow_test.c b/tests/follow_test.c new file mode 100644 index 0000000..eb01e34 --- /dev/null +++ b/tests/follow_test.c @@ -0,0 +1,432 @@ +/* SPDX-License-Identifier: GPL-3.0-only */ +/* (Skiff 2.1) Chord follow (firmware/src/follow.c; SCL > FOLLOW: FOLLOW, MODE, NOTE) on the real sources with + * tests/ui_test.c's stubs: T1 follows T2 (a lower track than its leader: the order the tracks tick in), C major. + * ROOT the chord's root from its notes: C E G, F/A, B dim either way up, sus4, a power chord, Am7 / C6 by its + * lowest note, a single note + * KEY a bass on C3 under C F G Am: C F G A, the nearest way (G and A below); a tritone up + * NOTE ROOT, LOW (F/A: A), HIGH; LAST from keys played on the leader + * SCALE C E G under Am: A C E (in key); under F: F A C; a note off the scale keeps its semitone + * FIT to the nearest note of the chord, a tie the lower; two notes onto one: one voice, ending with the last + * TIE a note tied over a chord change keeps its pitch, one note-on, nothing left gated + * AGAIN a note struck again where the chord has moved: the old pitch ends + * LIVE the keys, MIDI IN and the ARP on a follower follow; the leader moving while they are held, their release + * leaves nothing sounding + * KEYS the leader's keys: a note with none held starts a chord, the others join it (LAST: the last one) + * REC recording on a follower keeps the key pressed (it sounds moved) + * STOP clears the chords: a follower as played + * KITS a DRUM follower plays its lanes as they are; a muted leader still leads; FOLLOW on itself: as played + * STORE the three settings by stored id (143..145), a record of before without them: OFF; a sound load keeps them + * PAGE SCL a third time: FOLLOW; KNOB 1 never the track itself; the graph drawn anew as the chord changes + * Built and run by tests/run_tests.sh. */ +#define UI_TEST_NO_MAIN 1 +#include "ui_test.c" + +#define K(n) ((n) - 53u) /* the key of note n (QNT OFF, no octave: F3 is key 0) */ +static track_t *F, *Ld; /* the follower T1, its leader T2 */ +static uint32_t at, L; /* samples since PLAY, a step's */ + +static int sounds(const track_t *t, uint32_t note) +{ + uint32_t i; + for (i = 0; i < NVOICE; i++) + if (t->v[i].active && t->v[i].gate && t->v[i].note == note) + return 1; + return 0; +} +static uint32_t nsound(const track_t *t) +{ + uint32_t i, n = 0; + for (i = 0; i < NVOICE; i++) + n += t->v[i].active && t->v[i].gate; + return n; +} +static void midi(uint32_t st, uint32_t d1, uint32_t d2) +{ + midi_enqueue(st >> 4 | st << 8 | d1 << 16 | d2 << 24, 1); + events_block(CTL); +} +/* three melodic tracks in C major, POLY, LEN 4, GATE half a step, no swing, no steps; T1 follows T2 (KEY, ROOT) */ +static void setup(void) +{ + uint32_t k, i; + ui_power_on(); + song.g[G_SWING] = 0; + for (k = 0; k < 3u; k++) { + track_t *t = &trk[k]; + set_engine_of(t, 0); + track_defaults_steps(t); + for (i = 0; i < NSTEP; i++) + t->step[i] = (step_t){{0}, 0, ST_REST, 0, 0}; + t->p[P_SLEN] = 4; t->p[P_SGATE] = 64; t->p[P_SSWING] = 0; t->p[P_AMODE] = 0; t->p[P_CHRD] = 0; + t->p[P_VOICE] = V_POLY; t->p[P_SCALE] = 1; t->p[P_ROOT] = 0; t->p[P_QUANT] = 0; t->p[P_MUTE] = 0; + } + F = &trk[0]; + Ld = &trk[1]; + F->p[P_FOLLOW] = 2; + F->p[P_FMODE] = FM_KEY; + F->p[P_FNOTE] = FN_ROOT; + events_block(CTL); +} +static void play(void) +{ + seq_start(); + at = 0; + L = step_samples(F, div_samples((uint32_t)F->p[P_SDIV]), 0); +} +static void run_to(uint32_t pos) +{ + while (at + CTL <= pos) { + events_block(CTL); + at += CTL; + } +} +#define IN(s) ((s) * L + L / 4u) /* a quarter into step s */ +static void chord(track_t *t, uint32_t s, uint32_t a, uint32_t b, uint32_t c) +{ + t->step[s] = (step_t){{(uint8_t)a, (uint8_t)b, (uint8_t)c}, c ? 3u : b ? 2u : 1u, ST_NOTE, 0, 100}; +} +/* the leader's four steps: C, F, G, Am (root position) */ +static void cfga(void) +{ + chord(Ld, 0, 60, 64, 67); + chord(Ld, 1, 65, 69, 72); + chord(Ld, 2, 67, 71, 74); + chord(Ld, 3, 69, 72, 76); +} + +static int roots(void) +{ + int bad = 0; +#define PC(a, b, c) ((1u << ((a) % 12u)) | (1u << ((b) % 12u)) | (1u << ((c) % 12u))) + bad += check("ROOT: C E G -> C, F/A (A C F) -> F", fol_root(PC(60, 64, 67), 60) == 0u && fol_root(PC(57, 60, 65), 57) == 5u); + bad += check(" B D F -> B, as D F B too (a third and a flat fifth)", + fol_root(PC(59, 62, 65), 59) == 11u && fol_root(PC(62, 65, 71), 62) == 11u); + bad += check(" C F G (sus4) -> C, C G -> C, a single E -> E", + fol_root(PC(60, 65, 67), 60) == 0u && fol_root(PC(60, 67, 67), 60) == 0u && fol_root(1u << 4, 64) == 4u); + bad += check(" A C E G -> A over A, C over C (C6)", + fol_root(PC(57, 60, 64) | 1u << 7, 57) == 9u && fol_root(PC(57, 60, 64) | 1u << 7, 60) == 0u); +#undef PC + return bad; +} + +static int key_note(void) +{ + int bad = 0, ok; + uint32_t s; + static const uint8_t WANT[4] = {48, 53, 43, 45}; /* C, F above, G below, A below */ + setup(); + cfga(); + for (s = 0; s < 4u; s++) + F->step[s] = (step_t){{48}, 1, ST_NOTE, 0, 100}; + play(); + ok = 1; + for (s = 0; s < 4u; s++) { + run_to(IN(s)); + ok &= sounds(F, WANT[s]) && nsound(F) == 1u; + if (!sounds(F, WANT[s])) + printf("follow: step %u: want %u\n", s + 1u, WANT[s]); + } + bad += check("KEY: C3 under C F G Am plays C3 F3 G2 A2 (the nearest way; T1 after its leader T2 on each step)", ok); + run_to(4u * L + L - CTL); + bad += check(" nothing left sounding", !nsound(F)); + seq_stop(); + setup(); + chord(Ld, 0, 66, 70, 73); /* F# */ + F->step[0] = (step_t){{48}, 1, ST_NOTE, 0, 100}; + play(); + run_to(IN(0)); + bad += check(" a tritone: up (C3 under F#: F#3)", sounds(F, 54)); + seq_stop(); + + setup(); + chord(Ld, 0, 57, 60, 65); /* F/A */ + F->step[0] = (step_t){{48}, 1, ST_NOTE, 0, 100}; + F->p[P_FNOTE] = FN_LOW; + play(); + run_to(IN(0)); + ok = sounds(F, 45); /* LOW: A, below */ + seq_stop(); + F->p[P_FNOTE] = FN_ROOT; + play(); + run_to(IN(0)); + ok &= sounds(F, 53); /* ROOT: F */ + seq_stop(); + F->p[P_FNOTE] = FN_HIGH; + play(); + run_to(IN(0)); + ok &= sounds(F, 53); /* HIGH: F (65) */ + seq_stop(); + bad += check("NOTE: F/A moves C3 to A2 by LOW, to F3 by ROOT and by HIGH", ok); + return bad; +} + +static int scale_fit(void) +{ + int bad = 0, ok; + setup(); + chord(Ld, 0, 57, 60, 64); /* Am */ + chord(Ld, 1, 65, 69, 72); /* F */ + chord(F, 0, 60, 64, 67); + chord(F, 1, 60, 64, 67); + F->step[2] = (step_t){{61}, 1, ST_NOTE, 0, 100}; /* C#: off the scale, under F still */ + Ld->step[2] = Ld->step[1]; + F->p[P_FMODE] = FM_SCALE; + play(); + run_to(IN(0)); + ok = sounds(F, 57) && sounds(F, 60) && sounds(F, 64) && nsound(F) == 3u; + bad += check("SCALE: C E G under Am plays A C E (down two scale steps, in key)", ok); + run_to(IN(1)); + bad += check(" under F: F A C (up three)", sounds(F, 65) && sounds(F, 69) && sounds(F, 72) && nsound(F) == 3u); + run_to(IN(2)); + bad += check(" a note off the scale keeps its semitone (C# under F: F#)", sounds(F, 66) && nsound(F) == 1u); + seq_stop(); + + setup(); + chord(Ld, 0, 65, 69, 72); /* F A C */ + F->step[0] = (step_t){{62, 59, 64}, 3, ST_NOTE, 0, 100}; /* D B E: C C F */ + F->p[P_FMODE] = FM_FIT; + play(); + run_to(IN(0)); + ok = sounds(F, 60) && sounds(F, 65) && nsound(F) == 2u; + bad += check("FIT: D B E under F A C play C C F (each to the nearest), C once", ok); + fol_src[1].pc = 1u << 0 | 1u << 4; /* (C E: D two from either) */ + bad += check(" a tie goes to the lower (D between C and E: C)", fol_note(F, 62) == 60u && fol_note(F, 63) == 64u); + run_to(L - CTL); + bad += check(" their ends: nothing left sounding", !nsound(F)); + seq_stop(); + { /* two notes onto one, played by hand: it ends with the last of them */ + events_block(CTL); + sel_set(0); + fol_src[1].pc = 1u << 0 | 1u << 5 | 1u << 9; /* (F A C, as the leader left it) */ + fol_src[1].root = 5; + key_down(K(62)); + key_down(K(59)); + ok = sounds(F, 60) && nsound(F) == 1u; + key_up(K(62)); + ok &= sounds(F, 60); + key_up(K(59)); + bad += check(" D and B held (both C): D let go, C goes on; B let go, it ends", ok && !nsound(F)); + } + return bad; +} + +static int tie_again(void) +{ + int bad = 0, ok; + uint32_t v0, ons, i; + setup(); + cfga(); + F->step[0] = (step_t){{48}, 1, ST_NOTE, 0, 100}; + F->step[1] = (step_t){{0}, 0, ST_TIE, 0, 0}; /* C3 tied on into step 2, where the chord is F */ + play(); + run_to(IN(0)); + v0 = vage; + run_to(IN(1)); + ons = 0; + for (i = 0; i < NVOICE; i++) + ons += F->v[i].active && F->v[i].age > v0; + ok = sounds(F, 48) && !sounds(F, 53) && !ons; + bad += check("TIE: a note tied over a chord change keeps its pitch (C3 on, no note-on)", ok); + run_to(3u * L); + bad += check(" it ends: nothing left sounding", !nsound(F)); + seq_stop(); + + setup(); + events_block(CTL); + fol_src[1].pc = 1u << 0; fol_src[1].root = 0; /* C */ + trk_note_on(F, 48, 100); + ok = sounds(F, 48); + fol_src[1].pc = 1u << 5; fol_src[1].root = 5; /* F */ + trk_note_on(F, 48, 100); /* (the sequencer's "plays again": no note-off between) */ + ok &= sounds(F, 53) && !sounds(F, 48) && nsound(F) == 1u; + trk_note_off(F, 48); + bad += check("AGAIN: struck again where the chord moved (C to F): C3 ends, F3 sounds; its end ends F3", ok && !nsound(F)); + return bad; +} + +static int live(void) +{ + int bad = 0, ok; + uint32_t i; + setup(); + cfga(); + sel_set(0); + play(); + run_to(IN(0)); + key_down(K(60)); + ok = sounds(F, 60); /* (C: as played) */ + run_to(IN(1)); /* (the chord now F) */ + key_up(K(60)); + ok &= !nsound(F); + key_down(K(60)); + ok &= sounds(F, 65); + key_up(K(60)); + bad += check("LIVE keys: C4 under C sounds C4; held into F, its release ends it; pressed under F: F4", ok && !nsound(F)); + midi(0x90, 60, 100); /* (CH1: T1) */ + ok = sounds(F, 65); + run_to(IN(2)); /* (G) */ + midi(0x80, 60, 0); + bad += check(" MIDI IN: note 60 under F sounds F4; the chord moving, its note-off ends it", ok && !nsound(F)); + F->p[P_AMODE] = 1; /* ARP UP */ + key_down(K(60)); + key_down(K(64)); + ok = 0; + for (i = 0; i < 100u; i++) { /* (G, the nearest way: the arp's notes G3 B3) */ + events_block(CTL); + at += CTL; + ok |= sounds(F, 55) || sounds(F, 59); + } + key_up(K(60)); + key_up(K(64)); + for (i = 0; i < 200u; i++) + events_block(CTL); + bad += check(" the ARP: C4 E4 held play G3 B3 under G; let go, nothing left sounding", ok && !nsound(F)); + F->p[P_AMODE] = 0; + seq_stop(); + return bad; +} + +static int lead_keys(void) +{ + int bad = 0; + setup(); + sel_set(1); /* the keys play the leader */ + key_down(K(64)); + key_down(K(60)); + bad += check("KEYS: E4 then C4 held on the leader: one chord (E C), LAST C, LOW C, HIGH E", + fol_src[1].pc == (1u << 4 | 1u << 0) && fol_src[1].last == 60 && fol_src[1].lo == 60 && + fol_src[1].hi == 64 && fol_src[1].held == 2u); + key_up(K(64)); + key_up(K(60)); + key_down(K(67)); + bad += check(" all let go, G4: a new chord (G alone)", fol_src[1].pc == 1u << 7 && fol_src[1].root == 7u); + key_up(K(67)); + bad += check(" its chord stays when let go (for the followers)", fol_src[1].pc == 1u << 7 && !fol_src[1].held); + return bad; +} + +static int rec_stop(void) +{ + int bad = 0, ok; + uint32_t s, got = 0, moved = 0; + setup(); + for (s = 0; s < 4u; s++) + chord(Ld, s, 65, 69, 72); /* F throughout */ + sel_set(0); + song.rec = 1u; /* T1 armed */ + play(); + run_to(IN(1)); + key_down(K(60)); + ok = sounds(F, 65); + run_to(IN(1) + L / 4u); + key_up(K(60)); + song.rec = 0; + for (s = 0; s < 4u; s++) { + got |= F->step[s].n && F->step[s].note[0] == 60; + moved |= F->step[s].n && F->step[s].note[0] == 65; + } + bad += check("REC: C4 pressed on the armed follower sounds F4, its step keeps C4", ok && got && !moved); + seq_stop(); + events_block(CTL); + key_down(K(60)); + bad += check("STOP: the chords cleared, a follower's key as played (C4)", sounds(F, 60) && !fol_src[1].pc); + key_up(K(60)); + return bad; +} + +static int kits_self(void) +{ + int bad = 0, ok; + setup(); + cfga(); + set_engine_of(F, ENGI_DRUM); + F->step[1] = (step_t){{0}, 0, ST_NOTE, 0, 100, 1u}; /* KICK on step 2, under F */ + play(); + run_to(IN(1)); + ok = 0; + for (uint32_t i = 0; i < NVOICE; i++) + ok |= F->v[i].active && F->v[i].note == DRUM_LANE_NOTE[0]; + bad += check("KITS: a DRUM follower's KICK plays its lane note as it is", ok); + seq_stop(); + + setup(); + cfga(); + Ld->p[P_MUTE] = 1; + F->step[1] = (step_t){{48}, 1, ST_NOTE, 0, 100}; + play(); + run_to(IN(1)); + bad += check(" a muted leader still leads (C3 under F: F3)", sounds(F, 53) && !nsound(Ld)); + seq_stop(); + F->p[P_FOLLOW] = 1; /* itself */ + play(); + run_to(IN(1)); + bad += check(" FOLLOW on itself: as played", sounds(F, 48)); + seq_stop(); + return bad; +} + +static int store(void) +{ + int bad = 0, ok; + static uint8_t b[1u + SID_COUNT]; + static int16_t q[P_COUNT]; + uint32_t n; + setup(); + F->p[P_FOLLOW] = 3; F->p[P_FMODE] = FM_FIT; F->p[P_FNOTE] = FN_LAST; + n = sid_put(b, F->p); + memset(q, 0, sizeof q); + ok = n == 1u + SID_COUNT && sid_get(q, b, n) == n && !memcmp(q, F->p, sizeof q); + ok &= p_sid(P_FOLLOW) == 143u && p_sid(P_FNOTE) == 145u && p_sid(P_E0) == 127u && p_sid(P_LPAN0) == 135u && + sid_p(143) == P_FOLLOW && sid_p(127) == P_E0 && sid_p(135) == P_LPAN0; + bad += check("STORE: FOLLOW MODE NOTE by stored id 143..145, the rest as ever", ok); + b[0] = 143; /* (2.0's count: no chord follow) */ + memset(q, 0, sizeof q); + ok = sid_get(q, b, 1u + 143u) == 144u && !q[P_FOLLOW] && !q[P_FMODE] && !q[P_FNOTE] && q[P_E0] == F->p[P_E0] && + q[P_LPAN7] == F->p[P_LPAN7]; + bad += check(" a record of before: its values, OFF", ok); + apply_preset_to(F, 2); + bad += check(" a sound load keeps them", F->p[P_FOLLOW] == 3 && F->p[P_FMODE] == FM_FIT && F->p[P_FNOTE] == FN_LAST && + param_kept(P_FOLLOW) && param_kept(P_FMODE) && param_kept(P_FNOTE) && !motion_param(P_FOLLOW)); + return bad; +} + +static int page(void) +{ + int bad = 0, ok; + uint32_t sig; + ui_power_on(); + sel_set(0); + go_home(); frame(); + press(B_SCL); frames(400); + press(B_SCL); frames(400); + press(B_SCL); frames(400); + ok = str_eq(cur_page()->title, "FOLLOW") && cur_page()->graph == GR_FOLLOW && cur_page()->fam == FAM_SCL && + cur_page()->id[0] == P_FOLLOW && cur_page()->id[1] == P_FMODE && cur_page()->id[2] == P_FNOTE; + bad += check("PAGE: SCL a third time: FOLLOW (FOLLOW, MODE, NOTE)", ok); + memset(host_screen, 0, sizeof host_screen); ui.force = 1; ui_draw(); + bad += check(" OFF: the page draws", ui.graph_sig != 0u); + turn(EN_K1, 1); frame(); + ok = TSEL->p[P_FOLLOW] == 2; + turn(EN_K1, -1); frame(); + bad += check(" KNOB 1 on T1: OFF, T2 (never itself), back to OFF", ok && !TSEL->p[P_FOLLOW]); + turn(EN_K1, 1); frame(); + turn(EN_K2, 1); frame(); + turn(EN_K3, 2); frame(); + bad += check(" KNOB 2: MODE SCALE, KNOB 3: NOTE HIGH", TSEL->p[P_FMODE] == FM_SCALE && TSEL->p[P_FNOTE] == FN_HIGH); + memset(host_screen, 0, sizeof host_screen); ui.force = 1; ui_draw(); + sig = ui.graph_sig; + fol_step(&trk[1], (const uint8_t[]){57, 60, 65}, 3u); + frame(); + bad += check(" T2 plays a chord: the graph draws it anew", ui.graph_sig != sig); + press(B_SCL); frames(400); + bad += check(" SCL again: SCALE", str_eq(cur_page()->title, "SCALE")); + return bad; +} + +int main(void) +{ + int bad = roots() + key_note() + scale_fit() + tie_again() + live() + lead_keys() + rec_stop() + kits_self() + store() + + page(); + printf("%s\n", bad ? "FOLLOW TEST FAILED" : "chord follow test passed"); + return bad != 0; +} diff --git a/tests/persistence_test.c b/tests/persistence_test.c index 97a4769..f1a9afb 100644 --- a/tests/persistence_test.c +++ b/tests/persistence_test.c @@ -147,13 +147,13 @@ static fm6_bank_t mig_bank; static void mig_rec(up_bank_t *b, uint32_t i, uint32_t engine, int16_t slot, char tag) { up_rec_t *r = &b->r[i]; - uint32_t k; + uint32_t k, np = 91u; /* ((2.1) 1.0.2's records by count: E0..E7 the last eight) */ memset(r, 0, sizeof *r); - r->used = UP_USED; r->ver = UP_VER; r->engine = (uint8_t)engine; r->np = P_COUNT; + r->used = UP_USED; r->ver = UP_VER; r->engine = (uint8_t)engine; r->np = (uint8_t)np; r->name[0] = tag; - for (k = 0; k < P_COUNT; k++) up_set_value(r, k, param_desc_of(engine, k)->def); - up_set_value(r, P_E7, slot); - up_set_value(r, P_E0, (int16_t)(tag & 7)); /* (each record another sound) */ + for (k = 0; k < np; k++) up_set_value(r, k, param_desc_of(engine, k < np - 8u ? k : P_E0 + k - (np - 8u))->def); + up_set_value(r, np - 1u, slot); /* (E7) */ + up_set_value(r, np - 8u, (int16_t)(tag & 7)); /* (E0: each record another sound) */ } /* a 1.0.2 flash: user presets on B3 (slot 1), F2 (2), B5 empty (3), DRUM (4), B1 (18); the bank written twice */ @@ -982,8 +982,8 @@ int main(void) transport_req = 0; memset(&r, 0, sizeof r); r.used = UP_USED; - r.ver = UP_VER; - r.np = P_COUNT; + r.ver = UP_VER_SID; /* ((2.1) version 6, as SAVE and UP_PUT write: P_COUNT is past what a */ + r.np = (uint8_t)SID_COUNT; /* record by count holds) */ memcpy(r.name, "First", 6); erase_error = 1; bank = up_bank[1]; diff --git a/tests/project_test.c b/tests/project_test.c index 66e972a..922598d 100644 --- a/tests/project_test.c +++ b/tests/project_test.c @@ -226,9 +226,10 @@ int main(void) bad += check("layout: SLICER after DETUNE, then the matrix just before P_E0 ((Skiff) DIR, the ducking after the lane levels)", P_SLCR == P_DETUNE + 1 && P_SLDEPTH + 1 == P_M1SRC && P_M4AMT + 1 == P_FM1_ATK && P_FM4_LEVEL + 1 == P_CHRD && P_VOIC + 1 == P_LN0 && P_LN7 + 1 == P_DIR && P_DIR + 1 == P_DKSRC && P_DKREL + 1 == P_DTYPE && P_LDECAY7 + 1 == P_LSYNC && - P_ESYNC + 1 == P_LPAN0 && P_LPAN7 + 1 == P_E0 && P_E0 == 135 && /* ((1.3) LFO SYNC .. ENV SYNC: P_COUNT - * past 127; (2.0, #36) the lane pans) */ - P_COUNT == PROJ_NP_V3 + 86u && PROJ_NP == 103u && PROJ_NX == 32u && PROJ_NX == PROJ_PX_MAX && + P_ESYNC + 1 == P_LPAN0 && P_LPAN7 + 1 == P_FOLLOW && P_FNOTE + 1 == P_E0 && P_E0 == 138 && /* ((1.3) + * LFO SYNC .. ENV SYNC: P_COUNT past 127; (2.0, #36) the lane pans; (2.1) the + * chord follow) */ + P_COUNT == PROJ_NP_V3 + 89u && PROJ_NP == 103u && PROJ_NX == 32u && PROJ_NX == PROJ_PX_MAX && PROJ_NP_V3 == PROJ_NP_V2 + 4u); bad += check("SKF1 fits one flash object, the retained cache in NOINIT", sizeof(project_store_t) <= 4096u - 256u && sizeof(project_store_t) == 3840u && 0xC8u + 4u * sizeof(project_store_t) <= 0x3D50u); diff --git a/tests/ratchet_test.c b/tests/ratchet_test.c index 2acc760..af5011a 100644 --- a/tests/ratchet_test.c +++ b/tests/ratchet_test.c @@ -261,8 +261,8 @@ static int presets(void) for (i = 0; i < 16u; i++) { a[k++] = r.note[i]; a[k++] = r.flags[i]; } n = k; memset(&r, 0, sizeof r); - bad += check("UP_PUT keeps a pattern field's ratchet (the editor's format)", !up_parse(a, n, &r, &slot) && - r.flags[2] == 2u << SF_RATCH_SH && r.flags[5] == (SF_ACCENT | 3u << SF_RATCH_SH)); + bad += check("UP_PUT takes a pattern's ratchets (the editor's format; (2.1) the pattern passed over)", + !up_parse(a, n, &r, &slot) && r.ver == UP_VER_SID && !up_pat(&r)); up_store(4, "SOUND"); bad += check(" (Skiff) SAVE > USER stores the sound only: no pattern, no grid", up_used(4) && !up_grid(up_rec(4)) && !up_rec(4)->note[2] && !up_rec(4)->flags[2]); diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 6f91d04..dd2bede 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -39,6 +39,8 @@ # CHORD (tests/chord_test.c): the chord keys (src/chord.c): diatonic triads / sevenths of several scales and roots, # the fixed shapes and voicings (at most 4 notes), names, MONO plays the root, a release ends # exactly what its key / MIDI note started, recording, the ARP, MIDI IN, kits ignore CHRD. +# FOLLOW (tests/follow_test.c, 2.1): the chord follow (src/follow.c): roots, KEY / SCALE / FIT, NOTE, the order the +# tracks tick in, ties, keys / MIDI IN / ARP ending exactly, recording, STOP, kits, stored ids. # RATCH (tests/ratchet_test.c): a step's ratchet (x1..x4): its parts in the sequencer (equal, gated, chords and drum # hits whole, one chance roll, swing, no slide or tie out, STOP), FUN8 round trip and older projects x1, # user preset patterns, SEQ > CHANCE KNOB 3 and the roll / grid drawing. @@ -251,6 +253,8 @@ if [ -f build/gen/felucca_tables.h ]; then run "scales: white-key mapping and note lifecycle" "$OUT/scale_test" $CC -w -Ibuild/gen -Ifirmware/src -o "$OUT/chord_test" tests/chord_test.c -lm run "chord keys: diatonic and fixed chords, voicings, MONO root, releases, recording, ARP, MIDI IN, kits" "$OUT/chord_test" + $CC -w -Ibuild/gen -Ifirmware/src -o "$OUT/follow_test" tests/follow_test.c -lm + run "(2.1) chord follow: roots, KEY SCALE FIT, NOTE, the tick order, ties, keys MIDI ARP, recording, STOP, kits, ids" "$OUT/follow_test" $CC -O2 -w -Ibuild/gen -Ifirmware/src -o "$OUT/speaker_test" tests/speaker_test.c -lm run "SPEAKER EQ: FLAT / LOWCUT / BASS+ responses, BASS+ harmonics of the bass, the sub cut, no offset after" "$OUT/speaker_test" run "DSP render (ANALOG preset 0)" "$OUT/hostsim" 0 0 1 "$OUT/render.wav" diff --git a/tests/scale_test.c b/tests/scale_test.c index c76468f..d3de93f 100644 --- a/tests/scale_test.c +++ b/tests/scale_test.c @@ -507,9 +507,61 @@ static void seq_trn_test(void) puts("scales: QNT SEQ+T moves the sequence by TRN then snaps (steps unchanged, nothing held); other QNT values ignore TRN"); } +/* (2.1, #74) QNT SOLO: the white keys as WHITE; the black keys walk the same scale, five an octave, C#4 the root + * (SOLO_OCT octaves up). Over both boards' keys: the FM-1's F3..G5 (0..26) and the SMK-37's C3..C6 (kb_semi: -5..31) */ +static void solo_test(void) +{ + /* the black keys C#3 .. A#5 (from F3) and their notes with ROOT C, before TRN and the octave: C major (7 notes) and + * the major pentatonic (5 notes: a C on every C#) */ + static const int8_t SEMI[15] = {-4, -2, 1, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29}; + static const uint8_t NOTE[2][15] = { + {52, 53, 55, 57, 59, 60, 62, 64, 65, 67, 69, 71, 72, 74, 76}, /* MAJ: E3 F3 G3 A3 B3 C4 .. E5 */ + {48, 50, 52, 55, 57, 60, 62, 64, 67, 69, 72, 74, 76, 79, 81}, /* PEN: C3 D3 E3 G3 A3 C4 .. A5 */ + }; + static const uint8_t SCALE[2] = {1, 5}; + track_t *t = &trk[0]; + uint32_t s, i, white; + int32_t k, root, oct, trans; + memset(trk, 0, sizeof trk); + host_tracks_init(); + t->engine = t->eng_req = 0; + for (s = 0; s < 2u; s++) { + t->p[P_SCALE] = SCALE[s]; + for (root = 0; root < 12; root++) + for (oct = -3; oct <= 3; oct++) + for (trans = -24; trans <= 24; trans++) { + t->p[P_ROOT] = (int16_t)root; + t->p[P_TRANS] = (int16_t)trans; + t->p[P_QUANT] = QN_SOLO; + for (i = 0; i < 15u; i++) + assert(kb_pitch(t, (uint32_t)SEMI[i], oct) == + (uint32_t)clamp(NOTE[s][i] + root + 12 * (oct + SOLO_OCT) + trans, 0, 127)); + for (k = -5, i = 0, white = 0; k <= 31; k++) { /* the white keys: WHITE's notes */ + uint32_t solo = kb_pitch(t, (uint32_t)k, oct); + if (key_black((uint32_t)k)) { + i++; + continue; + } + t->p[P_QUANT] = QN_WHITE; + assert(solo == kb_pitch(t, (uint32_t)k, oct) && solo != KB_SILENT); + t->p[P_QUANT] = QN_SOLO; + white++; + } + assert(i == 15u && white == 22u); + } + } + t->p[P_SCALE] = 1; /* the panel's keys (kb_map): C#4 the root, F#5 an octave up */ + t->p[P_ROOT] = t->p[P_TRANS] = 0; + song.octave = 0; + assert(kb_map(t, 8) == 60u + 12u * SOLO_OCT && kb_map(t, 25) == 72u + 12u * SOLO_OCT && kb_map(t, 7) == 60u); + t->p[P_QUANT] = QN_OFF; + puts("scales: QNT SOLO's black keys walk the scale (7 and 5 notes, C3..C6, roots, octaves, TRN); white keys as WHITE"); +} + int main(void) { host_tracks_init(); + solo_test(); mapping_test(); key_events_test(); seq_quant_test(); diff --git a/tests/smk_ui_test.c b/tests/smk_ui_test.c index 3da927a..518b3b9 100644 --- a/tests/smk_ui_test.c +++ b/tests/smk_ui_test.c @@ -681,6 +681,61 @@ static int test_pedal(void) return bad; } +/* (2.1, #74) QNT SOLO on the SMK-37: the outer black keys carry the black keys' run on (C#3 D#3 below, G#5 A#5 above), + * a note each; the pedal holds a black key too, and with KBD HOLD on its release ends it, the chord held */ +static uint32_t gated_n(const track_t *t) +{ + uint32_t i, n = 0; + for (i = 0; i < NVOICE; i++) + n += t->v[i].active && t->v[i].gate; + return n; +} +static int test_solo(void) +{ + static const uint8_t BED[4] = {1, 3, 32, 34}, NOTE[4] = {52, 53, 74, 76}; /* C#3 D#3 G#5 A#5: E3 F3 D5 E5 */ + int bad = 0, ok = 1; + uint32_t i; + track_t *t = &trk[0]; + smk_power_on(); + song.sel = 0; + song.octave = 0; + t->p[P_TRANS] = 0; + t->p[P_VOICE] = V_POLY; + t->p[P_SCALE] = 1; /* C major */ + t->p[P_ROOT] = 0; + t->p[P_QUANT] = QN_SOLO; + t->p[P_CHRD] = CH_DIA3; + fm1_in.wheel[0] = 535; + fm1_in.wheel[1] = 629; + pedal_to(0); + for (i = 0; i < 4u; i++) { + fm1_in.key_vel[BED[i]] = 100u; + outer_to(BED[i], 100); + ok &= sounding(t, NOTE[i] + 12u * SOLO_OCT) && gated_n(t) == 1u; + outer_to(BED[i], 0); + ok &= !gated_n(t); + } + bad += check("SMK SOLO: the outer black keys go on with the run (C#3 D#3 below, G#5 A#5 above), a note each", ok); + t->p[P_AMODE] = 0; + t->p[P_AHOLD] = 1; /* KBD HOLD */ + fm1_in.key_vel[7u + SMK_KEY_F3] = fm1_in.key_vel[10u + SMK_KEY_F3] = 100u; + pedal_to(1); + key_to(7, 1); /* C4: C E G */ + key_to(7, 0); + key_to(10, 1); /* D#4: D4 */ + key_to(10, 0); + ok = gated_n(t) == 4u && sounding(t, 60) && sounding(t, 64) && sounding(t, 67) && sounding(t, 62u + 12u * SOLO_OCT); + pedal_to(0); + ok &= gated_n(t) == 3u && sounding(t, 60) && !sounding(t, 62u + 12u * SOLO_OCT) && kb_ped[7] && !kb_ped[10]; + t->p[P_AHOLD] = 0; + events_block(CTL); + bad += check("SMK SOLO, KBD HOLD: the pedal holds a black key too; let go, it ends, KBD HOLD keeps the chord (HOLD " + "off: it ends)", ok && !gated_n(t)); + t->p[P_QUANT] = QN_OFF; + t->p[P_CHRD] = CH_OFF; + return bad; +} + static int test_shift(void) { int bad = 0, ok, i; @@ -766,6 +821,7 @@ int main(void) bad += test_menu(); bad += test_wheels(); bad += test_pedal(); + bad += test_solo(); bad += test_shift(); bad += test_master(); bad += test_clock_out(); diff --git a/tests/ui_golden.txt b/tests/ui_golden.txt index cb65c80..cf48e25 100644 --- a/tests/ui_golden.txt +++ b/tests/ui_golden.txt @@ -1,9 +1,9 @@ # Skiff UI golden (tests/ui_render.c): FNV-1a 64 of every picture ui_render writes, then its name. # Rewritten by UI_GOLDEN_UPDATE=1 tests/run_tests.sh -- only for an intended change of the look. -8e727f4e635d1c35 CRYPT_about +4f8907e336396c1c CRYPT_about 7b406cff888c0edf CRYPT_about_credits 976a0b670244358f CRYPT_about_end -c48d14f681696c2d CRYPT_about_rec +68e2e112254a1454 CRYPT_about_rec d14a071f275c6385 CRYPT_arp 5ffd1ed622497098 CRYPT_arp_2 5efde6d80f6c8aa7 CRYPT_arp_on @@ -21,10 +21,10 @@ c397f614a26d9561 CRYPT_batt_usb 0d2646fb0c906b93 CRYPT_card_roll 0751ffc014130cd2 CRYPT_chance fb24cbebd1518e38 CRYPT_chance_flam -7bffb3dc1dbdf0bb CRYPT_chord +4a722a34bda956b7 CRYPT_chord e2d6cb3cb007c52c CRYPT_chord_kit -8d27cf88965d6716 CRYPT_chord_off -54b4df680c324889 CRYPT_chord_wide +991973ab04e7ef22 CRYPT_chord_off +4e01e1b14b1a7e15 CRYPT_chord_wide 58e5909ac436bc88 CRYPT_chorus cbfe8a7f513dc06d CRYPT_chorus_feedback 01084db11af1c2ea CRYPT_chorus_flanger @@ -79,6 +79,11 @@ be8eaf5d4f35df5b CRYPT_fm6_alg_32 65fd15797ef052ae CRYPT_fm_op_env f55ef68bdf16cc05 CRYPT_fm_op_keys aac8d7598d71aee8 CRYPT_fm_op_tone +8afec60c79a1e916 CRYPT_follow +e440004ede426544 CRYPT_follow_fit +debb4a60841ae185 CRYPT_follow_off +65f7fa9a89a76cda CRYPT_follow_scale +e1ba692c1f26af98 CRYPT_follow_wait c0a84a8c73ca7462 CRYPT_fx 4bc548db11117c1c CRYPT_fx_duck 4b8b70715f4c5675 CRYPT_fx_duck_off @@ -196,7 +201,7 @@ f4123edb4c61145e CRYPT_roll_playing e79fa48b0ee7d284 CRYPT_roll_ties f3838592e64bc805 CRYPT_roll_wide eb333bb43e15a520 CRYPT_samples -975419615f24064f CRYPT_scl +316c56c71559fd3b CRYPT_scl badc4be755b1e847 CRYPT_shift_env 9516cc04f96f478d CRYPT_shift_home 7c2f20c7bef27272 CRYPT_shift_step @@ -227,7 +232,7 @@ a640211c5b3b79d0 CRYPT_song_copyplus ac3785bdfa5b2f17 CRYPT_song_rest_pick eda8d013d956b2bc CRYPT_song_sound bc35c7c0c3ecc61c CRYPT_song_sounds -4756305f336b3fc5 CRYPT_splash +2f2377490a74ad00 CRYPT_splash ae37ac6fa7460cb3 CRYPT_step 67e3229e84561509 CRYPT_step_mark b722e4598b782da3 CRYPT_step_tiles @@ -243,10 +248,10 @@ e28a10113a015c17 CRYPT_user_foot 70347bc09e514016 CRYPT_voice_2 c7a0c74aaa23b4b6 CRYPT_voice_2_uni e5f489b7140e9950 CRYPT_voice_glide -94942b0d0d742311 CUSTOM_CRYPT_about +914a3607127da810 CUSTOM_CRYPT_about 58e33ab8f98e8f41 CUSTOM_CRYPT_about_credits ac47d1a1bf5d5393 CUSTOM_CRYPT_about_end -0e2af840a15755df CUSTOM_CRYPT_about_rec +58f3688a7fdf3c6a CUSTOM_CRYPT_about_rec b6a7880a42a5cbcb CUSTOM_CRYPT_arp 618fbbc0f8288bfc CUSTOM_CRYPT_arp_2 13c6ffe8947bed6f CUSTOM_CRYPT_arp_on @@ -262,10 +267,10 @@ dd35608b64907aa2 CUSTOM_CRYPT_batt_3 186f026e00664d56 CUSTOM_CRYPT_calibration 50312b45558c42ff CUSTOM_CRYPT_chance 3da09260a28fbb75 CUSTOM_CRYPT_chance_flam -529a3f69b31938c5 CUSTOM_CRYPT_chord +aad8def3bf8bc0b5 CUSTOM_CRYPT_chord 41dcc9b1c524c474 CUSTOM_CRYPT_chord_kit -b78ca793753e978d CUSTOM_CRYPT_chord_off -e32bb39bfd6cf9b2 CUSTOM_CRYPT_chord_wide +7a8e0f3d3695aadd CUSTOM_CRYPT_chord_off +9b7b4153e880d9c2 CUSTOM_CRYPT_chord_wide 90ba3b85c103aa07 CUSTOM_CRYPT_chorus 85b438017df3da12 CUSTOM_CRYPT_chorus_feedback 8f953d5a688f7267 CUSTOM_CRYPT_chorus_flanger @@ -320,6 +325,11 @@ f71edf4a45b0114e CUSTOM_CRYPT_fm6_alg_05 4d1c16a2c510e999 CUSTOM_CRYPT_fm_op_env ee860116a8bc33c5 CUSTOM_CRYPT_fm_op_keys a6339739f64aeea0 CUSTOM_CRYPT_fm_op_tone +60ea8b68aa0a2924 CUSTOM_CRYPT_follow +5372c2a80b30e8e9 CUSTOM_CRYPT_follow_fit +6e3341f17530dbfc CUSTOM_CRYPT_follow_off +99e4e8bdacb54e19 CUSTOM_CRYPT_follow_scale +374569cdafbc87d6 CUSTOM_CRYPT_follow_wait 20f03f935c5785cc CUSTOM_CRYPT_fx b475bbb03437fccc CUSTOM_CRYPT_fx_duck a50e6b0306444f81 CUSTOM_CRYPT_fx_duck_off @@ -437,7 +447,7 @@ a4562016936fed0a CUSTOM_CRYPT_roll_playing 389ebc80f1b3bbc9 CUSTOM_CRYPT_roll_ties 59c5dc3ef3f0ac4d CUSTOM_CRYPT_roll_wide 26ba54961e96692f CUSTOM_CRYPT_samples -b8d4a0ee64a7d682 CUSTOM_CRYPT_scl +ca3a2d772c7f2692 CUSTOM_CRYPT_scl 9069983b6abd0045 CUSTOM_CRYPT_shift_env 328ec6602c2dcc2e CUSTOM_CRYPT_shift_home eafd05525e51ffa2 CUSTOM_CRYPT_shift_step @@ -468,7 +478,7 @@ d9610d28c70ba071 CUSTOM_CRYPT_song_playing faa76a7454080148 CUSTOM_CRYPT_song_rest_pick 816344c11d678d19 CUSTOM_CRYPT_song_sound 86e5a7834c8be426 CUSTOM_CRYPT_song_sounds -516448adfa412309 CUSTOM_CRYPT_splash +45378fdd2ce2aa08 CUSTOM_CRYPT_splash 218eb199b74ad5f7 CUSTOM_CRYPT_step d413efa0663ef3c3 CUSTOM_CRYPT_step_mark 468ba1b0c80a5bcb CUSTOM_CRYPT_step_tiles @@ -484,10 +494,10 @@ d2d37ef6e92f98ce CUSTOM_CRYPT_take_partial 79ff34823edf6265 CUSTOM_CRYPT_voice_2 b2635aa7e5036074 CUSTOM_CRYPT_voice_2_uni 9c3771c1bbcdb617 CUSTOM_CRYPT_voice_glide -94942b0d0d742311 CUSTOM_NEON_about +914a3607127da810 CUSTOM_NEON_about 58e33ab8f98e8f41 CUSTOM_NEON_about_credits ac47d1a1bf5d5393 CUSTOM_NEON_about_end -0e2af840a15755df CUSTOM_NEON_about_rec +58f3688a7fdf3c6a CUSTOM_NEON_about_rec 52c6c53eff824652 CUSTOM_NEON_arp 4ace9b2cc148a5f9 CUSTOM_NEON_arp_2 c1116ebb9b27fe92 CUSTOM_NEON_arp_on @@ -503,10 +513,10 @@ adf7c64301a56ff3 CUSTOM_NEON_batt_usb 186f026e00664d56 CUSTOM_NEON_calibration 4f948be84091fe53 CUSTOM_NEON_chance 56fadf65f494d96a CUSTOM_NEON_chance_flam -e1a737d998979775 CUSTOM_NEON_chord +f09584164aeb0565 CUSTOM_NEON_chord df2bb12f24cd3e62 CUSTOM_NEON_chord_kit -42893ffaf4fd9b46 CUSTOM_NEON_chord_off -240dda2323bf26ed CUSTOM_NEON_chord_wide +d9a35bb4d67017a6 CUSTOM_NEON_chord_off +0ffe4c2f4e2f2a1d CUSTOM_NEON_chord_wide 4cb3c0d3d00850a9 CUSTOM_NEON_chorus 78283905453232e3 CUSTOM_NEON_chorus_feedback 8e2e1eb1a8d5a915 CUSTOM_NEON_chorus_flanger @@ -561,6 +571,11 @@ d29e1a340fcf67d4 CUSTOM_NEON_fm_init e4377d0c37ee8ff3 CUSTOM_NEON_fm_op_env 3e3961872377862e CUSTOM_NEON_fm_op_keys e8953ea965fd0651 CUSTOM_NEON_fm_op_tone +04b0acc870deae39 CUSTOM_NEON_follow +37c8c78db69bab9e CUSTOM_NEON_follow_fit +465f292f4b4ce0f8 CUSTOM_NEON_follow_off +bdadd63621c1aea8 CUSTOM_NEON_follow_scale +825a660ce1ec3dc1 CUSTOM_NEON_follow_wait 077a80c3b97b988b CUSTOM_NEON_fx 566c7462dbd9d2e6 CUSTOM_NEON_fx_duck 1d0cbd4a8b102d70 CUSTOM_NEON_fx_duck_off @@ -678,7 +693,7 @@ e348620586b23d2d CUSTOM_NEON_roll_locks fc48de90805feb1e CUSTOM_NEON_roll_ties df6eadb884c7cfad CUSTOM_NEON_roll_wide 1d93124b19e33343 CUSTOM_NEON_samples -0529c6a33942e0bb CUSTOM_NEON_scl +b6c0e0d99deb51bb CUSTOM_NEON_scl c1920bdd57fcc733 CUSTOM_NEON_shift_env 0bd75b3061826ce1 CUSTOM_NEON_shift_home 157a566f63f74e64 CUSTOM_NEON_shift_step @@ -709,7 +724,7 @@ d69ca969f5dde57e CUSTOM_NEON_song_rest 87962efe4b81985b CUSTOM_NEON_song_rest_pick b4a7f6c7fbd2e5ff CUSTOM_NEON_song_sound 5d370fc26da90fcf CUSTOM_NEON_song_sounds -0fdc647415ab6106 CUSTOM_NEON_splash +c3c346c7393fdd37 CUSTOM_NEON_splash c96606d07ca04eeb CUSTOM_NEON_step 6e60d7c871c8b5b3 CUSTOM_NEON_step_mark dcc8ea6095b6df63 CUSTOM_NEON_step_tiles @@ -725,10 +740,10 @@ eaa3b2e1cb06be20 CUSTOM_NEON_voice 4dbaba5b961109f3 CUSTOM_NEON_voice_2 651539f2321d70a4 CUSTOM_NEON_voice_2_uni d6323b948ce89067 CUSTOM_NEON_voice_glide -10d5b72d08a60ee9 CUSTOM_QUARK_about +17e760c04fbff4f0 CUSTOM_QUARK_about 272b1c538c0417b6 CUSTOM_QUARK_about_credits 32f558d5c8bb7951 CUSTOM_QUARK_about_end -01c6c7d370e294a6 CUSTOM_QUARK_about_rec +3a3f231dc2f2fa8b CUSTOM_QUARK_about_rec efe5e51233d71449 CUSTOM_QUARK_arp e10fb303a730524f CUSTOM_QUARK_arp_2 9e10f12181c45d69 CUSTOM_QUARK_arp_on @@ -744,10 +759,10 @@ c76fdf35e01ed7e4 CUSTOM_QUARK_batt_2 ff57be56ce1902f4 CUSTOM_QUARK_calibration 1b270d4d67ce8810 CUSTOM_QUARK_chance 4f345da2e5e0f77f CUSTOM_QUARK_chance_flam -2ba9ec78e23fa72e CUSTOM_QUARK_chord +89003c6fe632a5ea CUSTOM_QUARK_chord 6a9aa7ae84ef5f2e CUSTOM_QUARK_chord_kit -41ce59e68d6dcf05 CUSTOM_QUARK_chord_off -5b6e04c76bd9f5ed CUSTOM_QUARK_chord_wide +d0885be84500a7e5 CUSTOM_QUARK_chord_off +ef0a21db31b116bd CUSTOM_QUARK_chord_wide 07eb897b308930a1 CUSTOM_QUARK_chorus 3993e370b144281a CUSTOM_QUARK_chorus_feedback ec8bde5082f1fe3c CUSTOM_QUARK_chorus_flanger @@ -802,6 +817,11 @@ b3f13191befad649 CUSTOM_QUARK_fm_all_algo f14878b38a6944f2 CUSTOM_QUARK_fm_op_env 7448ff707dbf6c59 CUSTOM_QUARK_fm_op_keys 2f3577a9c45b0b31 CUSTOM_QUARK_fm_op_tone +7dca2ec327cd6538 CUSTOM_QUARK_follow +4e684118d2d32c0c CUSTOM_QUARK_follow_fit +95d3b170e6b4d19b CUSTOM_QUARK_follow_off +2776b3f0bef554b2 CUSTOM_QUARK_follow_scale +ba41bbe2a68e4b05 CUSTOM_QUARK_follow_wait e66a3a12b5f0a34e CUSTOM_QUARK_fx 7b97b68b2e760fea CUSTOM_QUARK_fx_duck 53dc677a54d87ada CUSTOM_QUARK_fx_duck_off @@ -919,7 +939,7 @@ ca8d042b39d275a5 CUSTOM_QUARK_roll_high 049189d697a0c1af CUSTOM_QUARK_roll_ties 4515bdb8d4142fb8 CUSTOM_QUARK_roll_wide 6755a721b5695d58 CUSTOM_QUARK_samples -d0f620ed0aaf0984 CUSTOM_QUARK_scl +e25cb74de78386d4 CUSTOM_QUARK_scl 67d1f14057e7dcbf CUSTOM_QUARK_shift_env 2465657835291336 CUSTOM_QUARK_shift_home d5ffecd73b3d5d04 CUSTOM_QUARK_shift_step @@ -950,7 +970,7 @@ db488cc8ce9ceef9 CUSTOM_QUARK_song_new bd432096a6a20621 CUSTOM_QUARK_song_rest_pick 26243b9b43eb852c CUSTOM_QUARK_song_sound d2920a5a7eb34efa CUSTOM_QUARK_song_sounds -595681f526ec67e3 CUSTOM_QUARK_splash +0fbfd2759f55de48 CUSTOM_QUARK_splash d6775a2aa5adbff3 CUSTOM_QUARK_step 9e71c2f5d855a5d3 CUSTOM_QUARK_step_mark faee4a12413b21f8 CUSTOM_QUARK_step_tiles @@ -966,10 +986,10 @@ cc651918769c3748 CUSTOM_QUARK_user_foot 5a801550b92937f4 CUSTOM_QUARK_voice_2 068dd573bdd07ff2 CUSTOM_QUARK_voice_2_uni 63b197c71fe4c8b1 CUSTOM_QUARK_voice_glide -10d5b72d08a60ee9 CUSTOM_SKIFF_about +17e760c04fbff4f0 CUSTOM_SKIFF_about 272b1c538c0417b6 CUSTOM_SKIFF_about_credits 32f558d5c8bb7951 CUSTOM_SKIFF_about_end -01c6c7d370e294a6 CUSTOM_SKIFF_about_rec +3a3f231dc2f2fa8b CUSTOM_SKIFF_about_rec dcd45277c15630cb CUSTOM_SKIFF_arp c0ed127f6a749547 CUSTOM_SKIFF_arp_2 dc67b31cacd0356d CUSTOM_SKIFF_arp_on @@ -985,10 +1005,10 @@ eaf1425048eeaa6e CUSTOM_SKIFF_batt_2 ff57be56ce1902f4 CUSTOM_SKIFF_calibration db1882fd5596019a CUSTOM_SKIFF_chance c4364db6d0e551fe CUSTOM_SKIFF_chance_flam -0f8f456871f7fccd CUSTOM_SKIFF_chord +2f13570d9ce0659d CUSTOM_SKIFF_chord 3d6575ba1851cfde CUSTOM_SKIFF_chord_kit -ab978cd31639abd2 CUSTOM_SKIFF_chord_off -0bdc1925bc52cab4 CUSTOM_SKIFF_chord_wide +785869511d4034ce CUSTOM_SKIFF_chord_off +145bde24a95d7db0 CUSTOM_SKIFF_chord_wide 1e9e66d1cba4c5a7 CUSTOM_SKIFF_chorus bf0698f44c3170bf CUSTOM_SKIFF_chorus_feedback a9f816ebad361e6f CUSTOM_SKIFF_chorus_flanger @@ -1043,6 +1063,11 @@ f89362015ee4b665 CUSTOM_SKIFF_fm_all_pitch de57e5c5568374ca CUSTOM_SKIFF_fm_op_env fa4f9ae9f33dacd0 CUSTOM_SKIFF_fm_op_keys e5b9a7838a14ef65 CUSTOM_SKIFF_fm_op_tone +8b7ed01f9cfee4ec CUSTOM_SKIFF_follow +3016d2b41dbab9be CUSTOM_SKIFF_follow_fit +4f4f4b9289be2871 CUSTOM_SKIFF_follow_off +1244a6732906bbd0 CUSTOM_SKIFF_follow_scale +60a789e6da6ec859 CUSTOM_SKIFF_follow_wait 6ab2a372cff9a615 CUSTOM_SKIFF_fx 57f264f0f6e0643d CUSTOM_SKIFF_fx_duck 38b6350a75f00901 CUSTOM_SKIFF_fx_duck_off @@ -1160,7 +1185,7 @@ a36a5330ae139573 CUSTOM_SKIFF_roll_empty d7e60187496fe6cc CUSTOM_SKIFF_roll_ties bc4bfd68b0ff47f2 CUSTOM_SKIFF_roll_wide 04f1987f2e025767 CUSTOM_SKIFF_samples -7b39027cdc90df8a CUSTOM_SKIFF_scl +07f18d7eee3a914a CUSTOM_SKIFF_scl e175fe052d1d97e3 CUSTOM_SKIFF_shift_env 817a0a38ee68784c CUSTOM_SKIFF_shift_home 36043a2a89a7e654 CUSTOM_SKIFF_shift_step @@ -1191,7 +1216,7 @@ b5402ebb5c3a9cea CUSTOM_SKIFF_song_chains b7ed969e42ab8a4c CUSTOM_SKIFF_song_rest_pick 2d947dc4a79bd0e7 CUSTOM_SKIFF_song_sound 5a1ab8994af1c9f4 CUSTOM_SKIFF_song_sounds -cd518151ee62231f CUSTOM_SKIFF_splash +9ea9bd22244cbea0 CUSTOM_SKIFF_splash c0dcc0f897d1c2cc CUSTOM_SKIFF_step 16b61816279b43ac CUSTOM_SKIFF_step_mark 531aff2799de09c3 CUSTOM_SKIFF_step_tiles @@ -1207,10 +1232,10 @@ d5b13ce57b9ecd56 CUSTOM_SKIFF_undo_box 43649eb56a3c94f3 CUSTOM_SKIFF_voice_2 b58462d0f4241bb9 CUSTOM_SKIFF_voice_2_uni 800d38984ddbf29b CUSTOM_SKIFF_voice_glide -58190975efa07de6 HI-CON_about +4b8ccd2b1c1ab628 HI-CON_about 45b1484da3de2369 HI-CON_about_credits 485a8dd85d6a206c HI-CON_about_end -de7253703cfe2d7c HI-CON_about_rec +12d8ac39a8595612 HI-CON_about_rec 203ab4886e85143a HI-CON_arp 27e02597c98cdc98 HI-CON_arp_2 6fb0450b7452a4f4 HI-CON_arp_on @@ -1226,10 +1251,10 @@ b9c9beda0dbbc525 HI-CON_auto_list_delete 77b2f7186e88b50c HI-CON_calibration 617a386ba9996ab4 HI-CON_chance aca847f476387d6b HI-CON_chance_flam -e1a90ec9d4a7631b HI-CON_chord +ac8900a5658f0e36 HI-CON_chord 4a16402e7f5c0b55 HI-CON_chord_kit -b69baff2bcf4e1ef HI-CON_chord_off -ba2e39c1bd91fe61 HI-CON_chord_wide +9c8ff9287ebbf80a HI-CON_chord_off +ee5013782e734084 HI-CON_chord_wide 355e4b32e6393131 HI-CON_chorus a7c567ef9d7aebce HI-CON_chorus_feedback f4086c2a9d9697b3 HI-CON_chorus_flanger @@ -1284,6 +1309,11 @@ eb6fbd3e57424ee9 HI-CON_fm_all_pitch 48120c9dd112246c HI-CON_fm_op_env d97a49d0eb0174cd HI-CON_fm_op_keys f9f9feae340da599 HI-CON_fm_op_tone +c2179f32190c829f HI-CON_follow +57b18af474c606e0 HI-CON_follow_fit +04295e43693da4c0 HI-CON_follow_off +1fd7238b806968da HI-CON_follow_scale +7b93d38269f2f5c3 HI-CON_follow_wait 72763e621a29310f HI-CON_fx ebae64e544533938 HI-CON_fx_duck fb38fdc24bd97c10 HI-CON_fx_duck_off @@ -1401,7 +1431,7 @@ edd2715f3904bdd8 HI-CON_roll_low 64040379e1eef48c HI-CON_roll_ties ebaa88b3629d303a HI-CON_roll_wide f716258f504d3251 HI-CON_samples -a51de9ba47a964d2 HI-CON_scl +96a7203d8706e62b HI-CON_scl dd6f40b0baed09bd HI-CON_shift_env a63588a10ab7bead HI-CON_shift_home 0b71d8964586f4e6 HI-CON_shift_step @@ -1432,7 +1462,7 @@ ba6f4087ed60e50d HI-CON_song_rest d33abb68ef9d2d1e HI-CON_song_rest_pick 302a778271f844ba HI-CON_song_sound 862ae52c06a7c73f HI-CON_song_sounds -0d6436c11d2a5bab HI-CON_splash +b45593f991c8e4eb HI-CON_splash 32f948fe2b3e98ac HI-CON_step fe5ab9ee7a712de5 HI-CON_step_mark c10a511522eda44a HI-CON_step_tiles @@ -1448,10 +1478,10 @@ bc2e7261b5777a48 HI-CON_voice 47478084fed9ef19 HI-CON_voice_2 ee972cec5a663aec HI-CON_voice_2_uni 54da1a184cfdc290 HI-CON_voice_glide -8e727f4e635d1c35 LARGE_CRYPT_about +4f8907e336396c1c LARGE_CRYPT_about 7b406cff888c0edf LARGE_CRYPT_about_credits 976a0b670244358f LARGE_CRYPT_about_end -c48d14f681696c2d LARGE_CRYPT_about_rec +68e2e112254a1454 LARGE_CRYPT_about_rec 1c9326db96758c6b LARGE_CRYPT_arp 478ba083442d973d LARGE_CRYPT_arp_2 f61b8db2d231076a LARGE_CRYPT_arp_on @@ -1467,10 +1497,10 @@ da30938cec273e6c LARGE_CRYPT_batt_usb 24809d062ec2601b LARGE_CRYPT_calibration 65106787da0dab24 LARGE_CRYPT_chance 509825378b4e350a LARGE_CRYPT_chance_flam -334a774f4d049350 LARGE_CRYPT_chord +6bc730019f4076db LARGE_CRYPT_chord 8409fda8aa8cdd03 LARGE_CRYPT_chord_kit -8ca6c65e1a594a25 LARGE_CRYPT_chord_off -6273b808e9373404 LARGE_CRYPT_chord_wide +a6fc4880a6a2e79a LARGE_CRYPT_chord_off +171b644eb63391c7 LARGE_CRYPT_chord_wide 4872a9ed07cc30cd LARGE_CRYPT_chorus 256ee6d4d1ab6c09 LARGE_CRYPT_chorus_feedback 56263a8ac881cbed LARGE_CRYPT_chorus_flanger @@ -1525,6 +1555,11 @@ c1442a45708091e2 LARGE_CRYPT_fm_all_lfo db38babb0d5fc497 LARGE_CRYPT_fm_op_env 7fe87fea68684af7 LARGE_CRYPT_fm_op_keys be876d0fe2e4efa8 LARGE_CRYPT_fm_op_tone +754ae3b6e5e0f1c5 LARGE_CRYPT_follow +a661450105ab1990 LARGE_CRYPT_follow_fit +2146aa36fb1ef474 LARGE_CRYPT_follow_off +bb11fe7598c34c60 LARGE_CRYPT_follow_scale +754ae3b6e5e0f1c5 LARGE_CRYPT_follow_wait b0803eeb7e45c1d7 LARGE_CRYPT_fx dcecac91312e5367 LARGE_CRYPT_fx_duck 8d50453c57afbd96 LARGE_CRYPT_fx_duck_off @@ -1642,7 +1677,7 @@ a11f238b397756c2 LARGE_CRYPT_roll_lock_held 5a335c2c721aea26 LARGE_CRYPT_roll_ties c07308ba735e7267 LARGE_CRYPT_roll_wide 7770ca67c5804626 LARGE_CRYPT_samples -e7df8b1a46824792 LARGE_CRYPT_scl +0003c3bd6dc2f47d LARGE_CRYPT_scl ce341ba978f703d3 LARGE_CRYPT_shift_env f4f93273d0bf8dfb LARGE_CRYPT_shift_home f54efb94b3672434 LARGE_CRYPT_shift_step @@ -1673,7 +1708,7 @@ cab1b6f37c9f98f6 LARGE_CRYPT_song_playing 066dc5b420adc706 LARGE_CRYPT_song_rest_pick aebc2d83c56358c9 LARGE_CRYPT_song_sound 2f95bf3f5de28ff5 LARGE_CRYPT_song_sounds -4756305f336b3fc5 LARGE_CRYPT_splash +2f2377490a74ad00 LARGE_CRYPT_splash fa365a152e3ba8b9 LARGE_CRYPT_step 85f824d9dbd15136 LARGE_CRYPT_step_mark 07a6740887431a84 LARGE_CRYPT_step_tiles @@ -1689,10 +1724,10 @@ bbb43f324795cb65 LARGE_CRYPT_user_foot ac2ad311307c3d85 LARGE_CRYPT_voice_2 ac2ad311307c3d85 LARGE_CRYPT_voice_2_uni 24fcb384a7d679f2 LARGE_CRYPT_voice_glide -78161a2b9423a5c9 LARGE_NEON_about +f87f987938c92af4 LARGE_NEON_about 19e21770e8770398 LARGE_NEON_about_credits 68d7c5aa89a096a3 LARGE_NEON_about_end -8bef53b5512748ec LARGE_NEON_about_rec +fd8659fe019bb335 LARGE_NEON_about_rec 905818ddd255b125 LARGE_NEON_arp c5393b8718ace45e LARGE_NEON_arp_2 9d399d4ecff68cd1 LARGE_NEON_arp_on @@ -1708,10 +1743,10 @@ fa4052d68e050712 LARGE_NEON_batt_2 fc5d6f95f4bd215b LARGE_NEON_calibration 6bd2767c67fa533b LARGE_NEON_chance 5ee42d946227b809 LARGE_NEON_chance_flam -037a4b8b8989be3e LARGE_NEON_chord +2e084835673acd66 LARGE_NEON_chord c2a3ad6f33ae8bc1 LARGE_NEON_chord_kit -a0700324bf8a9ebf LARGE_NEON_chord_off -db1b21d4be19cf1e LARGE_NEON_chord_wide +646f31bdd6117f87 LARGE_NEON_chord_off +f028975f526401c6 LARGE_NEON_chord_wide 5de03f4ad174e14f LARGE_NEON_chorus 1b26de9725f05216 LARGE_NEON_chorus_feedback a3f1f6720078eeb9 LARGE_NEON_chorus_flanger @@ -1766,6 +1801,11 @@ eb0e2b35d362ac2c LARGE_NEON_fm_all_algo 06fa3207f28dd29e LARGE_NEON_fm_op_env 6b551c7202b8d44b LARGE_NEON_fm_op_keys e907f23a21f80365 LARGE_NEON_fm_op_tone +85b3db7467ac8de0 LARGE_NEON_follow +2c8e46cc4fe304e9 LARGE_NEON_follow_fit +9a6dac9b38dbada0 LARGE_NEON_follow_off +f5876ee3f6ebee15 LARGE_NEON_follow_scale +85b3db7467ac8de0 LARGE_NEON_follow_wait 78d691947cb7ede8 LARGE_NEON_fx 11e5c921ab42159b LARGE_NEON_fx_duck 3c2fa9f8675a6087 LARGE_NEON_fx_duck_off @@ -1883,7 +1923,7 @@ e9a36b11416963b4 LARGE_NEON_roll_acid c105042cde6c6536 LARGE_NEON_roll_ties e02da5a978578d09 LARGE_NEON_roll_wide 84623beb15b3fb2d LARGE_NEON_samples -960d1074a81ce891 LARGE_NEON_scl +d5093485509d95c9 LARGE_NEON_scl 73aee6fce064876b LARGE_NEON_shift_env c82bad5bc848ac34 LARGE_NEON_shift_home 745ffa575ac78bb9 LARGE_NEON_shift_step @@ -1914,7 +1954,7 @@ aa3599e7dfb372dd LARGE_NEON_song_playing 0495a0ae7ecc90cc LARGE_NEON_song_rest_pick 957f412a8cff0bea LARGE_NEON_song_sound 3a2d1eeedc7929e3 LARGE_NEON_song_sounds -c7f2d20118ff02d8 LARGE_NEON_splash +d158b78f9e62fb14 LARGE_NEON_splash ce0efa55e9a5badd LARGE_NEON_step c3a8dbb50284e4da LARGE_NEON_step_mark d2292648cb5f302f LARGE_NEON_step_tiles @@ -1930,10 +1970,10 @@ abbf9442d25e44a7 LARGE_NEON_voice 26bdd7343f88c7a9 LARGE_NEON_voice_2 26bdd7343f88c7a9 LARGE_NEON_voice_2_uni d255565ab2ad528a LARGE_NEON_voice_glide -182d47586a95fb8d LARGE_QUARK_about +7735406cc3e5ebb9 LARGE_QUARK_about b515ea9ee4d620cf LARGE_QUARK_about_credits c8b84d9858bc80dd LARGE_QUARK_about_end -ddcde7ab96340c41 LARGE_QUARK_about_rec +9cf0051d8e8889e5 LARGE_QUARK_about_rec a7699759b913f311 LARGE_QUARK_arp 81108550b004456c LARGE_QUARK_arp_2 5367479d9732769f LARGE_QUARK_arp_on @@ -1949,10 +1989,10 @@ ea416b1e5939441e LARGE_QUARK_batt_2 eb3f5132acb8cebf LARGE_QUARK_calibration a300c23a5f777e3d LARGE_QUARK_chance 4bdae7d4e745fe6b LARGE_QUARK_chance_flam -45eeae385aaaa4e9 LARGE_QUARK_chord +2240d61a33a6a32b LARGE_QUARK_chord 3f8ec340b8246d58 LARGE_QUARK_chord_kit -37ceb8c2adcff762 LARGE_QUARK_chord_off -284c64f99b6b5cb9 LARGE_QUARK_chord_wide +d160bcd93844f1b4 LARGE_QUARK_chord_off +a7c3547ef620f55b LARGE_QUARK_chord_wide 2462dac0c5b62110 LARGE_QUARK_chorus 9a8ecde45e4b8bc0 LARGE_QUARK_chorus_feedback e2215eca98a37940 LARGE_QUARK_chorus_flanger @@ -2007,6 +2047,11 @@ d9f3ab5d8029fafe LARGE_QUARK_fm_all_pitch cc53661c24e27581 LARGE_QUARK_fm_op_env 4dff22bbf13405dd LARGE_QUARK_fm_op_keys 093ca5c8193c19c9 LARGE_QUARK_fm_op_tone +0194ac525e246df5 LARGE_QUARK_follow +64183b815f6235d7 LARGE_QUARK_follow_fit +e436a00a221fe44f LARGE_QUARK_follow_off +157ae7fa8c3bb516 LARGE_QUARK_follow_scale +0194ac525e246df5 LARGE_QUARK_follow_wait 61a81ceb1184acf2 LARGE_QUARK_fx cc9aede9cc14bb37 LARGE_QUARK_fx_duck e3b6216829fa4ead LARGE_QUARK_fx_duck_off @@ -2124,7 +2169,7 @@ e6b9bcfb538eee48 LARGE_QUARK_roll_playing 5d04ab282edc0ed8 LARGE_QUARK_roll_ties 357b9f2fc9013eae LARGE_QUARK_roll_wide 1397c85a8f0a3e56 LARGE_QUARK_samples -f5279180cfbe785b LARGE_QUARK_scl +9ee421e7bd040da1 LARGE_QUARK_scl 500c312f0d22352d LARGE_QUARK_shift_env 48250122e48726fa LARGE_QUARK_shift_home b5adc19046f35257 LARGE_QUARK_shift_step @@ -2155,7 +2200,7 @@ a7c442c0632f685a LARGE_QUARK_song_rest 69b55362ce1fafe5 LARGE_QUARK_song_rest_pick a8ceba3646380666 LARGE_QUARK_song_sound 9c9b9f162dc9e49d LARGE_QUARK_song_sounds -6bf8ec693edf2f7e LARGE_QUARK_splash +a6bb034bb01cf8c8 LARGE_QUARK_splash 43da5727dddf3fca LARGE_QUARK_step f5d91e3dff1792f8 LARGE_QUARK_step_mark 50e282501c0e0736 LARGE_QUARK_step_tiles @@ -2171,10 +2216,10 @@ df9d996b8d3f4877 LARGE_QUARK_step_tiles_drum f97c6504e19631a7 LARGE_QUARK_voice_2 f97c6504e19631a7 LARGE_QUARK_voice_2_uni e62595409207f4b4 LARGE_QUARK_voice_glide -37736e6a763d0f85 LARGE_SKIFF_about +a02dd602bd531da9 LARGE_SKIFF_about 407e133abca45b01 LARGE_SKIFF_about_credits 5deedbbeb09de76a LARGE_SKIFF_about_end -2d162a7f14c45430 LARGE_SKIFF_about_rec +5fdefcc465c648e4 LARGE_SKIFF_about_rec 1919218073432383 LARGE_SKIFF_arp 441d399f110914fd LARGE_SKIFF_arp_2 a0231cd49666b90b LARGE_SKIFF_arp_on @@ -2190,10 +2235,10 @@ b02becb143bb520f LARGE_SKIFF_batt_usb cc25781e47d28780 LARGE_SKIFF_calibration c18a56e0c84caac7 LARGE_SKIFF_chance 6da89e98420ba544 LARGE_SKIFF_chance_flam -411a36ac4b6f975b LARGE_SKIFF_chord +72b03240f21f2cd5 LARGE_SKIFF_chord 2605082d0c72d863 LARGE_SKIFF_chord_kit -407e3f7ddb60105f LARGE_SKIFF_chord_off -80a448957ff800e8 LARGE_SKIFF_chord_wide +6e31aedd04be0039 LARGE_SKIFF_chord_off +408b9484ed641f3e LARGE_SKIFF_chord_wide 83f3373f17e120c8 LARGE_SKIFF_chorus 647baf332b8bea67 LARGE_SKIFF_chorus_feedback 49c7b721916eea64 LARGE_SKIFF_chorus_flanger @@ -2248,6 +2293,11 @@ c01163483adebea8 LARGE_SKIFF_fm_all_algo f3417ba71991d2f5 LARGE_SKIFF_fm_op_env 26a26b89cf44b4ab LARGE_SKIFF_fm_op_keys 09ecc813e891c52d LARGE_SKIFF_fm_op_tone +6e41c9bd8e88b159 LARGE_SKIFF_follow +96e64410042d9cc8 LARGE_SKIFF_follow_fit +48d2fbe42b0f5112 LARGE_SKIFF_follow_off +6cf8b90d4a21bfce LARGE_SKIFF_follow_scale +6e41c9bd8e88b159 LARGE_SKIFF_follow_wait 75836aa4a870bff2 LARGE_SKIFF_fx 444bc1632422a54c LARGE_SKIFF_fx_duck c781bfa08d97577e LARGE_SKIFF_fx_duck_off @@ -2365,7 +2415,7 @@ e5a3babd0b70c13c LARGE_SKIFF_roll_playing d5f9bc04b58b1e11 LARGE_SKIFF_roll_ties d0ca1a3326cd3394 LARGE_SKIFF_roll_wide d85e5e7836d6e7d4 LARGE_SKIFF_samples -328f796af41047d2 LARGE_SKIFF_scl +bea4fc7e7cedbbd8 LARGE_SKIFF_scl f2d6640f43af8998 LARGE_SKIFF_shift_env a0d82312fed5b1d2 LARGE_SKIFF_shift_home f25ddd9d03f09edf LARGE_SKIFF_shift_step @@ -2396,7 +2446,7 @@ bbc842775f6d9f83 LARGE_SKIFF_song_new 5a7fec981e7986d4 LARGE_SKIFF_song_rest_pick 56c97d7277279ec0 LARGE_SKIFF_song_sound 4d8d2e3b449c5ff7 LARGE_SKIFF_song_sounds -d8a26c1b8b33813e LARGE_SKIFF_splash +c60bc4263afca49d LARGE_SKIFF_splash 172bc29d75427d91 LARGE_SKIFF_step 29ac214b55edfbc1 LARGE_SKIFF_step_mark 58e4e02e6922f804 LARGE_SKIFF_step_tiles @@ -2412,10 +2462,10 @@ fed8ac467c6c1e53 LARGE_SKIFF_user_foot d7d818ddc0431686 LARGE_SKIFF_voice_2 d7d818ddc0431686 LARGE_SKIFF_voice_2_uni 35bd27d867b2fb82 LARGE_SKIFF_voice_glide -78161a2b9423a5c9 NEON_about +f87f987938c92af4 NEON_about 19e21770e8770398 NEON_about_credits 68d7c5aa89a096a3 NEON_about_end -8bef53b5512748ec NEON_about_rec +fd8659fe019bb335 NEON_about_rec 8d6c256cf16cc50b NEON_arp ebf41f5e870cbcc2 NEON_arp_2 f0c4b8727105eded NEON_arp_on @@ -2433,10 +2483,10 @@ fc5d6f95f4bd215b NEON_calibration 64a7e674aa16ca33 NEON_card_roll cea9896f2087dc1d NEON_chance 8b4472b2d74297a0 NEON_chance_flam -91e6aeb24c636bcd NEON_chord +7c34ddd6815912f9 NEON_chord 8b25fe892a2f8fe0 NEON_chord_kit -1a352fb36b999c13 NEON_chord_off -102e9797c383efef NEON_chord_wide +7a913b35855125df NEON_chord_off +816e41e3668e24ab NEON_chord_wide d5d7377a8d4d262a NEON_chorus a9e69b5912ef8ad0 NEON_chorus_feedback f7d88434a8d34d08 NEON_chorus_flanger @@ -2491,6 +2541,11 @@ ed58f215e9c10ab9 NEON_fm_all_lfo 0662686b7097bc94 NEON_fm_op_env 1d011b3835422bcd NEON_fm_op_keys a423bedab28ac490 NEON_fm_op_tone +fe7287f4d3866614 NEON_follow +49642882d97983b0 NEON_follow_fit +69edb908e0338236 NEON_follow_off +4f32397eac3ba42a NEON_follow_scale +dccda8910181a104 NEON_follow_wait 31cea45aa863ec24 NEON_fx c7b5b0ce3b2f630a NEON_fx_duck fef3f006b7c2ce07 NEON_fx_duck_off @@ -2608,7 +2663,7 @@ f7fd7102c459d860 NEON_roll_locks 23b7d3ef78db4de2 NEON_roll_ties 11766218a4129f75 NEON_roll_wide 4651f29955400aef NEON_samples -6c8400f2151a645e NEON_scl +1164e1ed3c0a395a NEON_scl 8ca77888635eb795 NEON_shift_env 06a118af072bacdb NEON_shift_home 18ed400261b518b1 NEON_shift_step @@ -2639,7 +2694,7 @@ f87f243860031880 NEON_song_rest 8b3e54bd8ef84b97 NEON_song_rest_pick c9538febf77d200d NEON_song_sound 14f3ce37265a2048 NEON_song_sounds -c7f2d20118ff02d8 NEON_splash +d158b78f9e62fb14 NEON_splash 3c8db93bc277ea61 NEON_step e40cffb1683e4d0d NEON_step_mark b732c46b74f18b40 NEON_step_tiles @@ -2655,10 +2710,10 @@ b14c486a5002c5e0 NEON_voice 62fbe098ac9dae46 NEON_voice_2 24d9e62ca68159c6 NEON_voice_2_uni 5d12230b57fe543d NEON_voice_glide -5ab21e8c28faab31 PAPER_about +e3bf0fed928a0573 PAPER_about 17c5c1fd74334b10 PAPER_about_credits 7026b69890b630f0 PAPER_about_end -1aaaf665e073309e PAPER_about_rec +0d35bef9f67c8c94 PAPER_about_rec ce8d3d20f8571dc7 PAPER_arp e3c990b8a98bc689 PAPER_arp_2 927d7a0bc22ffe3d PAPER_arp_on @@ -2674,10 +2729,10 @@ ad1344a34402b661 PAPER_batt_0 3b0fd6206efa9ffa PAPER_calibration fccee4c7a3372111 PAPER_chance f4d6901120b6551b PAPER_chance_flam -1fcd2b4274175be3 PAPER_chord +86fa446e4ece9159 PAPER_chord 3dfd4bb061e5d8aa PAPER_chord_kit -07474d999094a251 PAPER_chord_off -19eafbb593d09977 PAPER_chord_wide +5bf7a13dc6afed8b PAPER_chord_off +93cfdc9d299e8645 PAPER_chord_wide 4aaa876b9a076683 PAPER_chorus 0cee0b5c88ca48b2 PAPER_chorus_feedback 61ecc8be292c0070 PAPER_chorus_flanger @@ -2732,6 +2787,11 @@ ff8ffdd46207f5f7 PAPER_env_2 81ad963c10cb22ae PAPER_fm_op_env 549ec85b9f310cf6 PAPER_fm_op_keys ee310e60136e8956 PAPER_fm_op_tone +0bcaa5e319a39227 PAPER_follow +b53840da6cdaa277 PAPER_follow_fit +babd9a55cbb5467b PAPER_follow_off +e8c913521a94ae41 PAPER_follow_scale +ba30575ff23d5276 PAPER_follow_wait 8657b4d48a708a1e PAPER_fx 5d84f66d6c08ed25 PAPER_fx_duck c4b07b3a9f2b4119 PAPER_fx_duck_off @@ -2849,7 +2909,7 @@ ec29bbad015e3c9d PAPER_roll_playing 31869b532028c9c9 PAPER_roll_ties c01001b86b81230e PAPER_roll_wide 0d768a45f8934700 PAPER_samples -1bb652a7e6ae6360 PAPER_scl +12e042f62d24f55e PAPER_scl 8fe5394d5fa5dea0 PAPER_shift_env 3a4cac81d224af7b PAPER_shift_home 385bb2b92611fd91 PAPER_shift_step @@ -2880,7 +2940,7 @@ dca3358b84b45c85 PAPER_song_rest d233176bd7ad4bb6 PAPER_song_rest_pick 5eee041417a65e04 PAPER_song_sound eba5612a222bf378 PAPER_song_sounds -9489bec37f51d34f PAPER_splash +de5a1209ea65676b PAPER_splash b65c86687b14d83e PAPER_step db7f00ec95560ca3 PAPER_step_mark df2a768ad8152660 PAPER_step_tiles @@ -2902,10 +2962,10 @@ dd2c60d0a0f712a6 PAPER_voice_glide fee43c6ce8c54275 PHLINE_NEON_six_home 4e7899be754154c0 PHLINE_QUARK_home cb7963f36bafe78c PHLINE_QUARK_six_home -182d47586a95fb8d QUARK_about +7735406cc3e5ebb9 QUARK_about b515ea9ee4d620cf QUARK_about_credits c8b84d9858bc80dd QUARK_about_end -ddcde7ab96340c41 QUARK_about_rec +9cf0051d8e8889e5 QUARK_about_rec f0f31931553bdc98 QUARK_arp 68c62c149b7a0502 QUARK_arp_2 adfaa1a7032e76da QUARK_arp_on @@ -2923,10 +2983,10 @@ eb3f5132acb8cebf QUARK_calibration 878d6f1d3904fd13 QUARK_card_roll c04f34d26e4d1659 QUARK_chance a76545c1f30cef67 QUARK_chance_flam -d5bbcb33532adf3d QUARK_chord +e648aed1d1a02925 QUARK_chord e54606c6a545a0bc QUARK_chord_kit -91c5dca13abf8909 QUARK_chord_off -b85f7b884af5335e QUARK_chord_wide +e68a5a6e20d67741 QUARK_chord_off +03a3fbc95a195aca QUARK_chord_wide 2f704fd2673ae707 QUARK_chorus 82cb8626c6df71c8 QUARK_chorus_feedback bad38781558936ba QUARK_chorus_flanger @@ -2981,6 +3041,11 @@ bb7e1cad4c8222a0 QUARK_fm_init 2470a4a47b5d5e49 QUARK_fm_op_env c7fc3d3a22528669 QUARK_fm_op_keys 3df0baa891d68a13 QUARK_fm_op_tone +fcd074d4f5f0fa64 QUARK_follow +93e168654b2cb622 QUARK_follow_fit +37b53b9932faf010 QUARK_follow_off +e12f5529ad180c40 QUARK_follow_scale +829eb392663a0745 QUARK_follow_wait 14fdf834a6ca9972 QUARK_fx 6687462a867ff630 QUARK_fx_duck 4b593da58a603616 QUARK_fx_duck_off @@ -3098,7 +3163,7 @@ a8ecf1c6ce9480c4 QUARK_roll_lock_held e978c3ddf01adfcc QUARK_roll_ties 3c3e351f415e5a22 QUARK_roll_wide e262ae3579d94034 QUARK_samples -e8c698e4a134ebb7 QUARK_scl +6dbbe37749aae813 QUARK_scl 1c5d2c749a04a5b4 QUARK_shift_env 979f56ddbd144c07 QUARK_shift_home e39704dec79c764f QUARK_shift_step @@ -3129,7 +3194,7 @@ e3cf3a9e107fd4bc QUARK_song_playing 86a7cf988e0bd725 QUARK_song_rest_pick ecf95f643f1617a6 QUARK_song_sound 93761f7ec3bd7004 QUARK_song_sounds -6bf8ec693edf2f7e QUARK_splash +a6bb034bb01cf8c8 QUARK_splash b8860221a86e098e QUARK_step 18d52a1157ae7dca QUARK_step_mark 9f85569f187231ec QUARK_step_tiles @@ -3145,10 +3210,10 @@ d5987ab09a28a806 QUARK_voice 893b270ea5327b18 QUARK_voice_2 b44c8316939b74d2 QUARK_voice_2_uni 95a643bb842f71e3 QUARK_voice_glide -37736e6a763d0f85 SKIFF_about +a02dd602bd531da9 SKIFF_about 407e133abca45b01 SKIFF_about_credits 5deedbbeb09de76a SKIFF_about_end -2d162a7f14c45430 SKIFF_about_rec +5fdefcc465c648e4 SKIFF_about_rec dabc0c9d6e5f58a0 SKIFF_arp 865c84d6c5f448ba SKIFF_arp_2 c3ed8808d3c1f6ef SKIFF_arp_on @@ -3166,10 +3231,10 @@ cc25781e47d28780 SKIFF_calibration 93b500219f28e8f3 SKIFF_card_roll 707c556475a7d14f SKIFF_chance ebb5215c50a050f8 SKIFF_chance_flam -05a37c2f433fb125 SKIFF_chord +80af65e39266bc10 SKIFF_chord 6afeea1b331c4713 SKIFF_chord_kit -4104e9a73cbaab4f SKIFF_chord_off -c1717ad9185bf227 SKIFF_chord_wide +20e7e7d877a2849a SKIFF_chord_off +b8185a2fbdacfdc2 SKIFF_chord_wide e3d1244203eb9d43 SKIFF_chorus 1b0a1dd9e43d42a6 SKIFF_chorus_feedback 9f0dab329bf53f69 SKIFF_chorus_flanger @@ -3224,6 +3289,11 @@ e4ae0c52926f7620 SKIFF_fm_all_pitch f7ac04f200440d4c SKIFF_fm_op_env 6abd2d09a6bea80c SKIFF_fm_op_keys a13895aae388af84 SKIFF_fm_op_tone +a633ea220505c584 SKIFF_follow +6e58366f3db58cfb SKIFF_follow_fit +a181f945a8d76e19 SKIFF_follow_off +fd2e42d0aeef85f7 SKIFF_follow_scale +0accb884b9e4e36d SKIFF_follow_wait 519a56e419c8af9b SKIFF_fx fefdbe7c7e86c50e SKIFF_fx_duck dcf31d7059187d67 SKIFF_fx_duck_off @@ -3341,7 +3411,7 @@ c5dcce2a04a58398 SKIFF_roll_low 8ca258f4ace5eb49 SKIFF_roll_ties ae3250a0cbd9ab1c SKIFF_roll_wide c033b45b34344c55 SKIFF_samples -3f0ff5f98bd0e649 SKIFF_scl +24c2fbf8254df780 SKIFF_scl 153642e4e8d29d0b SKIFF_shift_env bcb9fef6a08a9bd3 SKIFF_shift_home 1a572f0268951b07 SKIFF_shift_step @@ -3372,7 +3442,7 @@ a023a74732e85dc0 SKIFF_song_rest 1e49e6996b18fe78 SKIFF_song_rest_pick 371ba4044a27ca4c SKIFF_song_sound e12bfd4253c44d60 SKIFF_song_sounds -d8a26c1b8b33813e SKIFF_splash +c60bc4263afca49d SKIFF_splash be3797e720d65fa9 SKIFF_step 6d365a42f7184317 SKIFF_step_mark 041b914d8fd72502 SKIFF_step_tiles diff --git a/tests/ui_render.c b/tests/ui_render.c index 8e0ab17..48b8063 100644 --- a/tests/ui_render.c +++ b/tests/ui_render.c @@ -808,6 +808,7 @@ enum { S_HOME, S_HOME_IDLE, S_MESSAGE, S_MESSAGE_KEY, S_MESSAGE_NOFILE, S_PRESET S_LANE_MIX, S_LANE_MIX_DX, S_SONG_SOUND, S_SONG_SOUNDS, /* (2.0, #36, #30) */ S_SONG_CHAINS, S_SONG_CHAIN_COPY, /* (2.0, #44's box) */ S_DRUM_KIT_USR, S_LANES_USR, /* (2.0, #35) */ + S_FOLLOW, S_FOLLOW_SCALE, S_FOLLOW_FIT, S_FOLLOW_OFF, S_FOLLOW_WAIT, /* (2.1) */ S_MOCK_HOME, S_MOCK_PRESETS, S_MOCK_SEQ, S_MOCK_DRUM, S_MOCK_MIXER, S_MOCK_DIALOG, S_MOCK_MENU, S_COUNT }; static const char *const S_NAME[S_COUNT] = {"home", "home_idle", "message", "message_key", "message_nofile", "presets", "presets_nofav", "user", "project", "lanes", "step", "pattern", "chance", "motion", "drum", @@ -840,7 +841,8 @@ static const char *const S_NAME[S_COUNT] = {"home", "home_idle", "message", "mes "chorus_flanger", "chorus_phaser", "presets_bass", "song_rest", "song_rest_pick", "notes_range", "notes_pick", "feel_range", "notes_overlap", "momentary", "pool_empty", "pool_unused", "confirm_empty", "song_once", "song_new", "song_copyplus", "song_chain", "song_chain3", "notes_chain", "lane_mix", "lane_mix_dx", - "song_sound", "song_sounds", "song_chains", "song_chain_copy", "drum_kit_usr", "lanes_usr", "mock_home", "mock_presets", "mock_seq", "mock_drum", "mock_mixer", "mock_dialog", "mock_menu"}; + "song_sound", "song_sounds", "song_chains", "song_chain_copy", "drum_kit_usr", "lanes_usr", + "follow", "follow_scale", "follow_fit", "follow_off", "follow_wait", "mock_home", "mock_presets", "mock_seq", "mock_drum", "mock_mixer", "mock_dialog", "mock_menu"}; /* the scenes of the UI design screens: the state the UI-redesign * prototype drew them from (its setup(): two pattern tracks, the drum pattern on track 4, a synthetic scope), @@ -1351,6 +1353,24 @@ static void setup(int s) ui.hot_col = 2; ui.hot_t = 30; break; } + case S_FOLLOW: /* ((2.1) SCL > FOLLOW on T1, following T2: its chord F/A (A C F); */ + case S_FOLLOW_SCALE: /* KEY by ROOT (F: +5), SCALE by LOW (A: -2 steps), FIT (to A C F); */ + case S_FOLLOW_FIT: /* OFF; T2 with no chord yet) */ + case S_FOLLOW_OFF: + case S_FOLLOW_WAIT: + sel_set(0); + set_engine_of(&trk[0], 0); + set_engine_of(&trk[1], 0); + TSEL->p[P_FOLLOW] = s == S_FOLLOW_OFF ? 0 : 2; + TSEL->p[P_FMODE] = s == S_FOLLOW_SCALE ? FM_SCALE : s == S_FOLLOW_FIT ? FM_FIT : FM_KEY; + TSEL->p[P_FNOTE] = s == S_FOLLOW_SCALE ? FN_LOW : FN_ROOT; + TSEL->p[P_SCALE] = 1; + if (s != S_FOLLOW_WAIT) { + fol_step(&trk[1], (const uint8_t[]){57, 60, 65}, 3u); + } + go_title("FOLLOW"); + ui.hot_col = s == S_FOLLOW_SCALE ? 1 : s == S_FOLLOW_FIT ? 1 : 0; ui.hot_t = 30; + break; case S_SONG_SOUND: /* ((2.0, #30, 2A) entries with a sound: T1 A, T2 A C D, T4 E, T6 C */ case S_SONG_SOUNDS: { /* (corners cut); T2 on STRINGS: KNOB 2 at SOUND on C (OCT+: SET * SOUND STRINGS); no pick: C's sound named */ diff --git a/tests/ui_test.c b/tests/ui_test.c index 4810955..51b079d 100644 --- a/tests/ui_test.c +++ b/tests/ui_test.c @@ -139,6 +139,8 @@ static void ui_power_on(void) uint32_t i; memset(trk, 0, sizeof trk); memset(&song, 0, sizeof song); sel_set(0); + memset(fol_src, 0, sizeof fol_src); /* ((2.1) .pool at power-on: no chords, nothing followed) */ + memset(fol_map, 0, sizeof fol_map); memset(&ui, 0, sizeof ui); memset(&nsel, 0, sizeof nsel); /* ((Skiff 2.0) no selection, FEEL's tiles on CHANCE) */ clip.n = 0; /* (.. nothing copied) */ @@ -541,13 +543,13 @@ static int test_sound_loads(void) { /* a user preset of SAMPLE PERC (UP_PUT from an older editor, or a bank read): DRUM, its kit */ up_rec_t r; int16_t keep[P_COUNT]; - uint32_t k; + uint32_t k, np = 135u; /* ((2.1) 1.4's records by count: E0..E7 the last eight) */ memset(&r, 0, sizeof r); - r.used = UP_USED; r.ver = UP_VER; r.engine = ENGI_SAMPLE; r.np = P_COUNT; + r.used = UP_USED; r.ver = UP_VER; r.engine = ENGI_SAMPLE; r.np = (uint8_t)np; memcpy(r.name, "OLD PERC", 8); host_legacy_sample_perc(t); - for (k = 0; k < P_COUNT; k++) - up_set_value(&r, k, t->p[k]); + for (k = 0; k < np; k++) + up_set_value(&r, k, t->p[k < np - 8u ? k : P_E0 + k - (np - 8u)]); up_migrate(&r); *up_rec(7) = r; set_engine_of(t, 0); @@ -4481,14 +4483,15 @@ static int test_fm4_retired(void) fm4_preset_values(p, 5); /* DIGITAL PAD */ { up_rec_t r; + const uint32_t np = 135u; /* ((2.1) 1.4's records by count: E0..E7 the last eight) */ memset(&r, 0, sizeof r); r.used = UP_USED; r.ver = UP_VER; r.engine = ENGI_DIGITAL; - r.np = P_COUNT; + r.np = (uint8_t)np; memcpy(r.name, "OLD PAD", 7); - for (i = 0; i < P_COUNT; i++) - up_set_value(&r, i, p[i]); + for (i = 0; i < np; i++) + up_set_value(&r, i, p[i < np - 8u ? i : P_E0 + i - (np - 8u)]); up_put(7, &r); } fm4_convert(p, v); @@ -4505,14 +4508,15 @@ static int test_fm4_retired(void) #else { /* (2.0) a user preset stored with engine 1 (an editor of before's UP_PUT, a bank of before): OLD FORMAT, kept */ up_rec_t r; + const uint32_t np = 135u; /* ((2.1) 1.4's records by count: E0..E7 the last eight) */ memset(&r, 0, sizeof r); r.used = UP_USED; r.ver = UP_VER; r.engine = ENGI_DIGITAL; - r.np = P_COUNT; + r.np = (uint8_t)np; memcpy(r.name, "OLD PAD", 7); - for (i = 0; i < P_COUNT; i++) - up_set_value(&r, i, param_desc_of(ENGI_DIGITAL, i)->def); + for (i = 0; i < np; i++) + up_set_value(&r, i, param_desc_of(ENGI_DIGITAL, i < np - 8u ? i : P_E0 + i - (np - 8u))->def); up_put(7, &r); bad += check("(2.0) a DIGITAL user preset: OLD FORMAT, not loaded or listed, its bytes kept", !up_used(7) && up_old(7) && up_load(7) == 1 && !memcmp(up_rec(7), &r, sizeof r)); @@ -5508,10 +5512,13 @@ static int test_seq_quant(void) ok = cur_page()->id[2] == P_QUANT && t->p[P_QUANT] == 0; turn(EN_K3, 10); param_format(&TP[P_QUANT], t->p[P_QUANT], val, &unit); - ok &= t->p[P_QUANT] == 4 && str_eq(val, "SEQ+T"); /* ((1.3) SEQ+T appended) */ + ok &= t->p[P_QUANT] == QN_SOLO && str_eq(val, "SOLO"); /* ((2.1, #74) SOLO appended) */ + t->p[P_QUANT] = 4; + param_format(&TP[P_QUANT], t->p[P_QUANT], val, &unit); + ok &= str_eq(val, "SEQ+T"); /* ((1.3) SEQ+T appended) */ t->p[P_QUANT] = 3; param_format(&TP[P_QUANT], t->p[P_QUANT], val, &unit); - bad += check("SCL KNOB 3 QNT: OFF SNAP WHITE SEQ SEQ+T, SEQ+T last (default OFF)", ok && str_eq(val, "SEQ")); + bad += check("SCL KNOB 3 QNT: OFF SNAP WHITE SEQ SEQ+T SOLO, SOLO last (default OFF)", ok && str_eq(val, "SEQ")); t->p[P_SCALE] = 1; t->p[P_ROOT] = 0; ok = kb_map(t, 8) == 60u && kb_map(t, 7) == 60u; /* C#4 key -> C4, as SNAP */ @@ -5524,9 +5531,15 @@ static int test_seq_quant(void) transport_req = 2; events_block(CTL); bad += check("QNT SEQ: the keys snap as SNAP; C#4 F#4 of a step play C4 F4 in C major, the step keeps C#4 F#4", ok); + t->p[P_QUANT] = QN_SOLO; project_save(1); t->p[P_QUANT] = 0; project_load(1); + bad += check("(2.1, #74) QNT SOLO saved and loaded with the project", trk[0].p[P_QUANT] == QN_SOLO); + trk[0].p[P_QUANT] = 3; + project_save(1); + trk[0].p[P_QUANT] = 0; + project_load(1); bad += check("QNT SEQ saved and loaded with the project", trk[0].p[P_QUANT] == 3); return bad; } @@ -6693,6 +6706,116 @@ static int test_kbd_hold(void) return bad; } +/* (2.1, #74) QNT SOLO: chords on the white keys, a tune on the black. KBD HOLD holds the white keys' chord, not a black + * key, and a black key pressed (or down) doesn't start a new chord; with the ARP on the black keys sound directly (and + * are recorded so) while the white keys' chords go into it, a note both play kept apart; SCALE LEDS light the black keys, + * their roots too; step entry writes a black key's note alone */ +static int solo_on(const track_t *t, uint32_t note) /* a voice of t holds note */ +{ + uint32_t i; + for (i = 0; i < NVOICE; i++) + if (t->v[i].gate && t->v[i].note == note) + return 1; + return 0; +} +static int test_solo(void) +{ + enum { C4 = 7, D_4 = 10, F4 = 12, F_4 = 13 }; /* keys: D#4 plays D4, F#4 E4 (C major) */ + const uint32_t D = 62u + 12u * SOLO_OCT, E = 64u + 12u * SOLO_OCT, CW = C4 + 12u * SOLO_OCT; + int bad = 0, ok; + uint32_t root, sc, i, was, passed; + track_t *t; + ui_power_on(); + t = TSEL; + t->p[P_VOICE] = V_POLY; /* (T1's first sound: LEGATO) */ + t->p[P_SCALE] = 1; /* C major */ + t->p[P_ROOT] = 0; + t->p[P_QUANT] = QN_SOLO; + t->p[P_CHRD] = CH_DIA3; + t->p[P_AMODE] = 0; + t->p[P_AHOLD] = 1; /* KBD HOLD */ + key_down(C4); key_up(C4); + key_down(D_4); + ok = gates() == 4u && solo_on(t, 60) && solo_on(t, 64) && solo_on(t, 67) && solo_on(t, D); + key_up(D_4); + events_block(CTL); /* (kb_sol_up: a block on) */ + ok &= gates() == 3u && !solo_on(t, D) && !kb_ped[D_4] && kb_ped[C4]; + bad += check("#74 SOLO, KBD HOLD: a black key plays over the chord held, which goes on; let go, it ends (not held)", ok); + key_down(D_4); + key_down(F4); /* a black key down: still a new chord */ + ok = gates() == 4u && !solo_on(t, 60) && !solo_on(t, 64) && solo_on(t, 65) && solo_on(t, 69) && solo_on(t, 72) && + solo_on(t, D); + key_up(F4); key_up(D_4); + events_block(CTL); + ok &= gates() == 3u && solo_on(t, 65) && !solo_on(t, D); + bad += check(" a white key pressed while a black key is down starts a new chord (the black key's isn't one)", ok); + t->p[P_AHOLD] = 0; + events_block(CTL); + + t->p[P_AMODE] = AM_UP; /* the ARP on */ + key_down(CW); /* (its chord has the black key's E) */ + key_down(F_4); + ok = t->nheld == 3u && t->arp_phys == 3u && gates() == 1u && solo_on(t, E); + key_up(F_4); + ok &= t->nheld == 3u && t->arp_phys == 3u && !gates(); + key_down(F_4); + for (i = 0, was = passed = 0; i < 3000u && !passed; i++) { /* the ARP plays E and goes on: the key's E with it */ + events_block(CTL); + ok &= solo_on(t, E); + was |= t->arp_note == E; + passed = was && t->arp_note && t->arp_note != E; + } + ok &= passed; + key_up(CW); /* the white key first: nothing left in the ARP */ + ok &= !t->nheld && !t->arp_phys && solo_on(t, E); + key_up(F_4); + events_block(CTL); + ok &= !gates() && !t->nheld; + bad += check(" the ARP on: a black key sounds at once, not into it; the white key's chord goes into it; the ARP " + "playing the black key's note leaves it sounding; either let go first, nothing left", ok); + track_defaults_steps(t); + t->p[P_SLEN] = 16; + song.rec = 1u << song.sel; /* recording, the ARP on */ + song.playing = 1; + t->seq_idx = 0; + t->seq_pos = 0; + key_down(D_4); + key_up(D_4); + song.playing = 0; + song.rec = 0; + t->p[P_AMODE] = 0; + events_block(CTL); + bad += check(" recording with the ARP on: a black key's note goes into the step as played", + t->step[0].n == 1u && t->step[0].note[0] == D); + + menu_put(MI_SCLLED, 1); + sc = scale_leds(&root); + ok = sc == 0x7FFFFFFu && root == (1u << C4 | 1u << 19 | 1u << 8 | 1u << 25); /* C4 C5; C#4 F#5 */ + t->p[P_SCALE] = 5; /* PEN: a root every 5 keys of a colour */ + sc = scale_leds(&root); + ok &= sc == 0x7FFFFFFu && root == (1u << C4 | 1u << 16 | 1u << 24 | 1u << 8 | 1u << 20); + t->p[P_SCALE] = 1; + menu_put(MI_SCLLED, 0); + ui_rec_prefs = 0; + bad += check(" SCALE LEDS: every key (the black ones walk the scale too), the black keys' roots too", ok); + + track_defaults_steps(t); + go_page(GR_ROLL); frame(); + cursor_set(0); + song.rec = 1u << song.sel; /* (#133: armed, stopped: step entry) */ + key_down(D_4); frame(); + key_up(D_4); frame(); + key_down(C4); frame(); + key_up(C4); frame(); + song.rec = 0; + bad += check(" step entry, CHRD on: a black key writes its note alone, a white key its chord", + t->step[0].n == 1u && t->step[0].note[0] == D && t->step[1].n == 3u && t->step[1].note[0] == 60u && + t->step[1].note[1] == 64u && t->step[1].note[2] == 67u && ui.cursor == 2u); + t->p[P_QUANT] = QN_OFF; + t->p[P_CHRD] = CH_OFF; + return bad; +} + /* #48: the note divisions step by their length, longest first (triplets between their neighbours), on every list * that has them (SEQ DIV, ARP RATE, the delay's TIME, the SLICER's RATE); the stored values and their sound stay */ static int test_div_order(void) @@ -9639,6 +9762,7 @@ int main(void) bad += test_div_order(); bad += test_head_oct(); bad += test_kbd_hold(); + bad += test_solo(); bad += test_knob_accel(); bad += test_usb_level(); bad += test_click_menu(); diff --git a/tests/upreset_test.c b/tests/upreset_test.c index 4127d20..1ede409 100644 --- a/tests/upreset_test.c +++ b/tests/upreset_test.c @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: GPL-3.0-only * Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments */ /* Host test of the user preset record (firmware/src/upreset.c, -DUP_HOST part): - * UP_PUT parsing, a bank round trip through storage.c on a simulated NOR, - * bank / record version checks, map-by-count, pattern <-> steps, PHYS MODEL DRUM records -> the DRUM engine, - * drum grid records (version 3: UP_PUT's kind 1 and its high bits, a round trip). (2.0) Built twice (run_tests.sh): as + * UP_PUT parsing ((2.1) a version 6 record, its pattern or drum grid checked and passed over), a bank round trip + * through storage.c on a simulated NOR, bank / record version checks, map-by-count, PHYS MODEL DRUM records -> the + * DRUM engine, drum grid records (version 3). (2.0) Built twice (run_tests.sh): as * 2.0 is (versions 4..6, no DIGITAL record: OLD FORMAT) and with FELUCCA_LEGACY, the converter's (versions 1..3, the * PHYS DRUM and SAMPLE PERC records -> DRUM, a DIGITAL record kept). */ #include @@ -68,11 +68,10 @@ int main(void) up_valid(&r) && !memcmp(r.name, "Bass One", 8) && !r.name[8]); ok = 1; for (i = 0; i < P_COUNT; i++) - ok &= up_value(&r, i) == (int16_t)(-40 + (int32_t)(i % 100u)); + ok &= up_value(&r, p_sid(i)) == (int16_t)(-40 + (int32_t)(i % 100u)); bad += check("UP_PUT values (negative v14 too)", ok); - bad += check("pattern: rest drops flags, tie has no note", - r.note[0] == 0 && r.flags[0] == 0 && r.note[1] == 41 && r.flags[1] == 1 && r.note[3] == 0 && - r.flags[3] == 4); + bad += check("(2.1) a version 6 record, the pattern passed over", /* (P_COUNT past UP_PMAX * 2: the pattern's */ + r.ver == UP_VER_SID && r.np == SID_COUNT && !up_pat(&r) && !r.sid[SID_COUNT]); /* bytes were E6 E7) */ bad += check("UP_PUT short frame -> args", up_parse(a, n - 1u, &r, &slot) == 1); { up_rec_t keep = r; @@ -93,14 +92,16 @@ int main(void) bad += check("UP_PUT engine 1 (DIGITAL): kept as it is", up_parse(a, n, &r, &slot) == 0 && slot == 3u && r.engine == ENGI_DIGITAL && up_valid(&r)); up_migrate(&r); - bad += check(" a bank read keeps it engine 1 (its values DIGITAL's)", r.engine == ENGI_DIGITAL && up_value(&r, P_E4) == - (int16_t)(P_E4 % 100u)); + bad += check(" a bank read keeps it engine 1 (its values DIGITAL's)", r.engine == ENGI_DIGITAL && + up_value(&r, p_sid(P_E4)) == (int16_t)(P_E4 % 100u)); #else { /* (2.0) no DIGITAL record: UP_PUT refuses one; a bank's (and versions 1..3) are OLD FORMAT, their bytes kept */ up_rec_t keep = r; bad += check("(2.0) UP_PUT engine 1 (DIGITAL) -> args, the record unchanged", up_parse(a, n, &r, &slot) == 1 && !memcmp(&r, &keep, sizeof r)); *up_rec(30) = r; + up_rec(30)->ver = UP_VER; /* ((2.1) a record by count: UP_PUT's are version 6) */ + up_rec(30)->np = (uint8_t)(UP_PMAX * 2u); up_rec(30)->engine = ENGI_DIGITAL; ok = !up_used(30) && up_old(30); up_rec(30)->engine = 2; @@ -159,6 +160,7 @@ int main(void) up_rec(17)->ver = UP_VER_SID + 1u; bad += check("record with another version -> empty", !up_used(17)); up_rec(17)->ver = UP_VER_GRID; + up_rec(17)->np = (uint8_t)(UP_PMAX * 2u); /* ((2.1) a record by count: at most UP_PMAX * 2) */ bad += check("a version 3 record (a drum grid) is used", up_used(17)); /* a drum grid by UP_PUT: kind 1, then bit 7 of each step's hits (bit 0) and accents (bit 1) */ @@ -172,14 +174,12 @@ int main(void) g[m++] = 1; for (k = 0; k < 16u; k++) g[m++] = (uint8_t)(k == 2u ? 3u : k == 5u ? 2u : 0u); /* step 3: BELL hit + accent; 6: an accent alone */ - ok = up_parse(g, m, &got, &slot) == 0 && slot == 9u && got.ver == UP_VER_GRID && up_valid(&got) && - got.note[0] == 0x09u && got.flags[0] == 0x09u && got.note[1] == 0x08u && !got.flags[1] && - got.note[2] == 0x88u && got.flags[2] == 0x80u && got.note[5] == 0x08u && !got.flags[5] && - got.engine == ENGI_DRUM; - bad += check("UP_PUT kind 1: a grid record, accents only on hits", ok); + ok = up_parse(g, m, &got, &slot) == 0 && slot == 9u && got.ver == UP_VER_SID && up_valid(&got) && + !up_grid(&got) && got.engine == ENGI_DRUM; + bad += check("UP_PUT kind 1 (a grid): taken, (2.1) passed over", ok); g[m - 17u] = 0; /* kind 0: the notes and flags as before */ - ok = up_parse(g, m, &got, &slot) == 0 && got.ver == UP_VER && got.note[2] == 0x08u && got.flags[0] == 4u; /* (flags 0x7F: a tie) */ - bad += check("UP_PUT kind 0: a note pattern (version 2)", ok); + ok = up_parse(g, m, &got, &slot) == 0 && got.ver == UP_VER_SID && up_valid(&got) && !up_pat(&got); + bad += check("UP_PUT kind 0 (a note pattern): taken, passed over", ok); g[m - 17u] = 1; { up_rec_t keep = got; @@ -198,22 +198,25 @@ int main(void) st_save(OBJ_UPRESET0 + 1, &up_bank[1], sizeof up_bank[1]); memset(up_bank, 0, sizeof up_bank); up_bank_check(1, st_load(OBJ_UPRESET0 + 1, &up_bank[1], sizeof up_bank[1])); - bad += check("a grid record: bank round trip", up_used(20) && !memcmp(up_rec(20), &got, sizeof got)); + bad += check("its record: bank round trip", up_used(20) && !memcmp(up_rec(20), &got, sizeof got)); } #if FELUCCA_LEGACY /* ((2.0) the converter's) */ /* PHYS MODEL DRUM (before 1.0) -> the DRUM engine: from flash (a record of an older layout too), by UP_PUT */ { static const int16_t OLD[8] = {4, 70, 80, 60, 50, 110, 100, 70}, NEW[8] = {2, 70, 80, 60, 50, 110, 1, 0}; - up_rec_t d = r, m = r, o = r; - uint32_t k; + up_rec_t d, m, o; + uint32_t k, e = UP_PMAX * 2u - 8u; /* ((2.1) records by count, the most they hold: E0 at np - 8) */ + memset(&d, 0, sizeof d); + d.used = UP_USED; d.ver = UP_VER; d.np = (uint8_t)(UP_PMAX * 2u); memcpy(d.name, "Keys", 4); + m = o = d; d.engine = ENGI_PHYS; m.engine = ENGI_PHYS; /* MEMB: stays PHYS */ o.engine = ENGI_PHYS; - o.np = P_COUNT - 2u; /* an older layout: E0 at np - 8 */ + o.np = (uint8_t)(UP_PMAX * 2u - 2u); /* an older layout: E0 at np - 8 */ for (k = 0; k < 8u; k++) { - up_set_value(&d, P_E0 + k, OLD[k]); - up_set_value(&m, P_E0 + k, (int16_t)(k ? 9 : 2)); + up_set_value(&d, e + k, OLD[k]); + up_set_value(&m, e + k, (int16_t)(k ? 9 : 2)); up_set_value(&o, o.np - 8u + k, OLD[k]); } *up_rec(16) = d; @@ -226,7 +229,7 @@ int main(void) !memcmp(up_rec(17)->p, m.p, sizeof m.p) && up_used(18) && up_rec(18)->engine == ENGI_DRUM && up_rec(16)->ver == UP_VER; for (k = 0; k < 8u; k++) - ok &= up_value(up_rec(16), P_E0 + k) == NEW[k] && up_value(up_rec(18), o.np - 8u + k) == NEW[k]; + ok &= up_value(up_rec(16), e + k) == NEW[k] && up_value(up_rec(18), o.np - 8u + k) == NEW[k]; bad += check("bank load: PHYS DRUM -> DRUM engine, MEMB kept", ok); n = put_frame(a, 3, ENGI_PHYS, "Old kit", 0); for (k = 0; k < 8u; k++) { /* E0..E7 of the frame: OLD */ @@ -236,7 +239,7 @@ int main(void) } ok = up_parse(a, n, &got, &slot) == 0 && got.engine == ENGI_DRUM; for (k = 0; k < 8u; k++) - ok &= up_value(&got, P_E0 + k) == NEW[k]; + ok &= up_value(&got, p_sid(P_E0 + k)) == NEW[k]; bad += check("UP_PUT of PHYS DRUM -> DRUM engine", ok); } @@ -244,13 +247,18 @@ int main(void) * older layout too), by UP_PUT; the rest of the sound and the pattern as stored; another SET stays SAMPLE */ { static const int16_t KIT[8] = DRUM_KIT_E; - up_rec_t d = r, m = r, o = r, before; - uint32_t k; + up_rec_t d, m, o, before; + uint32_t k, e = UP_PMAX * 2u - 8u; /* ((2.1) as above) */ + memset(&d, 0, sizeof d); + d.used = UP_USED; d.ver = UP_VER; d.np = (uint8_t)(UP_PMAX * 2u); memcpy(d.name, "Keys", 4); + for (k = 0; k < 16u; k++) + d.note[k] = (uint8_t)(k % 3u ? 40u + k : 0u); /* (a pattern, as stored) */ + m = o = d; d.engine = m.engine = o.engine = ENGI_SAMPLE; - o.np = P_COUNT - 2u; /* an older layout: E0 at np - 8 */ + o.np = (uint8_t)(UP_PMAX * 2u - 2u); /* an older layout: E0 at np - 8 */ for (k = 0; k < 8u; k++) { - up_set_value(&d, P_E0 + k, (int16_t)(k ? 30 + k : SMP_SET_PERC)); - up_set_value(&m, P_E0 + k, (int16_t)(k ? 30 + k : 2)); /* FLUTE: stays SAMPLE */ + up_set_value(&d, e + k, (int16_t)(k ? 30 + k : SMP_SET_PERC)); + up_set_value(&m, e + k, (int16_t)(k ? 30 + k : 2)); /* FLUTE: stays SAMPLE */ up_set_value(&o, o.np - 8u + k, (int16_t)(k ? 30 + k : SMP_SET_PERC)); } *up_rec(19) = d; @@ -263,8 +271,8 @@ int main(void) !memcmp(up_rec(20)->p, m.p, sizeof m.p) && up_used(21) && up_rec(21)->engine == ENGI_DRUM && !memcmp(up_rec(19)->note, d.note, sizeof d.note) && !memcmp(up_rec(19)->flags, d.flags, sizeof d.flags); for (k = 0; k < 8u; k++) - ok &= up_value(up_rec(19), P_E0 + k) == KIT[k] && up_value(up_rec(21), o.np - 8u + k) == KIT[k]; - for (k = 0; k < P_E0; k++) + ok &= up_value(up_rec(19), e + k) == KIT[k] && up_value(up_rec(21), o.np - 8u + k) == KIT[k]; + for (k = 0; k < e; k++) ok &= up_value(up_rec(19), k) == up_value(&d, k); bad += check("bank load: SAMPLE PERC -> DRUM kit, FLUTE kept", ok); before = *up_rec(19); @@ -278,7 +286,7 @@ int main(void) } ok = up_parse(a, n, &got, &slot) == 0 && got.engine == ENGI_DRUM; for (k = 0; k < 8u; k++) - ok &= up_value(&got, P_E0 + k) == KIT[k]; + ok &= up_value(&got, p_sid(P_E0 + k)) == KIT[k]; bad += check("UP_PUT of SAMPLE PERC -> DRUM kit", ok); } #endif @@ -286,6 +294,7 @@ int main(void) /* map by count: a record from a build with 2 parameters fewer */ for (i = 0; i < P_COUNT; i++) def[i] = (int16_t)(1000 + i); + r.ver = UP_VER; /* ((2.1) UP_PUT's records are version 6) */ r.np = P_COUNT - 2u; for (i = 0; i < P_COUNT; i++) up_set_value(&r, i, (int16_t)(i % 100u)); @@ -306,9 +315,10 @@ int main(void) up_params(&r, v, def); ok = P_SLCR == 45 && P_SLDEPTH + 1 == P_M1SRC && P_M4AMT + 1 == P_FM1_ATK && P_FM4_LEVEL + 1 == P_CHRD && P_VOIC + 1 == P_LN0 && P_LN7 + 1 == P_DIR && P_DKREL + 1 == P_DTYPE && P_LDECAY7 + 1 == P_LSYNC && - P_ESYNC + 1 == P_LPAN0 && P_LPAN7 + 1 == P_E0 && P_E0 == 135 && P_COUNT == 143; /* ((Skiff) DIR, the ducking; - * phase 9: DRIVE, ENV 2, the lanes; 1.3: LFO SYNC TRIG POL, - * SPREAD, INSERT, ENV SYNC; (2.0, #36) the lane pans) */ + P_ESYNC + 1 == P_LPAN0 && P_LPAN7 + 1 == P_FOLLOW && P_FNOTE + 1 == P_E0 && P_E0 == 138 && + P_COUNT == 146; /* ((Skiff) DIR, the ducking; phase 9: DRIVE, ENV 2, the + * lanes; 1.3: LFO SYNC TRIG POL, SPREAD, INSERT, ENV SYNC; + * (2.0, #36) the lane pans; (2.1) the chord follow) */ for (i = 0; i < 45u; i++) ok &= v[i] == (int16_t)(2000 + i); for (i = P_SLCR; i < P_E0; i++) diff --git a/web/EDITOR_PROTOCOL.md b/web/EDITOR_PROTOCOL.md index df979ad..aab4efd 100644 --- a/web/EDITOR_PROTOCOL.md +++ b/web/EDITOR_PROTOCOL.md @@ -81,6 +81,13 @@ P_E0 117. No command changed. Projects keep 103 values a track (the layout befor them past 127). Projects (SKF4) and user presets (version 6) store parameters by stored id, so the pans are new ids and the engine values keep theirs: a record written before them loads with the lanes at C. +**Skiff 2.1 chord follow (146 parameters):** three track parameters, `FOLLOW` (135: OFF, T1..T6, the track whose +chords this one follows; never itself), `MODE` (136: KEY, SCALE, FIT) and `NOTE` (137: ROOT, LOW, HIGH, LAST), went +in before the engine parameters, which moved to 138..145: P_COUNT 146, P_E0 138. No command changed. Their stored ids +are 143..145 (a parameter added after the lane pans takes its id + 8), so a record written before them loads with +FOLLOW OFF. `UP_PUT` still takes a pattern after the values but stores none (as since 2.0): past 144 values a record +by count has no room for one, so the device keeps every user preset as version 6. + ## Framing A request is `F0 7D 46 4C F7`: @@ -493,7 +500,8 @@ grid lives in the steps themselves, so every engine has it: - **Sound loads and undo.** A load that changes a track's sound (`PRESET`, `SET` of `G_ENGSEL`, `UP_LOAD`, and the same on the device) changes the sound only: the engine and the parameters of the sound. It never changes the steps, nor the track's own parameters: `P_LEVEL`, `P_PAN`, `P_MUTE` (0, 39, 40), the - ARP pages, SCALE and LEN / DIV / SWING / GATE (17..32), the SLICER (45..48). It does drop the track's recorded + ARP pages, SCALE and LEN / DIV / SWING / GATE (17..32), the SLICER (45..48), CHORD (81, 82), DIR (91), DUCK + (92..94), (2.1) FOLLOW (135..137). It does drop the track's recorded motion (the device's SAVE held brings it back). (Before 1.0 a preset also set the arp and replaced the steps with its pattern; a factory preset turned the SLICER off.) The byte layout of every command is unchanged. Patterns are loaded on the device (SAVE > PATTERNS, PERFORM) or diff --git a/web/editor.html b/web/editor.html index f5b4b03..d2c003d 100644 --- a/web/editor.html +++ b/web/editor.html @@ -1700,8 +1700,10 @@ const P_LTUNE = Array.from({ length: 8 }, (_, i) => 101 + i), P_LDECAY = Array.f const P_LFO2 = [117, 118, 119], P_SPRD = 120, P_INSERT = [121, 122, 123, 124], P_IMIX = 125, P_ESYNC = 126; const P_LPAN = Array.from({ length: 8 }, (_, i) => 127 + i); /* (2.0, #36, P_COUNT 143, P_E0 135) core.h P_LPAN0..7: the DRUM lanes' PAN, sound parameters as the lane levels */ +const P_FOLLOW = [135, 136, 137]; /* (2.1, P_COUNT 146, P_E0 138) core.h P_FOLLOW P_FMODE P_FNOTE: the chord follow, the + track's */ const trackOwn = (i, pe0) => TRACK_OWN.has(i) || (pe0 >= 83 && P_CHORD.includes(i)) || (pe0 >= 92 && i === P_DIR) || - (pe0 >= 95 && P_DUCK.includes(i)); + (pe0 >= 95 && P_DUCK.includes(i)) || (pe0 >= 138 && P_FOLLOW.includes(i)); /* play a patch without writing flash, as UP_LOAD would load it: the sound only. SET the engine (G_ENGSEL: engine defaults and its first preset), then every instrument parameter that differs, except the track's own (TRACK_OWN). The steps are never touched. The device keeps a copy of the sound from before (SAVE held @@ -2135,7 +2137,7 @@ function makeMockDevice(opt = {}) { D("PITCH", F.BIPCT, -64, 63, 0), D("CUTOFF", F.BIPCT, -64, 63, 0), D("SHAPE", F.BIPCT, -64, 63, 0), D("AMP", F.PCT, 0, 127, 0), E("MODE", ["OFF", "UP", "DN", "UPDN", "RND", "ORD", "REPEAT", "DNUP", "UP+8", "CONV", "DIVG", "PINKY", "THUMB", "WALK", "CHORD"], 0), E("RATE", NDIV, 2), D("OCTAVE", F.INT, 1, 4, 1), D("GATE", F.PCT, 1, 127, 64), D("SWING", F.PCT, 0, 100, 0), D("CHANCE", F.PCT, 0, 127, 127), E("HOLD", NONOFF, 0), E("ORDER", ["NOTE", "PLAYED"], 0), - D("ROOT", F.NOTE, 0, 11, 0), E("SCALE", ["CHR", "MAJ", "MIN", "DOR", "MIX", "PEN", "MPEN", "HARM", "PHRY", "LYD", "LOC", "MEL", "BLUES", "WHOLE", "DIMHW", "DIMWH"], 0), E("QUANTIZE", ["OFF", "SNAP", "WHITE", "SEQ", "SEQ+T"], 0), D("TRANSP", F.SEMI, -24, 24, 0), + D("ROOT", F.NOTE, 0, 11, 0), E("SCALE", ["CHR", "MAJ", "MIN", "DOR", "MIX", "PEN", "MPEN", "HARM", "PHRY", "LYD", "LOC", "MEL", "BLUES", "WHOLE", "DIMHW", "DIMWH"], 0), E("QUANTIZE", ["OFF", "SNAP", "WHITE", "SEQ", "SEQ+T", "SOLO"], 0), D("TRANSP", F.SEMI, -24, 24, 0), D("LENGTH", F.STEPS, 1, 64, 16), E("DIV", NDIV, 2), D("SWING", F.PCT, 0, 100, 0), D("GATE", F.PCT, 1, 127, 127), /* ((2.0) 1 STEP) */ D("DIST", F.PCT, 0, 127, 0), D("CHORUS", F.PCT, 0, 127, 0), D("DELAY", F.PCT, 0, 127, 0), D("REVERB", F.PCT, 0, 127, 0), E("VOICE", ["POLY", "MONO", "LEG", "UNI"], 0), D("GLIDE", F.TIME, 0, 127, 0), D("PAN", F.BIPCT, -64, 63, 0), E("MUTE", NONOFF, 0), @@ -2389,7 +2391,9 @@ function makeMockDevice(opt = {}) { D("A", F.PCT, 0, 127, 64), D("B", F.PCT, 0, 127, 96), D("C", F.PCT, 0, 127, 96), D("MIX", F.PCT, 0, 127, 127)); TP.push(E("ENV SYNC", NONOFF, 0)); /* 126: (1.3) ENV SYNC ((2.0) on LFO 2: its whole name) */ for (let k = 0; k < 8; k++) TP.push(D("PAN", F.BIPCT, -64, 63, 0)); /* 127..134: (2.0, #36) the DRUM lanes' PAN */ - const P_COUNT = 143, G_COUNT = 27, NSTEP = 64, P_E0 = 135, G_ENGSEL = 20, P_SLCR = 45; + TP.push(E("FOLLOW", ["OFF", "T1", "T2", "T3", "T4", "T5", "T6"], 0), E("MODE", ["KEY", "SCALE", "FIT"], 0), + E("NOTE", ["ROOT", "LOW", "HIGH", "LAST"], 0)); /* 135..137: (2.1) the chord follow */ + const P_COUNT = 146, G_COUNT = 27, NSTEP = 64, P_E0 = 138, G_ENGSEL = 20, P_SLCR = 45; const clamp = (v, a, b) => Math.max(a, Math.min(b, v)); const enumOrig = (d, v) => d.fmt === F.ENUM && d.names ? aliasOf(d.names, v - d.min) + d.min : v; /* params.c enum_orig */ /* six tracks (firmware v3; Skiff phase 6), a synth part each; engine / preset / p / step below are the selected track's */ @@ -3337,7 +3341,7 @@ const HEAD_IC = { ENV: "function_env_adsr_exp", LFO: "waveform_sine", MOD: "symb GLOBAL: "symbol_cog", INSTRUMENT: "symbol_keyboard" }; /* ((1.3.1) Fukiai's filter names are mirrored: its "hpf_peak" glyph draws a low-pass with its resonance peak) */ const PAGE_IC = { FLT: "function_filter_hpf_peak", FILT: "function_filter_hpf_peak", DLY: "symbol_echo", REVERB: "symbol_spring", CHORUS: "symbol_waves", - SLICER: "symbol_grid", CHORD: "symbol_keyboard" }; + SLICER: "symbol_grid", CHORD: "symbol_keyboard", FOLLOW: "symbol_keyboard" }; /* WAVE / WAVE2 choices; phase-distortion shapes without a close glyph (SPLS, RSAW, RTRI, RTRP) get none */ const WAVE_IC = { SIN: "waveform_sine", TRI: "waveform_triangle_ac", SAW: "waveform_sawtooth_ac", SQR: "waveform_square", PLS: "waveform_pulse_quarter", PWM: "waveform_pulse_eighth", "S&H": "waveform_noise_step", NOIS: "waveform_noise_white", @@ -3993,7 +3997,7 @@ const EXPECT = { pcount: 91, gcount: 27, pe0: 83 }; /* the same layout without the chord keys (P_COUNT 89, P_E0 81), the FM operator ENVs too (69, 61) or the matrix (firmware 1.0: 57, 49) */ const knownLayout = (info) => info.gcount === EXPECT.gcount && - [[143, 135], [135, 127], [125, 117], [103, 95], [100, 92], [99, 91], [91, 83], [89, 81], [69, 61], [57, 49]].some(([c, e]) => info.pcount === c && info.pe0 === e); + [[146, 138], [143, 135], [135, 127], [125, 117], [103, 95], [100, 92], [99, 91], [91, 83], [89, 81], [69, 61], [57, 49]].some(([c, e]) => info.pcount === c && info.pe0 === e); const P = { LEVEL: 0, SLEN: 29 }; const LAYOUT = (pe0) => [ { t: "ENV", pages: [["ENV", 0, [1, 2, 3, 4]], ["ENV DEST", 0, pe0 >= 127 ? [5, 6, 7, P_ESYNC] : [5, 6, 7]], /* ((Skiff W5) P_ED_FX, @@ -4015,7 +4019,8 @@ const LAYOUT = (pe0) => [ { t: "FX", pages: [["FX", 0, [33, 34, 35, 36]], ...(pe0 >= 117 ? [["DRIVE", 0, [33, ...P_DRIVE]]] : []), ...(pe0 >= 127 ? [["INSERT", 0, P_INSERT], ["INSERT 2", 0, [P_IMIX]]] : []), /* ((1.3) the track's INSERT) */ ["SLICER", 0, [45, 46, 47, 48]], ...(pe0 >= 95 ? [["DUCK", 0, P_DUCK]] : []), ["DLY", 1, [4, 5, 6, 7]], ["REVERB", 1, [24, 8, 9]], ["CHORUS", 1, pe0 >= 117 ? [10, 11, 25, 26] : [10, 11]]] }, /* G_RTYPE 24: ROOM / SPRING */ - { t: "SCALE", pages: [["SCALE", 0, [25, 26, 27, 28]], ...(pe0 >= 83 ? [["CHORD", 0, P_CHORD]] : [])] }, /* CHRD VOIC 81, 82 */ + { t: "SCALE", pages: [["SCALE", 0, [25, 26, 27, 28]], ...(pe0 >= 83 ? [["CHORD", 0, P_CHORD]] : []), /* CHRD VOIC 81, 82 */ + ...(pe0 >= 138 ? [["FOLLOW", 0, P_FOLLOW]] : [])] }, /* ((2.1) FOLLOW MODE NOTE 135..137) */ { t: "ARP", pages: [["ARP", 0, [17, 18, 19, 20]], ["ARP 2", 0, [21, 22, 23, 24]]] }, { t: "SEQ PATTERN", tab: "seqgroups", pages: [["PATTERN", 0, [29, 30, 31, 32]], ...(pe0 >= 92 ? [["PLAY", 0, [P_DIR]]] : [])] }, { t: "GLOBAL", tab: "setgroups", pages: [["GLOBAL", 1, [0, 1, 2, 3]], ["SYSTEM", 1, [14]]] }, /* G_ROUTE: MIDI IN */ diff --git a/web/emu/felucca_web.c b/web/emu/felucca_web.c index 4c06659..8eb008b 100644 --- a/web/emu/felucca_web.c +++ b/web/emu/felucca_web.c @@ -254,6 +254,51 @@ static void cdc_task(void) {} /* --------------------------------------------------------- the device --- */ static uint32_t web_booted, web_boot_ms, web_last_frame; +#ifdef FOLLOW_DEMO +/* (2.1, a demo build only: EMU_CFLAGS=-DFOLLOW_DEMO) a song for the chord follow, PLAY to hear it: T1 SOFT PAD holds C Am + * F G a bar each; T2 SQR BASS's one-bar line and T3 SYNTH PLUCK's arp, both written in C, follow T1 (SCL > FOLLOW: KEY + * and SCALE, by its ROOT); T6 a beat */ +static void follow_demo(void) +{ + static const uint8_t CH[4][3] = {{60, 64, 67}, {57, 60, 64}, {53, 57, 60}, {55, 59, 62}}; + static const uint8_t BASS[16] = {36, 0, 48, 0, 36, 0, 43, 0, 36, 0, 48, 0, 46, 0, 43, 0}; + static const uint8_t ARP[16] = {60, 64, 67, 72, 67, 64, 60, 64, 60, 64, 67, 72, 76, 72, 67, 64}; + static const uint8_t BEAT[16] = {1, 0, 8, 0, 2, 0, 8, 0, 1, 0, 8, 1, 2, 0, 8, 8}; /* KICK 1, SNARE 2, CL HAT 8 */ + uint32_t k, i; + for (k = 0; k < NTRK; k++) { + track_defaults_steps(&trk[k]); + trk[k].p[P_SLEN] = 16; + } + for (k = 0; k < 3u; k++) { + track_t *t = &trk[k]; + set_engine_of(t, 0); + apply_preset_to(t, k == 0u ? 1u : k == 1u ? 2u : 8u); /* SOFT PAD, SQR BASS, SYNTH PLUCK */ + t->p[P_SCALE] = 1; + t->p[P_ROOT] = 0; + t->p[P_SDIV] = 2; + } + set_engine_of(&trk[NTRK - 1u], ENGI_DRUM); + apply_preset_to(&trk[NTRK - 1u], 0); + trk[0].p[P_SLEN] = 64; + for (i = 0; i < 64u; i++) + trk[0].step[i] = i % 16u ? (step_t){{0}, 0, ST_TIE, 0, 0} + : (step_t){{CH[i / 16u][0], CH[i / 16u][1], CH[i / 16u][2]}, 3, ST_NOTE, 0, 90}; + for (i = 0; i < 16u; i++) { + if (BASS[i]) + trk[1].step[i] = (step_t){{BASS[i]}, 1, ST_NOTE, 0, 110}; + trk[2].step[i] = (step_t){{ARP[i]}, 1, ST_NOTE, 0, (uint8_t)(i % 4u ? 70 : 100)}; + if (BEAT[i]) + trk[NTRK - 1u].step[i] = (step_t){{0}, 0, ST_NOTE, 0, 100, BEAT[i]}; + } + trk[1].p[P_SGATE] = 80; + trk[2].p[P_SGATE] = 50; + trk[1].p[P_FOLLOW] = trk[2].p[P_FOLLOW] = 1; /* (T1) */ + trk[1].p[P_FMODE] = FM_KEY; + trk[2].p[P_FMODE] = FM_SCALE; + song.g[G_BPM] = 108; +} +#endif + /* main.c fm1_main's boot, up to the main loop (no USB, no UART, no panel setup) */ static void web_power_on(void) { @@ -279,6 +324,9 @@ static void web_power_on(void) unit_g_adopt = ui_set_rev < 2u; /* main.c: (Skiff U3, R8) the unit's CLOCK MIDI IN TUNE */ autosave_boot(boot_clean); /* main.c: the last session's music (1.2, project.c) */ unit_g_boot(); +#ifdef FOLLOW_DEMO + follow_demo(); +#endif web_boot_ms = fm1_ms + 430u; /* main.c: 30 + 400 ms before the first frame */ web_booted = 1; } diff --git a/web/learn/index.html b/web/learn/index.html index edd83c9..eacf9cd 100644 --- a/web/learn/index.html +++ b/web/learn/index.html @@ -344,9 +344,9 @@ footer p { max-width: 1240px; margin: 6px auto; }

  • With Python

    -

    Without Chrome or Edge, or from a terminal: download skiff-2.0.3.fwsc from +

    Without Chrome or Edge, or from a terminal: download skiff-2.1.fwsc from the latest release and, with the repository's tools/ - folder and Python 3, run pip install mido python-rtmidi, then python tools/fm1_install.py skiff-2.0.3.fwsc. + folder and Python 3, run pip install mido python-rtmidi, then python tools/fm1_install.py skiff-2.1.fwsc. It does what the page does, and finishes an install left in update mode too, but it converts nothing: from 1.x or Felucca to 2.0, take a backup in the editor first and restore it after, and the Restore converts it.

  • diff --git a/web/test_web.mjs b/web/test_web.mjs index 8f2aaf9..d2ea659 100644 --- a/web/test_web.mjs +++ b/web/test_web.mjs @@ -52,24 +52,24 @@ async function editorMock() { const rq = async (r, o) => link.request(r, o); const info = E.parse[E.CMD.INFO](await rq(E.req.info())); ok(info.nengines === 15 && info.engines[1] === "-" && info.engines[12] === "FM6" && info.engines[13] === "SLICE" && info.engines[14] === "DRUM-X" - && info.engines[5] === "VOICE" && info.engines[6] === "TRIO" && info.engines[7] === "WHEEL" && info.engines[8] === "GRAIN" && info.engines[9] === "PHYS" && info.engines[10] === "DRUM" && info.engines[11] === "NOISE" && info.pcount === 143 && info.pe0 === 135 && info.engines[4] === "SAMPLE", - "editor: INFO (Skiff 2.0: P_COUNT 143, P_E0 135 from its wide-ids tag)"); + && info.engines[5] === "VOICE" && info.engines[6] === "TRIO" && info.engines[7] === "WHEEL" && info.engines[8] === "GRAIN" && info.engines[9] === "PHYS" && info.engines[10] === "DRUM" && info.engines[11] === "NOISE" && info.pcount === 146 && info.pe0 === 138 && info.engines[4] === "SAMPLE", + "editor: INFO ((2.1) P_COUNT 146, P_E0 138 from its wide-ids tag)"); { - /* (Skiff 1.3) wide ids: a track id from 128 on ((2.0) E0..E7 since P_E0 135, after the lane pans 127..134) goes as - scope 2 and comes back whole (GET, SET, DESC), in TRACK_PARAM's track byte (bit 6) and in a MOTION record's step - byte (bit 6); 127 (a lane's PAN) is still scope 0 */ - const v0 = E.parse[E.CMD.GET](await rq(E.req.get(0, 138))).value; - const a = E.req.set(0, 138, 10), s = E.parse[E.CMD.SET](await rq(a)), g = E.parse[E.CMD.GET](await rq(E.req.get(0, 138))); - const d = E.parse[E.CMD.DESC](await rq(E.req.desc(0, 142))); - const tp = E.parse[E.CMD.TRACK_PARAM](await rq(E.req.trackParam(3, 137))); + /* (Skiff 1.3) wide ids: a track id from 128 on ((2.0) E0..E7 since P_E0 135, after the lane pans 127..134; (2.1) P_E0 + 138, after the chord follow 135..137) goes as scope 2 and comes back whole (GET, SET, DESC), in TRACK_PARAM's track + byte (bit 6) and in a MOTION record's step byte (bit 6); 127 (a lane's PAN) is still scope 0 */ + const v0 = E.parse[E.CMD.GET](await rq(E.req.get(0, 141))).value; + const a = E.req.set(0, 141, 10), s = E.parse[E.CMD.SET](await rq(a)), g = E.parse[E.CMD.GET](await rq(E.req.get(0, 141))); + const d = E.parse[E.CMD.DESC](await rq(E.req.desc(0, 145))); + const tp = E.parse[E.CMD.TRACK_PARAM](await rq(E.req.trackParam(3, 140))); const e0 = E.req.get(0, 127); - const mo = E.parse[E.CMD.MOTION](await rq(E.req.motion(0, 3, { step: 5, param: 139, value: 9 }, info.ntrk))); - ok(a[1][0] === 2 && a[1][1] === 10 && s.scope === 0 && s.id === 138 && s.value === 10 && g.id === 138 && g.value === 10 && - d.scope === 0 && d.id === 142 && d.label === "KEYTRK" && tp.track === 3 && tp.id === 137 && e0[1][0] === 0 && e0[1][1] === 127 && - mo.events.some((e) => e.step === 5 && e.param === 139 && e.value === 9), - "editor: wide ids: SET / GET 138 and DESC 142 as scope 2, TRACK_PARAM 137 (bit 6), a motion record of 139; 127 scope 0"); + const mo = E.parse[E.CMD.MOTION](await rq(E.req.motion(0, 3, { step: 5, param: 142, value: 9 }, info.ntrk))); + ok(a[1][0] === 2 && a[1][1] === 13 && s.scope === 0 && s.id === 141 && s.value === 10 && g.id === 141 && g.value === 10 && + d.scope === 0 && d.id === 145 && d.label === "KEYTRK" && tp.track === 3 && tp.id === 140 && e0[1][0] === 0 && e0[1][1] === 127 && + mo.events.some((e) => e.step === 5 && e.param === 142 && e.value === 9), + "editor: wide ids: SET / GET 141 and DESC 145 as scope 2, TRACK_PARAM 140 (bit 6), a motion record of 142; 127 scope 0"); await rq(E.req.motion(0, 2, {}, info.ntrk)); - await rq(E.req.set(0, 138, v0)); + await rq(E.req.set(0, 141, v0)); } let descs = 0; for (let i = 0; i < info.pcount; i++) if (E.parse[E.CMD.DESC](await rq(E.req.desc(0, i))).label) descs++; @@ -120,6 +120,19 @@ async function editorMock() { const kept = E.parse[E.CMD.DUMP](await rq(E.req.dump()), info); ok(kept.p[81] === 2 && kept.p[82] === 4 && kept.preset === 3, "editor: a factory preset keeps CHRD and VOIC (the track's)"); await rq(E.req.set(0, 81, 0)); + /* (2.1) the chord follow (core.h P_FOLLOW P_FMODE P_FNOTE = 135..137, just before P_E0 138): the track's */ + const fd = []; + for (let i = 135; i < 138; i++) fd.push(E.parse[E.CMD.DESC](await rq(E.req.desc(0, i)))); + ok(fd.map((x) => x.label).join() === "FOLLOW,MODE,NOTE" && fd[0].names.join() === "OFF,T1,T2,T3,T4,T5,T6" && + fd[1].names.join() === "KEY,SCALE,FIT" && fd[2].names.join() === "ROOT,LOW,HIGH,LAST" && fd.every((x) => x.def === 0), + "editor: (2.1) the chord follow 135..137 over DESC"); + await rq(E.req.set(0, 135, 2)); + await rq(E.req.set(0, 136, 1)); + await rq(E.req.preset(0, 2)); + const fk = E.parse[E.CMD.DUMP](await rq(E.req.dump()), info); + ok(fk.p[135] === 2 && fk.p[136] === 1 && fk.preset === 2, "editor: a factory preset keeps the chord follow (the track's)"); + await rq(E.req.set(0, 135, 0)); + await rq(E.req.set(0, 136, 0)); /* the DRUM lane levels (core.h P_LN0..P_LN7 = 83..90, just before P_E0 91): percents, 100 % by default; the sound's, a factory preset sets them back */ const lanes = []; @@ -1209,7 +1222,7 @@ async function editorLive() { const dump = E.parse[C.DUMP](await pend, info); const ch = ev.pushes.find((f) => f.cmd === C.CHANGED); const cv = ch && E.parse[C.CHANGED](ch.a); - ok(dump.p.length === 143 && ch && ch.pending === C.DUMP && cv.scope === 0 && cv.id === 9 && cv.value === kn.value && !ev.unknown.length, + ok(dump.p.length === 146 && ch && ch.pending === C.DUMP && cv.scope === 0 && cv.id === 9 && cv.value === kn.value && !ev.unknown.length, "live: CHANGED while DUMP waits -> push handler, reply still matched"); const rl = m.sim.reload(); m.sim.step(3);