Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred



Operations on pitch tracks.

TODO It seems a little arbitrary to divide these cmds out like this. However, they are distinct from Cmd.PitchTrack, so a separate module is good. I suppose if I need these functions elsewhere I can more them to more generic places.



nn_to_note :: Int -> Maybe Pitch.Note Source #

Turn an nn back to a human-readable note name.



transpose_c :: Cmd.M m => Pitch.Step -> ModifyEvents.Track m Source #

Chromatic transposition.

transpose_d :: Cmd.M m => Pitch.Step -> ModifyEvents.Track m Source #

Diatonic transposition.

transpose_o :: Cmd.M m => Pitch.Octave -> ModifyEvents.Track m Source #

Octave transposition.

modify pitches

change_scale :: Cmd.M m => Pitch.ScaleId -> m (ModifyEvents.Track m) Source #

Change notes from one scale to another. This only makes sense if the scales have the same number of notes per octave.

TODO it would be nice to change the track title too, but ModifyEvents.Track doesn't support that. Of course, maybe I want the scale in the block or global transform.

to_relative :: Cmd.M m => Bool -> Pitch.Note -> ModifyEvents.Track m Source #

Convert the selected absolute pitch track into a relative one by subtracting all the notes from the given base note.

TODO as above, would be nice to set thet track title.


respell :: Cmd.M m => ModifyEvents.Track m Source #

Respell enharmonics according to the key.

sharps_to_flats :: Cmd.M m => ModifyEvents.Track m Source #

Convert all sharps to their enharmonic flats.