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 @@ -8,6 +8,10 @@ the project file format or the controls.

### Added

- **FM4: ACC, accent to the tone.** The OPS page's second knob makes an accented note brighter
as well as louder: its index rises with ACC, to twice its value at 127. At 0 an accent changes
the level only. EPIANO, BASS, BLIP and DUBSTB come with ACC up. A project from before it opens
with ACC at 0 and sounds as it did. No CPU cost.
- **FM4: modulator waves, the OPS page.** FM4's ninth EDIT page has WAV, the wave of the
modulator pair: `SIN` (FM as it was), `SIN2` (hollow, odd harmonics), `HALF` (warm, even
harmonics) and `DBL` (glassy). Three of the waves the classic 4-operator synths had beside
Expand Down
5 changes: 3 additions & 2 deletions app/app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,9 @@ constexpr const char *kHatCymNames[kAsrParams] = {"TLV", "TDC", "THP", "OPN"};
constexpr const char *kPercNoiseNames[kAsrParams] = {"NSE", "NDC", "NCL", "---"};
// And its TAPS page's (the SCN slots).
constexpr const char *kKickTapNames[kScnParams] = {"TAP", "TDV", "TFB", "TDC"};
// FM4's OPS page's (the SCN slots too): the modulator pair's wave (dsp/fm.hpp); three are free.
constexpr const char *kFmOpsNames[kScnParams] = {"WAV", "---", "---", "---"};
// FM4's OPS page's (the SCN slots too): the modulator pair's wave and the accent's lift of the
// index (dsp/fm.hpp); two are free.
constexpr const char *kFmOpsNames[kScnParams] = {"WAV", "ACC", "---", "---"};

// The ASR page's encoder names (dsp/va.cpp's table). Only the VAs read the page; on any other
// machine its four slots show "---".
Expand Down
3 changes: 3 additions & 0 deletions app/ui_mixer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,9 @@
case kScnFirst + 0:
append(out, fm_wave_name(fm_wave(value)));
return true;
case kScnFirst + 1: // ACC: a plain amount (the WAVE pair's SPD is a rate here)
append_number(out, value);
return true;
default:
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion core/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ void knob_rows(const HelpPlace &place, bool slc_auto, char rows[kHelpRows][kHelp
add_row(rows, count, "SIN2 HOLLOW ODD");
add_row(rows, count, "HALF NASAL EVEN");
add_row(rows, count, "DBL GLASSY");
add_row(rows, count, "ACC: ACCENTS BRIGHTER");
break;
}
add_row(rows, count, "POS TO END EACH NOTE");
Expand Down Expand Up @@ -1076,7 +1077,7 @@ const char *help_param_words(uint8_t machine, int index) {
static const char *const taps[4] = {"GHOST HITS", "DIVISION", "EACH TO NEXT", "GHOST LENGTH"};
return taps[slot];
}
if (machine_is_fm(machine)) return slot == 0 ? "MODULATOR WAVE" : "";
if (machine_is_fm(machine)) return slot == 0 ? "MODULATOR WAVE" : slot == 1 ? "ACCENT TO INDEX" : "";
return machine_reads_scn(machine) ? kScnWords[slot] : "";
default: return "";
}
Expand Down
14 changes: 12 additions & 2 deletions core/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
// off, the defaults)
// lfo slow (id 18), 8 x 1 byte: KitTrack::lfo_slow, 0-2 (absent: x1); then one byte, the
// machine pages' generation: 1 (kKitDrumPagesPerc) PERC's NOIS page is real, 2
// (kKitPagesFmWave) FM4's WAV too. A section that stops before it is a kit from before
// (kKitPagesFmWave) FM4's WAV too, 3 (kKitPagesFmAccent) FM4's ACC too. A section that stops before it is a kit from before
// NOIS; a kit below a page's generation opens with that page at 0
// zones (id 19), only in a kit that has zones, variable length: the track count (8), the
// record size (126), then per track a zone count 0-16 and its 126-byte records (path,
Expand Down Expand Up @@ -465,7 +465,10 @@ constexpr uint8_t kKitDrumPagesPerc = 1;
// 2: FM4 reads the SCN page's first slot as WAV (2026-11-30). The same story: an FM4 track that
// was once a WAVE track can hold a scan mode there, which would now pick a wave.
constexpr uint8_t kKitPagesFmWave = 2;
constexpr uint8_t kKitPagesWritten = kKitPagesFmWave;
// 3: FM4 reads the page's second slot as ACC, the accent's lift of the index (2026-11-30). Every
// FM4 track from before it holds SCN's default SPD there (28), which would now brighten its accents.
constexpr uint8_t kKitPagesFmAccent = 3;
constexpr uint8_t kKitPagesWritten = kKitPagesFmAccent;
constexpr uint32_t kKitLfoSlowWritten = kKitLfoSlowBytes + kKitDrumPagesBytes;
constexpr uint32_t kKitLfoSlowOffset = kKitSlapOffset + kKitSlapBytes;
constexpr uint32_t kKitTotalBytes = kHeaderBytes + kKitLfoSlowOffset + kKitLfoSlowWritten;
Expand Down Expand Up @@ -1628,6 +1631,13 @@ SerializeResult kit_read(Kit &kit, const uint8_t *buffer, uint32_t size) {
if (machine_is_fm(track.machine)) track.params[kKitScnFirst] = 0;
}
}
// And from before its ACC: an accent is louder and nothing else.
if (drum_pages < kKitPagesFmAccent) {
for (int t = 0; t < kTracks; t++) {
KitTrack &track = kit.tracks[t];
if (machine_is_fm(track.machine)) track.params[kKitScnFirst + 1] = 0;
}
}
return SerializeResult::ok;
}

