Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ the project file format or the controls.
velocity (the quiet ones most), opens a HAT track's off-beat hats from +32 when its OPN is up,
and never puts three ghosts in a row on a track. Down thins a HAT track's 16ths, then its
beats, and the off-beat hats last.
- **With TEMPO GUARD on, a plain turn of VALUE is ENERGY** where it would have been the tempo, as
FUNC + turn is, under any clock (the second review, 2026-11-30). A tap still shows the tempo
and leaves it.

- **VA POLY and WAVE POLY: the filter follows the keys.** Above middle C the cutoff rises three
quarters of an octave for each octave played, so the top notes of a chord keep their
harmonics. Middle C and everything below it sound as before. Projects with high chords on
Expand Down
16 changes: 9 additions & 7 deletions app/ui_gestures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@
}

// TEMPO GUARD (FUNC menu; review 2026-11-29, proposal 9): VALUE is the tempo on most screens,
// and a hand brushing it moved the BPM mid-set. With the guard on, a plain turn or a tap of
// VALUE where it would set the tempo shows the tempo and changes nothing; the row is turned
// off to change it (Roland, 2026-11-30, over push + turn, which is swing). The nudge,
// VariSpeed and a section's BPM are moves of their own and still play. True if refused.
// and a hand brushing it moved the BPM mid-set. With the guard on, a tap of VALUE where it
// would set the tempo shows the tempo and changes nothing, and a plain turn there is ENERGY,
// as FUNC + turn is (the second review, 2026-11-30, proposal 10: the knob the guard frees is
// the performance knob). The row is turned off to change the tempo (Roland, 2026-11-30, over
// push + turn, which is swing). The nudge, VariSpeed and a section's BPM are moves of their
// own and still play. True if refused.
bool tempo_guarded() const { return engine_.project().settings.tempo_guard; }

