Module

Data.Abc.Transposition

Package
purescript-abc-parser
Repository
newlandsvalley/purescript-abc-parser

Transposition of an ABC note or tune to a new key.

#defaultKey Source

defaultKey :: ModifiedKeySignature

The default Key - C Major.

#keyDistance Source

keyDistance :: ModifiedKeySignature -> ModifiedKeySignature -> Either String Int

Calculate the distance between the keys (target - source) measured in semitones. Keys must be in compatible modes. not sure whether we need to expose this

#transposeNote Source

transposeNote :: ModifiedKeySignature -> ModifiedKeySignature -> AbcNote -> Either String AbcNote

Transpose a note from its source key to its target.

#transposeTo Source

transposeTo :: Pitch -> AbcTune -> AbcTune

transposition where the target mode is taken from the source tune's key signature (it doesn't make any sense to transpose to a different mode)