kshoji / Unity-MIDI-Plugin-supports

Documents and issues for Unity MIDI Plugin
10 stars 0 forks source link

simple playback #4

Open mitragee opened 1 year ago

mitragee commented 1 year ago

Hello, I have a need to just playback a midi file, there are a lot of options in the package that I don't need at the moment, can you give me just a couple of lines of code to playback a midi file that is in unity (not from a url)

mpelika commented 1 year ago

// load SMF from file StartCoroutine(GetStreamingAssetFilePath("Track 1.mid", stream => { sequencer.UpdateDeviceConnections(); sequencer.Stop(); sequencer.SetSequence(stream); sequencer.Start();

        }));