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



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.