diff --git a/Sources/music-notation/Instrument.swift b/Sources/music-notation/Instrument.swift index 370f1ea..3a841ef 100644 --- a/Sources/music-notation/Instrument.swift +++ b/Sources/music-notation/Instrument.swift @@ -7,11 +7,23 @@ // public struct Instrument { - public let name: String = "" + public let name: String - public let lineCount: Int = 0 + public let lineCount: Int /// Number of steps that this instrument is transposed. - public let chromaticTransposition: Int = 0 - public let octaveTransposition: Int = 0 + public let chromaticTransposition: Int + public let octaveTransposition: Int + + public init( + name: String = "", + lineCount: Int = 0, + chromaticTransposition: Int = 0, + octaveTransposition: Int = 0 + ) { + self.name = name + self.lineCount = lineCount + self.chromaticTransposition = chromaticTransposition + self.octaveTransposition = octaveTransposition + } }