Expand Down
30 changes: 19 additions & 11 deletions core/sounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,15 @@ constexpr SoundPreset kFmPresets[] = {
// The index (95) and IEN at the top put the brightness in the strike, VEL makes a hard hit
// bark, and a touch of feedback adds edge. At IDX 50 it had almost nothing above 1 kHz even
// in its attack, an organ more than a piano (the sound review, 2026-11-27).
{"EPIANO", {72, 24, 95, 10}, FLAT, {96, 127, 120, 80}, NO_ASR, {30, 64, 60, 13}},
{"EPIANO", {72, 24, 95, 10}, FLAT, {96, 127, 120, 80}, NO_ASR, {30, 64, 60, 13},
{0, 40, 0, 0}},
// A bell: 1:3.5, inharmonic, ringing for seconds while the index falls away.
{"BELL", {72, 72, 60, 0}, FLAT, {115, 110, 60, 72}, NO_ASR, {40, 64, 30, 13}},
// A bass: the full stack with feedback, short and growling, the index snapping shut. More
// index and feedback (2026-11-29): 4-8 kHz of a rolling line had sat 7-23 dB under RY
// Oblivion's bass loops, now level with them.
{"BASS", {8, 24, 80, 55}, FLAT, {60, 110, 70, 122}, NO_ASR, {0, 64, 0, 13}},
{"BASS", {8, 24, 80, 55}, FLAT, {60, 110, 70, 122}, NO_ASR, {0, 64, 0, 13},
{0, 64, 0, 0}},
// Brass: a slow index rise to a held, half-open tone. Chords. IDX 75 and feedback for the
// rasp: 4-8 kHz of a chord line had been 19-58 dB under the stab loops, now 7-12 (2026-11-29).
{"BRASS", {40, 24, 75, 50}, FLAT, {80, 90, 60, 61}, {40, 100, 30, 80}, {20, 64, 40, 13}},
Expand All @@ -500,16 +502,20 @@ constexpr SoundPreset kFmPresets[] = {
{"GLASS", {56, 104, 45, 20}, FLAT, {85, 110, 70, 92}, NO_ASR, {20, 64, 50, 13}},
// A blip: two pairs at 1:1, the index all in the strike, short. The bleep in bleep techno.
// More index (2026-11-29): still a bleep, with a few more partials.
{"BLIP", {72, 24, 90, 0}, FLAT, {55, 127, 80, 120}, NO_ASR, {0, 64, 40, 13}},
{"BLIP", {72, 24, 90, 0}, FLAT, {55, 127, 80, 120}, NO_ASR, {0, 64, 40, 13},
{0, 50, 0, 0}},
// A chime: 1:14, high glassy partials over a long ring.
{"CHIME", {72, 120, 40, 0}, FLAT, {120, 110, 60, 72}, NO_ASR, {30, 64, 30, 13}},
// A dub stab: pairs at 1:1, the index falling over a medium decay, a touch of detune and of
// feedback. At IDX 45 it was a sine thud, its fourth harmonic up 26-44 dB under the
// library's stabs; IDX 80 with IEN 110 puts the strike back (2026-11-29).
{"DUBSTB", {72, 24, 80, 30}, FLAT, {70, 110, 60, 99}, NO_ASR, {20, 64, 50, 13}},
{"DUBSTB", {72, 24, 80, 30}, FLAT, {70, 110, 60, 99}, NO_ASR, {20, 64, 50, 13},
{0, 45, 0, 0}},
// A drone: three carriers over one modulator, a slow swell, the index held, feedback for
// breath. Long notes.
{"DRONE", {88, 40, 50, 40}, FLAT, {100, 30, 30, 72}, {60, 120, 100, 90}, {50, 70, 30, 13}},
// (EPIANO, BASS, BLIP and DUBSTB end on ACC, the last four bytes' second: an accent strikes
// harder, with up to half as much index again. 2026-11-30.)
// The modulator waves (WAV, the last four bytes' first; 2026-11-30). A reed: two pairs at
// 1:1 with SIN2, whose odd harmonics make the hollow tone of a clarinet or a reed organ. Held.
{"REED", {72, 24, 62, 20}, FLAT, {80, 60, 60, 72}, {10, 100, 30, 80}, {20, 64, 40, 13},
Expand Down Expand Up @@ -619,9 +625,9 @@ uint64_t sound_preset_writes(uint8_t machine) {
case MachineId::hat: return (kSrcFltrAmp | kDrumPageBits) & ~(uint64_t(1) << kHatChoke);
case MachineId::va_mono:
case MachineId::va_poly: return kSrcFltrAmp | kAsrBits | kOscBits;
// And WAV, the first of the SCN slots (dsp/fm.hpp); its other three are not read.
// And WAV and ACC, the first two of the SCN slots (dsp/fm.hpp); the other two are not read.
case MachineId::fm:
return kSrcFltrAmp | kAsrBits | kOscBits | (uint64_t(1) << kSoundScnFirst);
return kSrcFltrAmp | kAsrBits | kOscBits | (uint64_t(3) << kSoundScnFirst);
case MachineId::wave_mono:
case MachineId::wave_poly: return kSrcFltrAmp | kAsrBits | kOscBits | kScnBits;
case MachineId::grain:
Expand All @@ -634,13 +640,15 @@ uint64_t sound_preset_writes(uint8_t machine) {
namespace {

// The preset's value for KitTrack parameter p (only meaningful where the mask is set).
uint8_t value_of(const SoundPreset &s, int p) {
uint8_t value_of(const SoundPreset &s, int p, uint8_t machine) {
if (p < 4) return s.src[p];
if (p < 8) return s.fltr[p - 4];
if (p < 12) return s.amp[p - 8];
if (p >= kSoundAsrFirst && p < kSoundAsrFirst + 4) return s.asr[p - kSoundAsrFirst];
if (p >= kSoundOscFirst && p < kSoundOscFirst + 4) return s.osc[p - kSoundOscFirst];
if (p >= kSoundScnFirst && p < kSoundScnFirst + 4) {
// FM4's OPS knobs are their own numbers: left out is SIN and no accent lift.
if (machine == uint8_t(MachineId::fm)) return s.scn[p - kSoundScnFirst];
const bool scans = s.scn[0] != 0 || s.scn[1] != 0 || s.scn[2] != 0 || s.scn[3] != 0;
return scans ? s.scn[p - kSoundScnFirst] : kKitScnDefault[p - kSoundScnFirst];
}
Expand All @@ -654,7 +662,7 @@ bool sound_preset_apply(uint8_t machine, int index, uint8_t *params) {
if (s == nullptr || params == nullptr) return false;
const uint64_t mask = sound_preset_writes(machine);
for (int p = 0; p < kKitParams; p++) {
if ((mask >> p) & 1u) params[p] = value_of(*s, p);
if ((mask >> p) & 1u) params[p] = value_of(*s, p, machine);
}
return true;
}
Expand All @@ -664,7 +672,7 @@ bool sound_preset_matches(uint8_t machine, int index, const uint8_t *params) {
if (s == nullptr || params == nullptr) return false;
const uint64_t mask = sound_preset_writes(machine);
for (int p = 0; p < kKitParams; p++) {
if (((mask >> p) & 1u) && params[p] != value_of(*s, p)) return false;
if (((mask >> p) & 1u) && params[p] != value_of(*s, p, machine)) return false;
}
return true;
}
Expand All @@ -683,15 +691,15 @@ bool machine_defaults_apply(uint8_t machine, uint8_t *params) {
}
const SoundPreset *s = sound_preset(machine, 0);
if (s == nullptr) return false;
for (int p = 0; p < 12; p++) params[p] = value_of(*s, p);
for (int p = 0; p < 12; p++) params[p] = value_of(*s, p, machine);
if (machine_has_asr_page(machine)) {
for (int p = 0; p < 4; p++) params[kSoundAsrFirst + p] = s->asr[p];
if (machine_has_osc_page(machine)) {
for (int p = 0; p < 4; p++) params[kSoundOscFirst + p] = s->osc[p];
}
}
if (machine_has_scn_page(machine)) {
for (int p = 0; p < 4; p++) params[kSoundScnFirst + p] = value_of(*s, kSoundScnFirst + p);
for (int p = 0; p < 4; p++) params[kSoundScnFirst + p] = value_of(*s, kSoundScnFirst + p, machine);
}
return true;
}
Expand Down
5 changes: 5 additions & 0 deletions docs/BUDGET.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ control rate. No cost is expected. `scenario_fmwave` is `scenario_fm` with WAV o
**Not measured yet**: cl6x and the emulator run on Roland's PC; the cl6x listing of the two
loops should be compared with the one before (`tools/ti_loops.py`).

### FM4's ACC (2026-11-30)

One multiply a voice a control slice, on accented notes' index: no loop changes and no cost.
`scenario_fmwave` turns it up with WAV on DBL.

### PERC's NOIS (2026-11-30)

The noise layer is, a sounding voice, a block of `enaga_noise_add`, one envelope render, one
Expand Down
2 changes: 1 addition & 1 deletion docs/CHEATSHEET.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ MNO VA mono · PLY VA poly · WMN wavetable mono · WPL wavetable poly · FM4 fo

**SCAN page (WAVE MONO, WAVE POLY):** moves the position from POS towards END with each note. MOD `OFF` `FWD` (once, holds) `REV` (from END, once) `LOOP` `LREV` (looped backwards) `PING` (there and back) `RET` (there and back once) `SINE` (eased there and back) `RAND` (a random frame a cycle) `DRFT` (glides to a random frame a cycle) · SPD the LFO's RAT: 0-63 free (28 = 1 Hz), 64-127 synced (96 ticks = a beat) · END frame 0-15 as POS · CRV `LIN` at 64, `+n` slow start, `-n` fast start.

**FM4 pages:** ENV = ATK SUS REL ISU (index sustain). OSC = DET `OFF`/`D1`-`D25` the second pair sharp · FIN fine ratio, `0` at 64 · BRT index keytrack · CAR carrier ratio 1 0.5 2 3 4. OPS (the ninth page) = WAV the modulators' wave: `SIN` plain FM · `SIN2` hollow, odd harmonics · `HALF` warm, even harmonics · `DBL` glassy.
**FM4 pages:** ENV = ATK SUS REL ISU (index sustain). OSC = DET `OFF`/`D1`-`D25` the second pair sharp · FIN fine ratio, `0` at 64 · BRT index keytrack · CAR carrier ratio 1 0.5 2 3 4. OPS (the ninth page) = WAV the modulators' wave: `SIN` plain FM · `SIN2` hollow, odd harmonics · `HALF` warm, even harmonics · `DBL` glassy · ACC accented notes brighter, up to twice the index.

**SECTION (CHAIN, push A):** SECT = PAT pattern · REP repeats · MUT mute state (`--`, M1-M8, CAP an exact mask) · SCN scene on side B. MOVE = MRP morph move (SNAP, RIDE, BACK, SNAP A) · NRG ENERGY · BPM tempo · TRN TRANSPOSE. KIT = A song kit K1-K8 (KIT_1..8.BIN in the project folder), recalled on the entry's first beat; `KIT LATE` when it was read too late.

Expand Down
10 changes: 10 additions & 0 deletions docs/DESIGN_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -810,5 +810,15 @@ drum bus clip (their fold-over is at -40 dB or lower).
(`kit_param_max(machine, index)`). The other three slots stay free. **The file.** An FM4 track
that was once a WAVE track can hold a scan mode there, so the generation byte on LFO SLOW's
section goes to 2 and `kit_read` puts an FM4 track's slot at 0 below that. No byte is added.
- **FM4's ACC: accent to the index.** #303 sent FM4's accent to the level (1.4, the VA's). On
an FM voice the struck-harder sound is in the index, so OPS takes a second knob: an accented
note's index is multiplied by 1 + ACC/127, after IEN, VEL and BRT and before `fm_index_cap`,
which therefore holds an accent as it holds IDX. A knob and not a fixed lift, so that 0 is
the accent every existing song has. **The slot** is the SCN page's second, which every kit
fills with SCN's default SPD (28): the generation byte goes to 3 and `kit_read` puts an FM4
track's slot at 0 below it. For the same reason an FM4 preset writes its OPS numbers as they
stand (`value_of` takes the machine): on the WAVE pair and KICK a preset that leaves the page
out writes the SCN defaults. EPIANO (the machine's default sound, so a new FM4 track too),
BASS, BLIP and DUBSTB set ACC 40 to 64.
**KICK's TAP.** The same slot is TAP on KICK, and the limit of 9 was by index alone, so TAP
never passed 7%: the limit takes the machine.
1 change: 1 addition & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ FM4 and GRAIN machines.
| **Synthesis review pass** (2026-11-30): the VA POLY and WAVE POLY filter follows the keys above middle C (0.75 octave per octave); FM4 feedback averages two samples (no tone at half the sample rate), FM4 velocity and accent reach the level; KICK TAPS ghosts start at zero phase | #303 | ○ (W111) | Key tracking is a fixed amount, not a knob (the OSC page is full). FM4 notes at velocity 127 are 1.5 dB louder than they were. Worst case 47.74% with cl6x after it (docs/BUDGET.md) |
| **Synthesis review, the taste calls** (2026-11-30): VA MONO's filter saturates (the resonant stage's state through the soft clip, every sample); HAT's six squares are band-limited; SNARE's body starts 35% sharp and settles in 6 ms | #307 | ○ (W117) | Fixed amounts, no knobs. ACID is about 1 dB quieter. 0.55 to 0.82 points with cl6x; GCC-only `stack` trips the CPU guard (docs/BUDGET.md) |
| **FM4's OPS page: modulator waves** (2026-11-30, synthesis review item 11): WAV on EDIT's ninth page gives operators 2 and 4 the sine or one of three variants of it, SIN2 (odd harmonics), HALF (even), DBL (the first three about level); the carriers stay sines; presets REED, HORN, TINE | Unreleased | ○ (W122) | The SCN page's first slot, a number 0-3. KIT.BIN's generation byte goes to 2, so a kit from before WAV opens on SIN; scenes, locks and user sounds are not cleared. A note whose wave would fold past half the rate plays the sine. Same loop, a second table pointer: cost not yet measured with cl6x (`scenario_fmwave` against `scenario_fm`) |
| **FM4's ACC: accent to the index** (2026-11-30, from the synthesis review): the OPS page's second knob lifts an accented note's index, to twice at 127, so an accent is brighter as well as louder; 0 is level only; EPIANO, BASS, BLIP and DUBSTB set it | Unreleased | ○ (W124) | The SCN page's second slot, 0-127. KIT.BIN's generation byte goes to 3: an FM4 track from before it opens at 0 (the slot held SCN's default SPD, 28). The lift comes before the fold-over cap. Control rate only: no cost. FM4 presets write the slot as their own number, 0 where they name none |
| **PERC's NOIS page** (2026-11-30, synthesis review item 12): a noise layer beside the FM pair on the ASR page's slots: NSE mix (0 off, 64 noise under the full pair, 127 noise alone), NDC its own decay (3-800 ms, HOLD), NCL a band-pass 400 Hz-12 kHz; presets SHAKER, BRUSH, SNPTOM | Unreleased | ○ (W121) | KIT.BIN's LFO SLOW section grew one byte (the drum pages' generation), so a kit from before NOIS opens with it at 0; scenes, locks and user sounds are not cleared. Cost not yet measured with cl6x (`scenario_nois`) |
| **GRAIN in stereo** (2026-11-30, synthesis review item 6): with the track's WID up each grain is born at its own place (sides in turn, 35-100% of the knob's reach) and the cloud renders as a pair into the stereo insert chain | Unreleased | ○ (W120) | One zone, no unison. A stereo sample is still summed. The same grains at any WID; WID 0 is bit-exact mono. Replaces the highs widening on GRAIN tracks. Costs 0.74 points with cl6x (`scenario_grainwide` 29.36% against `scenario_grain` 28.62%) |
| MID: plays an outboard synth over MIDI; SRC/AMP knobs send CC 74/71/73/72, 70/75/76/77 | v0.1.0 | ○ (8d) | No sound or CPU of its own; no scale fold |
Expand Down
Loading