Skip to content

Commit

Permalink
MIDI.Note: disfavored failable init
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Mar 3, 2022
1 parent 2beafc7 commit 616830b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/MIDIKit/Note/MIDI Note.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public extension MIDI {

/// Construct from a MIDI note number.
/// Returns `nil` if note number is invalid.
@_disfavoredOverload
public init?<T: BinaryInteger>(_ number: T) {

guard let uint7 = MIDI.UInt7(exactly: number) else { return nil }
Expand Down

0 comments on commit 616830b

Please sign in to comment.