Added more sweeping conformances to Sendable and Hashable; made "shortcuts" concurrency-safe#56
Added more sweeping conformances to Sendable and Hashable; made "shortcuts" concurrency-safe#56aure merged 21 commits intoAudioKit:mainfrom edonv:main
Sendable and Hashable; made "shortcuts" concurrency-safe#56Conversation
Added `Hashable` conformance to `Chord`.
Added `Hashable` conformance to `Key`.
Added `Sendable` conformance to `Accidental`.
Added `Sendable` conformance to `Letter`.
Added `Sendable` conformance to `NoteClass`.
Added `Sendable` conformance to `ChordType`.
Added `Sendable` conformance to `Chord`.
Added `Sendable` conformance to `Interval`.
Added `Sendable` conformance to `Scale`.
Added `Sendable` conformance to `BitSet` protocol.
Added `Sendable` conformance to `BitSetAdapter`.
Added `Sendable` conformance to `Key`.
Added `Sendable` conformance to `Note`.
Added `Sendable` conformance to `Note.MiddleCStandard`.
Added `Sendable` conformance to `Octave`.
Added `Sendable` conformance to `Pitch`.
Added `Sendable` conformance to `PitchColor`.
Changed static variable to static constant, as it shouldn't be mutable.
Changed remaining `NoteClass` static variable "shortcuts" to static constants. This ensures that they're concurrency-safe. They shouldn't be mutable anyway.
Changed remaining `Chord` static variable "shortcuts" to static constants. This ensures that they're concurrency-safe. They shouldn't be mutable anyway.
Changed remaining `Note` static variable "shortcuts" to static constants. This ensures that they're concurrency-safe. They shouldn't be mutable anyway.
|
|
||
| /// B♭ Major | ||
| static var Bb = Chord(.Bb, type: .major) | ||
| static let Bb = Chord(.Bb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bb' (identifier_name)
|
|
||
| /// A♭ Major | ||
| static var Ab = Chord(.Ab, type: .major) | ||
| static let Ab = Chord(.Ab, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ab' (identifier_name)
|
|
||
| /// G♭ Major | ||
| static var Gb = Chord(.Gb, type: .major) | ||
| static let Gb = Chord(.Gb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Gb' (identifier_name)
|
|
||
| /// F♭ Major | ||
| static var Fb = Chord(.Fb, type: .major) | ||
| static let Fb = Chord(.Fb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Fb' (identifier_name)
|
|
||
| /// E♭ Major | ||
| static var Eb = Chord(.Eb, type: .major) | ||
| static let Eb = Chord(.Eb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Eb' (identifier_name)
|
|
||
| /// E♯ Major | ||
| static var Es = Chord(.Es, type: .major) | ||
| static let Es = Chord(.Es, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Es' (identifier_name)
|
|
||
| /// D♯ Major | ||
| static var Ds = Chord(.Ds, type: .major) | ||
| static let Ds = Chord(.Ds, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
|
||
| /// C♯ Major | ||
| static var Cs = Chord(.Cs, type: .major) | ||
| static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Cs' (identifier_name)
|
|
||
| /// B Minor | ||
| static var Bm = Chord(.B, type: .minor) | ||
| static let Bm = Chord(.B, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bm' (identifier_name)
|
|
||
| /// A Minor | ||
| static var Am = Chord(.A, type: .minor) | ||
| static let Am = Chord(.A, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Am' (identifier_name)
|
|
||
| /// B♭ Major | ||
| static var Bb = Chord(.Bb, type: .major) | ||
| static let Bb = Chord(.Bb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bb' (identifier_name)
|
|
||
| /// A♭ Major | ||
| static var Ab = Chord(.Ab, type: .major) | ||
| static let Ab = Chord(.Ab, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ab' (identifier_name)
|
|
||
| /// G♭ Major | ||
| static var Gb = Chord(.Gb, type: .major) | ||
| static let Gb = Chord(.Gb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Gb' (identifier_name)
|
|
||
| /// F♭ Major | ||
| static var Fb = Chord(.Fb, type: .major) | ||
| static let Fb = Chord(.Fb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Fb' (identifier_name)
|
|
||
| /// E♭ Major | ||
| static var Eb = Chord(.Eb, type: .major) | ||
| static let Eb = Chord(.Eb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Eb' (identifier_name)
|
|
||
| /// E♯ Major | ||
| static var Es = Chord(.Es, type: .major) | ||
| static let Es = Chord(.Es, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Es' (identifier_name)
|
|
||
| /// D♯ Major | ||
| static var Ds = Chord(.Ds, type: .major) | ||
| static let Ds = Chord(.Ds, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
|
||
| /// C♯ Major | ||
| static var Cs = Chord(.Cs, type: .major) | ||
| static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Cs' (identifier_name)
|
|
||
| /// B Minor | ||
| static var Bm = Chord(.B, type: .minor) | ||
| static let Bm = Chord(.B, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bm' (identifier_name)
|
|
||
| /// A Minor | ||
| static var Am = Chord(.A, type: .minor) | ||
| static let Am = Chord(.A, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Am' (identifier_name)
|
|
||
| /// B♭ Major | ||
| static var Bb = Chord(.Bb, type: .major) | ||
| static let Bb = Chord(.Bb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bb' (identifier_name)
|
|
||
| /// A♭ Major | ||
| static var Ab = Chord(.Ab, type: .major) | ||
| static let Ab = Chord(.Ab, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ab' (identifier_name)
|
|
||
| /// G♭ Major | ||
| static var Gb = Chord(.Gb, type: .major) | ||
| static let Gb = Chord(.Gb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Gb' (identifier_name)
|
|
||
| /// F♭ Major | ||
| static var Fb = Chord(.Fb, type: .major) | ||
| static let Fb = Chord(.Fb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Fb' (identifier_name)
|
|
||
| /// E♭ Major | ||
| static var Eb = Chord(.Eb, type: .major) | ||
| static let Eb = Chord(.Eb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Eb' (identifier_name)
|
|
||
| /// E♯ Major | ||
| static var Es = Chord(.Es, type: .major) | ||
| static let Es = Chord(.Es, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Es' (identifier_name)
|
|
||
| /// D♯ Major | ||
| static var Ds = Chord(.Ds, type: .major) | ||
| static let Ds = Chord(.Ds, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
|
||
| /// C♯ Major | ||
| static var Cs = Chord(.Cs, type: .major) | ||
| static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Cs' (identifier_name)
|
|
||
| /// B Minor | ||
| static var Bm = Chord(.B, type: .minor) | ||
| static let Bm = Chord(.B, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bm' (identifier_name)
|
|
||
| /// A Minor | ||
| static var Am = Chord(.A, type: .minor) | ||
| static let Am = Chord(.A, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Am' (identifier_name)
|
|
||
| /// B♭ Major | ||
| static var Bb = Chord(.Bb, type: .major) | ||
| static let Bb = Chord(.Bb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bb' (identifier_name)
|
|
||
| /// A♭ Major | ||
| static var Ab = Chord(.Ab, type: .major) | ||
| static let Ab = Chord(.Ab, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ab' (identifier_name)
|
|
||
| /// G♭ Major | ||
| static var Gb = Chord(.Gb, type: .major) | ||
| static let Gb = Chord(.Gb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Gb' (identifier_name)
|
|
||
| /// F♭ Major | ||
| static var Fb = Chord(.Fb, type: .major) | ||
| static let Fb = Chord(.Fb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Fb' (identifier_name)
|
|
||
| /// E♭ Major | ||
| static var Eb = Chord(.Eb, type: .major) | ||
| static let Eb = Chord(.Eb, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Eb' (identifier_name)
|
|
||
| /// E♯ Major | ||
| static var Es = Chord(.Es, type: .major) | ||
| static let Es = Chord(.Es, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Es' (identifier_name)
|
|
||
| /// D♯ Major | ||
| static var Ds = Chord(.Ds, type: .major) | ||
| static let Ds = Chord(.Ds, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
|
||
| /// C♯ Major | ||
| static var Cs = Chord(.Cs, type: .major) | ||
| static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Cs' (identifier_name)
|
|
||
| /// B Minor | ||
| static var Bm = Chord(.B, type: .minor) | ||
| static let Bm = Chord(.B, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Bm' (identifier_name)
|
|
||
| /// A Minor | ||
| static var Am = Chord(.A, type: .minor) | ||
| static let Am = Chord(.A, type: .minor) |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Am' (identifier_name)
Hashableconformances to all ofTonic's types, except forChordTableandPitchColor.Sendableconformances to all ofTonic's types, except forChordTable.Note,Chord, andNoteClassfromstatic var(mutable static property) tostatic let(immutable static constants). This ensures that they're concurrency-safe, as they're not mutable.This relates to my own pull requests #54 and #55.