Safe Haskell | Safe-Inferred |
---|
Functions to deal with tuning instruments.
E.g.:
LTuning.realtime "pno" =<< LTuning.selection True LTuning.write_ksp (Just "wayang") "charu.ksp" =<< LTuning.scale True "raga" "key=charukesi"
nrpn tuning is a lot less hassle than copy pasting KSP everywhere:
LTuning.nrpn "pemade" =<< LTuning.selection True
Don't forget to set the score to the same scale or things will sound confusing. Also, reaper won't receive sysex on a track unless you set it to receive all channels.
To retune all instruments that do tuning via either nrpn
or realtime
:
LTuning.retune =<< LTuning.selection True
Synopsis
- table :: Patch.Scale -> Text
- selection :: Cmd.M m => Bool -> m Patch.Scale
- scale_at :: Cmd.M m => BlockId -> TrackId -> m (Patch.Scale, [Text])
- named :: Cmd.M m => Bool -> Text -> Text -> m Patch.Scale
- get_scale :: Cmd.M m => Text -> m Scale
- make_patch_scale :: Cmd.M m => Scale -> Text -> m (Patch.Scale, [Text])
- derive :: Cmd.M m => Deriver a -> m (Maybe.Maybe a, [Text])
- all_inputs :: [(Midi.Key, Pitch.Input)]
- set_scale :: Cmd.M m => Util.Instrument -> m ()
- retune :: Cmd.M m => Patch.Scale -> m [Util.Instrument]
- get_tuning :: Cmd.M m => Util.Instrument -> Patch.Scale -> m Text
- realtime :: Cmd.M m => Util.Instrument -> Patch.Scale -> m ()
- nrpn :: Cmd.M m => Util.Instrument -> Patch.Scale -> m ()
- write_ksp :: Maybe.Maybe Util.Instrument -> FilePath -> Patch.Scale -> Cmd.CmdT IO ()
- write_bali_scales_ksp :: Cmd.CmdT IO ()
- write_laras_ksp :: FilePath -> (BaliScales.Tuning -> Patch.Scale) -> Cmd.CmdT IO ()
Patch.Scale
table :: Patch.Scale -> Text Source #
Format a Patch.Scale as a table.
:: Cmd.M m | |
=> Bool | False to throw if there are warnings or errors, True to ignore them. |
-> m Patch.Scale |
Get a patch scale for the scale at the selection.
scale_at :: Cmd.M m => BlockId -> TrackId -> m (Patch.Scale, [Text]) Source #
Figure out a Patch.Scale
by enumerating all inputs to the scale in
scope.
:: Cmd.M m | |
=> Bool | False to check for warnings and errors, True to ignore them. |
-> Text | |
-> Text | |
-> m Patch.Scale |
Create a Patch.Scale for the named scale.
make_patch_scale :: Cmd.M m => Scale -> Text -> m (Patch.Scale, [Text]) Source #
all_inputs :: [(Midi.Key, Pitch.Input)] Source #
set_scale :: Cmd.M m => Util.Instrument -> m () Source #
retune
retune :: Cmd.M m => Patch.Scale -> m [Util.Instrument] Source #
All instruments with initialization get the new scale.
get_tuning :: Cmd.M m => Util.Instrument -> Patch.Scale -> m Text Source #
Show tuning map for debugging.
realtime :: Cmd.M m => Util.Instrument -> Patch.Scale -> m () Source #
Set the instrument's Scale to the given scale and send a MIDI tuning
message with LInst.initialize_realtime_tuning
.
nrpn :: Cmd.M m => Util.Instrument -> Patch.Scale -> m () Source #
Just like realtime
, but send tuning via LInst.initialize_nrpn_tuning
.
write_ksp :: Maybe.Maybe Util.Instrument -> FilePath -> Patch.Scale -> Cmd.CmdT IO () Source #
Write KSP to retune a 12TET patch. Don't forget to do LInst.set_scale
to configure the instrument.
write_bali_scales_ksp :: Cmd.CmdT IO () Source #
write_laras_ksp :: FilePath -> (BaliScales.Tuning -> Patch.Scale) -> Cmd.CmdT IO () Source #