

To clarify, don’t use the others ! They can be modified or removed without any information. All methods and properties are prefixed with MPTK_.You’ll need to add the following at the top of any C# script that need to use MPTK API: using MidiPlayerTK Edit your script with your preferred editor.First of all, add your script to a gameObject (empty or not) in your scene hierarchy.MidiSpatializer: play music from a MIDI files with the spatializer ready for a 3D environnement.MidiInReader: read MIDI events from a MIDI keyboard, play directly, or do anything that you want with the MIDI events.MidiExternalPlay: playing a MIDI directly from the Web or anywhere on the desktop.MidiListPlayer: play music from list of MIDI files, overlap between MIDI, play part of a MIDI, loop ….MidiFileLoader: load a MIDI file for analysis or processing purpose.MidiStreamPlayer: create music from algo.MidiFilePlayer: play music from a MIDI file.Drag and drop from Unity Project Tab: Example with the prefab MidiFilePlayerĬhoose your MPTK prefab depending of your need: There is surely a prefab for your need! All you have to do is to add this prefab to your scene. Rather, add MPTK prefab in your scene hierarchy, directly at the top level of your scene hierarchy or attached to another gameObject (2D or 3D Object, Camera, Light … ). In addition, don’t forget to save your scene outside MidiPlayer folder in order to easily update MPTK when new versions are available.Įxcept for MidiPlayerGlobal or MidiFileWriter, you can’t use directly the MPTK classes because these classes need others components to work correctly. Applying effects as filter, reverb, chorus.Ĭlassically, the Unity scene contains all the necessary gameObjects for your project.Changing on fly the current SoundFont or bank, see API in MidiPlayerGlobal class.Spatialize each instruments from a a MIDI file, see MidiSpatializer prefab and class.Reading MIDI events from a MIDI keyboard, see MidiInReader prefab and class.



Defined play list with overlap and play extract of MIDI, see MidiListPlayer prefab and class.Writing a MIDI file, see MidiFileWriter class.Playing External MIDI, see MidiExternalPlayer prefab and class.In addition with the Pro version, you can also: Loading a MIDI file and get access to all the MIDI events, see MidiFileLoader prefab and class.Playing Generated Music from your algorithm, see MidiStreamPlayer prefab and class and MPTKEvent class.Playing MIDI Music from MIDI file, see MidiFilePlayer prefab and class.With Free and Pro versions of MPTK you will be able to: On top of that, MPTK contains an API (a set of class, functions and attributes: follow the C# tuto if you don’t understand this) which facilitate reaching your target. But, you need to take the time to follow this tuto Coding in C# in Unity for beginners The main key of success ? see previous paragraph. Thanks to C# which is quite simple and associated to Unity, a C# beginner can build great thing. You need also to learn how writing script with the language C#. But stay focused! Lock the door, shutdown your phone, make coffee or tee … and learn! it’s a journey with sometimes disappointment, nervousness, frustration but you will discover beautiful landscape. Unity proposes a lot of well done tutorials have a look here. There are Excellent Guides to this Galaxy! Basic knowledge may be sufficient at the start. Understanding Unity scripting principles.On the other hand, writing script with Unity requires two skills: But, for more complex needs, you will have to write some Unity scripts.Ībove all, don’t be worried, MPTK API is quite simple and well documented. One of the strengths of MPTK is the ability for playing music with any line of script. Look here to see the full API documentation.
