DAW mode on the SMK-37

BUILT ON BRANCH daw-mode · 2026-11-27 · NOT ON A UNIT YET, NOTHING MEASURED ON ONE

A second way to run Saadet on the SMK-37: as a MIDI controller. The engines stop and the output goes quiet. The keys, pads, knobs, faders, wheels, pedal and spare buttons send MIDI. The pads hold eight banks of sixteen, A to H, with the MPC Sample's own pad notes. ARP, its drone, the SEQ REC latch and every SCALE mode stay on the keys, so the notes that go out are the notes Saadet would have played. Latency comes before everything else: in DAW mode a control becomes MIDI inside the scan's own interrupt and leaves from there.

Try it

Press and hold < + > for a second to switch modes. Click a pad (higher on the pad is harder), drag or scroll a knob, move a fader, play the keys. SCALE cycles the keys' QNT mode here; on the unit it opens the SCALE page as it does now. A mouse can hold only one thing, so held gestures stay open until you pick: KNOB BANK and FADER BANK open their picker after half a second, and the both-banks chip opens the pad banks.

Pads

Knobs K1–K8

Buttons

Keys C3–C6

MIDI out · USB, the TRS jack and Bluetooth

Latency first

In DAW mode nothing waits for the screen, the main loop or an audio block. A key, pad, knob, fader or button becomes MIDI inside the scan's own interrupt, and the same interrupt hands it to USB and the TRS jack. Every figure here is a worst case read from the code as built (fm1-base's SMK-37 layer and Saadet) and checked in the host tests' simulated time. None is measured on a unit yet.

Key to USB

0–1.4 ms

Synth mode: 0–7.6 ms, plus a UI frame when the main loop is drawing.

Pad to USB

1–4 ms

Synth mode: 4.8–12 ms, plus a UI frame.

Key to the TRS jack

0.64–2.3 ms

Synth mode: 1–7 ms, and up to about 82 ms more behind a fader sweep already queued.

