Skip to content

guide scales

Aisjam edited this page Nov 15, 2026 · 1 revision

Scales, tuning and quantisation

Home · Section index

Working manual · 0.0.1-alpha · source snapshot 16 November 2026

SCALE sits directly above GROOVE (Select + Up from Groove). The scene keeps its slot, column and focus while visiting other scenes. Its twelve root-relative columns use the shared glyph painter; the TUNE / LOAD / SAVE toolbar is fixed at the bottom of the 640×480 display. The functional reference is the M8 Scale View, pages 28–29, adapted to Contour's horizontal layout and existing controls.

Controls

  • D-pad navigates the header, NOTE / EN / OFF / DEG, settings, tracks and toolbar.
  • Hold A with Left/Right to edit by one cent; Up/Down edits one semitone. A+B resets the selected offset. The detail line shows signed hundredths.
  • A toggles EN. DEG is read-only hexadecimal, with -- for disabled notes.
  • A on NOTE auditions the remembered instrument until A is released. Missing instruments are safely unavailable. Sample and synth previews use the existing dedicated audition slot and do not replace transport playback.
  • B+Left/Right switches slots; A+directions also edits the header slot and root.
  • A on the name opens the shared keyboard. Root changes rotate relationships; they do not rewrite enabled flags or offsets.
  • GLOBAL selects the default slot. ENTRY constrains new notes, DEGREES changes note editing to degree steps, PLAY enables playback quantisation, LIGHT enables subdued out-of-scale tracker text, and MODE selects NEAREST / UP / DOWN.
  • TRK values are GL (inherit global) or a slot 00–0F. Reserved lanes retain assignments; their labels remain dim until those lanes are enabled.
  • TUNE uses 0.01 Hz horizontal / 1 Hz vertical adjustment, bounded to 220–880 Hz.
  • The existing radial Menu action opens Reset Chromatic / Duplicate to Next / Load Preset. Existing radial Undo/Redo and Select+Y use project transactions. Start and Select navigation retain their global meanings.

The Project SCALE value selects the global slot with A+Left/Right and changes that slot's root by one semitone with A+Up/Down, wrapping between B and C. Its label displays the root alongside the scale name. Phrase and Roll A+direction pitch edits use tuned audition, released with A. Note entry, degree transposition, playback quantisation and highlighting are independent opt-ins. Enabling them never rewrites existing Phrase data. Disabled pitches still sound and retain their microtonal offsets unless PLAY quantisation maps them to an enabled pitch.

Musical model

core/tracker/Scale.hpp owns sixteen editable definitions, root-relative 12-bit masks, signed integer cents, reference tuning and twelve track assignments. Slot 00 is chromatic. The remaining slots start with the factory definitions. Factory definitions are generated independently and loaded by value into an editable slot; melodic minor uses its ascending form and diminished uses whole/half.

ScaleEngine provides pitch classes, degree indices, directional quantisation, degree transposition, frequency conversion and generic triad/seventh/inversion generation. Degree arithmetic works with any number of enabled notes. Empty masks use chromatic arithmetic while their UI flags remain disabled. NEAREST ties choose the lower pitch. Bounded note entry/playback chooses the nearest valid enabled pitch inside the MIDI range when a directional result exceeds it. transpose is also the reusable scale-aware arpeggio/note-generation primitive.

Audio and FX

Playback preparation builds a 16×128 table of semitone offsets outside audio. Each occupied voice resolves its saved or runtime scale and adds the cached offset through the existing Synth::tableModulation pitch interface. This preserves sampler resampling, instrument tuning, synth pitch controls, Tables, bends and glides. Each chord voice uses its own base pitch. Existing ARP, SCL, Table transpose and other chromatic FX semantics remain unchanged.

Snapshots adopt on the existing musical tick; sustained voices update pitch without retriggering. No new worker, callback allocation, filesystem access or audio synchronization is introduced. Audition extends the existing device control boundary to update a prepared preview pitch. The separate preview synth backend uses the one audition allocation, never a tracker or synth lane slot.

SCA 00–0F overrides one track's scale; SCG 00–0F changes the runtime global scale. Explicit track assignments take precedence over SCG. These append registry IDs and leave legacy SCL intact. Overrides persist across ordinary loops and pattern traversal, reset on fresh playback/stop, and never change ProjectData. Explicit track stop clears its SCA override. Invalid values are ignored.

Persistence and presets

CTP/CTL v35 stores all scale settings in chunk 22. Earlier files receive the default chromatic context, 440 Hz and disabled opt-ins. Autosave, recovery, backups and project history use the same document/codec. See the binary contract (repository reference: file-formats/project-v35.md).

User presets live under <content root>/Scales. They reuse the existing .ctp container: saving writes the current definition to slot 00 of an otherwise empty project; loading imports only that definition. Factory entries precede user files in the shared side menu. Names are sanitized for portable filenames, and existing destinations require the shared overwrite confirmation. SaveManager provides temporary-file replacement. No new extension or unversioned format is introduced.

Source map

New modules are core/tracker/Scale.hpp, core/input/ScaleEditor.hpp, core/save/ScaleSerializer.hpp, application/ScalePresets.hpp, application/NoteAudition.hpp, and scene/ScaleScene.{hpp,cpp}. Integration touches ProjectData/History/Serializer, SceneNavigation/SystemState, the FX registry/picker, tracker field editors and Phrase/Roll rendering, PlaybackData/Engine/Fx/VoicePool, the SDL audition boundary, Project and main. Tests are ScaleTests.cpp and ScaleSceneTests.cpp; CMake registers their targets.

What should be here

Documentation still to add
Annotated current-build screenshots and a recorded controller walkthrough for this topic.

Evidence and verification

Repository sources used for this page:

  • docs/scales.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.

Clone this wiki locally