Skiff 1.3.3: QUARK's event display, and fixes from your comments and issues

- QUARK's scope is the 1.2 tour video's event display, live: every note a track plays sends particles out in its
  colour, and the calorimeter's towers rise with each track's level.
- HOME names the sound in the footer when it shows no lanes: MENU > DISPLAY > LARGE, and the scope (#22).
- PLAY on CLOCK USB or TRS with no clock coming says WAITING FOR USB CLOCK, then MENU > MIDI > CLOCK.
- The installer's way back to V15 says when the FM-1 already runs V15 or isn't running Skiff, instead of "Backup
  timed out"; the update-mode hint says to plug in without a hub or USB-sharing software (#23).
- On a drum track a step's chance, ratchet and condition cover every hit on it (README, Learn Skiff); the installer
  links Learn Skiff; a square picture for the Firmware Hub.
This commit is contained in:
illuminus5 committed 2026-10-19 16:48:50 -05:00
1 parent 07c7444808
commit c7d53d9cbf
18 files changed
+247 -59

No files matched your search

+4 -2
View File
@@ -432,8 +432,10 @@ collisions, dark matter, the hazard sign, the polar scope; `ui_quark.c`, its cir
its sine's end), FLANGER's and PHASER's response and REVERB's tail (its reflections towers, DAMP's share sparse);
CHORUS's copy ends in the electron, its FEEDBACK copy dotted; GLOBAL, FX's sends, LANES, WHEEL and SLICER calorimeter towers;
the roll's notes bubble tracks from their vertex (its cursor in gold corners); the drum grid's hits and PATTERN's steps
bunches. The scope (HOME tapped on HOME): the sound as an event, the wave wrapped round the detector, the
calorimeter's towers outside it as loud as it is there, a collision at its heart.
bunches. The scope (HOME tapped on HOME; 1.3.3, Q6): the 1.2 tour video's event display, live: each note a track
plays a collision at the vertex, three particles flying out in the track's colour and curling in the field, then
fading; round the beam pipe's rings the calorimeter, eight towers a track, as loud as the track is; the vertex gold,
brighter just after a hit. (It replaced Q5's wave wrapped round the detector.)
**The web editor looks like the unit** (1.0; `design/editor_looks.png` A BLOCKS, the user's pick over a softer app
look): the night, each section a tile, white values, Barlow Condensed for headings, labels and values, each track its
+13 -7
View File
@@ -14,7 +14,11 @@ synths and drums, patterns and songs, live performance, and a screen that shows
<img src="https://img.shields.io/badge/hardware-M--VAVE%20FM--1-555" alt="Hardware: M-VAVE FM-1">
</p>
<p align="center"><b>New in 1.3.2:</b> a stereo HALL reverb, <a href="https://illuminus5.github.io/skiff/try/">Skiff in
<p align="center"><b>New in 1.3.3:</b> QUARK's scope as the tour video's event display, live from all six tracks, and
fixes from your comments: HOME names the sound in LARGE too, PLAY says when it waits for an external clock, the
installer says what it found ·
<a href="https://github.com/illuminus5/skiff/releases/tag/v1.3.3">the release notes</a><br>
<b>New in 1.3.2:</b> a stereo HALL reverb, <a href="https://illuminus5.github.io/skiff/try/">Skiff in
your browser</a>, update mode on the screen and a finer vibrato ·
<a href="https://github.com/illuminus5/skiff/releases/tag/v1.3.2">the release notes</a><br>
<b>New in 1.3:</b> the FM-1's second core (BETA: 12 voices), MIDI LEARN and a channel per track,
@@ -51,12 +55,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 V15 firmware, saving a
complete backup of your music first.
**With Python 3:** download `skiff-1.3.2.fwsc` from the [latest release](https://github.com/illuminus5/skiff/releases/latest)
**With Python 3:** download `skiff-1.3.3.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-1.3.2.fwsc
python tools/fm1_install.py skiff-1.3.3.fwsc
```
It takes about two minutes and the FM-1 restarts on Skiff.
@@ -265,7 +269,8 @@ FM6 patches from `.syx` files and saves complete backups.
- **Sequencer:** 64 steps a track with chords, ties, accent, slide, velocity, per-step chance and trig
conditions (1:2, 3:4 ..), ratchets and **FLAM**, **NUDGE** (a step early or late, in 64ths), a step's own
GATE, play direction (FWD, RVRS, PING, RAND); SEQ › STEP as 16 tiles, the piano roll (ROLL), a drum grid
(white keys steps, black keys lanes); live loop recording with overdub, **FEEL** (recording keeps where you
(white keys steps, black keys lanes; a step's chance, ratchet and condition cover every hit on it); live loop
recording with overdub, **FEEL** (recording keeps where you
played), step recording, count-in and click. While playing, the step pages follow the playhead past step 16
(1.3); MENU › STEP PREVIEW sounds the step KNOB 1 lands on in the piano roll (1.3); QUANTIZE SEQ+T transposes the
sequencer's notes by TRANSP before it snaps them to the scale (1.3)
@@ -575,9 +580,10 @@ and control behaves, rule by rule: [DESIGN.md](DESIGN.md). The editor's protocol
**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-1.3.2.fwsc`): it finishes the install. 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.)
(or `python tools/fm1_install.py skiff-1.3.3.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.)
**A computer sees a USB device named WL80UBOOT** (or a USB mass-storage device with ID 4C4A:8057): that is the
chip's built-in boot mode, and the FM-1 can be brought back:
+24
View File
@@ -11,6 +11,9 @@ screens 2x, nearest), skiff-hub-2x.png.
RENDERS=~/skiff-fm6-ui/build/ui_new/ppm python3 hub_card.py -> design/mockups/hub_card_{a,b,c}.png, hub_cards.png;
docs/logo/skiff-hub.png, skiff-hub-2x.png
The hub shows pictures square, so the 2:1 card came out cropped and squeezed; (2026-10-18) the user's pick for a square
one, E (the icon and the word over HOME and the FM6 page):
RENDERS=... python3 hub_card.py square -> docs/logo/skiff-hub-square.png (480), skiff-hub-square-2x.png (960)
"""
import os
import sys
@@ -109,7 +112,28 @@ def card_c(z):
return im
def card_square(z):
"""(2026-10-18, the user's pick E) square, as the hub shows a picture (img/<id>.png: its lineup crops to 1:1, its list
is a 60 px box; the 2:1 card came out cropped and squeezed): the icon and the word over HOME and the FM6 page, 480 x
480 at z 1 (the screens 0.9x: drawn at z 2 and scaled down, so z 1 is z 2 resized)"""
im = Image.new("RGBA", (480 * z, 480 * z), (*NIGHT, 255))
icon(im, 20, 20, 176, z)
word(im, 214, 40, 6, z)
text(im, (216, 128), "six-track groovebox", 27, MID, z)
text(im, (216, 160), "for the M-VAVE FM-1", 27, MID, z)
for x, n in ((16, "SKIFF_six_home"), (248, "NEON_fm_op_tone")):
im.paste(screen(n, 2).resize((216 * z, 216 * z), Image.LANCZOS), (x * z, 248 * z))
ImageDraw.Draw(im).rectangle([x * z - 1, 248 * z - 1, (x + 216) * z, (248 + 216) * z], outline=(40, 40, 40))
return im
def main():
if "square" in sys.argv[1:]: # hub_card.py square: only the square picture
big = card_square(2).convert("RGB")
big.save(HERE.parent / "docs" / "logo" / "skiff-hub-square-2x.png", optimize=True)
big.resize((480, 480), Image.LANCZOS).save(HERE.parent / "docs" / "logo" / "skiff-hub-square.png", optimize=True)
print("skiff-hub-square.png, skiff-hub-square-2x.png")
return
out = HERE / "mockups"
for k, fn in (("a", card_a), ("b", card_b), ("c", card_c)):
fn(1).convert("RGB").save(out / f"hub_card_{k}.png", optimize=True)
Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

+2
View File
@@ -433,6 +433,8 @@ typedef struct track {
uint8_t ins_run; /* (Skiff 1.3) the INSERT runs (fx.c track_insert): on, or fading */
uint8_t lfo_wrap; /* (Skiff 1.3) the LFO's phase wrapped this block: its S&H is drawn after the tracks
* (voice.c track_lfo_end; in the pad before armp: track_t keeps its size) */
uint8_t hits; /* (Skiff Q6) its note-ons, counted (voice.c trk_note_on): QUARK's event display
* (ui_graph.c qk_detector; the pad's last byte) */
int16_t armp, aholdp; /* P_AMODE / P_AHOLD as last seen by the ISR */
/* engine switch (voice.c engine_block): the old engine's voices fade out, then it switches */
uint8_t xf_on, xf; /* fading; blocks of the fade still to render */
+1 -1
View File
@@ -32,7 +32,7 @@
#define FELUCCA_ID "FM-1_700" /* package identity (build.py: the .fwsc marker string) */
#endif
#ifndef FELUCCA_VERSION
#define FELUCCA_VERSION "v1.3.2" /* Skiff's; shown in the menu, the console and the editor; build.py --release X.Y */
#define FELUCCA_VERSION "v1.3.3" /* 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"
+15
View File
@@ -548,6 +548,21 @@ static void unit_g_poll(void)
settings_save();
}
}
/* every frame: PLAY with CLOCK USB or TRS follows that clock's pulses (seq.c events_block, midi_clock.c), so with none
* a second after the start the music stands still: say so, once a start, and where CLOCK is. (A comment on the Learn
* videos, 2026-10-19: PLAY and REC did nothing after the install till RESET SETTINGS; Skiff's first boot takes CLOCK
* from the session it restores, unit_g_boot) */
static void ui_way(const char *s, const char *way);
static void clock_wait_poll(void)
{
static uint8_t said;
if (!song.playing || !song.g[G_CLOCK] || midi_clock.have_pulse)
said = 0;
else if (!said && fm1_ms - midi_clock.start_ms >= 1000u) {
said = 1;
ui_way(song.g[G_CLOCK] == 1 ? "WAITING FOR USB CLOCK" : "WAITING FOR TRS CLOCK", "MENU > MIDI > CLOCK");
}
}
/* after the session came back (main.c, autosave_boot): the unit's into song.g; the first boot the other way */
static void unit_g_boot(void)
{
+5 -2
View File
@@ -579,6 +579,9 @@ static int32_t foot_hint_r(const char *ti)
{
return 232 - text_w(&AF_S, ti) - (ui.home || page_icon(cur_page()) == ICON_NONE ? 0 : 16) - 12;
}
/* (#22) HOME shows its lanes, which name every track's sound (ui_home.c); MENU > LARGE's tall cards and the scope (HOME
* tapped on HOME) have none, so there the footer names the sound instead of HOLD [HOME] SHIFT (both force a redraw) */
static int home_lanes(void) { return ui.home && !ui.home_scope && large_kind() != LK_TALL; }
static void draw_foot(void)
{
char s[48], pn[16], ti[20];
@@ -696,9 +699,9 @@ static void draw_foot(void)
ex = 8 + 16 + 5 + (ew < 80 ? ew : 80); /* (where the engine's name ends) */
tx = r - text_w(&AF_S, ti) - (pi != ICON_NONE ? 16 : 0);
(void)need;
if (ui.home && !ui_hints_off) /* Skiff BLOCKS on HOME: the lanes name the sounds; the hint */
if (home_lanes() && !ui_hints_off) /* Skiff BLOCKS on HOME: the lanes name the sounds; the hint */
cv_free_hint(8, ly, "HOLD [HOME] SHIFT", T_MID, T_BG, 160);
if ((ui.home && !ui_hints_off) || hints) { /* (an action page's or a grid's hints: the title) */
if ((home_lanes() && !ui_hints_off) || hints) { /* (an action page's or a grid's hints: the title) */
if (pi != ICON_NONE) {
GFX_HOOK_ALIGN(0, ly + AF_S_CAP_Y, 0, ly + AF_S_CAP_Y + AF_S_CAP_H, AL_V, "footer icons on the names' line");
cv_icon_in(tx, ly + AF_S_CAP_Y, 0, AF_S_CAP_H, 12, pi, T_MID, T_BG);
+75 -27
View File
@@ -2141,6 +2141,77 @@ static void draw_tracks(void)
cv_blit(0, graph_y() + graph_h() + 1u);
}
}
/* (Skiff Q6) QUARK: the scope as the 1.2 tour video's event display, live: each note a track plays is a collision at
* the vertex, three particles flying out of it in the track's colour and curling in the field (two events a track at a
* time; ANIM OFF: they appear whole), then fading; round the beam pipe's rings the calorimeter, eight towers a track,
* as loud as it is (muted: dark); the vertex gold, brighter just after a hit */
static struct {
uint32_t t0[NTRK][2], seed[NTRK][2], last; /* each event's fm1_ms and shape (0: none); the last draw's fm1_ms */
int16_t lv[NTRK]; /* the towers' levels, 0..1000, falling */
uint8_t seen[NTRK], nx[NTRK]; /* trk.hits as last seen; the event a new hit takes */
} qkd __attribute__((section(".pool"))); /* (.pool: not among the globals the audio ISR reaches) */
static void qk_detector(int32_t cx, int32_t cy)
{
int32_t R = cy - 3, k, j, fall;
uint32_t now = fm1_ms, newest = 1000u;
fall = (int32_t)(now - qkd.last > 500u ? 500u : now - qkd.last) * 2; /* (towers: all the way down in 0.5 s) */
qkd.last = now;
qk_disc(cx, cy, R * 58 / 100, ux_mix(T_THEME, T_SURF, 93)); /* (the glow round the beam) */
qk_ellipse(cx, cy, R * 19 / 100, R * 19 / 100, 0, ux_mix(T_THEME, T_SURF, 78), 24);
qk_dotring(cx, cy, R * 37 / 100, 40, ux_mix(T_THEME, T_SURF, 66));
qk_ellipse(cx, cy, R * 58 / 100, R * 58 / 100, 0, ux_mix(T_THEME, T_SURF, 70), 48);
qk_dotring(cx, cy, R * 76 / 100, 72, ux_mix(T_THEME, T_SURF, 50));
for (k = 0; k < NTRK; k++) {
track_t *t = &trk[k];
int32_t lv = t->p[P_MUTE] ? 0 : meter_px(t->peak) * 1000 / (TS_MH - 2);
t->peak = 0; /* (a max-hold, as the MIXER reads it) */
qkd.lv[k] = (int16_t)(lv > qkd.lv[k] - fall ? lv : qkd.lv[k] - fall);
if (t->hits != qkd.seen[k]) { /* struck: a new event, in place of its older one */
j = qkd.nx[k];
qkd.nx[k] ^= 1u;
qkd.seen[k] = t->hits;
qkd.t0[k][j] = now;
qkd.seed[k][j] = ((uint32_t)t->hits * 2654435761u ^ (uint32_t)k * 0x9E3779B9u) | 1u;
}
}
for (k = 0; k < 48; k++) { /* the calorimeter: the six tracks' towers in turn */
uint32_t ph = (uint32_t)k * (0xFFFFFFFFu / 48u), r = (uint32_t)k * 2654435761u >> 24; /* (r: its own reach) */
int32_t lv = qkd.lv[k % NTRK], r0 = R * 78 / 100, h = 1 + lv * (R * 22 / 100) * (600 + (int32_t)r * 400 / 255) / 1000000;
int32_t co = QK_COS(ph), si = QK_SIN(ph);
cv_line_t(cx + r0 * co / 32767, cy + r0 * si / 32767, cx + (r0 + h) * co / 32767, cy + (r0 + h) * si / 32767,
ux_mix(T_TRK(k % NTRK), T_SURF, 65 - lv * 65 / 1000), 2);
}
for (k = 0; k < NTRK; k++)
for (j = 0; j < 2; j++) {
uint32_t age = now - qkd.t0[k][j], seed = qkd.seed[k][j], u, i;
int32_t g, fade;
uint16_t col;
if (!seed || age >= 1100u)
continue;
newest = age < newest ? age : newest;
u = age >= 250u ? 0u : 1000u - age * 4u; /* (flying out over 250 ms, slowing) */
g = ui_prefs & PREF_ANIM_OFF ? 1000 : 1000 - (int32_t)(u * u / 1000u);
fade = age < 450u ? 0 : (int32_t)(age - 450u) * 100 / 650;
col = ux_mix(T_TRK(k), T_SURF, fade);
for (i = 0; i < 3u; i++) { /* three particles, each its own way */
uint32_t dir, e;
int32_t len, rc, curl, n;
seed = seed * 1103515245u + 12345u;
dir = seed * 2654435761u;
len = R * (34 + (int32_t)(seed >> 16) % 46) / 100;
rc = R * (15 + (int32_t)(seed >> 24) % 136) / 100;
curl = seed >> 3 & 1u ? 1 : -1;
n = len * g / 1000;
qk_track(cx + 1, cy, dir, rc, len, curl, ux_mix(col, T_SURF, 60), T_SURF, n); /* (its glow) */
e = qk_track(cx, cy, dir, rc, len, curl, col, T_SURF, n);
if (n)
cv_rect((int16_t)(e >> 16), (int16_t)e - 1, 2, 2, col); /* (the particle) */
}
}
qk_disc(cx, cy, newest < 150u ? 4 : 3, ux_mix(T_ACCENT, T_SURF, 60));
qk_disc(cx, cy, newest < 150u ? 3 : 2, T_ACCENT);
}
/* oscilloscope of the output, triggered on a rising zero crossing: a RAISE centre line, the trace 2 px (in silence
* a flat line on it; MENU > SCREEN OFF keeps it from staying on the panel for hours) */
static void graph_scope(uint16_t c)
@@ -2148,6 +2219,10 @@ static void graph_scope(uint16_t c)
static int16_t snap[SCOPE_N];
uint32_t w = scope_w, i, trig = 0;
int32_t cy = (int32_t)cv_h / 2, py = cy, x, peak = 1500, a = cv_h >= H_GRAPH ? 46 : cy - 6; /* (LARGE: the strip) */
if (ux.quark && cv_h >= H_GRAPH) {
qk_detector(120, cy);
return;
}
for (i = 0; i < SCOPE_N; i++) {
snap[i] = scope_buf[(w + i) & (SCOPE_N - 1u)];
if (snap[i] > peak)
@@ -2179,33 +2254,6 @@ static void graph_scope(uint16_t c)
}
return;
}
if (ux.quark && cv_h >= H_GRAPH) { /* (Skiff Q5) QUARK: the sound as an event: the wave wrapped round the
* detector (its radius the sound), the calorimeter's towers outside
* it as loud as it is there, a collision at its heart */
int32_t cx = 120, cc = (int32_t)cv_h / 2, k, qx0 = 0, qy0 = 0;
qk_ellipse(cx, cc, 22, 22, 0, T_LINE, 48);
qk_ellipse(cx, cc, 36, 36, 0, T_LINE, 64);
qk_ellipse(cx, cc, 50, 50, 0, T_DIM, 72);
for (k = 0; k <= 96; k++) {
uint32_t ph = (uint32_t)k * (0xFFFFFFFFu / 96u) - 0x40000000u; /* (from the top, clockwise) */
int32_t s = snap[trig + (uint32_t)(k % 96) * 2u], r = 36 + s * 12 / peak;
int32_t qx = cx + r * QK_COS(ph) / 32767, qy = cc + r * QK_SIN(ph) / 32767;
if (k)
cv_line_t(qx0, qy0, qx, qy, c, 2);
qx0 = qx;
qy0 = qy;
if (k % 4 == 0 && k < 96) {
int32_t e = (s < 0 ? -s : s) * 6 / peak, j;
for (j = 0; j <= e; j++) {
int32_t rr = 54 + j * 3;
cv_rect(cx + rr * QK_COS(ph) / 32767, cc + rr * QK_SIN(ph) / 32767, 2, 1,
ux_mix(T_ACCENT, T_REC, j * 100 / 7));
}
}
}
qk_burst(cx, cc, 6, ui.frame / 8u * 2654435761u + 1u, 16, T_SURF);
return;
}
if (ux.neon && cv_h >= H_GRAPH) { /* (Skiff N8) NEON: the sound as the skyline: the wave a ridge of
* vector mountains over the horizon, the striped sun behind it
* swelling with how loud it is, the floor running toward the viewer */
+1
View File
@@ -1281,6 +1281,7 @@ static void ui_input(void)
static uint8_t home_long; /* Skiff: HOME held past 0.7 s, the menu closed: MENU when let go */
fm6_poll(); /* FM6: PTCH turned -> its patch */
unit_g_poll(); /* ((Skiff U3, R8) the unit's CLOCK MIDI IN TUNE) */
clock_wait_poll(); /* (PLAY on an external clock that sends nothing: say so) */
bank_poll(); /* (Skiff) a pattern switched in live: what went out kept */
song_poll(); /* (Skiff phase 5) SONG: each track's next entry staged */
#if !FELUCCA_FM4
+21 -8
View File
@@ -75,21 +75,32 @@ static void qk_nucleus(int32_t x, int32_t y, uint16_t c, int32_t r)
cv_rect(x + r * 7 / 10, y - r * 3 / 10, 2, 2, T_ACCENT);
}
/* a dotted ring round (cx, cy), radius r, n dots */
static void qk_dotring(int32_t cx, int32_t cy, int32_t r, uint32_t n, uint16_t c)
{
uint32_t k;
for (k = 0; k < n; k++) {
uint32_t ph = k * (0xFFFFFFFFu / n);
cv_rect(cx + r * QK_COS(ph) / 32767, cy + r * QK_SIN(ph) / 32767, 1, 1, c);
}
}
/* a charged particle's track from (x, y), heading `dir` (a turn 2^32), curling one way (curl +-1) ever tighter as it
* slows, `len` px; its colour fading into `under` */
static void qk_track(int32_t x, int32_t y, uint32_t dir, int32_t r, int32_t len, int32_t curl, uint16_t c, uint16_t under,
int bubbles)
* slows, `len` px, its first n drawn ((Skiff Q6) n < len: still flying out); its colour fading into `under`;
* -> where it has got to, x << 16 | y */
static uint32_t qk_track(int32_t x, int32_t y, uint32_t dir, int32_t r, int32_t len, int32_t curl, uint16_t c,
uint16_t under, int32_t n)
{
int32_t dx = QK_COS(dir) / 8, dy = QK_SIN(dir) / 8, fx = x << 12, fy = y << 12, k; /* (Q12) */
for (k = 0; k < len; k++) {
for (k = 0; k < n; k++) {
int32_t rr = r - r * 6 * k / (10 * len), t = 4096 / (rr > 4 ? rr : 4) * curl, ndx = dx - dy * t / 4096;
dy += dx * t / 4096;
dx = ndx;
fx += dx;
fy += dy;
if (!bubbles || !(k & 1))
cv_rect(fx >> 12, fy >> 12, 1, 1, ux_mix(c, under, 65 * k / len));
cv_rect(fx >> 12, fy >> 12, 1, 1, ux_mix(c, under, 65 * k / len));
}
return (uint32_t)(fx >> 12) << 16 | ((uint32_t)(fy >> 12) & 0xFFFFu);
}
/* a collision at (x, y): n tracks out of it, each its colour charge, curling its own way (seed: which way) */
@@ -97,9 +108,11 @@ static void qk_burst(int32_t x, int32_t y, uint32_t n, uint32_t seed, int32_t le
{
uint32_t k;
for (k = 0; k < n; k++) {
int32_t l;
seed = seed * 1103515245u + 12345u;
qk_track(x, y, k * (0xFFFFFFFFu / n) + (seed >> 6 & 0x0FFFFFFFu), 10 + (int32_t)(seed >> 26) % 30,
len / 2 + (int32_t)(seed >> 20) % (len / 2 + 1), (seed >> 16) & 1u ? 1 : -1, T_TRK(k), under, 0);
l = len / 2 + (int32_t)(seed >> 20) % (len / 2 + 1);
qk_track(x, y, k * (0xFFFFFFFFu / n) + (seed >> 6 & 0x0FFFFFFFu), 10 + (int32_t)(seed >> 26) % 30, l,
(seed >> 16) & 1u ? 1 : -1, T_TRK(k), under, l);
}
qk_disc(x, y, 1, T_TEXT);
}
+1
View File
@@ -428,6 +428,7 @@ static void trk_note_on(track_t *t, uint32_t note, uint32_t vel)
return;
}
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) */
for (i = 0; i < NVOICE; i++)
any |= t->v[i].gate;
+58 -4
View File
@@ -1004,6 +1004,56 @@ static int test_home_footer(void)
return check("#3 HOME after SEQ's first page (the tiles, a drum grid): the footer as after any other page", ok);
}
/* (#22) HOME without its lanes (MENU > LARGE's tall cards; the scope, HOME tapped on HOME): the footer names the track's
* engine and sound, as with HINTS OFF, not HOLD [HOME] SHIFT; with the lanes the hint stays */
static int test_home_names(void)
{
static uint16_t named[240 * 240];
uint32_t at = foot_y() * 240u, sz = 240u * foot_h() * sizeof *named, k, ok = 1;
for (k = 0; k < 3u; k++) { /* LARGE, the scope, the lanes */
ui_power_on();
ui_prefs = k == 0u ? PREF_LARGE : 0u;
if (k == 1u)
press(B_HOME); /* (on HOME: the scope) */
ui_hints_off = 1;
ui.force = 1;
frame();
memcpy(named, host_screen, sizeof named);
ui_hints_off = 0;
ui.force = 1;
frame();
ok &= ui.home && ui.home_scope == (k == 1u) && !memcmp(named + at, host_screen + at, sz) == (k < 2u);
}
ui_prefs = 0;
return check("#22 HOME with LARGE or the scope: the footer names the sound (HINTS ON as OFF); the lanes keep the hint",
ok);
}
/* (a Learn video comment, 2026-10-19) PLAY on CLOCK USB with no clock coming: a second on, WAITING FOR USB CLOCK, then
* where CLOCK is; once a start. With the clock's pulses: nothing */
static int test_clock_wait(void)
{
uint32_t ok;
ui_power_on();
song.g[G_CLOCK] = 1;
press(B_PLAY); events_block(32);
frames(800);
ok = song.playing && !msg_is("WAITING FOR USB CLOCK");
frames(300);
ok &= msg_is("WAITING FOR USB CLOCK") && str_eq(ui.msg2, "MENU > MIDI > CLOCK");
ui.msg_t = 0; ui.msg2[0] = 0;
frames(2000);
ok &= !msg_is("WAITING FOR USB CLOCK"); /* (once) */
stop_transport(); frame();
press(B_PLAY); events_block(32);
midi_clock_pulse(fm1_ms); /* (the clock comes) */
frames(1500);
ok &= song.playing && !msg_is("WAITING FOR USB CLOCK");
song.g[G_CLOCK] = 0;
stop_transport(); frame();
return check("PLAY on CLOCK USB with no clock: WAITING FOR USB CLOCK, MENU > MIDI > CLOCK, once; with pulses, quiet", ok);
}
/* (#10) a drum track's grid at one height on SEQ's pages: STEP drew it from the panel's top (cv_oy 0), CHANCE and PLAY
* centred (pad lower) */
static int test_grid_rows(void)
@@ -6974,7 +7024,7 @@ static int test_u4(void)
"SAVED UNTIL POWER OFF", "RENAMED UNTIL POWER OFF", "ERASED UNTIL POWER OFF", "STORAGE ERROR", "KEYS RECORD LANES",
"HOLD [GLO]: SHORTCUTS", "HOLD [EDIT]: SHORTCUTS", "SOUND INITIALIZED", "PATTERN 06 CLEARED", "UNDONE: SEQUENCE",
"SESSION NOT RESTORED", "IT STOPPED BEFORE", "HOLD [SAVE]: UNDO", "PICK WITH A KNOB FIRST", "ONE LAYER AT A TIME",
"TAP 2 MORE", "SETTINGS RESET"};
"TAP 2 MORE", "SETTINGS RESET", "WAITING FOR USB CLOCK", "WAITING FOR TRS CLOCK", "MENU > MIDI > CLOCK"};
int bad = 0, ok = 1;
uint32_t i;
const char *u;
@@ -7486,15 +7536,17 @@ static int test_large(void)
press(B_HOME);
bad += check("#15 MENU > LARGE: OFF by default, under COLOR; KNOB 1 right / OCT+ ON, left / OCT- OFF", ok && !ui.menu);
/* HOME: tall cards (rows 28..132) and the strip (136..198); the footer as it was */
/* HOME: tall cards (rows 28..132) and the strip (136..198); (#22) no lanes, so the footer names the sound, not the hint */
frame();
ok = ui.home && large_kind() == LK_TALL && card_h() == LG_CARD_H && graph_y() == LG_Y_GRAPH && strip_kind() == SK_SCOPE;
ok &= lg_px(30, Y_SEP_END + 1) == T_SURF && off[(Y_SEP_END + 1) * 240 + 30] == swap16(T_BG); /* a card where the gap was */
ok &= lg_px(30, LG_Y_GRAPH + 1) == T_SURF;
for (c = 0; c < 4u; c++) /* each column's K pill, over its knob */
ok &= lg_px(CARD_X(c) + 8, Y_LABEL + LG_MY + LG_MH / 2) == T_KEY;
ok &= !memcmp(off + foot_y() * 240, host_screen + foot_y() * 240, 240u * foot_h() * sizeof *off);
bad += check("#15 LARGE ON: HOME's cards tall (a K1..K4 pill over each column), the scope a strip, the footer kept", ok);
ok &= memcmp(off + foot_y() * 240, host_screen + foot_y() * 240, 240u * foot_h() * sizeof *off) != 0; /* (its
* pixels as HINTS OFF's: test_home_names) */
bad += check("#15 LARGE ON: HOME's cards tall (a K1..K4 pill over each column), the scope a strip, the footer the sound's",
ok);
/* the value in L: GLOBAL's BPM 124 stands about twice as tall as in M */
go_title("GLOBAL"); frame();
@@ -8249,6 +8301,8 @@ int main(void)
bad += test_tracks();
bad += test_grid();
bad += test_home_footer();
bad += test_home_names();
bad += test_clock_wait();
bad += test_grid_rows();
bad += test_mixer_no_flash();
bad += test_screen();
+1 -1
View File
@@ -166,7 +166,7 @@ export class BackupConnection {
async request([cmd, args], opt = {}) {
if (this.pending || this.closed || this.input.state === "disconnected" || this.output.state === "disconnected") throw new Error("Backup connection closed or busy");
return new Promise((resolve, reject) => {
const timer = setTimeout(() => { this.pending = null; reject(new Error("Backup timed out. Keep the FM-1 connected and stopped.")); }, opt.timeout || 1200);
const timer = setTimeout(() => { this.pending = null; reject(Object.assign(new Error("Backup timed out. Keep the FM-1 connected and stopped."), { code: "timeout" })); }, opt.timeout || 1200);
this.pending = { cmd, timer, resolve, reject };
try { this.output.send([240, 125, 70, 76, cmd, ...args, 247]); }
catch (e) { clearTimeout(timer); this.pending = null; reject(e); }
+16 -5
View File
@@ -50,6 +50,7 @@
<p id="status"></p>
<pre id="log"></pre>
<p><a href="../editor/" style="color:inherit" data-t="editor"></a></p>
<p><a href="../../learn/" style="color:inherit" data-t="learn"></a></p>
<p class="small">Skiff by illuminus5, built on Felucca by Leo Kuroshita (@kurogedelic), <a href="https://hugelton.com" target="_blank" rel="noopener" style="color:inherit">Hügelton Instruments</a>, with its CrispyZebra waveforms, drum voices, Sample Pack and Fukiai icons (MIT).<br>
Font: Barlow Condensed (The Barlow Project Authors, SIL OFL 1.1). DRUM-X: JIANT FM by juanjiant-bit (GPL-3.0). Samples: Versilian Studios VSCO-2 Community Edition and VCSL (CC0 1.0).<br>
FM6 engine: msfa from Dexed (Google Inc., Pascal Gauthier, Apache-2.0). The package also holds three JieLi AC79 SDK files, uboot.boot, cfg_tool.bin and eq_cfg_hw.bin (JieLi Technology, Apache-2.0). <a href="../../firmware/LICENSING.md" style="color:inherit">Licences</a>: <a href="../../firmware/LICENSE" style="color:inherit">GPL-3.0</a>, <a href="../../firmware/LICENSES/Apache-2.0.txt" style="color:inherit">Apache-2.0</a>, <a href="../../firmware/LICENSES/" style="color:inherit">all</a>.<br>
@@ -65,6 +66,7 @@ const TEXT = {
warn: "書き込み中は USB を抜かないでください。",
install: "インストール", other: "English",
editor: "エディタ(インストール後、パソコンから音色やシーケンスを編集)",
learn: "Learn Skiff(使い方ガイド。章ごとに解説動画つき・英語のみ)",
direct: "USB ケーブルはパソコンに直接つないでください。Probe や Transporter などの機材は不要です。",
brick: "万一インストールに失敗して起動しなくなった場合は、復旧に Transporter が必要です:",
beta: "Skiff はカスタムファームウェアです。不具合は GitHub で知らせてください。このカスタムファームウェアを使ったことで FM-1 が壊れたり不具合が起きたりしても、作者は一切の責任を負いません。自己責任でお使いください。",
@@ -74,7 +76,9 @@ const TEXT = {
stockRecovery: "更新中断の再開:全体バックアップはすでにパソコンへ保存済み",
stockValid: "公式V15を確認しました", stockConfirm: "全体バックアップファイルをパソコンに保存できましたか? 続けると公式V15へ戻します。Skiff の曲は公式V15では開けません。",
stockNeedBackup: "書き込みモードからはバックアップできません。保存済みバックアップがある場合だけ、更新中断の再開にチェックしてください。",
stockUnsupported: "この Skiff は全体バックアップに未対応です。先に最新版をインストールしてください。",
stockUnsupported: "このファームウェアは Skiff の全体バックアップを作れません。古い Skiff なら先に最新版をインストールしてください。他のファームウェアから V15 へ戻すには M-VAVE のアップデーターを使ってください。",
stockIsV15: "この FM-1 はすでに公式 V15 です。",
stockNotSkiff: "この FM-1 は Skiff ではないため、バックアップする Skiff の曲はありません。他のファームウェアから V15 へ戻すには M-VAVE のアップデーターを使ってください。FM-1 の報告: ",
backup: "全体バックアップ保存中 ", stockError: "公式ファイルを確認できません: ",
nomidi: "このブラウザでは使えません。Chrome か Edge で開いてください。", loadfail: "読み込めませんでした: ",
start: "開始します", verify: "確認中", loader: "書き込みモードに切り替え中", write: "書き込み中",
@@ -84,7 +88,7 @@ const TEXT = {
notfound: "FM-1 が見つかりません。USB ケーブル(データ通信用か)を確かめ、MIDI を使う他のアプリを閉じてから、もう一度押してください。",
model: "接続されている機器は FM-1 ではありません。",
lost: "USB の接続が切れました。挿し直してもう一度押してください。",
noloader: "書き込みモードの FM-1 が見つかりません。USB を挿し直してもう一度押してください(終わるまで書き込みモードのままです)。",
noloader: "書き込みモードの FM-1 が見つかりません。USB をハブや USB 共有ソフトを通さずパソコンに直接挿し直して、もう一度押してください(終わるまで書き込みモードのままです)。",
noreturn: "FM-1 が戻ってきません。電源を入れ直してください。",
mismatch: "書き込みは終わりましたが、FM-1 が別のバージョンを報告しています: ",
badpkg: "インストールするファイルが壊れています。ページを再読み込みしてください。",
@@ -96,6 +100,7 @@ const TEXT = {
warn: "Do not unplug the USB cable while writing.",
install: "Install", other: "日本語",
editor: "Editor (after installing: edit sounds and sequences from the computer)",
learn: "Learn Skiff (the manual, with a video for every chapter)",
direct: "Connect the USB cable directly to the computer. No probe or Transporter is needed.",
brick: "If an install fails and the FM-1 no longer starts, recovering it needs a Transporter:",
beta: "Skiff is custom firmware; please report problems on GitHub. The author accepts no responsibility if your FM-1 is damaged or misbehaves because of this custom firmware. Use it at your own risk.",
@@ -105,7 +110,9 @@ const TEXT = {
stockRecovery: "Resume an interrupted update: I already saved a complete backup to this computer",
stockValid: "Official V15 verified", stockConfirm: "Has the complete backup file been saved to this computer? Continue to return to official V15. Official V15 cannot open Skiff music.",
stockNeedBackup: "An update loader cannot export a backup. Only select resume if you already saved a complete backup.",
stockUnsupported: "This Skiff does not support complete backups. Install the current Skiff first.",
stockUnsupported: "This firmware cannot make a complete Skiff backup. An older Skiff: install the current Skiff first. Another firmware: return to V15 with M-VAVE's updater.",
stockIsV15: "This FM-1 already runs official V15.",
stockNotSkiff: "This FM-1 is not running Skiff, so there is no Skiff music to back up. To return to V15 from another firmware, use M-VAVE's updater. The FM-1 reports: ",
backup: "Saving complete backup ", stockError: "Cannot validate official firmware: ",
nomidi: "This browser cannot do it. Open the page in Chrome or Edge.", loadfail: "Could not load: ",
start: "Starting", verify: "Verifying", loader: "Switching to update mode", write: "Writing",
@@ -115,7 +122,7 @@ const TEXT = {
notfound: "FM-1 not found. Check the USB cable (a data cable), close other apps that use MIDI, and press Install again.",
model: "The connected device is not an FM-1.",
lost: "The USB connection was lost. Replug it and press Install again.",
noloader: "The FM-1 in update mode was not found. Replug the USB cable and press Install again (it stays in update mode until it is finished).",
noloader: "The FM-1 in update mode was not found. Replug the USB cable straight into the computer (not through a hub or USB-sharing software) and press Install again (it stays in update mode until it is finished).",
noreturn: "The FM-1 did not come back. Power-cycle it.",
mismatch: "Written, but the FM-1 reports another version: ",
badpkg: "The file to install is damaged. Reload the page.",
@@ -234,8 +241,12 @@ $("stock-go").addEventListener("click", async () => {
const device = await up.find(id => id.model === "FM-1");
if (!device) { sayK("notfound"); return; }
const input = device.link.input, output = device.link.output; device.link.close();
if (device.id.text === "FM-1_015") { sayK("stockIsV15"); return; } // (#23: it is official V15 already)
link = new BackupConnection(input, output);
const info = archiveInfo(await link.request([1,[]]));
let reply; // every Skiff answers INFO: no answer, no Skiff (#23 read "Backup timed out")
try { reply = await link.request([1,[]]); }
catch (e) { if (e.code !== "timeout") throw e; sayK("stockNotSkiff", device.id.text); return; }
const info = archiveInfo(reply);
if (!info.supported) { sayK("stockUnsupported"); return; }
const archive = await captureBackup((r,o) => link.request(r,o), info.version,
(done,total) => sayK("backup", `${Math.round(done / Math.max(1,total) * 100)}%`));
+3 -1
View File
@@ -874,7 +874,9 @@ footer p { max-width: 1240px; margin: 6px auto; }
<li class="step" id="variation/cond">
<h3>Conditions</h3>
<p><kbd>KNOB 4</kbd>, COND: when the step plays at all. FILL plays it only during a fill, !FILL only when there's none; A:B plays
it in pass A of every B, counted from PLAY (1:2, 2:2, 1:3 … 4:4). Step 9's kick at 1:2 plays in the first bar of every two.</p>
it in pass A of every B, counted from PLAY (1:2, 2:2, 1:3 … 4:4). Step 9's kick at 1:2 plays in the first bar of every two.
On a drum track the condition is the step's, so every hit on that step follows it, as with CHANCE and RATCH: a sound that needs
its own goes on a track of its own.</p>
</li>
<li class="step" id="variation/fill">
<h3>A fill</h3>
+7 -1
View File
@@ -2,7 +2,7 @@
// Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments
// fm1backup.js against a simulated device: 7-bit packing, CRC, manifest checks, a full capture,
// validation before the first write, restore order (live music last) and abort on a failed chunk.
import { BACKUP_IDS, BACKUP_CMD, bkU32, bkR32, bkPack, bkUnpack, bkCrc, bkManifest, readBackup, captureBackup, restoreBackup } from "./fm1backup.js";
import { BACKUP_IDS, BACKUP_CMD, bkU32, bkR32, bkPack, bkUnpack, bkCrc, bkManifest, readBackup, captureBackup, restoreBackup, BackupConnection } from "./fm1backup.js";
let fails = 0;
const ok = (c, what) => { console.log(`${what.padEnd(72)} ${c ? "ok" : "FAIL"}`); if (!c) fails++; };
@@ -118,6 +118,12 @@ ok([0, 1, 2, 6].every((id) => target.objs.get(id).every((v, i) => v === objs.fin
}
const failing = device([], { failChunk: 2 });
ok(await athrows(() => restoreBackup(failing.request, file)) && failing.log.includes("abort 2") && !failing.log.includes(0), "backup: a refused chunk aborts that object and stops before the live music");
{ // (#23) nobody answers: code "timeout", which the installer reads as "not running Skiff" (every Skiff answers INFO)
const link = new BackupConnection({ state: "connected" }, { state: "connected", send() {} });
const e = await link.request([1, []], { timeout: 5 }).catch((x) => x);
link.close();
ok(e?.code === "timeout", "backup: an unanswered request times out with code timeout");
}
console.log(fails ? `BACKUP WEB TESTS FAILED (${fails})` : "backup web tests passed");
process.exit(fails ? 1 : 0);