MidiPlayer
actor MidiPlayer
Play a ChordDefinition with its MIDI values
-
Make it a shared actor
Declaration
Swift
static let shared = MidiPlayer() -
The MIDI player
Declaration
Swift
var midiPlayer: AVMIDIPlayer? -
The URL of the SoundBank
Note
A stripped version of theGeneralUser GS MuseScorebankDeclaration
Swift
var bankURL: URL -
Private init to make sure the actor is shared
Declaration
Swift
private init() -
Play a chord with its MIDI values
Declaration
Swift
func playChord(notes: [Int], instrument: Midi.Instrument = .acousticNylonGuitar) asyncParameters
notesThe notes to play
instrumentThe
Instrumentto use -
Struct for a chord
See moreDeclaration
Swift
struct Chord
View on GitHub