improve cfg legibility and move more defs there

This commit is contained in:
i do not exist 2026-09-20 14:17:28 +03:00
parent 83c03f5a80
commit 8b96ddb411
8 changed files with 182 additions and 318 deletions

View file

@ -1,207 +1,86 @@
(view :logo (text tek ))
(mode Menu (name Main Menu) (info Welcome to Tek!) (keys Y Confirm)
(view (bar/s 2 Transport (bar/n 2 Status (align/c (bar/s 2 (align/x (bg (g 12) Logo)) Menu))))))
(mode Transport (name Transport) (info JACK transport controller.)
(keys Clock Global)
(view Transport))
(mode Arranger (name Arranger) (info Launch grid.)
(keys Global Clock Tracks Scenes Clip Launch Color History)
(view (bar/n 2 Status (bar/s 8 (bar/e 16 (align/nw Transport)
(bar/w 20 (bar/s 2 (bar/w 4 TracksOutputsAdd TracksOutputsCount)
(bar/s 2 (bar/w 4 TracksDevicesAdd TracksDevicesCount)
(bar/s 2 (bar/w 4 TracksNamesAdd TracksNamesCount)
(bar/w 4 TracksInputsAdd TracksInputsCount))))
(align/x (bar/s 2 TracksOutputsCells
(bar/s 2 TracksDevicesCells
(bar/s 2 TracksNamesCells TracksInputsCells))))))
(bar/w 20 (text) (bar/e 16 ScenesNames ScenesClips))))))
(mode Sequencer (info MIDI sequencer.)
(keys Global Clock I IFine Y Page EditorView EditorAdd EditorDel)
(view (bsp/s (exact/h 1 Transport) (bsp/n (exact/h 1 Status) (fill/xy (bsp/a (fill/xy (align/e Pool)) Editor))))))
(mode Sampler (info Sample player.)
(keys SamplerDirs SamplerRec SamplerPlay)
(view (bsp/s (exact/h 1 Transport) (bsp/n (exact/h 1 Status) (fill/xy SampleGrid)))))
(mode Groovebox (info Sequencer with sampler.)
(keys Global Clock Sampler I IFine Y Page EditorView EditorAdd EditorDel)
(view (bsp/w MetersOut (bsp/e MetersIn (bsp/w GrooveMeta GrooveEditor)))))
(view :browse (bsp/s
(pad/xy 3 1 :browse-title)
(fg (g 96) browser)))
(view Logo (text tek! 0.4.0 ))
(view Browse (bsp/s (pad/xy 3 1 BrowseTitle) (fg (g 96) browser)))
(view PortsOut (bsp/s (align/w (text L-AUDIO-OUT)) (bsp/e (text MIDI-OUT) (align/e (text AUDIO-OUT-R)))))
(view PortsIn (bsp/s (align/w (text L-AUDIO-IN)) (bsp/e (text MIDI-IN) (align/e (text AUDIO-IN-R)))))
(view GrooveMeta (fill/y (align/n (stack/s Pool MidiInsStatus MidiOutsStatus AudioInsStatus AudioOutsStatus))))
(view GrooveEditor (bsp/n GrooveSample GrooveSequence))
(view GrooveSample (exact/h SampleHeight (bsp/e (fill/y (exact/w 20 (align/nw SampleStatus))) SampleViewer)))
(view GrooveSequence (bsp/e (fill/y (align/n (bsp/s Status/v EditorStatus))) (bsp/e SamplesKeys Editor)))
(view Status (bar/s 1 (text Mode) ModeList))
(view Transport (bg (g 0) (pad/x 1 (bar/e 4 PlayPause (bar/e 16 Bpm (bar/e 16 Beat Time))))))
(mode :transport
(name Transport)
(info JACK transport controller.)
(keys :clock :global)
:transport)
(keys Global (@f1 (dialog Help))
(@f2 (project new))
(@f3 (dialog History))
(@f6 (dialog :save))
(@f8 (dialog :options))
(@f9 (dialog :load))
(@f10 (dialog :quit)))
(mode :menu
(name Menu)
(info Mode selector.)
(keys :axis/y :confirm)
(view
(bar/s 2 (pad/x 1 :transport)
(bar/n 2 :status
(align/c
(bar/s 2 (align/x (bg (g 12) :logo))
:dialog/menu))))))
(keys Back (@escape cancel))
(keys Confirm (@enter confirm))
(keys Page (@pgup page/up) (@pgdn page/down))
(keys Delete (@delete delete) (@backspace delete/back))
(keys History (@u (undo 1)) (@r (redo 1)))
(keys X (@left (axis (dec X))) (@right (axis (inc X))))
(keys Y (@up (axis (dec Y))) (@down (axis (inc Y))))
(keys Z (@minus (axis (dec Z))) (@equal (axis (inc Z))))
(keys I (@comma (axis (dec I))) (@period (axis (inc Z))))
(keys W (@openbracket (axis (dec W))) (@closebracket (axis (inc W))))
(keys XFine (@shift/left (axis (dec XFine))) (@shift/right (axis (inc XFine))))
(keys YFine (@shift/up (axis (dec YFine))) (@shift/down (axis (inc YFine))))
(keys ZFine (@underscore (axis (dec ZFine))) (@plus (axis (inc ZFine))))
(keys IFine (@lt (axis (dec IFine))) (@gt (axis (inc ZFine))))
(keys WFine (@openbrace (axis (dec WFine))) (@closebrace (axis (inc WFine))))
(keys :back (@escape cancel))
(keys :confirm (@enter confirm))
(keys :axis/y (@up (axis (dec :y)))
(@down (axis (inc :y))))
(keys Clock (@space (clock/toggle 0)) (@shift/space (clock/toggle 0)))
(keys Scenes (@shift/S (scenes add)) (@s (scenes select)) (@up (scenes prev)) (@down (scenes next)))
(keys Tracks (@shift/T (tracks add)) (@t (tracks select)) (@left (tracks prev)) (@right (tracks next)))
(keys Clip (@l (toggle :loop)) (@tab (clip upsert) (edit toggle)))
(keys Color (@c (color)))
(keys Launch (@q (launch)))
(mode :arranger (name Arranger) (info Launch grid.)
(keys :clock :color :launch :scenes :tracks :clip :global :history :saveload)
(mode :editor (keys :editor))
(mode :dialog (keys :dialog))
(mode :message (keys :message))
(mode :add-device (keys :add-device))
(mode :browse (keys :browse))
(mode :rename (keys :input))
(mode :length (keys :rename))
(mode :clip (keys :clip))
(mode :track (keys :track))
(mode :scene (keys :scene))
(mode :mix (keys :mix))
(view
(bar/n 2 :status
(bar/s 8
(bar/e 16 (align/nw (pad/x 1 :transport))
(bar/w 20 (bar/s 2 (bar/w 4 :tracks/outputs/add :tracks/outputs/count)
(bar/s 2 (bar/w 4 :tracks/devices/add :tracks/devices/count)
(bar/s 2 (bar/w 4 :tracks/names/add :tracks/names/count)
(bar/w 4 :tracks/inputs/add :tracks/inputs/count))))
(align/x
(bar/s 2 :tracks/outputs/cells
(bar/s 2 :tracks/devices/cells
(bar/s 2 :tracks/names/cells
:tracks/inputs/cells))))))
(bar/w 20 (text)
(bar/e 16 :scenes/names
:scenes/clips))))))
(keys EditorView (see X XFine Z ZFine) (@z toggle :lock))
(keys EditorAdd (@a editor/append :true) (@enter editor/append :false))
(keys EditorDel (@del editor/delete/note) (@shift/del editor/delete/note))
(keys :global
(@f1 (dialog :help))
(@f2 (project new))
(@f3 (dialog :history))
(@f6 (dialog :save))
(@f8 (dialog :options))
(@f9 (dialog :load))
(@f10 (dialog :quit)))
(keys Sequencer (see Color Launch) (@shift/I input/add) (@shift/O output/add))
(keys :clock
(@space (clock/toggle 0))
(@shift/space (clock/toggle 0)))
(keys SamplerRec (@r sampler/record/toggle SelectedSample) (@shift/R sampler/record/back))
(keys SamplerPlay (@p sampler/play/sample SelectedSample) (@P sampler/stop/sample SelectedSample))
(keys SamplerImpEx (@shift/f6 dialog :export/sample) (@shift/f9 dialog Import/sample))
(keys SamplerDirs (@up sampler/select :sample/above) (@down sampler/select :sample/below) (@left sampler/select :sample/to/left) (@right sampler/select :sample/to/right))
(keys :color
(@c (color)))
(keys :launch
(@q (launch)))
(keys :scenes
(@shift/S (scenes add))
(@s (scenes select))
(@up (scenes prev))
(@down (scenes next)))
(keys :tracks
(@shift/T (tracks add))
(@t (tracks select))
(@left (tracks prev))
(@right (tracks next)))
(keys :clip (see :color :launch :axis/z :axis/z2 :delete)
(@l (toggle :loop))
(@tab (clip upsert) (edit toggle)))
(view :ports/out
(bsp/s (align/w (text L-AUDIO-OUT))
(bsp/e (text MIDI-OUT)
(align/e (text AUDIO-OUT-R)))))
(view :ports/in
(bsp/s (align/w (text L-AUDIO-IN))
(bsp/e (text MIDI-IN)
(align/e (text AUDIO-IN-R)))))
(mode :sequencer (name Sequencer) (info MIDI sequencer.)
(keys :editor :clock :global)
(mode browse (keys :browse))
(mode rename (keys :pool/rename))
(mode length (keys :pool/length))
(view
(bsp/s (exact/h 1 :transport)
(bsp/n (exact/h 1 :status)
(fill/xy (bsp/a (fill/xy (align/e :pool))
:editor))))))
(mode :sampler (name Sampler) (info Sample player.)
(keys :sampler/directions :sampler/record :sampler/play)
(view
(bsp/s (exact/h 1 :transport)
(bsp/n (exact/h 1 :status)
(fill/xy :samples/grid)))))
(mode :groovebox (name Groovebox) (info Sequencer with sampler.)
(keys :clock :editor :sampler :global)
(mode browse (keys :browse))
(mode rename (keys :pool-rename))
(mode length (keys :pool-length))
(view
(bsp/w :meters/output
(bsp/e :meters/input
(bsp/w :groove/meta
:groove/editor)))))
(view :groove/meta (fill/y (align/n (stack/s :midi-ins/status :midi-outs/status :audio-ins/status :audio-outs/status :pool))))
(view :groove/editor (bsp/n :groove/sample :groove/sequence))
(view :groove/sample (exact/h :h-sample-detail (bsp/e (fill/y (exact/w 20 (align/nw :sample-status))) :sample-viewer)))
(view :groove/sequence (bsp/e (fill/y (align/n (bsp/s :status/v :editor-status))) (bsp/e :samples/keys :editor)))
(keys :axis/x (@left dec :x)
(@right inc :x))
(keys :axis/x2 (@shift/left dec :x2)
(@shift/right inc :x2))
(keys :axis/y2 (@shift/up dec :y2)
(@shift/down inc :y2))
(keys :axis/z (@minus dec :z)
(@equal inc :z))
(keys :axis/z2 (@underscore dec :z2)
(@plus inc :z2))
(keys :axis/i (@comma dec :i)
(@period inc :z))
(keys :axis/i2 (@lt dec :i2)
(@gt inc :z2))
(keys :axis/w (@openbracket dec :w)
(@closebracket inc :w))
(keys :axis/w2 (@openbrace dec :w2)
(@closebrace inc :w2))
(keys :focus)
(keys :editor (see :axis/i :axis/i2 :axis/y
:page :editor/view :editor/add :editor/del))
(keys :editor/view (see :axis/x :axis/x2 :axis/z :axis/z2)
(@z toggle :lock))
(keys :editor/add (@a editor/append :true)
(@enter editor/append :false))
(keys :editor/del (@del editor/delete/note)
(@shift/del editor/delete/note))
(keys :sampler/record (@r sampler/record/toggle :sample/selected)
(@shift/R sampler/record/back))
(keys :sampler/play (@p sampler/play/sample :sample/selected)
(@P sampler/stop/sample :sample/selected))
(keys :sampler/import-export (@shift/f6 dialog :export/sample)
(@shift/f9 dialog :import/sample))
(keys :sampler/directions (@up sampler/select :sample/above)
(@down sampler/select :sample/below)
(@left sampler/select :sample/to/left)
(@right sampler/select :sample/to/right))
(keys :track (see :color :launch :axis/z :axis/z2 :delete)
(@r toggle :rec)
(@m toggle :mon)
(@p toggle :play)
(@P toggle :solo))
(keys :scene (see :color :launch :axis/z :axis/z2 :delete))
(keys :help (@f1 dialog :help))
(keys :page (@pgup page/up)
(@pgdn page/down))
(keys :delete (@delete delete)
(@backspace delete/back))
(keys :input (see :axis/x :delete) (:char input))
(keys :list (see :axis/y :confirm))
(keys :length (see :axis/x :axis/y :confirm))
(keys :browse (see :list :input :focus))
(keys :history (@u undo 1)
(@r redo 1))
(keys :saveload (@f6 dialog :save)
(@f9 dialog :load))
(keys :sequencer (see :color :launch)
(@shift/I input/add)
(@shift/O output/add))
(keys :pool (see :axis-y :axis-w :axis/z2 :color :delete)
(@n rename/begin)
(@t length/begin)
(@m import/begin)
(@x export/begin)
(@shift/A clip/add :after :new/clip)
(@shift/D clip/add :after :cloned/clip))
(keys Track (see Color Launch Z ZFine Delete) (@r toggle :rec) (@m toggle :mon) (@p toggle :play) (@P toggle :solo))
(keys Scene (see Color Launch Z ZFine Delete))
(keys Input (see X Delete) (:char input))
(keys List (see Y Confirm))
(keys Length (see X Y Confirm))
(keys Browse (see List Input))
(keys Pool (see Y W ZFine Color Delete) (@n rename/begin) (@t length/begin) (@m import/begin) (@x export/begin) (@shift/A clip/add :after :newClip) (@shift/D clip/add :after :clonedClip))