Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Cmd.Repl.LTuning

Description

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

Patch.Scale

table :: Patch.Scale -> Text Source #

Format a Patch.Scale as a table.

selection Source #

Arguments

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

named Source #

Arguments

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

derive :: Cmd.M m => Deriver a -> m (Maybe.Maybe a, [Text]) 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.