Repository navigation
instruments pool
Working manual · 0.0.1-alpha · source snapshot 16 November 2026
POOL is the P node above INST EXT: Select+Up from INST twice. Select+Down
returns to INST EXT, Select+Right opens INST, and Select+Left opens Phrase
and updates the shared Phrase/Roll insertion memory. The highlighted instrument
and table column survive scene navigation. --pool starts on this scene.
INST shows the instrument's category tag to the right of its name.
The pool reads ProjectManager's sparse instrument map, displaying every valid
slot from 00 to InstrumentData::maxId. Allocated instruments count as populated,
even when they have no sample. Rows fit the 640x480 viewport below the HUD and
above the footer; browsing never allocates instruments. Stars use the loaded bank
when available, otherwise * and -. VOL is disabled (--): the current
instrument definition has no independent output-volume parameter. PAN edits the
existing signed -64..+64 hexadecimal control.
EDIT = A, OPTION = B, SHIFT = Select, PLAY = Start; keyboard mirrors these through InputMapper.
| Input | Result |
|---|---|
| D-pad | Row/column cursor |
| B+Left/Right | First/last slot |
| B+Up/Down | Back/forward eight slots |
| A on NAME | Shared text-entry overlay (populated slots only) |
| A on TAG | Shared tag/colour picker; B applies, Select cancels |
| A on FAV | Toggle favourite on release |
| A+Up/Down on ID/NAME | Swap neighbouring slots and remap all Phrase instrument references |
| A+directions on PAN | Fine horizontal/coarse vertical adjustment |
| A+B | Reset field; ID/NAME asks before clearing the instrument |
| Hold Select, press B | Copy instrument on ID/NAME, or typed TAG/FAV/PAN value |
| Select+A | Paste compatible value; occupied instrument slots require confirmation |
| Start | Audition at C4/7F when stopped; otherwise stop |
| Select+Start | Song playback from the current Chain slot |
| Hold B, press Select | Momentary current-track mute |
| B+Start | Momentary current-track solo |
| B+Select+Start | Clear all mute and solo states |
| L2+R2+Start | Explicit stop |
| Y | POOL ACTIONS: EXPORT or IMPORT |
The copy/mute overlap uses press order. Mix gestures settle for 150 ms before applying, allowing the three-button clear chord to supersede the pair. Release B first to latch; release the other button first to restore the prior state. Quick chords resolve on release. Leaving the scene or losing input focus restores unlatched mix state. Name/FAV/paste/reset/preview taps commit on release so building an editing chord cannot first toggle a favourite or start a preview.
Y → EXPORT opens ALL INSTRUMENTS / FAVOURITES ONLY with explicit CANCEL / EXPORT.
Choose the set with A, then move down to EXPORT and press A. Output goes to the
configured content root's Instruments directory, matching existing CTI packing.
Files use Contour_Instruments_YYYYMMDD.zip or Contour_Favourites_YYYYMMDD.zip
(UTC date), with a numeric suffix to preserve existing archives.
ZIP uses standard stored entries, CRC32, local headers, a central directory and
an end record. It is bounded to 128 MiB; larger selections fail explicitly.
Names are sanitized and prefixed with the original hexadecimal slot to avoid
collisions. manifest.json describes the actual exported selection. Each CTI
contains its own packed samples and all existing instrument parameters, tag and
favourite flag. Packing is performed on temporary resource documents; exports
never modify the project. Missing required samples abort the operation. SaveManager
stages and atomically finalizes the archive, removing its temporary output on failure.
Unpack with a standard ZIP utility into the content root's Instruments folder.
In another project, highlight a destination slot and choose Y → IMPORT. The
existing asset browser selects a CTI; replacing a populated slot requires
confirmation. Resource references are remapped transactionally into the destination
registry. The archived original ID does not constrain the destination slot.
InstrumentPoolEditor owns cursor/edit behavior in ContourEditors. The scene owns dialogs, naming and browser lifecycle. ProjectManager remains the sole document owner. Clipboards own value copies of packed samples; external sample references remain shared. Clearing a slot never deletes external sample files. Reordering swaps definitions and all wave/INST references in every allocated Phrase, plus insertion memory, in one commit. Chain/Song structures reference Phrases rather than instruments, so their assignments remain intact. Synth references are unchanged.
CTP/CTL v17 adds stable tag and theme-colour IDs to v16's tag/favourite data;
CTI stays v1 with its canonical embedded CTP. Older files migrate with Core colour,
preserving custom text. See the wire format (repository reference: file-formats/project-v17.md) and
the three-column picker.
Audition is an ephemeral PlaybackData request sent through the existing SDL audio device and INST voice backend. It creates no Phrase/Step events or project edits. One-shot samples finish naturally; looping samples receive a two-second note gate and normal release, with a ten-second safety cap. Audition hides arrangement playheads. SINGLE and SLICE support forward, reverse, ping-pong and loop playback. ROUND, ZONE and KIT remain authoring-only sample types. Synths use their separate S-slot allocation and model-specific editors; see the Synths section.
| Documentation still to add |
|---|
| Annotated current-build screenshots and a recorded controller walkthrough for this topic. |
Repository sources used for this page:
docs/instrument-pool.md
This is a documentation/source review, not a new runtime or hardware test. Physical response, screenshots and listening examples still need verification on a recorded build.