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
2 changes: 1 addition & 1 deletion docs/midi-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ most.
| `POST /api/midi?outMode=abs\|rel` | knobs out as a virtual position (default) or as relative steps. Persisted. |
| `POST /api/midi?outMul=N` | outbound sensitivity the other way: steps per detent, `1..8`. Setting one of `outMul`/`outDiv` above 1 resets the other to 1; the console page shows both as one scale from ×8 through 1:1 to 1/16. |
| `...&knob=1..4` | Apply `outMul`/`outDiv` to one knob; without it, to all four. Each knob keeps its own ratio; `GET` reports `outMul` and `outDiv` as four-element arrays. |
| `POST /api/midi?outDiv=N` | outbound sensitivity: detents per outbound step, `1..16`, persisted on the panel. The encoders have 20 detents a turn, so `1` is 20 steps per turn and `4` is 5. Default `1` (`PF_MIDI_OUT_DIVISOR`). |
| `POST /api/midi?outDiv=N` | outbound sensitivity: detents per outbound step, `1..16`, persisted on the panel. The encoders have 24 detents a turn, so `1` is 24 steps per turn and `4` is 6. Default `1` (`PF_MIDI_OUT_DIVISOR`). |
| `POST /api/midi?host=<ip>` | A host to **invite**: the panel sends the session invitation itself on boot and again every 20 s while no session is up, so a panel that reboots comes back into the DAW without anyone reopening rtpMIDI or Audio MIDI Setup. The host must accept invitations (rtpMIDI: *Who may connect to me: Anyone*; macOS: the same setting in the Network MIDI window). Empty string clears it. Persisted. |

## Why these numbers
Expand Down
8 changes: 4 additions & 4 deletions firmware/patternflow/console/midi.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
.sens .top b{font-size:13px;font-weight:600}
.sens .top label{margin-left:auto;font-size:12px;color:var(--muted);display:flex;gap:6px;align-items:center;cursor:pointer}
.sens .top label input{accent-color:var(--led)}
/* The readout column is in its own font's ch: the longest reading is 29
(1/16 at 101.6 turns), plus room for a fallback font's wider × and ·.
/* The readout column is in its own font's ch: the longest reading is 28
(1/16 at 84.7 turns), plus room for a fallback font's wider × and ·.
Narrower, it spilled past the page edge; on a phone it goes under the
slider instead. */
.g{display:grid;grid-template-columns:28px minmax(0,1fr) 32ch;align-items:center;gap:12px;padding:5px 0;
Expand Down Expand Up @@ -201,9 +201,9 @@ <h2>The map</h2>
return mul>1?0:GAINS.length-1;
}
function gainText(g){return g[0]>1?('\u00d7'+g[0]):(g[1]>1?('1/'+g[1]):'1 : 1')}
// 20 detents a turn; 127 steps end to end.
// 24 detents a turn (PEC11R-4220F-S0024); 127 steps end to end.
function rowText(g,abs){
var perTurn=20*g[0]/g[1];
var perTurn=24*g[0]/g[1];
var t=gainText(g)+' \u00b7 '+(Math.round(perTurn*10)/10)+'/turn';
if(abs)t+=' \u00b7 '+(Math.round(127/perTurn*10)/10)+' turns';
return t;
Expand Down
4 changes: 2 additions & 2 deletions firmware/patternflow/features/midi/core_midi.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ inline bool runtimeEnabled = true;
// Outbound sensitivity: detents per relative-CC step. A DAW moves a mapped
// parameter a fixed amount per step, and one detent per step turned out to be
// a lot of parameter per wrist on the first Live session - the panel's
// encoders have 20 detents a turn, so at 1 a full turn is 20 steps and at 4
// it is 5. Remainders accumulate, so slow turns still arrive. Runtime, via
// encoders have 24 detents a turn, so at 1 a full turn is 24 steps and at 4
// it is 6. Remainders accumulate, so slow turns still arrive. Runtime, via
// POST /api/midi?outDiv=N, persisted; PF_MIDI_OUT_DIVISOR is the default.
#ifndef PF_MIDI_OUT_DIVISOR
#define PF_MIDI_OUT_DIVISOR 1
Expand Down
Loading
Loading