Skip to content

Commit

Permalink
Instrument has an initializer now. Fully public
Browse files Browse the repository at this point in the history
  • Loading branch information
woolie committed Mar 31, 2021
1 parent c93da03 commit 5f7397f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Sources/music-notation/Instrument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 5f7397f

Please sign in to comment.