TransformationalTools

public class TransformationalTools

TransformationalTools** is an abstract class and a toolkit for dealing with neo-riemannian and transformational ideas in musical composition and analysis.

  • Dictionary mapping roots for the R transformation from major.

    Declaration

    Swift

    public static let relativeFromMajor: [PitchLetter: PitchLetter] = [.C: .A, .Bs: .Gx, .Dbb: .Bbb, .Db: .Bb, .Cs: .As, .D: .B, .Cx: .Ax, .Ebb: .Cb, .Eb: .C, .Ds: .Bs, .E: .Cs, .Dx: .Bx, .Fb: .Db, .F: .D, .Es: .Cx, .Gbb: .Ebb, .Gb: .Eb, .Fs: .Ds, .G: .E, .Fx: .Dx, .Abb: .Fb, .Ab: .F, .Gs: .Es, .A: .Fs, .Gx: .Ex, .Bbb: .Gb, .Bb: .G, .As: .Fsx, .B: .Gs, .Ax: .Fx, .Cb: .Ab]
  • Dictionary mapping roots for the L transformation from major.

    Declaration

    Swift

    public static let leadingToneFromMajor: [PitchLetter: PitchLetter] = [.C: .E, .Bs: .Dx, .Dbb: .Fb, .Db: .F, .Cs: .Es, .D: .Fs, .Cx: .Ex, .Ebb: .Gb, .Eb: .G, .Ds: .Fx, .E: .Gs, .Dx: .Fsx, .Fb: .Ab, .F: .A, .Es: .Gx, .Gbb: .Bbb, .Gb: .Bb, .Fs: .As, .G: .B, .Fx: .Ax, .Abb: .Cb, .Ab: .C, .Gs: .Bs, .A: .Cs, .Gx: .Bx, .Bbb: .Db, .Bb: .D, .As: .Cx, .B: .Ds, .Ax: .Csx, .Cb: .Eb]
  • Perform a standard transformation on some triad represented by a tuplet containing a root and a chord quality. Available transformations are cases in the Transformation enum: P, L, R, N, S, H.

    Declaration

    Swift

    public static func transform(_ chord: (PitchLetter, ChordQuality), by transformation: Transformation) -> (PitchLetter, ChordQuality)?
  • Perform a P transformation on some triad represented by a tuplet containing a root and a chord quality.

    Declaration

    Swift

    public static func parallel(_ chord: (PitchLetter, ChordQuality)) -> (PitchLetter, ChordQuality)?
  • Perform a R transformation on some triad represented by a tuplet containing a root and a chord quality.

    Declaration

    Swift

    public static func relative(_ chord: (PitchLetter, ChordQuality)) -> (PitchLetter, ChordQuality)?
  • Perform an L transformation on some triad represented by a tuplet containing a root and a chord quality.

    Declaration

    Swift

    public static func leadingTone(_ chord: (PitchLetter, ChordQuality)) -> (PitchLetter, ChordQuality)?
  • Attempt to identify a single standard transformational mapping between two triads.

    Declaration

    Swift

    public static func checkSingleTransformation(from chord: (PitchLetter, ChordQuality), to otherChord: (PitchLetter, ChordQuality)) -> Transformation?