GPU Presentation, Modeless Keymap & Deck Contract
This specification defines the strict purity boundary between cadence-app and cadence-gui, the GPU display-list and semantic theming pipeline, the unified modeless keyboard grammar and global modifier boundaries, the six visual-axis deck alignments, all workspace decks and modal overlays, live 24-bit audio recording, and the hardware MIDI contract.
Related specifications: Material & Timing · DSP & Audio Engine · Protocols & Persistence · User Guide
1. Pure Controller (cadence-app) & HostIo Boundary
cadence-app owns all session state, keyboard routing, undo history (HISTORY_LIMIT = 128), navigation trail (capped at 32), drafts, commands, device/recording state, MIDI dispatch, and semantic view projection with zero audio, MIDI, GPU, or direct OS filesystem dependencies:
- Minimal pure
Cargo.tomlcontract (crates/app/Cargo.toml): Depends strictly onanyhow,cadence-core,cadence-formats(feature-gatedrbs),serde, andserde_json(plushoundandtempfilefor dev tests). Directstd::fs,std::env, orFile::calls insidecrates/app/src/are forbidden and verified by integration tests. HostIoabstraction (crates/app/src/host_io.rs): All path queries, bounded reads, bounded directory scans, atomic writes,UserConfigpersistence,PresetCatalog/SampleLibrarydiscovery, filter groove loading, portable bundle export, sample decoding, and take-journal sinks route throughArc<dyn HostIo>.CoreHostIodelegates tocadence-core::storein production binaries.MemoryHostIoprovides a 100% pure in-memory virtual filesystem andMemoryJournalSinkfor deterministic, disk-free testing.
- Pure
Outcomeintents: Mutating operations (App::apply,App::handle_key,App::handle_midi) return anOutcomevalue describing required host side effects (changed,samples_changed,project_boundary,transport,live_notes_on/off,rack_audition,audition_instrument,preview_sample,clear_mixer_meters,audio_device,audio_record,export,bounce,inspection,midi_feedback,midi_connect,file_dialog,quit). - Single-point parameter & visual math:
- All
ParamAddress(Rack,Zone,Module,Cable,Channel,Send,Effect) resolution, parsing, formatting, and nudging routes throughcrates/app/src/param_ops.rscomposingcadence_core::rack::*andcadence_core::dsp::*. - All live modulated parameter and Macro values across every deck resolve through
crates/app/src/view/live_params.rs, mirroring the exact 3-tier compiler precedence (Static Macro → Automated Macro → Direct Modulation) at smooth sub-steplive_query_time.
- All
2. GPU Presentation Pipeline (FrameView → DisplayList → wgpu)
Semantic View Projection (crates/app/src/view/mod.rs)
App::frame_view(&self, snapshot: &AudioSnapshot, audio_status: &str) -> FrameView produces an immutable, frontend-neutral snapshot of the frame:
FrameView
├── chrome: ChromeView (theme, title, dirty, transport, tempo/key, live timing,
│ take_armed/take_recording/take_capped, audio_recording,
│ overrides/pending/staged, MIDI/Macro badges, peak L/R,
│ master_hot/clipped, mode_name, mode_kind, pending_key_count,
│ hints, status, trail)
├── zoomed: bool
├── focused: Spot
├── decks: Vec<DeckSlot> (ordered visible decks with DeckView payload)
├── jam_hud: Option<JamHudView>
├── lane_layer: Option<LaneLayerView>
└── overlay: Option<OverlayView>
Ordered DisplayList, App Icon & WGSL Pipelines (crates/gui/src/{display.rs,gpu/mod.rs,icon.rs})
cadence-gui transforms (&FrameView, &Theme) into a logical-pixel DisplayList (scaled seamlessly to physical pixels on upload), split into base: DisplayLayer (decks & chrome) and overlay: DisplayLayer (modal overlays strictly above base text):
- Single ordered painter’s pass: Both
QuadInstances (rounded/gradient/bordered/hatched SDF rectangles) andCurveVertexgeometry (anti-aliased waveforms, filter/EQ frequency curves, Bezier Signal Graph & Patchbay cables, filled ADSR/Hold-Decay/reverb envelopes) emit into oneVec<DrawCmd>(DrawCmd::Quads(DrawBatch)|DrawCmd::Curves(DrawBatch)), coalescing adjacent same-kind, same-clip batches while preserving exact back-to-front draw order. - Shared multi-column cable-graph SPOT (
crates/gui/src/decks/cable_graph.rs): One reusable renderer powers both the Project Signal Graph (gG,decks/graph.rs) and the Eurorack Instrument DeckPatchbaytab (decks/instrument/), sharing column layout, node cards, arc-length-dashed feedback Bezier curves (flagged with ASCII"z-1"for JetBrains Mono glyph compatibility), selected-cable halos/ringed jacks, collision-free midpoint pill badges, and upstream/downstream path illumination. - Balanced scissor clipping: Every container clip pairs
push_clip(rect)withpop_clip();begin_overlay()resets the clip stack to the full viewport. - Embedded cross-platform app icon (
crates/gui/src/icon.rs): Embeds the canonical 256×256 PNG derived fromassets/icons/cadence.svg, attachingwinit::window::Icon(+ Windows taskbar icon) on window creation and setting macOSNSApplication::setApplicationIconImageon startup so unbundled terminal runs show the Cadence Dock/Cmd-Tab icon. - 3-stage
wgpu+glyphonrenderer (Rgba16FloatHDR target):- Main + Selective Emissive MRT pass:
sdf_quad.wgsl+scope.wgslwrite both main color and selective emissive channels (playhead, active notes, focused/active deck borders, scopes, clip indicators). - Half-resolution separable Gaussian bloom:
bloom.wgslapplies a 2-pass phosphor bloom scaled bytheme.glow.bloom_strength. - Additive composite + hermetic HiDPI typography:
glyphoncomposites razor-sharp text via a hermeticFontSystem(create_embedded_font_system) backed exclusively by the 2 embeddedJetBrains Monofaces—Regular (weight 400) and Bold (weight 700)—with zero OS font scanning or proportional fallback, programming ligatures disabled (calt/liga/clig/dligviano_ligatures_features(), ensuring hints like-/=,!=,->, and</>always shape as literal separate monospace glyphs), and a generation-sweptTextBufferCache(TEXT_CACHE_EVICT_AGE = 120,TEXT_CACHE_TRIM_INTERVAL = 60,TEXT_CACHE_SOFT_CAP = 2048).
- Main + Selective Emissive MRT pass:
Semantic Theme System (crates/gui/src/{theme.rs,chrome.rs})
Zero hardcoded hex/RGBA colors are permitted outside crates/gui/src/theme.rs. Every deck, chrome bar, visualizer, and overlay queries &Theme:
- Token groups:
SurfaceTokens,BorderTokens,TextTokens,AccentTokens(focus,edit,jam,routing,playhead,warning_key,modulation,alert,override_bar,audition),MeterTokens(low,mid,high,hot,clip,pre_fader,zero_db,gr,track_bg,hold_tick),tracks: [Color; 8],RadiusTokens,GlowTokens, andFontTokens. - Deck framing (
draw_deck_frame): Focused decks display the crisp cyan focus border (theme.accent.focus);Mode::Insertsignals step-entry mode in amber (theme.accent.edit);Mode::Jamdisplays the glowing violet border (theme.accent.jam) and floating Jam HUD. - 3 Built-in Themes (
ThemeId):Cadence Dark(default slate + phosphor),Midnight Neon(deep obsidian + high-bloom stage contrast), andStudio Light(daylight high-contrast slate).
3. Modeless Keybinding Grammar & Input Pipeline (crates/app/src/input/)
Cadence is strictly keyboard-driven, consistent, and direct. Parameter sculpting, note shaping, placement resizing, and item reordering happen directly in place without toggling a general edit mode.
3A. Mode Inventory
Only genuine input/selection modes exist:
| Mode | Trigger | Role |
|---|---|---|
Normal | Default | Modeless workspace: pure spatial navigation (hjkl/HJKL), direct 2D manipulation & reorder (Alt+hjkl/HJKL), one-hand scalar adjust (,/. </>), and canonical action verbs. |
Insert | i on editable Pattern Notes | Piano step entry (zsxdcvgbhnjm, + Shift accents, 1–8 scale degrees, </> octave, . rest, Left/Right step cursor). |
Jam | gj / Ctrl+Shift+j | Modal floating live-performance keyboard (top-row lanes, number-row sections, bottom-row chromatic piano, Tab/Shift-Tab bank). |
ValueInput | Enter on any scalar control | Exact number/unit/text entry with live validation and formatted preview. |
MiniEditor | Enter on a Mini pattern | Live-validated Mini-Notation code editor with Cycle 1 note preview. |
| Overlays & Browsers | Ctrl+Shift+<key>, :, /, ?, n, P, B, g/t/z/v | Fuzzy Action Palette, File Hub, Preset/Groove/Sample Browsers, Song Properties, Settings, Workflows, Pickers, Help, Inspect, Confirm, Prefix HUDs. |
3B. Deterministic Routing Order (crates/app/src/input/route.rs)
Every keyboard event (KeyEvent) passes through App::handle_key in one strict priority order:
KeyEvent
1. Normalize shifted char; on Press break undo coalescing & MIDI CC rec gesture
2. KeyEventKind::Release -> release matching held computer-keyboard notes (live_notes_off)
3. KeyCode::Home -> clear count, Action::Stop (non-repeat)
4. Active lane_layer HUD -> intercept part digit (1..9) or toggle lane across ALL modes;
any other key closes the layer and falls through
5. Ctrl+Shift+j -> toggles Mode::Jam ON and OFF (even inside Jam)
6. Universal Alt Layer -> Alt+Enter (stage/fire), Alt+1..0 (sections), Alt+q..p (lane layer),
Alt+m/M (mute/unmute all), Alt+s/S (solo/clear all),
Alt+x/X (release/release all), Alt+c/C (keep/keep all) — active everywhere
(Alt+hjkl / Alt+HJKL / Alt+Backspace flow to Tier 3 direct manipulation;
Alt+b/f/d stay free in text inputs)
7. Ctrl+c -> in Normal: Mode::Confirm(Quit); in any other mode: cancel to Normal
(restoring live-preview browsers cleanly if active)
8. Modal forms & popups -> Create, Workflow, Browser, PresetBrowser, GrooveBrowser, SongProperties,
MiniEditor, Palette, FileHub, Pick, Authoring, ValueInput,
Interpolation, ArrangeViews, ArrangementInspect
9. Ctrl / Ctrl+Shift -> Ctrl+<deck> (all 10 docked decks), Ctrl+Shift+<modal> (all modals),
Ctrl+s Save, Ctrl+z/Ctrl+Shift+z/Ctrl+r Undo/Redo, Ctrl+w Window,
Ctrl+=/−/0 zoom, Ctrl+u clear input
10. Jam & Stage modes -> Mode::Jam (Alt layer locked on + z–, 13-key piano HUD + </> octave + Tab/Shift-Tab bank)
Mode::Stage (Enter/S fire staged batch, x discard, Esc keep staging)
11. Esc unwinding -> cancel MIDI Learn -> clear count -> discard staging -> clear Take marks
-> clear sub-search filter -> exit Insert -> cancel preview browser
-> resume Jam -> unwind trail (`back`)
12. Prefix / overlay / -> Search (/), Transport (t), Window (z), Go (g), Help (?),
Insert / Normal Settings (g,), Inspect, Assets, Tutorial, Confirm, Insert (i), Normal
3C. The Four Directional Tiers
Every deck obeys the same four directional tiers with zero axis flips:
| Tier | Keys | Invariant | Undo / Repeat |
|---|---|---|---|
| 1. Navigate | h j k l (+ Arrows) | Pure spatial cursor movement matching the visual screen axes. Never mutates. Bare h/l is strictly a no-op on 1-axis vertical inspector decks. | Key-repeat enabled; no undo |
| 2. Coarse Nav / Tabs | H J K L (Shift + nav) | Coarse spatial jump or deck-level tabs (Rack tabs, Devices Audio | MIDI tabs, Modal tabs, Arrange sections, Pattern bars ±16, Mixer strip pages). Never mutates. | Key-repeat enabled; no undo |
| 3. Direct 2D Manipulate & Reorder | Alt+h j k l (fine)Alt+H J K L (coarse)(+ Alt+Arrows / Alt+Shift+Arrows) | Directly manipulate, move, nudge, or reorder the focused item along its visual axis (turn knob, push fader, shift pitch/gate, move placement bar/lane, slide breakpoint, reorder inserts/zones/pins/bindings). | Key-repeat enabled with coalesced single-gesture undo (u / Ctrl+z) |
| 4. One-Hand Scalar Adjust | , / . (fine − / +)< / > (coarse − / +) | Decrease / increase the focused scalar value right below k/l (zero modifier for fine). Works on every knob, fader, pan, send, duck, macro dial, cable amount, BPM, curve value, note velocity, and placement length. | Key-repeat enabled with coalesced single-gesture undo (u / Ctrl+z) |
3D. Global Modifier & Prefix Boundaries
No individual deck may shadow any global prefix, live-performance key, or Ctrl shortcut in this section. In native winit, physical_fallback keeps Ctrl+i and Ctrl+m distinct from Tab and Enter, and on macOS Cmd+=/−/0 maps onto the Ctrl zoom chords.
All 10 Docked Decks (Ctrl+<letter>, zero Shift)
| Deck | g Prefix | Direct Ctrl |
|---|---|---|
| Arrange | ga | Ctrl+a |
| Pattern | gp | Ctrl+p |
| Bank | gb | Ctrl+b |
| Mixer | gm | Ctrl+m |
| Instrument Rack | gi | Ctrl+i |
| Macros | gk | Ctrl+k |
| Take | gt | Ctrl+t |
| Signal Graph | gG | Ctrl+g |
Devices (Audio | MIDI) | gd (preserves active tab; :audio / :midi jump directly) | Ctrl+d |
| Output Monitor (toggle) | go | Ctrl+o |
All Modals & Overlays (Ctrl+Shift+<key>, always Shift)
| Modal / Overlay | Direct / g Prefix | Ctrl+Shift Chord |
|---|---|---|
| Action Palette | : | Ctrl+Shift+p (works in Normal & Jam) |
| Jam (modal floating overlay) | gj | Ctrl+Shift+j (toggles Jam ON and OFF even inside Jam) |
| File Hub | gf | Ctrl+Shift+f |
| File Hub: Open | gf (tab 1) | Ctrl+Shift+o |
| File Hub: Save As / Bundle | gf (tab 2) | Ctrl+Shift+s |
| File Hub: Export Audio | gf (tab 4) | Ctrl+Shift+e |
| Song Properties / Info | gP | Ctrl+Shift+i |
| Settings | g, | Ctrl+Shift+, (plus Ctrl+, alias) |
| Sample Browser | B / gS | Ctrl+Shift+b |
| Create New Object Menu | n | Ctrl+Shift+n |
| Help | ? | Ctrl+Shift+/ (i.e. Ctrl+?) |
Core CUA & Window Shortcuts
| Chord | Scope | Behavior |
|---|---|---|
Ctrl+s | Normal (also Settings / Devices / Take) | Save immediately (opens File Hub Save tab only if untitled) |
Ctrl+z / Ctrl+Shift+z (+ Ctrl+r) | Normal | Undo / Redo (alongside u / U) |
Ctrl+c | Any mode | Cancel overlay/input back to Normal (restoring live-preview browsers); in Normal opens Quit confirm |
Ctrl+w | Normal | Window / Deck prefix (Mode::Window, alias of z) |
Ctrl+= / Ctrl+- / Ctrl+0 | Normal / Insert | Horizontal zoom in / out / reset (only when Arrange or Pattern focused) |
Ctrl+u | Text inputs / Search | Clear active input buffer |
Alt — Top-Row Live Performance + Home-Row Direct Manipulation
| Chord | Scope | Behavior |
|---|---|---|
Alt+1..0 | Any mode (non-repeat) | Section jump 1–10 in current bank (or stage jump) |
Alt+q..p | Any mode (non-repeat) | Open lane layer for bank lanes 1–10 |
Alt+m / Alt+M | Any mode (non-repeat) | Mute focused lane (or Mixer channel) / Unmute all lanes |
Alt+s / Alt+S | Any mode (non-repeat) | Solo focused lane (or non-Master Mixer channel) / Clear all solos |
Alt+x / Alt+X | Any mode (non-repeat) | Release focused lane / Release all lanes |
Alt+c / Alt+C | Any mode (non-repeat) | Commit / Keep focused override (or Take selection on Take deck) / Keep all overrides |
Alt+Enter | Any mode (non-repeat) | Toggle / fire Staging (Mode::Stage) |
Alt+Backspace | Non-text decks (non-repeat) | Reset focused parameter / fader / pan / send / macro / cable / setting to default |
Alt+h/j/k/l & Alt+H/J/K/L | Non-text decks (repeat OK) | Tier 3 Direct 2D Manipulation & Reorder (plus Alt+Arrows / Alt+Shift+Arrows) |
Text-entry fields keep Alt+b, Alt+f, Alt+d, and Alt+[ free.
Global Normal Keys & Prefixes
| Key | Behavior |
|---|---|
g | Go prefix: ga Arrange · gp Pattern · gb Bank · gm Mixer · gi Instrument · gk Macros · gG Signal Graph · gd Devices (Audio | MIDI) · gt Take · go Output · gj Jam · gf File Hub · gP Song Properties · g, Settings · gS Sample Browser · gs Follow Source / Pattern Def · gg Start · ge End |
t | Transport prefix: tf Follow · tg Cue bar · tl Loop section · tx Clear loop · tX Cancel pending · ts Stop · te End rule · tr Take arm · tR Restart loop · ta Toggle 24-bit audio record · tA Record Audio dialog · ti Cycle input monitor (Off|Auto|On) · tc Cue · tp Cue & play · tb Bounce dialog · tq Launch quantize · tQ Cycle boundary · tE Edit timing · tC Clear all clipped meters |
z | Window prefix: zw/Tab cycle · zz zoom deck · zp pin · zx close · zo only · zh/j/k/l directional focus · z=/z-/z0 timeline zoom · z1..4 layout presets |
: / / / ? | Action Palette / Bank Material search / Help |
Space / Home | Play / Pause · Stop & rewind |
u / U | Pop staged change or Undo / Redo |
S / M / R | Stage toggle/fire · MIDI Learn · MIDI Record |
n / B / \ / ' | Global Create menu / Sample Browser / Toggle song loop / Arm From-Here fork |
; | Repeat last single-step pattern edit |
Tab / BackTab | Cycle focus across open decks forward / backward |
0 / $ / G / End | Start / end of the deck’s active focused list or timeline (never leaks to hidden cursors) |
PgUp / PgDn | Page along the deck’s primary scrollable axis |
Esc | Cancel MIDI Learn → clear count → discard staging → clear Take marks → back() (stop audition / deselect cable / unzoom / pop trail) |
Backspace | Cancel pending timeline jump else back() |
3E. Canonical Action Verbs
| Key | Intent | Scope |
|---|---|---|
Enter | Primary action: open / drill-down on links & containers · launch on Bank Parts · toggle on booleans & Rhythm · open exact ValueInput on scalars | Every deck |
a | Contextual Add (item into current deck/list) | Rack Panel/Patchbay (Add Module), Zones (Add Zone picker), Macros (Add Binding), Bank Parts (Add Part to Lane), Detail::Part (Add P-lock Link), Settings (Add Dir), Devices/MIDI (Add Mapping), Mixer/Channel (Add Insert/Send/Duck picker) |
A | Universal Audition / Preview | Pattern, Part, Placement, Bank Parts, Rack (all 3 tabs), PresetBrowser, SampleBrowser, Pickers |
x | Remove / unlink / release focused child item | Arrange (release override else remove placement), Notes (delete voice), Values (delete point), Panel (remove module), Patchbay (disconnect cable else remove module), Zones (delete zone), Mixer/Channel (remove Insert/Send/Duck), Macros (unbind binding), Graph (unlink cable), Bank Parts (release lane), MIDI (delete user mapping), Settings (remove dir), Take (clear marks) |
X | Delete whole entity / clear container (Mode::Confirm for entities) | Channel, Instrument, Effect, Pattern, Part, Lane, Section, Notes (clear step), Macro slot, Graph (unlink all), Take (discard), MIDI (clear all user mappings) |
r | Rename / edit metadata | Instrument, Module, Quick Pin, Zone, Channel, Effect, Pattern (incl. literal length/mode), Part, Lane, Section, Duck, Macro slot, Devices (r rescans audio/MIDI ports) |
d | Derive / duplicate (non-destructive) | Pattern (Draft::derive), Zones (duplicate zone), Arrange (duplicate placement), Mixer/Channel/Graph (Add Duck) |
e | Edit / inspect Modulation & Macro links | Any focused parameter on Rack (Panel/Zones), Detail::Channel, Detail::Effect, Mixer slots, Macros header (bind to M1–M8, attach/edit/unlink Modulation, jump to source), plus Signal Graph cables & FileHub inline path edit |
m | Mute / Bypass / Mode toggle | Lane Mute (Arrange, Bank), Channel Mute (Mixer, Channel), Effect Bypass (Detail::Effect; b on Mixer Insert slot when channel Mute owns m), Values Hold ↔ Ramp toggle, Notes step mute/rest (preserves pitch/chord) |
s | Solo | Lane Solo (Arrange, Bank), Channel Solo (Mixer, Channel) |
y / p / P | Clipboard (Arrange Placements & Pattern only) · Rack Pin (p on Rack) · Preset / Groove Browser (P on Rack / Filter) | Save Preset/Groove lives inside the P browser and gf Save tab; never leaks Paste errors onto non-clipboard decks |
v | View / Visual / Move FX | Arrange views prefix (vp/vo/vr), Bank Parts ↔ Material, Take visual range, Move Effect (Detail::Channel/Effect/Mixer Insert) |
f | Fork (or Add Effect on Mixer/Channel) | Pattern fork, Placement fork, Filter groove fork |
o | Open detail / local occurrence / route output / stack chord | Mixer → Detail::Channel; Placement/Inspect → local occurrence; Rack/Graph → route output; Pattern Notes → stack chord voice |
i | Step Insert (Pattern Notes only) | Enters piano-keyboard Mode::Insert |
C | Clear clipped meter (Mixer / Channel / Output) · Cable exact amount (Patchbay) | Pairs with tC (clear all clips) |
4. Deck Layout Engine, Visual Alignments & Deck-by-Deck Contract
4A. Pure Layout Model (crates/app/src/layout.rs, crates/app/src/decks.rs)
Layout stores pinned: Vec<Deck>, working: Option<Deck>, focus: Spot::{Pinned(usize), Working}, and zoomed: bool. Every workspace and focus query (workspace(), focus(), focused_canvas(), focused_deck_kind()) is derived purely from self.layout with zero shadow state.
- Deck shapes (
Shape):Widedecks (Arrange,Output,Take,Graph,Midi[Devices],Macros) stack horizontally;Talldecks (Bank,Mixer) dock along the right column;Blockdecks (Patternand object decks) adapt to available slots. - Working-deck selection tracking: While another deck holds focus, an unpinned working deck automatically retargets to follow the current selection; pinning (
zp) locks a deck’s target indefinitely. - Navigation trail: Navigating via
g<key>/Ctrl+<key>orEnterrecords aNavigationsnapshot onback(up to32entries) soEscunwinds cleanly without affecting musical undo.
4B. Six Visual-Axis Deck Layout Alignments
Six deck layout alignments guarantee every hjkl and Alt+hjkl binding matches the screen 1:1:
- Uniform control lists (
crates/gui/src/decks/object.rs,crates/app/src/controls.rs):j/kwalks rows andw/bjumps groups on every control list regardless of 1-column or 2-column visual flow; bareh/lnever mutates. - Rack
Zoneshorizontal Zone strip (crates/gui/src/decks/instrument/zones.rs): Renders a scrollable horizontal Zone pill strip at the top ofZones(matchingPanel’s module strip) soh/lselects zones left-to-right,j/kwalks Zone/Voice/Rack controls below, andAlt+j/kreorders zones. - Bank
Partsrow-oriented layout (crates/gui/src/decks/bank.rs): Renders Lanes as rows (j/k) and each Lane’s Parts as horizontal cards/pills left-to-right (h/l) in both unzoomed and zoomed (zz) views, matching Arrange with zero zoomed transpose. - Mixer vertical channel-detail stack (
crates/gui/src/decks/mixer.rs): Renders the selected channel’sFX,SND,OUT, andDUCKslots as a vertical stacked list below the strips soj/kslot navigation andAlt+j/kInsert reorder match the visual axis 1:1 (omitting unfocusableOUT → MasteronReturnandMasterchannels). - Macros 1D horizontal dial strip + scrollable Bindings (
crates/gui/src/decks/macros.rs): KeepsM1–M8in a single horizontal strip across all pane widths and scrolls the vertical Bindings table around the focused row. - Devices (
Audio | MIDI) navigable inspector rows (crates/gui/src/decks/midi.rs): RendersAudiotab rows (AUDIO INTERFACE,AUDIO INPUT & RECORDING,ENGINE & RECOVERY— 11 typedAudioDeckRows) andMIDItab rows (DEVICE & PROFILE— 5 typedMidiDeckRows:IN,OUT,Profile,Pads,Pickup— directly aboveMAPPINGS) as standard vertical inspector rows withH/Lswitching tabs, keeping globalt,i, andBackspaceunshadowed.
4C. All 11 Primary Deck Surfaces
DeckKind defines 14 targetable deck kinds projected into 11 visual surfaces (Placement, Part, and Channel share the unified ObjectDeckView):
| # | Deck | Jump | DeckView | Role & Key Capabilities |
|---|---|---|---|---|
| 1 | Arrange | ga / Ctrl+a | Arrange | Placements (vp), Evaluated Overview (vo), Evaluated Piano Roll (vr), live override rows, pending/staged badges, sections (H/L, w/b), Event Provenance (Enter) |
| 2 | Bank | gb / Ctrl+b | Bank | Row-oriented Launchpad (Parts) & searchable Material pattern/section library (v toggles) |
| 3 | Pattern | gp / Ctrl+p | Pattern | 2D polyphonic voice-sorted piano roll (j/k voice, o stack, Alt+j/k pitch, Alt+h/l gate, ,/. velocity, i Step Insert), fractional sub-step visualization, rhythm matrix, Values Hold/Ramp curve editor, MiniEditor (Enter), derived source inspector (gs/Enter) |
| 4 | Mixer | gm / Ctrl+m | Mixer | 32-bit float console (Audio, Group, Return, Master), -60..+6 dB faders with 0 dB hairline, pre-fader ticks, HOT/!CLIP, CMP/LIM GR bars, vertical detail slots (Fader/Pan/Inserts/Sends/Output/Duck), o Channel deck |
| 5 | Macros | gk / Ctrl+k | Macros | All 8 Project Macros (M1..M8) in 1 horizontal strip + scrollable Bindings, live automated sweeps, native-unit spans, inverted badges, MIDI CC badges |
| 6 | Devices (Audio | MIDI) | gd / Ctrl+d | Midi | Two-tab hardware deck (H/L switches Audio ↔ MIDI): Audio configures output/input device, sample rate, buffer size, cue out, input mode (Stereo | Left | Right), live input monitor (Off | Auto | On), latency trim (-250..+250 ms), audio panic/restart/rescan + live input meters & health; MIDI configures ports, profile, pads, soft pickup, Smart Macro & RGB pad previews, mappings, and event log |
| 7 | Graph | gG / Ctrl+g | Graph | Interactive 5/6-column Signal Graph patchbay (Sources → Derived → Parts → [Macros] → Instruments [RACK, {z}z · {m}m badge] → Mixer / FX), illuminated cubic-Bezier cables via shared cable_graph.rs, undo-safe wiring (o/a/s/m/d/e/x/X) |
| 8 | Take | gt / Ctrl+t | Take | Explicitly armed performance timeline (tr toggle, default OFF; Auto-Record Takes setting; Chrome TAKE ARM / ● REC TAKE / ● TAKE CAPPED badges), bar summaries, event markers, v Visual range selection, Enter/Alt+c keep with auto-forking, Ctrl+s save, X confirm-guarded discard |
| 9 | Instrument | gi / Ctrl+i | Instrument | Unified 11-module Eurorack Modular Rack (Panel | Patchbay | Zones via H/L): Panel (Quick panel_pins + module strip + 12 pre-sampled DSP ModuleVisualView visualizers), Patchbay (4-column cable_graph.rs with bipolar attenuverters & dashed z-1 feedback), Zones (horizontal zone strip + 32-zone key/vel/choke map); universal P Preset Browser, B Sample Browser, A audition, r rename |
| 10 | Effect / Object | Enter | Effect / Object | Dedicated visualizers for all 8 EffectKinds (EQ response, Filter + FilterEnv step bars, Comp/Limiter transfer + GR, Drive 3-mode curve, Chorus LFO, Delay taps, Reverb RT60) + ObjectDeckView for Placement, Part, and Channel |
| 11 | Output | go / Ctrl+o | Output | Non-focusable live stereo oscilloscope, L/R 32-bit float meters, 0 dB hairline, Master HOT/!CLIP latch, and Master LIM/CMP GR badge |
4D. Deck-by-Deck Binding Contract
- Arrange (
ga/Ctrl+a— Placements, Overview, Roll):- Nav:
h/lbar±1(Placements) or step±1(Overview/Roll) ·j/klane±1·H/Lprev/next section ·w/bsection (Placements) or note event (Overview/Roll) ·0/$/Gstart/end ·PgUp/PgDnlanes±6or visible bar page ·=/-quick zoom. - Direct Manipulation (Placements):
Alt+h/lmove start±4steps (Alt+H/L±16) ·Alt+j/kmove placement across lanes ·,/.shrink/extend length±4steps (</>±16). - Verbs:
EnteropenDetail::Placement(or Place workflow on empty bar;ArrangementInspecton Overview/Roll) ·vviews (vp/vo/vr) ·xrelease override else delete placement ·Xdelete section (or lane) ·redit section (or rename lane) ·dduplicate placement ·m/slane mute/solo ·[/]loop start/end ·y/p/Pyank/paste.
- Nav:
- Pattern (
gp/Ctrl+p— Notes, Rhythm, Values, Derived, Mini):- Shared:
h/lstep±1·H/L&PgUp/PgDnbar±16·0/$/Gfirst/last step ·=/-quick zoom ·Aaudition ·dderive ·redit metadata/length/rename ·ffork ·Xdelete pattern (confirm) ·y/p/Pyank/paste ·;repeat last edit. - Notes:
j/kchord voice ↓/↑ ·w/bnext/prev active note ·Alt+j/kpitch±1deg (Alt+J/K±1oct) ·Alt+h/lgate±0.25steps (Alt+H/L±1.0) ·,/.velocity±5%(</>±15%) ·[/](and#) flat/sharp accidental ·c/CcycleStepCondition·ostack chord voice ·mtoggle step rest/active ·xdelete voice ·Xclear step ·iStep Insert ·Backspace(in Placement scope) re-inherit step from definition. - Values:
w/bnext/prev breakpoint ·Alt+j/k&,/.value fine (±0.01/±1deg) ·Alt+J/K&</>coarse (±0.10/±7deg) ·Alt+h/lslide breakpoint±1step (Alt+H/L±4) ·EnterexactValueInput·mtoggleHold ↔ Ramp·xdelete breakpoint ·einspect/jump downstream Modulation/Link consumers. - Rhythm:
w/bnext/prev hit ·Enter/xtoggle hit directly. - Derived / Mini / Generators:
j/ksource chip (Derived) ·Enter/gsopen selected source (Derived) orMode::MiniEditor(Mini) ·Ffreeze to literal pattern.
- Shared:
- Modular Rack (
gi/Ctrl+i—Panel,Patchbay,Zones):- Shared:
H/Lswitch tab (Panel | Patchbay | Zones, or:page panel|patchbay|zones) ·Aaudition ·PPreset Browser (incl. Save Preset &Rreload) ·BSample Browser (auto-insertsSampler -> Out.Inviaensure_zone_sampler_modulewhen absent and applies RIFFsmpl/instmetadata) ·oroute output channel ·rrename instrument (or focused module/pin/zone) ·Xdelete instrument (confirm). Panel:h/lModule pill (Quick+ every module) ·j/kvertical control (w/bgroup) ·Alt+h/l&,/.fine (Alt+H/L&</>coarse) ·Alt+Backspacereset ·EnterexactValueInput(or open Sampler/Link) ·Alt+j/kreorder pin (Quickpill) ·aadd module ·xremove module (neverOut) ·ppin/unpin ·eedit/bind Macro & Modulation links. Displays all 12 pre-sampled GPUModuleVisualViewvisualizers (PinnedOverview,Vco,Sampler,Noise,Env,Lfo,Filter,Vca,Drive,LoFi,Resonator,Out).Patchbay: 4-columncable_graph.rs(SOURCES→MODULATORS→PROCESSORS→VCA / OUT) ·h/lcolumn ·j/kmodule card ·w/b([/]) cycle attached cables ·Alt+h/l&,/.fine cable amount (Alt+H/L&</>coarse) ·Alt+Backspacereset ·Enterjump to modulePanelor cable exactValueInput·aadd module ·cconnect cable ·Cselect/edit cable amount ·xdisconnect cable (else remove module) ·ppin cable ·eedit/bind Macro & Modulation links.Zones:h/lhorizontal Zone pill ·j/kvertical Zone/Voice/Rack control (w/bgroup) ·Alt+h/l&,/.fine (Alt+H/L&</>coarse) ·Alt+Backspacereset ·EnterexactValueInput/ Sample Browser ·Alt+j/kreorder active Zone ·a"Add Zone…"picker ·dduplicate zone ·xdelete zone ·rrename zone ·eedit/bind Macro & Modulation links.- Modular Rack Ex commands:
:new synth|sampler|kit|rack|modular [NAME],:mod add <vco|sampler|noise|env|lfo|filter|vca|drive|lofi|resonator> [NAME],:mod del <ID|NAME>,:mod rename <ID|NAME> <NEW_NAME>,:patch <FROM> <TO[.PORT]> [AMOUNT],:unpatch <CABLE_ID | FROM TO[.PORT]>,:pin [PARAM [LABEL] | LABEL],:unpin [INDEX | PARAM | LABEL],:zone ...,:sample PATH,:bounce ....
- Shared:
- Mixer (
gm/Ctrl+m) & Object Details (Channel,Effect,Part,Placement):- Mixer:
h/lchannel strip (H/L&PgUp/PgDnpage;0/$/Gfirst/Master) ·j/kvertical slot (Fader → Pan → Insert → Send → Output → Duck) ·Alt+h/l&,/.fine (Alt+H/L&</>coarse; step sizes aligned withDetail::Channel) ·Alt+j/kpush Fader dB or reorder Insert ·Alt+Backspacereset ·Enteropen Insert / bus picker /EditDuck/ exactValueInput·oopenDetail::Channel·aadd picker (cChannel /fEffect /wSend /dDuck) ·rrename ·m/smute/solo (bbypass Insert) ·vmove Insert ·elinks ·xremove child ·Xdelete channel (confirm) ·Cclear clip. - Object Details:
j/kvertical control (w/bgroup; bareh/lstrictly no-op) ·0/$/Gfirst/last ·PgUp/PgDn±6·Alt+h/l&,/.fine (Alt+H/L&</>coarse) ·Alt+Backspacereset ·Alt+j/kreorder Insert (Channel/Effect) ·Enterdrill-down link or exactValueInput·eedit/bind links ·rrename/edit ·x/Xremove/delete · deck-specific verbs (Channel:m/s/v/b/C;Effect:m/v, FilterP/f;Part:A/a;Placement:A/r/f/o).
- Mixer:
- Macros (
gk/Ctrl+k), Bank (gb/Ctrl+b), Signal Graph (gG/Ctrl+g), Take (gt/Ctrl+t), Devices (gd/Ctrl+d):- Macros:
h/l(1–8,0/$/G) Macro slotM1–M8·j/kDial header ↔ scrollable Bindings · Dial:Alt+h/l&,/.±2%(Alt+H/L&</>±10%),Alt+Backspace0%,EnterValueInput,abind picker,rrename,edriving Mod,x/Xunbind all / clear slot · Binding:Alt+h/l&,/.min,Alt+H/L&</>max,Alt+j/kreorder,Enterjump target,vinvert,xunbind row. - Bank:
vtoggleParts ↔ Material. Parts:j/klane ·h/lpart in lane ·0/$/Gfirst/last lane ·Enterlaunch (Shift+Enterimmediateat now) ·Aaudition ·aadd Part ·redit phase/offset ·xrelease lane ·Xdrop Part ·m/smute/solo. Material:j/kpattern (PgUp/PgDn,0/$/G) ·Enter/lopen Pattern ·hfocus left deck ·Aaudition ·dderive ·ffork ·rrename/edit ·Xdelete pattern (confirm). - Signal Graph:
h/lnon-empty column ·j/knode row (0/ggtop,G/Endbottom) ·Enterjump to deck ·oroute output ·eedit cable ·x/Xunlink cable / unlink all ·aadd connection (ors/m/dquick-add). - Take:
h/lbar (0/$/Gstart/end) ·vvisual range ·Enter/Alt+ckeep range ·xclear marks ·Xdiscard take (confirm) ·Ctrl+ssave take. - Devices (
Audio | MIDI):H/LswitchAudio ↔ MIDItab ·j/kvertical rows (w/bgroup jump; bareh/lno-op) ·Alt+h/l&,/.cycle values (Alt+Backspacereset) ·Enterpicker / run action / MIDI Learn ·rrescan audio or MIDI ports ·Ctrl+ssave config. OnMIDI:aadd mapping ·vtoggle invert ·x/Xdelete mapping / clear all user mappings (confirm).
- Macros:
- Settings (
g,/Ctrl+,), Song Properties (gP/Ctrl+Shift+i), Modals & Browsers:- Settings & Song Properties:
j/krow ·w/bgroup · bareh/lno-op ·Alt+h/l&,/.fine (Alt+H/L&</>coarse) ·Alt+Backspacereset ·EnterexactValueInput/ title edit ·aadd dir (g,) ·xremove dir (g,) ·FOS folder dialog (g,) ·Ctrl+ssave (g,) ·ccycle boundary picker. - Browsers, File Hub & Help:
h/l,H/L,Tab/BackTabswitch horizontal tabs/categories (FileHubExport rows adjust values withAlt+h/land,/., keepingH/L/Tab/1–4on tabs) ·j/klist ·/search ·Aaudition ·Spaceplay/pause ·Enteropen/commit ·Escclear search → cancel/restore.
- Settings & Song Properties:
4E. Workspace Presets & Window Keys (z / Ctrl+w)
| Key | Action / Layout Preset |
|---|---|
z1 | Compose: Pinned Arrange + working Pattern |
z2 | Perform: Pinned Arrange + Bank (Parts) + Output |
z3 | Sound Design: Pinned Pattern + Output + working Instrument (fallback Bank) |
z4 | Mix: Pinned Arrange + Output + working Mixer |
zz / zp / zx / zo | Toggle full-screen zoom / pin focused deck / close deck / keep only focused deck |
zh/zj/zk/zl, zw | Directional deck focus movement / cycle focus (Tab) |
z= / z- / z0 | Zoom Arrange/Pattern timeline in / out / reset (also Ctrl+= / Ctrl+- / Ctrl+0) |
4F. Modal Overlays (OverlayView)
Palette(:/Ctrl+Shift+p): Fuzzy Action Palette (subsequence search over actions, decks, layouts, 8 quick-add FX, themes, and dynamic Sections/Patterns/Instruments) with live top-slot▶ Run command:Ex passthrough.PresetBrowser(Pon Instrument): Unified Rack preset browser (engine_label: "RACK") with 6 category filter tabs (All/Synth/Sampler/Drums/Kit/Modular), 4 bare neutral defaults (Init Synth,Blank Sampler,Blank Kit,Blank Modular), Save Preset action, and live non-destructive audio preview from a fullProjectsnapshot (j/kpreview,/search,Aaudition,Spacetransport,Entersingle-transaction commit,Esczero-trace restore).GrooveBrowser(Pon Filter Effect): Live filter groove browser across the 128-slotFilterEnvbank (24MIT factory grooves + user grooves) with preview on scroll, Save-to-Bank, and Fork-to-Pattern (f).SongProperties(gP/Ctrl+Shift+i): Modal editor for Title, Tempo (BPM), Key Root, Scale (all 13NAMED_SCALES), Length (Bars), End Rule, and Live Timing on theuundo stack.MiniEditor(EnteronMini): Dedicated live-validated Mini-Notation editor (cadence_core::mini::parse_mini) with real-time Cycle 1 event count and resolved note preview.ValueInput(Enteron scalar controls): Unified exact scalar entry modal with live parse validation and formatted preview across Pattern Values, allParamAddresscontrols, Rack zone structural fields, Macro dials, Placement offsets, and Song Properties.FileHub(gf,Ctrl+Shift+f/o/s/e): 4-tab Open/Recent (with.rbsimport preview whenfeature = "rbs"is enabled), Save & Bundle, Import (auto-closes on preset/profile load), and Export (WAV/Stems), universal/search,H/L/Tab/1–4tabs, andFnative OS dialogs.Browser(B/gS/Samplerows): Universal/sample browser with async off-thread preview decoding, live auditioning, and automaticSampler -> Out.Inmodule insertion + RIFFsmpl/instmetadata application on the active Rack zone.Authoring(n/d/r/tA/ workflow keys): Typed modal draft forms for creating/editing patterns, derivations, instruments (SoundChoice::{Template(RackTemplate), Preset(String), Sampler { path, label }, Folder { path, label }}), channels, effects, sends, ducks, bounces, and live audio recording (RecordDraft).Settings(g,/Ctrl+,/:settings): PersistedUserConfigeditor: theme, startup preset, output monitor, follow,Auto-Record Takes, default BPM/key, project Live Timing, and auto-refreshingsample_dirs/preset_dirs.Help(?/Ctrl+Shift+/): 7-tab wrapped, universal/searchable reference (All,Navigate,Compose,Mini & Algebra,Sound & FX,Live & Jam,Files & CLI;H/L/Tabswitch tabs).Confirm: Unsaved-dirty & destructive protection guarding Quit, New, Open, ImportRbs, DeleteChannel, ClearMidiMappings, and DiscardTake.Tutorial,Picker,EventInspection,Inspect/Assets, andPrefixMenulegends (g,t,z,v,S).
5. Live 24-Bit Audio Recording & Hardware MIDI Control
5A. Live Audio Input & 24-Bit WAV Recording (crates/app/src/{devices.rs,recording.rs})
- Device & input setup (
Devices · Audiotab viaCtrl+dthenH/L, or:audio): Select input/output devices, sample rate, buffer size, mono/stereo channel capture (Stereo,Left (Ch 1),Right (Ch 2)), live monitoring (Off,Auto[monitor while armed/recording],On), latency trim (-100..+100 ms), and recovery actions (Audio Panic,Restart Audio,Rescan Devices). - Capture workflows (
ta,tA,ti,:rec):tatoggles quick recording immediately;tAopens theRecord Audioworkflow dialog (RecordingMode::{Synced, CountIn, Free}, target bar length, destination New Sampler or existing Rack Zone, optional Arrange placement).:rec [start|stop|cancel|dialog|free|countin [BARS]|bars <N>|zone ...|monitor [off|auto|on]|mode <stereo|left|right>|input <NAME|none>].- Audio captures off the RT thread via a lock-free SPSC ring, resamples cleanly when input/output hardware sample rates differ, applies latency trim, writes a portable 24-bit PCM WAV under
<project>/recordings/(or the configured session recordings directory for untitled projects), and commits aSamplerRack instrument + Part + Placement in one undoable transaction.
5B. Hardware MIDI Learn, Live Recording & Bi-Directional Feedback (crates/core/src/midi_map.rs, crates/app/src/midi/)
MIDI mapping and feedback are data-driven and hardware-agnostic inside cadence-app, with raw wire encoding isolated to cadence-engine::midi:
- Device Profiles (
UserConfig::midi_profile):"generic","standard_cc", and"minilab3_daw"(Arturia MiniLab 3 DAW-mode integration). - Sources & Value Modes:
MidiSource::{Cc, Note, PitchBend}(channel-scoped or omni);MidiValueMode::{Absolute, RelativeSigned, RelativeOffset64, Trigger, Toggle, Momentary}with[min, max],invert, and soft-pickup takeover (pickup: true) so absolute knobs catch the live value smoothly without jumps. - Bindable
MidiTargets:Param { address }(any automatableParamAddress, includingRack,Zone,Module, andCableattenuverters),FocusedMacro { slot: 0..8 }(tracks focused Effect/Channel controls, Project Macros 1–8 outside object decks, or active Rack controls prioritizing continuous!param.is_discrete()panel_pinsfirst, then continuous active-zone module controls, thenRackParams, then discrete pins),ProjectMacro { slot: 0..8 },LaneGain,MasterGain,Transport(10MidiTransportActions + universal MMC),LaunchSection,LaunchLanePart,MuteLane,SoloLane. - 1-Key MIDI Learn (
M): Resolves the focused target automatically (Macroslot →Midirow → object-deck automatable parameter →Mixerchannel gain/pan/send →Banklaunch part → active Rack’s first pinned control, first Filter cutoff, or Rack Cutoff). Pressingx/Backspacewhile armed unlearns;Esccancels. Learned mappings persist globally inUserConfig::midi_mappings. - Live Note & CC Recording (
R): Enters notes in step-entry mode when stopped; while playing, overdubs quantized polyphonic chords and lazily creates/updatesValues(Normalized, Ramp)automation curves for any moved MIDI CC or Project Macro (1500 msgesture undo coalescing). - Bi-Directional Feedback (
FeedbackProtocol::{None, StandardCcNote, ArturiaDaw}):App::sync_midi_feedbackemits pure semanticMidiFeedbackevents (InitDawMode, 2-line OLEDDisplaywith value bar, RGB pad LEDs acrossMidiPadMode::{Notes, Sections, Mutes},TransportLedKindLEDs, and CC echo) translated to hardware bytes bycadence-engine::midi.