Safe Haskell | Safe-Inferred |
---|
Global static app defaults.
This should minimize imports, since everyone should be able to import this without incurring dependencies.
Synopsis
- type SelNum = Int
- data Platform
- platform :: Platform
- data_dir :: Path.Relative
- save_dir :: Path.Relative
- ky_paths :: [Path.Relative]
- instrument_dir :: Path.Relative
- im_dir :: Path.Relative
- sc_dir :: Path.Relative
- instrument_cache_dir :: Path.Relative
- local_dir :: Path.Relative
- log_dir :: Path.Relative
- type SortKey = Int
- status_chord :: (SortKey, Text)
- status_control :: (SortKey, Text)
- status_selection :: (SortKey, Text)
- status_track_id :: (SortKey, Text)
- status_zoom :: (SortKey, Text)
- status_octave :: (SortKey, Text)
- status_step :: (SortKey, Text)
- status_record :: (SortKey, Text)
- status_note :: (SortKey, Text)
- status_note_text :: (SortKey, Text)
- status_integrate_source :: (SortKey, Text)
- repl_socket_name :: FilePath
- mouse_select :: Types.MouseButton
- insert_selnum :: SelNum
- temporary_insert_selnum :: SelNum
- error_selnum :: SelNum
- step_play_selnum :: SelNum
- play_position_selnum :: SelNum
- highlight_selnum :: SelNum
- im_progress_selnum :: SelNum
- max_selnums :: SelNum
- selection_colors :: [Color.Color]
- lookup_selection_color :: SelNum -> Color.Color
- highlight_colors :: Map Color.Highlight Color.Color
- box_color :: Color.Color
- val_edit_color :: Color.Color
- method_edit_color :: Color.Color
- advance_color :: Color.Color
- no_advance_color :: Color.Color
- play_color :: Color.Color
- abbreviation_color :: Color.Color
- busy_color :: Color.Color
- mute_color :: Color.Color
- solo_color :: Color.Color
- im_pending_color :: Color.Color
- im_working_color :: Color.Color
- track_bg :: Color.Color
- ruler_bg :: Color.Color
- status_default :: Color.Color
- status_root :: Color.Color
- status_integrate_destination :: Color.Color
- status_score_integrate_destination :: Color.Color
- skeleton :: Color.Color
- integrate_skeleton :: Color.Color
- score_integrate_skeleton :: Color.Color
- default_derive_wait :: NominalDiffTime
- default_keep_history :: Int
- default_scale_id :: Text
- read_device_pb_range :: (Int, Int)
- view_size :: (Int, Int)
- zoom :: Zoom.Zoom
- ruler_width :: Types.Width
- track_width :: Types.Width
- collapsed_width :: Types.Width
- track_signal_color :: Color.Color
- clip_namespace :: Text
- clip_block_name :: Text
- bconfig_box :: (Color.Color, Char)
- view_top_padding :: Int
- block_title_height :: Int
- track_title_height :: Int
- view_bottom_padding :: Int
- view_left_padding :: Int
- window_decoration_h :: Int
- bravura :: String
- event_text_height :: Int
- event_comment :: Text
- styles :: [Style.Style]
- style_faces :: [[Style.FontFace]]
- set_face :: Bool -> Style.FontFace -> Style.StyleId -> Style.StyleId
- event_style :: Style -> Style.StyleId -> Style.StyleId
- data Style
- = Note
- | NoteBlockCall
- | Control
- | Pitch
- | NoteParent
- | Error
- | Commented
- default_style :: Style.StyleId
- plain_styles :: [Style.Style]
- note_color :: Color.Color
- block_call_color :: Color.Color
- control_color :: Color.Color
- pitch_color :: Color.Color
- note_parent_color :: Color.Color
- parse_error_color :: Color.Color
- integrated_style :: Style.StyleId -> Style.StyleId
- unmodified_style :: Style.StyleId -> Style.StyleId
- modified_style :: Style.StyleId -> Style.StyleId
Documentation
paths
data_dir :: Path.Relative Source #
All local data is relative to this dir.
data, shared between repos
save_dir :: Path.Relative Source #
Saved scores are expected to be relative to this directory. I use a symlink to have a path relative to the app dir, but point to a global directory.
ky_paths :: [Path.Relative] Source #
These directories are searched for ky files containing local definitions. The directory of the saved score is prepended to the list.
instrument_dir :: Path.Relative Source #
Store instrument db code and data.
instrument_cache_dir :: Path.Relative Source #
Directory for instruments with slow patch loading to save their caches.
data, local to a repo
local_dir :: Path.Relative Source #
All code and data local to an installation (i.e. specific to a particular configuration) should go here.
status view
per-view
The block status bar is not very wide, so it's important to control what goes in there, and more importantly, which order. Items with a high key are more likely to be cut off.
status_chord :: (SortKey, Text) Source #
status_control :: (SortKey, Text) Source #
Control value, if this is a control track.
status_selection :: (SortKey, Text) Source #
Selection start and range.
status_track_id :: (SortKey, Text) Source #
Selected TrackId.
status_zoom :: (SortKey, Text) Source #
Zoom and scroll of the visible area.
per block
status_octave :: (SortKey, Text) Source #
Base octave of the kbd note entry.
status_step :: (SortKey, Text) Source #
Current time step.
status_record :: (SortKey, Text) Source #
Various record flags. Most are reflected in the color of the edit box, but the secondary ones go here.
status_note :: (SortKey, Text) Source #
Text of the last note, even if it didn't create an event. Useful to know what a key would enter.
status_note_text :: (SortKey, Text) Source #
Track state_note_text
, which is the previously entered note track
text. This is useful e.g. to set an attribute and maintain that for
several notes in a row.
status_integrate_source :: (SortKey, Text) Source #
Show the source block for blocks integrated from another block.
repl
repl_socket_name :: FilePath Source #
Unix socket to listen on for repl requests.
input
mouse_select :: Types.MouseButton Source #
This is the primary mouse button, used to set the insertion selection.
selnums
insert_selnum :: SelNum Source #
The insertion selection is what just about all Cmds should look at to know where to apply any score changes they are supposed to make. Generally if a Cmd doesn't have specific BlockId, TrackId, and ScoreTime arguments, it probably defaults to the insert_selnum.
temporary_insert_selnum :: SelNum Source #
Temporary insert point, to indicate insert position when it's not the insert_selnum.
error_selnum :: SelNum Source #
Highlight errors. I use insert_selnum
for this nowadays, so it's
probably unused.
step_play_selnum :: SelNum Source #
Display current Cmd.StepPlay position.
play_position_selnum :: SelNum Source #
Display current play position, managed by play monitor thread.
highlight_selnum :: SelNum Source #
Display Color.Highlight
s. This has many possible colors.
im_progress_selnum :: SelNum Source #
Show im progress, as communicated from external im synths. This also has multiple colors.
max_selnums :: SelNum Source #
The most number of SelNums that will be used. The only reason this needs
a constant is so refresh_selections
can emit updates for all
selections.
selection_colors :: [Color.Color] Source #
Colors that come from a SelNum.
colors
advance_color :: Color.Color Source #
Colors indicate if state_advance
is set.
no_advance_color :: Color.Color Source #
Colors indicate if state_advance
is set.
play_color :: Color.Color Source #
Set when playing.
status_default :: Color.Color Source #
Default color for the block status line background.
status_root :: Color.Color Source #
Color for the status of the root block.
status_integrate_destination :: Color.Color Source #
Color for the status of a block integrated from another block.
status_score_integrate_destination :: Color.Color Source #
Like status_integrate_destination
, but for score integration.
skeleton :: Color.Color Source #
Color of the skeleton lines.
integrate_skeleton :: Color.Color Source #
Color of lines indicating an integrate dependency.
score_integrate_skeleton :: Color.Color Source #
Color of lines indicating a score integrate dependency.
defaults
default_derive_wait :: NominalDiffTime Source #
The background derive threads will wait this many seconds before starting up, to avoid working too hard during an edit.
default_keep_history :: Int Source #
Keep this many past history entries for undo. Beyond this entries will have to be loaded from disk.
default_scale_id :: Text Source #
Default scale id for new projects. It's a string so I don't have import Perform.Pitch.
read_device_pb_range :: (Int, Int) Source #
Default range for input devices (e.g. MIDI keyboards).
ruler_width :: Types.Width Source #
Default width for the block ruler track.
track_width :: Types.Width Source #
Default width for new tracks. This should just fit common control track
contents, e.g. e (4f#)
.
collapsed_width :: Types.Width Source #
Width of the divider that represents a collapsed track.
track_signal_color :: Color.Color Source #
Default color for the track signal, as rendered in the track UI.
clip_namespace :: Text Source #
The default namespace for the clipboard. Copies go to block + tracks in this namespace.
clip_block_name :: Text Source #
The copied block will be BlockId (Id.id clip_namespace clip_block_name).
hardcoded configs
bconfig_box :: (Color.Color, Char) Source #
Default contents of track and sb boxes.
fiddly pixel bits
view_top_padding :: Int Source #
This is the number of pixels taken up by the various gizmos in the window track beyond the main track view. It's only correct when the window is first created, since various widgets can be dragged around.
window_decoration_h :: Int Source #
How many pixels the window bar consumes above the window. This is needed because to place windows I need an accurate idea of their dimensions. I can wait to get the resized msg back from fltk, but that's too late if if I want to change the size of a window and do something (e.g. zoom) based on the new size.
TODO I should actually be getting this from fltk but it's easier to hardcode for now. But I need a window, since it comes from Fl_Window::decorated_h() - Fl_Window::h(). However I can't assume that linux will have 0. Oh and this doesn't work on linux with fvwm anyway, because fltk can't figure out the decoration size.
fonts
event_text_height :: Int Source #
This is enough pixels to display one line of text in the normal font and
size, and not seem cramped. It corresponds to a bit more than fl_height()
of the plain_styles
below.
TODO it could be derived to adjust when the default style changes. Currently it's derived via the traditional process of zooming and squinting.
event style
event_comment :: Text Source #
The comment for tracklang is --, but if an event starts with this comment, the whole event is ignored. A normal comment would mean the event exists, but has no expression.
styles :: [Style.Style] Source #
Like Symbols, these are sent to the UI layer at startup and then remain static.
style_faces :: [[Style.FontFace]] Source #
set_face :: Bool -> Style.FontFace -> Style.StyleId -> Style.StyleId Source #
Tweak the StyleId to set or enset the given Style.FontFace
.
event_style :: Style -> Style.StyleId -> Style.StyleId Source #
These should line up with the plain_styles
list below.
plain_styles :: [Style.Style] Source #
note_color :: Color.Color Source #
Events on note tracks.
block_call_color :: Color.Color Source #
Events on note tracks which have a block call. I color these specially because they're very common, and thus it's common for them to accidentally conflict with other note generators.
control_color :: Color.Color Source #
Events on control tracks.
pitch_color :: Color.Color Source #
Events on pitch tracks
note_parent_color :: Color.Color Source #
A note track with tracks below it.
parse_error_color :: Color.Color Source #
Parse errors.
integrated_style :: Style.StyleId -> Style.StyleId Source #
Indicates that this event was integrated from somewhere else.
unmodified_style :: Style.StyleId -> Style.StyleId Source #
Indicates that this integrated event has not yet been modified.
modified_style :: Style.StyleId -> Style.StyleId Source #
Indicates that this integrated event was modified after integration.