Add Midi music player to your Unity application
Play music in your Unity 3D games or applications from Midi files. Thank SoundFont for adding hundred sounds of instruments for playing Midi files.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
- Play music from Midi files in your Unity application without any C# or JS scripting.
- Use customs inspectors to define your musics.
- Play generated music in your Unity application and reuse hundreds presets and waves extracted from SoundFont.
- Add Midi Audio Source Prefab in your scene as much as you want.
- Add Midi files (from the web or from your composition) as much as you want.
- Play / Paused automatically based on distance.
- Write Midi file [Pro] from your Midi stream, Midi player, …
- Midi File Player
- Midi Stream Player
- Midi Play List [Pro]
- Midi External Player [Pro]
- Use Unity Events to process Midi Events:
- Start playing Midi file
- Midi events from the MPTK Sequencer
- control change,
- text, karaoke function,
- … .
- End playing Midi file
- An API is available to integrate MPTK in your application for more complex interactions.
- Furthermore, all the source code is available! No hidden DLL or binary component.
Many examples are available in the Unity package
- TestMidiFilePlayer: a very simple example with only one MidiFilePlayer prefab to play Midi music. An example of using MPTK to play Midi music without programming.
- TestMidiFilePlayerScripting: how to integrate MPTK by script in your application. Use of the MPTK API with a few lines of code
- TestMidiFilePlayerMulti: four MidiFilePlayer prefabs are defined on a scene with the camera moving on each to experiment the “Playing on distance” function.
- TestMidiStreamSimple: how to generate music without any Midi files with a few lines of code.
- CatchMusic: Midi is read from a MidiFilePlayer but playing music is delayed in time. Could become a game !
- Play External Midi: Midi is loaded directly from your desktop or from a web site. [Pro]
- TestMidiPlayList: demonstration of the prefab MidiListPlayer able to play a list of Midi files. [Pro]
- TestMidiWriter: Four methods to create and write a Midi file with MPTK. Contains also a light music sequencer. [Pro]
Have a look to the main demonstration scene to an easy access on each demos. Load and run this scene: Scenes For Demo/ScenesDemonstration
Warning: To avoid interacting with your project, MPTK doesn’t add MPTK scenes in the Build Settings. Add the MPTK scenes with “File/Build Settings” if you want a full functionality of the demonstrator.
Free or Pro version
|Play Midi Music||X||X|
|Play Generated Music||X||X|
|Play / Paused automatically||X||X|
|Load Midi file||X||X|
|API to a full integration in your script||X||X|
|Midi File Writer||X|
|Play External Midi File||X|
|Midi Play List||X|
|Import and manage several SoundFonts||X|
|Optimize waves size||X|
If you have no need of the Pro function, you can also bought it 😉 It’s a lot of work. Please help keep us sustainable with a professional behaviors even with the free version !
Play Music Without Midi File
Generate your music from your own algorithm by using hundreds waves extracted from SoundFont. Of course, a pitch effect is added to waves to adapt notes frequency. Some examples are provided to explain how to. Have a look to : TestMidiStreamSimple.
For more information see Class MidiPlayerTK.MidiStreamPlayer. More information about integrating MPTK in your script here.
Example of integration with MPTK
Midi File Player Advanced
Write Midi File (Pro)
Catch Music (not available with MPTK asset)