Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Cmd.Repl.LInst

Contents

Description

REPL Cmds dealing with instruments and MIDI config.

Synopsis

get

allocated :: Ui.M m => m [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 => 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.

modify

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

Rename an instrument.

Common.Config

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

Midi.Patch.Config settings

util

Cmd.EditState

change_instrument

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

misc

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

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 => Instrument -> m () Source #

Initialize an instrument according to its Patch.config_initialization.

initialize_realtime_tuning :: Cmd.M m => 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.