Skip to content

how to create a suspended chord (sus2 / sus4) - ChordType initializer forces to use a third  #51

@ayaphi

Description

@ayaphi

Hi,

I try to create simple sus2 and sus4 chords, but I cannot find a way to do so - I am always getting the third along, as the initializer enforces a ChordThirdType parameter (it's not optional as ChordSixthType e.g)

let sus2 = ChordType(
    third: .major,
    fifth: .perfect,
    suspended: .sus2)

print(sus2.intervals)   // [Perfect 1st, Major 3rd, Major 2nd, Perfect 5th]
let csus2 = Chord(
  type: sus2,
  key: Key(type: .c))

csus2.notation
print(csus2.keys)  // [C, E, D, G]
print(csus2.description)   // C Major  Suspended 2nd

Any ideas? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions