Karya, built on 2018-02-23T20:23:55 (patch cf8565b7ac832266878af99a942555d139065f12)

Safe HaskellNone




REPL Cmds dealing with instruments and MIDI config.



allocated :: Ui.M m => m [Score.Instrument] Source #

List all allocated instruments.

list :: Cmd.M m => m Text Source #

List all allocated instrument configs all purty-like.

list_like :: Cmd.M m => Text -> m Text Source #

Pretty print matching instruments:

>pno - pianoteq/ loop1 [0..15]
>syn - sampler/inst 音

allocations :: Ui.M m => m UiConfig.Allocations Source #

Instrument allocations.

add and remove

add :: Util.Instrument -> Qualified -> Text -> [Midi.Channel] -> Cmd.CmdL () Source #

Allocate a new MIDI instrument. For instance:

LInst.add "m" "kontakt/mridangam-g" "loop1" [0]

This will create an instance of the kontakt/mridangam instrument named >m, and assign it to the MIDI WriteDevice loop1, with a single MIDI channel 0 allocated.

add_default :: Util.Instrument -> Qualified -> [Midi.Channel] -> Cmd.CmdL () Source #

Allocate the given channels for the instrument using its default device.

add_im :: Util.Instrument -> Qualified -> Cmd.CmdL () Source #

Allocate a new Im instrument.

add_play_cache :: Text -> Midi.Channel -> Cmd.CmdL () Source #

Add the play-cache instrument. This is a dummy instrument used to trigger the play-cache vst. It's emitted automatically if there are im instruments, but needs a channel allocation.

add_dummy :: Util.Instrument -> Util.Instrument -> Cmd.CmdL () Source #

Create a dummy instrument. This is used for instruments which are expected to be converted into other instruments during derivation. For instance, pasang instruments are stand-ins for polos sangsih pairs.

The qualified name still has to name a valid patch. Its common config will be used for the allocation, and MIDI-specific fields discarded.

allocate :: Cmd.M m => Score.Instrument -> UiConfig.Allocation -> m () Source #

All allocations should go through this to verify their validity, unless it's modifying an existing allocation and not changing the Qualified name.

remove :: Util.Instrument -> Cmd.CmdL () Source #

Remove an instrument allocation.

merge :: Cmd.M m => UiConfig.Allocations -> m () Source #

Merge the given configs into the existing ones. This also merges config_defaults into Patch.config_settings. This way functions that create Allocations don't have to find the relevant Patch.


rename_qualified :: Cmd.M m => Util.Instrument -> Qualified -> m () Source #

Point an instrument at a different Qualified.

rename :: Ui.M m => Util.Instrument -> Util.Instrument -> m () Source #

Rename an instrument.


mute :: Ui.M m => Util.Instrument -> m Bool Source #

Toggle and return the new value.

solo :: Ui.M m => Util.Instrument -> m Bool Source #

Toggle and return the new value.

add_environ :: (RestrictedEnviron.ToVal a, Ui.M m) => EnvKey.Key -> a -> Util.Instrument -> m () Source #

Add an environ val to the instrument config.

clear_environ :: Ui.M m => Util.Instrument -> m () Source #

Clear the instrument config's environ. The instrument's built-in environ from patch_environ is still present.


Midi.Patch.Config settings




change_instrument :: Qualified -> Cmd.CmdL () Source #

Replace the instrument in the current track with the given one, and initialize it. This is intended for hardware synths which need a program change or sysex, and can be invoked via Instrument.Browser.

device_of :: Score.Instrument -> Cmd.CmdL Midi.WriteDevice Source #

Synths default to writing to a device with their name. You'll have to map it to a real hardware WriteDevice in the write_device_map.

midi interface

read_devices :: Cmd.CmdL [(Midi.ReadDevice, [Midi.ReadDevice])] Source #

Every read device on the system, along with any aliases it may have.

write_devices :: Cmd.CmdL [(Midi.WriteDevice, [Midi.WriteDevice])] Source #

Every write device on the system, along with any aliases it may have.


teach :: Text -> Midi.Channel -> Midi.Control -> Cmd.CmdL () Source #

Send a CC MIDI message on the given device. This is for synths that use MIDI learn.

type Qualified = Text Source #

This is parsed into a Qualified.


initialize_all :: Cmd.M m => m () Source #

Initialize all instruments that need it.

need_initialization :: Ui.M m => m Text Source #

List allocated instruments that need initialization.

initialize_inst :: Cmd.M m => Score.Instrument -> m () Source #

Initialize an instrument according to its Patch.config_initialization.

initialize_realtime_tuning :: Cmd.M m => Score.Instrument -> m () Source #

Send a MIDI tuning message to retune the synth to its Patch.Scale. Very few synths support this, I only know of pianoteq.