Add Midi music player to your Unity application
Play music in your Unity 3D games or applications from Midi files. Thank to 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.
- Specific inspectors defined all your needs directly in the Unity editor.
- Play generated music in your Unity application and reuse hundreds 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.
- A component is able to write Midi file [Pro]. From your Midi stream, Midi player, …
- Midi File Player
- Midi Stream Player
- Midi Play List [Pro]
- Unity Events to process Midi Events:
- Start playing Midi file
- New notes available from Midi file playing
- 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!
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 ysing 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 !
- InfinityMusic: music is generated with some algorithms. Could become a more complex application to generate music.
- 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
MPTK is designed to be used for gaming with weak devices which implied some choices.
- Some instruments in SoundFont, are using more of one waves to play one midi event. MPTK will plays all the waves associated to the note or only the first found. Therefore a parameter lets you make your choice.
- Panoramic sounds are defined in SoundFont and in Midi files. Also for some games, it’s better to handle right/left by the game (for example to localize an object). Therefore a parameter lets you make your choice.
- Complex SoundFont effect are not yet implemented (reverb, chorus …) to avoid high CPU impact. Could be added in a future version. May be you could your say!
Play Music Also 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 and InfinityMusic which is a more sophisticated demo.
For more information see Class MidiPlayerTK.MidiStreamPlayer in API documentation.
Free or Pro version
|Play Midi Music||X||X|
|Play Generated Music||X||X|
|Play / Paused automatically||X||X|
|Midi File Writer||X|
|Midi Play List||X|
|Optimize waves size||X|