Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

App.Config

Description

Global static app defaults.

This should minimize imports, since everyone should be able to import this without incurring dependencies.

Synopsis

Documentation

type SelNum = Int Source #

This is Num, but duplicated here to avoid the import.

data Platform Source #

Constructors

Mac 
Linux 

Instances

Instances details
Show Platform Source # 
Instance details

Defined in App.Config

Eq Platform Source # 
Instance details

Defined in App.Config

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

type SortKey = Int Source #

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_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.Highlights. 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.

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).

view_size :: (Int, Int) Source #

Default size of new views.

zoom :: Zoom.Zoom Source #

Create new views at this zoom.

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.

set_face :: Bool -> Style.FontFace -> Style.StyleId -> Style.StyleId Source #

Tweak the StyleId to set or enset the given Style.FontFace.

data Style Source #

These should line up with the plain_styles list below.

Instances

Instances details
Enum Style Source # 
Instance details

Defined in App.Config

Show Style Source # 
Instance details

Defined in App.Config

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

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.

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.