Safe Haskell | Safe-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.
Synopsis
- nn_to_note :: Int -> Maybe Pitch.Note
- patch_scale :: Cmd.M m => Pitch.ScaleId -> m Patch.Scale
- transpose_c :: Cmd.M m => Pitch.Step -> ModifyEvents.Track m
- transpose_d :: Cmd.M m => Pitch.Step -> ModifyEvents.Track m
- transpose_o :: Cmd.M m => Pitch.Octave -> ModifyEvents.Track m
- transpose :: Cmd.M m => Transposition -> Pitch.Octave -> Pitch.Step -> ModifyEvents.Track m
- modify_pitch :: Cmd.M m => (Pitch.Pitch -> Pitch.Pitch) -> ModifyEvents.Track m
- change_scale :: Cmd.M m => Pitch.ScaleId -> m (ModifyEvents.Track m)
- to_relative :: Cmd.M m => Bool -> Pitch.Note -> ModifyEvents.Track m
- respell :: Cmd.M m => ModifyEvents.Track m
- to_piano_input :: Pitch.Pitch -> Pitch.Input
- sharps_to_flats :: Cmd.M m => ModifyEvents.Track m
- e_sharps_to_flats :: [(Pitch.Pitch, a)] -> Maybe a
Documentation
nn_to_note :: Int -> Maybe Pitch.Note Source #
Turn an nn back to a human-readable note name.
scales
patch_scale :: Cmd.M m => Pitch.ScaleId -> m Patch.Scale Source #
transpose
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.
transpose :: Cmd.M m => Transposition -> Pitch.Octave -> Pitch.Step -> ModifyEvents.Track m Source #
modify pitches
modify_pitch :: Cmd.M m => (Pitch.Pitch -> Pitch.Pitch) -> ModifyEvents.Track m Source #
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.
enharmonics
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.
e_sharps_to_flats :: [(Pitch.Pitch, a)] -> Maybe a Source #