let bassNotes: [MIDINotes] = [
		.g3, .rest, .g2, .rest,
		.c3, .g3, .c4, .rest,
		.b4, .rest, .as4, .rest,
		.f2, .rest, .f3, .e3,
		.d3, .rest, .g2, .rest,
		.c4, .rest, .rest, .rest,
		.a3, .rest, .fs3, .rest,
		.f3, .d3, .c4, .a3
]
let trebleNotes: [MIDINotes] = [
		.rest, .b3, .c4, .d4,
		.e4, .rest, .rest, .d4,
		.e4, .a4, .g4, .e4,
		.d4, .c4, .a3, .rest,
		.rest, .c4, .e4, .f4,
		.g4, .rest, .rest, .a4,
		.g4, .e4, .c4, .e4,
		.d4, .rest, .rest, .rest
]
func performance(owner: Assessable) {
		let numberOfBeats = 32
		let duration = 16.0	
		
		var bass = Track(instrument: .bassGuitar, length: numberOfBeats)
		var piano = Track(instrument: .piano, length: numberOfBeats)
		let tracks = [bass, piano]
		
		bass.notes =	bassNotes
		piano.notes = trebleNotes
		
		let interval = duration / Double(numberOfBeats)
		var index = 0
		Timer.scheduledTimer(withTimeInterval: interval, repeats: true, block: { timer in
				playInstrument(piano.instrument, note: piano.note(for: index))
				playInstrument(bass.instrument, note: bass.note(for: index))
				
				if index + 1 < numberOfBeats {
						index = index + 1
				}
				else {
						index = 0
						owner.endPerformance()
				}
		})
		owner.endPerformance()
}
public struct Track : TrackProtocol {
		
		public var instrument: Instrument.Kind
		public var length: Int
		
		var notes: [MIDINotes]? = nil
		
		public func note(for frame: Int) -> MIDINotes {
				guard let n = notes, frame < n.count else {
						return .rest
				}
				return n[frame]
		}
}
Cool chapters and the last one especially! Thank you!!! :)