bool tempo_guard_refuses() {
Expand Down Expand Up @@ -184,11 +186,12 @@
post(Cmd::set_pattern_swing, 0, 0, 0, clamp_delta(delta), kDeltaFlag);
return;
}
if (fn) {
if (fn || tempo_guarded()) {
// FUNC + VALUE is ENERGY (core/energy.hpp), on every screen, an effect picked or
// not: the signature move gets the one gesture that needs no screen (the 2026-11-29
// review, proposal 2). It was the master DJ filter until 2026-11-25 (backlog D1),
// then VariSpeed until it moved to PERFORM's FUNC + C, where ENERGY was.
// then VariSpeed until it moved to PERFORM's FUNC + C, where ENERGY was. With
// TEMPO GUARD on, the plain turn too, under any clock: ENERGY is not the tempo.
energy_turn_by(delta);
return;
}
Expand All @@ -201,7 +204,6 @@
notice("EXT CLOCK");
return;
}
if (tempo_guard_refuses()) return;
// Clamped as a SIGNED value, before the cast. `tempo_tenths_` is unsigned, so a
// delta large enough to take the sum below zero used to wrap to about four billion
// and then clamp to 3000 -- 300 BPM -- when the user was turning the knob DOWN. Not
Expand Down
6 changes: 3 additions & 3 deletions core/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@ constexpr Text kMenu = {"FUNC MENU:", {

// TEMPO GUARD, the FUNC menu's row that keeps VALUE off the tempo during a set.
constexpr Text kTempoGuard = {"TEMPO GUARD:", {
"ON: VALUE TURN OR TAP",
"SHOWS THE TEMPO AND",
"LEAVES IT",
"ON: A VALUE TURN IS",
"ENERGY A TAP SHOWS",
"THE TEMPO",
"OFF TO CHANGE TEMPO",
"STILL PLAY: NUDGE",
"VARISPEED AND SWING",
Expand Down
4 changes: 2 additions & 2 deletions docs/CHEATSHEET.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ each line means.
| VALUE push + turn | Pattern swing |
| Tap VALUE, three times or more | Tap tempo where VALUE turns the tempo (`TAP 128.0`) once two gaps agree, from the last four taps; a 2 s gap starts again |
| FUNC + SEL< / SEL> | **TRANSPOSE**: the melodic tracks (VAs, WAVEs, FM4, GRAIN, unsliced SAMPLE) a scale step down / up, -12..+12, on every screen (`TRANSPOSE +2 IN KEY`); the FUNC menu's TRANSPOSE row on SEMI makes it semitones, the key moving too (`TRANSPOSE +3 C`). Both screen keys together back to 0. Drums, sliced samples and MID stay. Not saved; in a LOCK |
| FUNC + VALUE turn | **ENERGY**, on every screen: from a breakdown (-64) to the peak (+64), two counts a click (`ENERGY -20`). Rest is a detent; FUNC + tap VALUE (no effect picked) drops back to 0. A turn keeps FUNC's layer until the knob rests, so FUNC let go mid-turn moves no tempo |
| FUNC + VALUE turn | **ENERGY**, on every screen (with TEMPO GUARD on, the plain turn too, where VALUE would be the tempo): from a breakdown (-64) to the peak (+64), two counts a click (`ENERGY -20`). Rest is a detent; FUNC + tap VALUE (no effect picked) drops back to 0. A turn keeps FUNC's layer until the knob rests, so FUNC let go mid-turn moves no tempo |
| FUNC + push VALUE + turn | Nudge: 4% faster or slower for 250 ms a detent, then back to the set tempo (`NUDGE FASTER`) |
| Push VALUE + STEP, CLR, LEFT/RIGHT | The performance mixer (below) |
| FUNC + push A / B / C | Master kill EQ: kill LOW / MID / HI, again to bring it back (`KILL LOW`, `LOW BACK`). Performance only: not saved, and a load brings every band back |
Expand Down Expand Up @@ -215,7 +215,7 @@ NEW, OK AGAIN: DEMO). NEW is empty; LOAD DEMO is the factory demo a first start
**FUNC menu (FUNC+HOME):** DO: SAVE, GEN ALL, JAM REC, ARR REC, ARR UNDO, SAVE AS, OPEN PROJECT,
KITS, NEW PROJECT, RELOAD PROJECT, CLEAR PATTERN, LOAD DEMO. SET: CLICK, COUNT-IN, REC MODE,
QUANTIZE, AUTO-FILL, FX GLIDE, TRANSPOSE (SCALE or SEMI), LOOP LEN, CHAIN, CHAIN END, PROG CHG
OUT, TEMPO GUARD (ON: VALUE's turn and tap leave the tempo; saved). It always opens on SAVE:
OUT, TEMPO GUARD (ON: VALUE's turn is ENERGY and its tap shows the tempo; saved). It always opens on SAVE:
DOWN once is GEN ALL (GENERATE on every unmuted track, each of its own TYPE, one undo level; OK
again for another), twice JAM REC, three times ARR REC. The right screen key jumps to SET (CLICK),
the left one back to SAVE. UP/DOWN or A
Expand Down
5 changes: 3 additions & 2 deletions docs/CONTROLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ HOME "system", PLAY "◀◀", STOP "▶▶", MIXER "fx", EDIT "rec src".
two gaps agree within 25%, the tempo follows the last four taps (`TAP TEMPO` twice, then
`TAP 128.0`), set and saved as a turn sets it; two stray taps set nothing. A gap over 2 s
or a tap at half or twice the pace starts a new count. **TEMPO GUARD** (FUNC menu) on: the
turn and the tap leave the tempo and say `TEMPO GUARD 130.0`.
turn is ENERGY, as FUNC + turn is, under any clock (review 2026-11-30, proposal 10), and the
tap leaves the tempo and says `TEMPO GUARD 130.0`.
- **STEP keys:** the sixteen of whatever the pad-row keys chose. **On every playing screen,
PERFORM and KEYS included, they are steps** (D12, 2026-11-25): tap, hold + knob, hold + OK
work as on GRID. MUTE MODE (STEP 1-8 the mute states), a held scene pad, push VALUE (the
Expand Down Expand Up @@ -208,7 +209,7 @@ the setting rows used to sit between SAVE and the file rows.)
| CHAIN | | ON / OFF |
| CHAIN END | | SONG (play once) / LOOP |
| PROG CHG OUT | | `OFF` (a new project) / `ON`: a program change on MIDI CH every time the playing pattern changes, the pattern's number 0-127. Saved with the project |
| TEMPO GUARD | | `OFF` (a new project) / `ON`: a plain turn or tap of VALUE where it would set the tempo changes nothing and says `TEMPO GUARD 130.0`; turn the row off to change the tempo. The nudge, VariSpeed, swing and a section's BPM still play (review 2026-11-29, proposal 9; Roland chose this over push + turn, which is swing, 2026-11-30). `EXT CLOCK` first under an outside clock. Saved with the project |
| TEMPO GUARD | | `OFF` (a new project) / `ON`: a plain turn of VALUE where it would set the tempo is ENERGY (`ENERGY +12`; review 2026-11-30, proposal 10), and a tap there changes nothing and says `TEMPO GUARD 130.0`; turn the row off to change the tempo. The nudge, VariSpeed, swing and a section's BPM still play (review 2026-11-29, proposal 9; Roland chose this over push + turn, which is swing, 2026-11-30). A tap says `EXT CLOCK` first under an outside clock; the turn is ENERGY under any clock. Saved with the project |

Moved here from: FUNC + PROJECT twice (save), PROJECT's FUNC + UP/DOWN/LEFT/RIGHT (chain,
reload, new), PROJECTS' FUNC + DOWN (save as, still there too), CHAIN's FUNC +
Expand Down
2 changes: 1 addition & 1 deletion docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ FM4 and GRAIN machines.
| --- | --- | --- | --- |
| Follows the unit's clock: internal, MIDI clock, SYNC IN; refuses tempo/transport under external clock | v0.1.0 | ○ (M7) | STRATA cannot set CLOCK SRC (Enaga has no setter). SYNC polarity not selectable (Enaga) |
| Tap tempo on VALUE, nudge on FUNC + push VALUE + turn | v0.6.0 | ○ (W72, W80) | Internal clock only; nothing set until three taps agree within 25%; the nudge is 4% for 250 ms a detent |
| TEMPO GUARD (FUNC menu): VALUE's plain turn and tap show the tempo and leave it | Unreleased | ○ (W99), E (scenario_tempoguard.sh) | Off by default; saved with the project (one byte on the end of PROJECT.BIN's MIDI section). Nudge, VariSpeed, swing and section BPMs still play |
| TEMPO GUARD (FUNC menu): VALUE's plain turn is ENERGY (review 2026-11-30, proposal 10) and its tap shows the tempo; both leave it | Unreleased | ○ (W99), E (scenario_tempoguard.sh) | Off by default; saved with the project (one byte on the end of PROJECT.BIN's MIDI section). Nudge, VariSpeed, swing and section BPMs still play |
| **Song tempo kept apart from the project's**: a section's BPM plays without becoming the saved tempo; ARR REC writes BPM only where the tempo changed (and the take's start tempo on its first entry); VariSpeed held back near 300 BPM says so and returns at a slower tempo | v0.6.0 | ○ (W80), E (scenario_sections.sh, scenario_arrrec.sh) | The clock no longer jumps back for a moment after a section BPM, a VALUE turn or a tap |
| MIDI OUT per track (OFF/1-16): steps, chords, ratchets, arp, note repeat, pads, KEYS, MIDI IN | v0.1.0 | ○ (8d) | **On Enaga 0.2.0 (v0.1.0-v0.3.1):** with USB connected to a computer not reading, DIN out stalls; unplug USB. Fixed in Enaga 0.3.0, which `main` needs |
| Every note gets its note-off; second STOP sends All Notes Off | v0.1.0 | ○ (8d) | Slide is not sent as legato |
Expand Down
7 changes: 4 additions & 3 deletions docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1650,9 +1650,10 @@ up a little earlier or later and the tempo stays put, which is how to line STRAT
a turntable or a band that sends no clock. Both are refused under an outside clock (`EXT CLOCK`).

**TEMPO GUARD** (FUNC menu, `OFF` or `ON`) keeps VALUE off the tempo during a set, where a hand
brushing the knob would move the BPM on any screen. With it on, a turn or a tap of VALUE where it
would set the tempo changes nothing and shows the tempo instead (`TEMPO GUARD 128.0`). To change
the tempo, turn the row off. The nudge, VariSpeed, swing (push + turn) and a section's BPM are
brushing the knob would move the BPM on any screen. With it on, a plain turn of VALUE where it
would set the tempo is **ENERGY**, as FUNC + turn is (`ENERGY +12`), so the knob under your hand
is the build and the drop, and a tap there changes nothing and shows the tempo
(`TEMPO GUARD 128.0`). To change the tempo, turn the row off. The nudge, VariSpeed, swing (push + turn) and a section's BPM are
moves of their own and still play, and VALUE still turns a picked effect, the morph and the
fields it edits. Under an outside clock `EXT CLOCK` comes first. It is off in a new project and
saved with the project.
Expand Down
5 changes: 3 additions & 2 deletions docs/UNIT_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,9 @@ DEMO), A01 playing.
**W99. TEMPO GUARD (3 min).** Beat playing, A01, on GRID.
- FUNC menu, DOWN to TEMPO GUARD (under PROG CHG OUT), RIGHT: `TEMPO GUARD ON`, the row reads `ON`.
CLR. `____`
- Turn VALUE either way and tap it four times in time: `TEMPO GUARD 130.0` (the project's tempo)
each time, the top bar's tempo and the beat unchanged. `____`
- Turn VALUE up a few clicks: `ENERGY +6` or so, the part fills, the tempo unchanged; back down
to `ENERGY 0` (review 2026-11-30, proposal 10). Tap it four times in time: `TEMPO GUARD 130.0`
(the project's tempo) each time, the top bar's tempo and the beat unchanged. `____`
- Push + turn VALUE still moves the swing; FUNC + push + turn still nudges (`NUDGE FASTER`);
push VALUE + STEP 4 then a turn still moves that effect. `____`
- SAVE, turn the unit off and on, open the project: the row reads `ON`. Turn it off (OK on the
Expand Down
17 changes: 9 additions & 8 deletions tests/scenario_tempoguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# TEMPO GUARD in the emulator (FUNC menu; docs/CONTROLS.md, "The FUNC menu"): the beat running,
# the guard switched on, then VALUE turned and tapped, then the guard switched off again.
#
# What it proves is what the host cannot: the menu row draws and switches on the C674x, and the
# refusal (app/ui_gestures.hpp, a notice built with the tempo in it) runs from VALUE's turn and
# its release without a crash, an overrun or a stall. That the tempo stays put is host-tested (tests/test_ui.cpp,
# What it proves is what the host cannot: the menu row draws and switches on the C674x, VALUE's
# turn is ENERGY (review 2026-11-30, proposal 10) and the refusal (app/ui_gestures.hpp, a notice
# built with the tempo in it) runs from VALUE's release without a crash, an overrun or a stall. That the tempo stays put is host-tested (tests/test_ui.cpp,
# ui_the_tempo_guard_holds_the_tempo_against_value), since the emulator cannot read the screen.
#
# Observable through Enaga's log (notice_logged): `TEMPO GUARD ON`, then `TEMPO GUARD 130.0` (the
# tempo, whatever it is) for the turn and each tap, never a `TAP ...` line, then
# `TEMPO GUARD OFF`; `run int` from the transport.
# Observable through Enaga's log (notice_logged): `TEMPO GUARD ON`, then `ENERGY +2` or more for
# the turn, `TEMPO GUARD 130.0` (the tempo, whatever it is) for each tap, never a `TAP ...` line,
# then `TEMPO GUARD OFF`; `run int` from the transport.
#
# Keys (third_party/enaga/include/enaga/abi.h): F5 = 22 (PLAY), F1 = 19, F4 = 27 (HOME), DOWN = 25,
# RIGHT = 18, OK = 23, CLR = 30, PUSH_VALUE = 4. The row is found by name (tools/menu_rows.py), so
Expand Down Expand Up @@ -103,9 +103,10 @@ check(report.get("app_status") == "APP RUNNING", "app is running",
check(not report.get("crash_reason"), "no crash", f'reason={report.get("crash_reason")!r}')
check("run int" in log, "the transport started", f"log={log}")
check("TEMPO GUARD ON" in log, "the FUNC menu row switched the guard on", f"log={log}")
energy = [l for l in log if re.fullmatch(r"ENERGY \+\d+", l)]
check(len(energy) >= 1, "VALUE's turn was ENERGY", f"lines={energy}")
refused = [l for l in log if re.fullmatch(r"TEMPO GUARD \d+\.\d", l)]
# The turn may arrive as one event or three; the taps are four more.
check(len(refused) >= 5, "VALUE's turn and its four taps were refused", f"lines={refused}")
check(len(refused) >= 4, "VALUE's four taps were refused", f"lines={refused}")
check(len(set(refused)) == 1, "every refusal names the same tempo", f"lines={refused}")
taps = [l for l in log if l.startswith("TAP ")]
check(not taps, "no tap was counted towards a tempo", f"lines={taps}")
Expand Down
31 changes: 21 additions & 10 deletions tests/test_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15362,8 +15362,9 @@ TEST(ui_value_taps_set_the_tempo_and_it_is_saved) {
CHECK_EQ(UiProbe::tempo_tenths(app), before);
}

// TEMPO GUARD (FUNC menu, review 2026-11-29 proposal 9): on, VALUE's plain turn and its taps show
// the tempo and leave it; the nudge, VariSpeed and swing still move. Off again, VALUE turns it.
// TEMPO GUARD (FUNC menu, review 2026-11-29 proposal 9): on, VALUE's taps show the tempo and leave
// it, and its plain turn is ENERGY (review 2026-11-30, proposal 10); the nudge, VariSpeed and swing
// still move. Off again, VALUE turns the tempo.
TEST(ui_the_tempo_guard_holds_the_tempo_against_value) {
Strata &app = fresh();
FakeHost &host = FakeHost::the();
Expand All @@ -15381,17 +15382,21 @@ TEST(ui_the_tempo_guard_holds_the_tempo_against_value) {
key(ENAGA_KEY_CLR);
CHECK_EQ(UiProbe::mode(app), int(Mode::grid));

// A plain turn: refused, the tempo named, the clock and the project untouched.
// A plain turn: ENERGY, as FUNC + turn is; the clock and the project untouched.
app.on_encoder(4, 5);
pump(2);
char expect[24];
std::snprintf(expect, sizeof(expect), "TEMPO GUARD %u.%u", unsigned(before / 10),
unsigned(before % 10));
CHECK(std::strcmp(UiProbe::notice(app), expect) == 0);
CHECK(std::strncmp(UiProbe::notice(app), "ENERGY +", 8) == 0);
CHECK(int(app_engine().energy()) > 0);
CHECK_EQ(UiProbe::tempo_tenths(app), before);
CHECK_NEAR(host.tempo(), float(before) * 0.1f, 0.01f);
CHECK_EQ(int(app_engine().project().settings.tempo_centi_bpm), int(before * 10));
check_layout(app, "GRID, TEMPO GUARD refusing a turn");
check_layout(app, "GRID, TEMPO GUARD: a turn is ENERGY");
app.on_encoder(4, -5); // and back to rest
pump(2);
CHECK_EQ(int(app_engine().energy()), 0);
char expect[24];
std::snprintf(expect, sizeof(expect), "TEMPO GUARD %u.%u", unsigned(before / 10),
unsigned(before % 10));

// Taps that agree: refused too, none of them counted.
tap_value_after(app, 3000);
Expand Down Expand Up @@ -15447,16 +15452,22 @@ TEST(ui_the_tempo_guard_holds_the_tempo_against_value) {
pump(2);
}

// Under an outside clock the tempo is not STRATA's: EXT CLOCK says so before the guard does.
// Under an outside clock the tempo is not STRATA's: a tap says EXT CLOCK before the guard does,
// and a turn is ENERGY all the same, which is not the tempo.
TEST(ui_the_tempo_guard_gives_way_to_ext_clock) {
Strata &app = fresh();
FakeHost &host = FakeHost::the();
pump(2);
post_cmd(Cmd::set_tempo_guard, 1);
pump(2);
host.set_source(ENAGA_CLOCK_MIDI);
app.on_encoder(4, 3);
tap_value_after(app, 3000);
CHECK_EQ(UiProbe::notice(app), "EXT CLOCK");
app.on_encoder(4, 3);
pump(2);
CHECK(std::strncmp(UiProbe::notice(app), "ENERGY +", 8) == 0);
app.on_encoder(4, -3);
pump(2);
host.set_source(ENAGA_CLOCK_INTERNAL);
post_cmd(Cmd::set_tempo_guard, 0);
pump(2);
Expand Down