-
-
Notifications
You must be signed in to change notification settings - Fork 29
Added more sweeping conformances to Sendable
and Hashable
; made "shortcuts" concurrency-safe
#56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
||
// MARK: - Sharp Major chords | ||
|
||
/// C♯ Major | ||
static var Cs = Chord(.Cs, type: .major) | ||
static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
||
// MARK: - Sharp Major chords | ||
|
||
/// C♯ Major | ||
static var Cs = Chord(.Cs, type: .major) | ||
static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
||
// MARK: - Sharp Major chords | ||
|
||
/// C♯ Major | ||
static var Cs = Chord(.Cs, type: .major) | ||
static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Ds' (identifier_name)
|
||
// MARK: - Sharp Major chords | ||
|
||
/// C♯ Major | ||
static var Cs = Chord(.Cs, type: .major) | ||
static let Cs = Chord(.Cs, type: .major) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'Am' (identifier_name)
Hashable
conformances to all ofTonic
's types, except forChordTable
andPitchColor
.Sendable
conformances to all ofTonic
's types, except forChordTable
.Note
,Chord
, andNoteClass
fromstatic 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.