HP MIDIFILE is a Windows MIDI playback and editing library. RB-MidiFile is a HP MIDIDFILE binding for Realbasic and Xojo ("classic" framework) projects. The minimum supported HP MIDIFILE version is 1.37. The minimum supported Xojo version is RS2010R4.
This example plays a MIDI file:
Dim midfile As FolderItem = SpecialFolder.Desktop.Child("example.mid")
Dim player As New Midi.MidiFile(midfile)
player.Play()
Do Until Not player.IsPlaying
App.DoEvents()
Loop
- Play standard MIDI files
- Select MIDI playback device†
- Read, modify, and insert MIDI events†
†= work in progress
A MIDI file, whether for playing or editing, is represented by an instance of the MidiFile
class.
- Download the RB-MidiFile project either in ZIP archive format or by cloning the repository with your Git client.
- Open the RB-MidiFile project in REALstudio or Xojo. Open your project in a separate window.
- Copy the Midi module into your project and save.
HP MIDIFILE is not installed by default on most systems. You will need to copy the DLL file into the same directory as your application's EXE file.
RB-MidiFile will raise a PlatformNotSupportedException when used if all required DLLs are not available at runtime.