With Midi Player Tool Kit you can add to your Unity application all the Midi music that you want, thanks to the Midi standard and the SoundFont synthesizer. Midi gives you much more control of the music, that is why it’s very suitable for a game:
- Change tempo without affecting the pitch (perfect to adapt to game speed).
- Mute or Change instrument on fly.
- Jump to other places in the music with a 100% smooth transition.
- Make things happen in your game when certain notes are played in the music.
- Apply all transformations you want on the music.
- Nothing gets smaller than Midi file. Absolutely the smallest file-size you’ll find to play music!
Want to start directly the journey? here a Quick start otherwise, read main functionalities below:
⭐ No need to install external component or Midi device to play music.
⭐ No coding required for main function: dedicated inspectors defined all your needs directly in Unity editor.
⭐ Follows the full SoundFont and Midi norms based on a rewrite of the legendary FluidSynth synthesizer.
⭐ Contains many demonstrations to get you started.
⭐ Two versions are available, begin with the Free and if you like, get the Pro!
⭐ Fully documentation (Web, PDF, CHM) that is freely available from the website before purchase.
Features All Versions:
☑ Add Midi Prefabs in your scene as much as you want.
☑ Add Midi files from the web or from your composition as much as you want.
☑ SoundFont with 270 instruments and 864 samples from GeneralUser_GS_SoftSynth_v144 is provided. it’s a free SoundFont, see schristiancollins site.
☑ Midi Parameters: loop, transpose, speed, position, quantization, auto start, auto pause, stat, verbose …
☑ Midi Sequencer: enable or disable channel, change instrument on fly.
☑ Synchronize Midi events with your game or application.
☑ Synthesier Parameters: spatialization, rate, buffer size, interpolation level, apply pan, LFOs, Modulator, release time, auto buffer, device performance, stat, verbose
☑ Play & Paused Midi automatically based on distance.
☑ Build generated notes from your algorithm, see our demos.
☑ Karaoke capabilities (by script).
☑ Spatialization capabilities, ready for your Virtual Reality project.
☑ Advanced API for more complex interactions .
Features Pro Version:
☑ Load SoundFont and extract samples associated from the web or from your device as much as you want. Mastered the quality, diversity and size of your music. Possibility to load or change a SoundFont when running.
☑ Analyze Midi files to optimize the samples need by your set of Midi. Essential to avoid big application!
☑ Midi List Player automatically plays a list of Midi files. Abilities to play part of a Midi (from / to in ticks, seconds or time) with overlapping betwen the Midis playing.
☑ Midi External Player plays Midi directly from a web site, no need to download the file before running. In real time, reach all the music you want, from your web site or from compatible site.
☑ Midi File Writer: save Midi stream to Midi file.
☑ Midi Input Reader: read Midi events from a Midi keyboard connected to your computer (Windows and MacOS only).
☑ Midi Spatializer: spatialize a Midi file by channel/instrument in a 3D environment.
☑ Warp Dynamic Sound Effects processing: modify in real-time parameters for low-pass filter, reverb, chorus. Use standard Unity effect or dedicated effect.
☑ Helper to build Chords: dynamically created from parameters as degree, scale, arpeggio or from the 85 chords in library.
☑ Helper to build Scales from the 86 scales in library: Major, Minor, Blues, Pentatonic, Enigmatic, Oriental, Bitonal, …
☑ Integration ready with other packages from the Asset Store. No scripting C# or JS is mandatory to add Midi music to your application!
• Cinematic Sequencer – Slate
• Adventure Creator
• other integrations can be studied on request …
☑ Look here for a full comparison between pro and free.
Synthesizer based on SoundFont is a wonderful solution to get hundreds sounds from real instruments and synthetic sounds often for free.
Moreover hundreds SoundFont are available on the web! For free or not, with different styles (general, classic, jazz, electro, hip hop, …), with different quality and size. The possibilities are huge, quite infinite!
And if it’s not sufficient, there are tools to create it! More information here.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
Prefab available for Free
- MidiFilePlayer: play music from a Midi file with a full control: speed, position, quantization, channel.
- MidiStreamPlayer: create music from your algorithm.
- MidiFileLoader: load a Midi file for analysis or processing purpose.
Prefab available with Pro version
- MidiListPlayer: play music from list of Midi files, overlap between Midi, play part of a midi, loop …
- MidiExternalPlay: playing a Midi directly from the Web or anywhere on the desktop.
- MidiInReader: read Midi events from a Midi keyboard, play directly, or do anything that you want with the Midi events.
- MidiSpatializer: play music from a Midi files with the spatializer ready for a 3D environment where each instruments can be localized.
There is surely a prefab for your need! All you have to do is to add one of this prefab to your scene.
Demo have several roles: help us for regression tests, capabilities demonstrations, script examples, … We know, you like demo and we like creating demos!
Demos available for Free :
- 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. There is no script !
- TestMidiFilePlayerScripting: how to integrate MPTK by script in your application. Example of a a Karaoke like application. Use of the MPTK API with a few lines of code.
- TestMidiLoader: a simple Midi loader able to display the Midi events.
- TestMidiFilePlayerMulti: four MidiFilePlayer prefabs are defined on a scene with the camera moving on each to experiment the “Playing on distance” function.
- TestMidiStream: 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, thank to the MidiStreamPlayer. Could become a game! See Here.
Demos available with Pro :
- TestExternalMidiPlay: Midi is loaded directly from your desktop or from a web site.
- TestMidiPlayList: demonstration of the prefab MidiListPlayer able to play a list of Midi files with overlap and loop inside a Midi itself.
- TestMidiWriter: Four methods to create and write a Midi file with MPTK. Contains also a light music sequencer.
- TestMidiInReader: wait and play Midi events from a Midi keyboard connected to your computer. Use of the MPTK API with a few lines of code.
- EuclideanRhythm: The Euclidean rhythm in music was discovered by Godfried Toussaint in 2004 and is described in a 2005 paper “The Euclidean Algorithm Generates Traditional Musical Rhythms”. An impressive Rhythm Box. It’s a demonstration, but a lot of potential for a more complex application! See Here.
- SpatializerFly: Each instruments from the Midi are positionned on the 3D stage. You can navigate among them in a spatial journey! See Here.
Also 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 (Midi File)||X||X|
|Play Generated Music (Midi Stream)||X||X|
|Play / Paused automatically based on distance and on focus lost||X||X|
|Loop, transpose, quantization, start play at first note, change position, speed, all on fly.||X||X|
|Channel mute, volume, set instruments.||X||X|
|Load Midi file||X||X|
|API for a full integration in your script||X||X|
|Midi Spatializer on the whole Midi||X||X|
|Midi File Writer||X|
|Midi Spatializer by channels or instruments||X|
|Play External Midi File||X|
|Midi Play List and Loop inside||X|
|Midi Input Reader from an external Midi keyboard||X|
|Import and manage several SoundFonts and optimize samples count||X|
|Load SoundFont on the fly from a local file or from the web||X|
|Add audio effects: low-pass filter, reverb, chorus (V2.8).||X|
|Integration with Cinematic Sequencer – Slate (V2.8).||X|
|Builder for Chords and Scales||X|
Obviously, even if you don’t have the need of the Pro function, you can also bought it 😉 It’s a lot of work. Please, help us to maintain this application with a professional behaviors !!!
Play Music Without Midi File
Furthermore, you can generate your music from your own algorithm by using hundreds waves extracted from SoundFont.
Of course, some examples are provided to explain how to. Have a look to : TestMidiStreamSimple demo or EuclideanRhythm.
For more information see Class MidiPlayerTK.MidiStreamPlayer. More information about integrating MPTK in your script here.
There is no extra DLL or binary (except for reading Midi input from external keyboard), all the source code of MPTK is available (C#). Consequently, there is some functions not available on some devices. See here.