Closed KittenYang closed 1 year ago
macOS 13 Ventura
Xcode 14
public func loadSequencerFile(fileURL: URL) { sequencer.loadMIDIFile(fromURL: fileURL) if sequencer.allTempoEvents.isNotEmpty { lastTempo = sequencer.allTempoEvents[0].1 } else { lastTempo = sequencer.tempo } sequencer.setGlobalMIDIOutput(sampler.midiIn) do { try sampler.loadSoundFont("UprightPianoKW-20190703", preset: 0, bank: 0) } catch { } }
I replace the SoundFont with custom .sf2 file, and the url is not nil. But in the demo MIDITrack.swift still play the default beeper sound. How can I load custom .sf2 file?
.sf2
MIDITrack.swift
No response
I figured it out, must turn on the background modes for audio!!
background modes for audio
macOS Version(s) Used to Build
macOS 13 Ventura
Xcode Version(s)
Xcode 14
Description
I replace the SoundFont with custom
.sf2
file, and the url is not nil. But in the demoMIDITrack.swift
still play the default beeper sound. How can I load custom.sf2
file?Crash Logs, Screenshots or Other Attachments (if applicable)
No response