Measured on the Elite, 2026-11-27 (the base's own tick figures, driven over USB, no keys or pads played): in DAW mode the tick ran 40 kHz with its longest run 32 µs and its longest gap 33 µs over 20 s, none over 300 µs; the clock out gave exactly 960 clocks in 20 s at 120 BPM. In synth mode the same figures are 42 µs and 271 µs. A flash write used to stop the tick for 17 ms; DAW mode now writes nothing.

The floors. Full-speed USB hands data over at the computer's next IN token, up to 1 ms later. 31,250 baud takes 0.32 ms a byte, 0.64 ms for a note with running status. Bluetooth MIDI waits for a connection event: 7.5 ms at best, often 11.25–15 ms as the computer sets it, so it stays the slow link.

StageSynth modeDAW mode, as built
Matrix scanA 10 kHz tick reads one column; a key is judged at the end of the frame after its column is read: up to two frames, 0–3.2 ms.A 40 kHz tick; a key is judged on the tick its second contact's column is read: 0–0.4 ms.
Key velocityTicks between the two contacts, in the stock's 100 µs unit.Microseconds from fm1_ticks, put back into the stock's unit, so the factory curves still apply.
PadsEach pad read every 2.4 ms (one conversion a tick, shared by 24 inputs); velocity after three readings: 4.8–7.2 ms.Pads read first, every 1 ms: a conversion takes about 40 µs, so it runs every other 25 µs tick (every fourth if one is ever late). The note goes at the first reading that stops rising, or the third: 1–2 ms after the hit's first reading.
Pad LEDsA colour change sends a 0.8 ms frame on mux B's line; the bottom row's readings meanwhile are dropped.No pad frame while a pad is inside its velocity window. A hit's white-blue lights after its note.
Faders, wheelsRead every 2.4 ms, median of three, then a 1/4 smoother: about 10 ms to follow a move.Read every 2 ms, median of three, no smoother, a dead band that lets one step on the same way: 2–4 ms. The wheels' smoother halved.
ButtonsClosed for 2 frames: 3.2–4.8 ms.The first closed reading counts, then 5 ms deaf to bounce: 0–0.4 ms.
EncodersDecoded once a frame: 0–1.6 ms.0–0.4 ms.
Key releaseBoth contacts open for 3 frames: 4.8–6.4 ms.Both open for 0.8 ms, to tune against chatter on the unit.
Into SaadetThe main loop's poll, which a UI frame holds up, then the next audio block: 0–2.9 ms more.None. The interrupt reads tables the main loop prepares: key to note through QNT, octave and chord; pad to note per bank; control to CC.
To the USB endpointusb_poll at 2 kHz, never inside a render: 0–0.5 ms, longer while the render runs.The interrupt arms EP1 itself: microseconds. Notes go into the 64-byte packet before CCs.
TRS jackOne 256-byte ring in order, a byte a tick, a status byte every message: 0.96–1.2 ms a message, after whatever is queued.Notes and real time first. CCs coalesced (the latest value per controller) and sent only when no note waits. Running status. The next byte as soon as the UART takes it: 0.64 ms a note, at most one message ahead.
Arp, clock outStepped by the audio block's 0.73 ms control steps.The note path runs in the tick at least every 0.1 ms and at once when a key moves: arp steps within 0.1 ms. The clock out within a 25 µs tick.

How it gets there

  • The render returns silence at once, so its interrupt never holds the scan or USB back, and CPU0's time goes to a scan four times as fast. The tick's cost is on GLOBAL > DAW > LATENCY; at 40 kHz it has to stay well under 25 µs.
  • The scan, the translation and both outputs run in TIMER5's interrupt, where usb_poll already runs, so USB's INDEX register stays unshared.
  • That path and its tables run from RAM. A miss in the XIP flash cache costs time, and while the radio calibrates the flash cannot be read at all. The idle voice arena holds the tables.
  • To check on the unit: the rows settle in 25 µs, the tick's cost, and that USB audio's service (kept, decision 10) does not hold it back.

Measuring it

  • The firmware stamps fm1_ticks when the scan sees an event and when its first byte leaves (EP1 armed, the UART's last byte) and keeps the mean and the longest, shown each second on GLOBAL > DAW > LATENCY with the tick's longest run and gap (plat_midi_lat).
  • A logic analyzer on a key's second-contact row and the TRS TX pin gives contact to wire, end to end.
  • A few hundred raw pad hits, streamed out, fit the short velocity window against the stock three-reading one.

Scenes

The screen as the firmware would draw it, with the pads and the button LEDs. Each scene is one moment.

Every control

SMK-37In DAW modeDefault
Keys C3–C6Notes on KEYS CH, with velocity. They go through OCTAVE, SCALE (QNT, scale, ROOT, TRN, DEG), CHORD, ARP and the latch before they leave. No engine hears them.CH 1
16 pads, banks A–HThe MPC Sample's pad notes on PADS CH, pad 01 bottom left as on an MPC. Pressure: nothing, poly or channel aftertouch.CH 10, bank A
16 pads, SCALEOne degree of the scale per pad on KEYS CH, pad 02 on DEG: the layout Saadet's MPC mode reads from Bank H, sent out.on the picker's pad 9
16 pads, PROGA program change per pad, each pad with its own program and channel. Hold a pad: K1 its program, K2 its channel. Program changes.programs 1–16, KEYS CH; the picker's pad 10
K1–K8CC, the knob bank's eight. ABS: the knob keeps a value for each bank and a turn sends the new value. BINARY: 64 plus the turn's step (DAWs call it Binary offset).KNOBS 1: CC 70–77
Faders 1–4CC, the fader bank's four: where the fader is, as it moves. No pickup; the receiver does its own.FADERS 1: CC 28–31
Pitch, mod wheelPitch bend, CC 1 on KEYS CH, as now.
Sustain pedalCC 64 on KEYS CH; the notes it holds wait for it, as now.
< >The previous or next pad bank, A to H and round. With a BANK button held, its bank.
< + > heldInto DAW mode, and out again. Every note that went out gets its note-off first.the HOLD time
KNOB BANKTap: the next knob bank, 1–4. Held: the picker, pads 1–4.
FADER BANKTap: the next fader bank, 1–2. Held: the picker, pads 1–2.
KNOB + FADER BANK heldThe pad banks: the top row A–H, the bottom row's first two pads SCALE and PROG. A tap jumps there. The MPC Sample does the same with PAD BANK and pads 1–8.
GLOBAL > DAWThree pages. DAW: MODE, KEYS CH, PADS CH, CC CH. DAW OUT: KNOBS (ABS, BINARY), PRESS (OFF, POLY, CHAN), CLOCK, RUN ST. LATENCY: the last second's figures, and AT BOOT (LAST, SYNTH).
ARPAs now. Held: the drone, ended by the next press. Its notes now go out on KEYS CH; today they reach only the engine.
SEQ RECThe latch, as now.
SCALE, SEQThe SCALE and CHORD pages, as now. They shape the notes the keys send.
SEQ PLAYMIDI Start and Stop. Its LED is green while running.
OCTAVE − / +The keys' octave and the SCALE pads'. Banks A–H keep their notes: a bank is their octave.
PATCHThe DAW screen, in place of HOME.
GLOBEGLOBAL, with a DAW page of its own.
NOTE REPEATHeld: the pads held retrigger at ARP's RATE, in time with the clock.
FX, CHORD, PARA, BTCC buttons: 127 down, 0 up. Their places edit a sound, and there is none.CC 118, 119, 15, 9
TRS jackMIDI OUT: everything USB gets, without SysEx.

Scales go out as they are

The keys reach MIDI through the same kb_map that feeds the engines, so every QNT mode sends exactly the note Saadet would have played. The SCALE page, its scales, ROOT, TRN and DEG work as on HOME.

QNTA key sendsC minor, keys E4 C#4 G#4

Microtonal scales (EDO, just, maqam and the rest) send degree addresses, as MIDI OUT does now: note 60 is the root and each degree is one note up. A receiver plays them as semitones unless it shares the tuning. Per-note pitch bend could carry the real pitch later; the MPC Sample would not use it.

Pad notes

The MPC Sample's default program map, from a blank project (tests/fixtures/mpc_sample_pad_notes.h holds banks E–H as transcribed; A–D follow the same count, and its review says pad A01 sends C1, note 36). One note up per pad and sixteen per bank. Past 127 the count wraps to 0, so all 128 pads have a note. Pad 01 is bottom left: on the SMK-37 the bottom row is pads 01–08 and the top row 09–16.

Pink: the notes that wrapped past 127. The SCALE row shows C minor at octave 0, DEG 1; the root is white.

Program changes

The PROG pad bank, after SCALE: each pad sends one program change, from the scan's tick like a pad's note, and nothing when it is let go. Every pad keeps its own program and channel. To set one, hold the pad: K1 turns its program (1–128, as most hosts count; it goes out as 0–127, faster turns take bigger steps) and K2 its channel (KEYS, which follows KEYS CH, or 1–16). Each turn sends the new program at once, so the receiver follows as you look. While a pad is held the other knobs send nothing. The pad that sent each channel's program last stays lit; the screen shows every pad's program as the pads stand, and the held one's two cards.

12345678
Top, pads 09–16910111213141516
Bottom, pads 01–0812345678

The programs at first, all on KEYS. They are kept with the settings (the retired SLICE engine's favourites row, bytes 0–23, tagged), and like every setting changed in DAW mode they are written once the mode is off.

CC numbers

Every default keeps clear of the controllers that mean something fixed: 0 and 32 bank select, 1 mod, 7 volume, 10 pan, 11 expression, 64–69 the pedals, 91–101 the effects and data entry, and 120–127 the channel modes. Saadet Studio could re-map them later.

With the MPC Sample

Connect

  • The SMK-37's TRS MIDI OUT into the MPC Sample's MIDI IN, on its back. The MPC's jacks are 1/8" TRS Type A.
  • Both are USB devices, so a USB cable between them carries nothing. A computer between them works too.
  • To check: which TRS type the SMK-37 uses. Type B needs an adapter.

On the MPC Sample (SHIFT + PAD 8, MIDI CONFIG)

  • MIDI Port: External.
  • MIDI In Channel: 10, the pads' channel. With All, the keys on 1 fire pads too: C3–C6 are notes 48–84, pads A13 to D01.
  • Pad MIDI In: On.
  • MIDI Sync In: Midi Clock, so it follows Saadet's TEMPO and SEQ PLAY.

To try on the unit

  • The MPC answers incoming notes with the same pad map. Likely, since the program holds one map, but the guide does not say.
  • A note for a bank that is not showing still plays that bank's pad.
  • MIDI Start and Stop move its sequencer when Sync In is Midi Clock.

What it will not take

  • CC. Its guide documents no MIDI learn and no CC map for K1–K3. The knobs and faders are for a DAW.
  • Per-note pitch bend, so microtonal scales arrive as semitones.

What stops, what runs

Stops

  • The engines, their voices and the audio render with its interrupt. The output is silent.
  • CPU1, the voices' second core.
  • USB audio, if decision 10 goes that way.
  • MIDI IN notes and CC no longer play or edit a sound.
  • Knobs, faders and pads no longer edit or load sounds.

Keeps running

  • The arp, the tempo and the clock out, stepped by the scan's 40 kHz tick instead of the audio block (seq.c steps the arp from the block today).
  • USB audio, if kept (decision 10). The computer's playback through the SMK's output should still be heard: to check.
  • MIDI clock in on TEMPO's CLOCK, for the arp.
  • Saadet Studio, over SysEx.
  • The sound that was playing. Leaving DAW mode plays it again, unsaved edits included.

Decided

Built with every recommendation below but the tenth: USB audio stays on in DAW mode for now.

  1. The switch. < and > held together for the HOLD time; no gesture uses that pair today. A power-on combination alone would be harder to hit by accident and slower to use. Recommended: < + > held, also MODE on GLOBAL > DAW.
  2. Through power-off. Keep DAW mode, or always start as a synth. Recommended: keep it (AT BOOT LAST); the boot screen and the DAW header say so, so a silent unit never looks broken.
  3. NOTE REPEAT. A CC button, as drafted, or real note repeat: held pads retrigger at ARP's RATE, in time with the clock. Recommended: note repeat. The button is printed that way, and the MPC Sample does nothing with CC.
  4. The SCALE pad bank. On the pad-bank picker's pad 9, as 8 KNOBS sits on the knob picker. Recommended: yes. It is Saadet's MPC mode turned outward.
  5. Microtonal scales. Degree addresses only, as MIDI OUT sends them now, or per-note pitch bend as well. Recommended: degree addresses now; pitch bend only if a receiver needs it.
  6. Channels. PADS 10 and KEYS 1, with CC on KEYS CH unless CC CH says otherwise. Recommended as drafted.
  7. Clock out. New for Saadet: F8 at 24 a beat with Start and Stop, only when TEMPO's CLOCK is internal, so it never sends a clock back. Recommended: on in DAW mode. The TRS jack has no input, so the MPC can only follow.
  8. Faders. Send where the fader is, with no pickup. Recommended. DAWs do their own takeover.
  9. Pressure. Recommended: off by default. The TRS jack carries about 1,000 three-byte messages a second at 31,250 baud, and poly pressure on sixteen pads can fill it.
  10. USB audio in DAW mode. Off: USB comes back as MIDI only at the switch (about half a second without MIDI, and the computer's playback through the SMK stops), and no audio service runs in the interrupt. Kept: its 1 ms isochronous service stays nested in TIMER5. Recommended: off. Not built yet: it needs USB to come back with other descriptors at the switch, which cannot be checked without a unit. The render is silent and costs next to nothing meanwhile; the latency figures will say whether the audio service holds the tick back.
  11. The pad window. The note at the first reading that stops rising, capped at 1.5 ms, or a fixed 1.5 ms. The first is faster on sharp hits and reads velocity from less of the hit. Recommended: peak or cap, its curve fitted on the unit.
  12. Running status on TRS. It saves a third of every note's time. Every MIDI receiver must accept it, but the MPC Sample is untried. Recommended: on, with a GLOBAL > DAW row to turn it off.
  13. CPU1. Parked, or a scan core that polls the matrix with no timer: about a 0.2 ms frame instead of 0.4. It would share SPI2, the ADC and the MIDI queues with CPU0, and CPU1 has failed to start on this Elite once. Recommended: parked, and revisited only if the stamps show the tick is the limit.

What was built

SMK-37 only, behind SAADET_SMK37; the FM-1 build stays as it is. Most of the latency work is fm1-base's. Its SMK-37 layer is pinned, so those changes go through the board layer's branch (or tools/base_overlay.py until then), not Saadet alone.

The PROG bank (added the same day): daw.c sends a pad's program change in the tick and any the UI asks for (daw.prog_send: the tick alone writes MIDI in this mode); ui_smk.c gives a held pad every knob (smk_daw_editing); settings_persist.c keeps the 16 programs and channels. Image 612,932 B, data RAM 57,340 B. tests/smk_daw_test.c covers the tap, K1 and K2 on a held pad, the limits, the store round trip and a store left untouched.

Size, measured (Elite): the image 589,976 → 609,732 B (+19,756), data RAM 55,628 → 57,260 B of 98,304, the interrupt's code in SRAM +9,024 B, which leaves the engine arena 60,704 B (its floor 32,768). The FM-1 package still builds and fits. Tests: tests/smk_daw_test.c (the core and the screens) and tests/smk_base_daw_test.c (the overlaid scan and jack, simulated) join tests/run_smk37_tests.sh; every SMK-37 and FM-1 suite passes. On the unit, still owed: the LATENCY page and a logic analyzer, the Elite into an MPC Sample over TRS, no stuck notes after a switch, a fader sweep and a pad roll together on TRS, the pads' velocity with the shorter window.

Sources