Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Midi Player Tool Kit - New functions, better accuracy

Discussion in 'Made With Unity' started by BachmannT, Apr 14, 2018.

  1. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    20
    Hi Thierry,
    I had a question on V2 of MPTK, If I play middle C from a midi file, is that C3 or C4, or Send a NoteOn event to the Midistream player with value of 60. Will that be Octave 3 or 4?
     
  2. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    It's C4
    A tip:
    Activate Log Waves with the MidiStreamPlayer Prefab:
    upload_2020-2-8_7-42-57.png
    Play a note with TestMidiStream or other, you see the sample plays for each notes.
    upload_2020-2-8_7-43-40.png

    Best Regards
    Thierry
     
  3. alezfdezgar

    alezfdezgar

    Joined:
    Feb 27, 2020
    Posts:
    6
    Hi Thierry.
    I have a doubt. How can I do recognise a image target and play the midi? I have to do a project for end my college career.
     
    Last edited: Feb 27, 2020
  4. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    I'm not sure to understand
    recognise a image: sorry it's not the goal of MPTK.
    Launch a midi from script: easy !
    Code (CSharp):
    1.  // assign the prefab MidiFilePlayer from your hierarchy to this properties in your inspector
    2. public MidiFilePlayer midiFilePlayer;
    3.             ...
    4. midiFilePlayer.MPTK_MidiIndex = midiindex;
    5. midiFilePlayer.MPTK_Play();
    See here for more informations: https://paxstellar.fr/midi-file-player-detailed-view-2

    Best regards
     
    Last edited: Feb 27, 2020
  5. alezfdezgar

    alezfdezgar

    Joined:
    Feb 27, 2020
    Posts:
    6
    Hello,
    Thanks you for the information. Sorry for not explaining me well. I speak English a little.
    I have a doubt. For my end-of-degree work, I need to know how it is done, for an augmented reality application, to recognize a marker (in my case a photo) with the camera and that it plays a MIDI while the marker is being recognized. When the marker disappears from the scene, do not play anything. I'm trying to know how it's done but I can't get it.

    Thank you so much for everything. I am looking forward to your response

    Best regards







     
    Last edited: Mar 4, 2020
  6. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hi,
    Yes I understand your need. But this thread is not the good place for your question. Try dedicated thread about AR. Then to play a midi it's very easy. See my previous post.
     
  7. Zaladur

    Zaladur

    Joined:
    Oct 20, 2012
    Posts:
    392
    Hello,

    Downloaded today, and been tinkering, got it working great on standalone for PC. However, for WebGL, I'm running into issues. Unity wants to change all Audio Clips to 'Decompress on Load", which causes a large number of them to become distorted and unusable. For reference, I've been attempting the "TestMidiStream" scene file.

    Have you had any success running this asset on WebGL, and if so are there any tips to convert over?

    Thanks
     
  8. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    Thank for your interest with MPTK. I apologize, but MPTK is not running on WebGL. See here : https://paxstellar.fr/2019/03/25/platform-compliance/
    Best Regards
    Thierry
     
  9. IPnose

    IPnose

    Joined:
    Jun 6, 2014
    Posts:
    20
    I haven't tested it yet, but your asset looks fantastic.

    I'll most likely use it to port to Android an old application I had developed for Windows 8 ; https://www.microsoft.com/en-us/p/my-masterpiece/9wzdncrddp2c (no midi support, each note of each instrument had been extracted manually, it was quite laborious for an average result).
     
  10. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hi
    Sound very interesting ! Keep me inform and contact me if question.
    Regards
    Thierry
     
  11. MrKendi

    MrKendi

    Joined:
    Feb 15, 2019
    Posts:
    5
    Hi Thierry, Thanks for great asset, I tried demo version and later bought pro version. Unfortunately after upgrading from 2.5 to 2.7 MTKP is not reading properly events around 1:01 (first notes, track information, lyrics etc). Whats more , its not reading for 99% times, sometimes I can see it could read one track name. Everything works fine in 2.5

    EDIT, I also noticed that next two notes (A5 B4) that are on 1:01:001 and 002 are shown in console log, but for 9/10 replays they are mute (sometimes only one), but they are 100% played when player is set to loop and restarts playing
     

    Attached Files:

    Last edited: Mar 9, 2020
  12. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello MrKendi
    Could you send me your midi ?
    What desktop are you using ? Mac / PC ?
     
  13. MrKendi

    MrKendi

    Joined:
    Feb 15, 2019
    Posts:
    5
    In attachment you can find my test midi file, there is one chord at the beginning (each note separated by one tick:000,001,002) And also lyrics for each tick ("0" for 1: 01:000, "1" for 1:01:001..)
    EDIT - I'm on PC
     

    Attached Files:

    Last edited: Mar 9, 2020
  14. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Ok, I understand. The first three notes (C4, A5, B4) are not played unless the loop mode is activated. It's a bug, I apologize for that.
    Generally Midi starts after some ticks and not so early (0,1,2 ticks here). Try to start playing after a tick > 500 or after 0.5 second.
    Of course, I will correct this issue ASAP.
    Thank for this information.
    Best Regards
    Thierry
     
  15. MrKendi

    MrKendi

    Joined:
    Feb 15, 2019
    Posts:
    5
    There are two different problems, one is that none of the information written at 1.1.000
    has been read (title, track names etc). I can always move first notes a little, but the problem is with track names, which are very important for me.
    (there is no difference with loop mode)

    Secondly, notes that are in next tick (001,002) are shown properly in console, but they are muted. But if activate loop, and loop is restarting, then I can hear them. This is also important for me because i want to use short midi in loops

    Both problems are not 100% constant, when I hi stop/play many times I can sometimes see some track information, or hear first notes
    Also in version 2.5 everything works fine
     
  16. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hi, yes all these issues come from the same problem: early events are not read; track name, notes, ... unless when looping or sometimes. For now, I did'nt found the root cause. I'm searching ....
     
  17. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello, random bug are the worst ! but it's ok I found the cause.
    Currently delay for publishing are quite long (>10 days). I will explain what to modify.

    Open source file MidiFilePlayer.cs,
    Uncomment line 1108
    Comment line 1109
    upload_2020-3-11_22-33-13.png

    like this:
    upload_2020-3-11_22-34-19.png

    And that will be good !

    BR
    Thierry
     
    Last edited: Mar 12, 2020
  18. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    V2.71 is now available with the correction.
     
    Last edited: Mar 16, 2020
    MrKendi likes this.
  19. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    36
    I've finally gotten around to implementing this into my project and I'm loving it! I do have a question though. Is it possible to mute or change the volume of individual MIDI channels? I'd love to be able to dynamically mute and unmute channels in my game's soundtrack depending on what's going on. For example, a level could start out with just a piano playing on channel 1, and then later I could turn on a channel for trumpets, and then drums, etc. Unless I'm missing something, currently it seems the only way I'd be able to do something like that would be by making separate MIDI files with the different combinations of tracks I want, but of course that would require me to restart playback every time I wanted to introduce a track which would completely ruin the flow of the music.

    If that's not currently possible, it's a feature I'd love to see added!
     
  20. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    Good to known you succeed!
    I'm sorry but the function you need don't exist for now with MPTK. It's only possible to enable or disable channel in real time.
    But it's a very good idea, I will see how to add this function for a new release.
    Best Regards
    Thierry

    PS: see the demo:TestMidiFilePlayerScripting
    upload_2020-5-6_8-38-42.png
    And the API:
    Code (CSharp):
    1.  
    2.                 GUILayout.BeginHorizontal();
    3.                 for (int channel = 0; channel < midiFilePlayer.[B]MPTK_ChannelCount[/B](); channel++)
    4.                 {
    5.  
    6.                     bool state = GUILayout.Toggle(midiFilePlayer.[B]MPTK_ChannelEnableGet[/B](channel),
    7.                                string.Format("{0} / {1}", channel + 1,
    8.                                       midiFilePlayer.[B]MPTK_ChannelPresetGetIndex[/B](channel)), GUILayout.Width(65));
    9.                     if (state != midiFilePlayer.[B]MPTK_ChannelEnableGet[/B](channel))
    10.                     {
    11.                         midiFilePlayer.[B]MPTK_ChannelEnableSet[/B](channel, state);
    12.                         Debug.LogFormat("Channel {0} state:{1}, preset:{2}",
    13.                                     channel + 1, state,
    14.                                     midiFilePlayer.[B]MPTK_ChannelPresetGetName[/B](channel) ?? "not set");
    15.                     }
    16.  
    17.                     if (channel == 7)
    18.                     {
    19.                         // Create a new line ...
    20.                         GUILayout.EndHorizontal();
    21.                         GUILayout.BeginHorizontal();
    22.                     }
    23.                 }
    24.                 GUILayout.EndHorizontal();
    25.  
     
  21. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    36
    Ah, MPTK_ChannelEnableSet was exactly what I was looking for! While the ability to control the volume of individual channels would be cool I was mainly concerned about turning them on and off. Thanks for the help!
     
  22. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Ready for the next version ;-)
    upload_2020-5-7_8-19-2.png
     
  23. EvanXu1225

    EvanXu1225

    Joined:
    Dec 6, 2019
    Posts:
    1
    Hi Bachmann, I spent two weeks looking for a suitable plugin for my app and I finally find it. I am making an instrument app. People can play the instrument by click or enter the string on the screen. However, there is a problem for one of the function. I want to make the string change color as the instrument in the song plays. Is there any way to realize this using your Plugin?
     
  24. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hi
    Yes you can do that, but only by scripting:

    First method, detect Midi event PatchChange, example:
    Code (CSharp):
    1. midiFilePlayer.OnEventNotesMidi.AddListener(NotesToPlay);
    2.   public void NotesToPlay(List<MPTKEvent> notes)
    3.         {
    4.             countZ = new int[Convert.ToInt32(maxZ - minZ) + 1];
    5.  
    6.             //Debug.Log(midiFilePlayer.MPTK_PlayTime.ToString() + " count:" + notes.Count);
    7.             foreach (MPTKEvent note in notes)
    8.             {
    9.                 switch (note.Command)
    10.                 {
    11.                     case MPTKCommand.NoteOn:
    12.                         if (note.Value > 40 && note.Value < 100 && note.Channel==1)
    13.                         {
    14.                            // some actions
    15.                         }
    16.                         break;
    17.  
    18.                     case MPTKCommand.PatchChange:
    19.                         {
    20.                            // some actions
    21.                         }
    22.                         break;
    23.                 }
    24.             }
    25.         }
    26.  
    27.  
    Or read the current instrument associated to a channel. Example.:
    Code (CSharp):
    1. textPlayer.text =
    2.                     //$"Channel:{midiFilePlayer.DedicatedChannel} - " +
    3.                     $"{midiFilePlayer.MPTK_ChannelPresetGetIndex(midiFilePlayer.DedicatedChannel)} - " +
    4.                     $"{midiFilePlayer.MPTK_ChannelPresetGetName(midiFilePlayer.DedicatedChannel)}\n" +
    5.                     $"{midiFilePlayer.MPTK_StatVoicePlayed.ToString()}";
     
  25. alezfdezgar

    alezfdezgar

    Joined:
    Feb 27, 2020
    Posts:
    6
    Hi Bachmann,

    I have a doubt. I need to load a midi and play when a image target. I think that my error is de function that play midi. Look the code.

    Code (CSharp):
    1.     public MidiFilePlayer midisoundTarget;
    2.  
    3.     public AudioClip clipTarget;
    4.  
    5.     private MidiFilePlayer[] allMidiFilePlayer;
    6.  
    7. ...
    8.  
    9.     void StopAllAudio()
    10.     {
    11.         allMidiFilePlayer = FindObjectsOfType(typeof(MidiFilePlayer)) as MidiFilePlayer[];
    12.         foreach (MidiFilePlayer midiS in allMidiFilePlayer)
    13.         {
    14.             midiS.MPTK_Stop();
    15.         }
    16.     }
    17.  
    18.  
    19.     void playMidi(string ss)
    20.     {
    21.         clipTarget = (AudioClip)Resources.Load(ss);
    22.         midisoundTarget.MPTK_Play();
    23.     }
    24.  
    25.  
    26.     protected virtual void Start()
    27.     {
    28.         mTrackableBehaviour = GetComponent<TrackableBehaviour>();
    29.  
    30.         if (mTrackableBehaviour)
    31.         {
    32.             mTrackableBehaviour.RegisterOnTrackableStatusChanged(OnTrackableStatusChanged);
    33.         }
    34.  
    35.         //Register / add the AudioSource as object
    36.         //soundTarget = (AudioSource)gameObject.AddComponent<AudioSource>();
    37.         midisoundTarget = (MidiFilePlayer)gameObject.AddComponent<MidiFilePlayer>();
    38.  
    39.     }
    40.  
    41.     protected virtual void OnTrackingFound()
    42.     {
    43.         if (mTrackableBehaviour)
    44.         {
    45.             var rendererComponents = mTrackableBehaviour.GetComponentsInChildren<Renderer>(true);
    46.             var colliderComponents = mTrackableBehaviour.GetComponentsInChildren<Collider>(true);
    47.             var canvasComponents = mTrackableBehaviour.GetComponentsInChildren<Canvas>(true);
    48.  
    49.             // Enable rendering:
    50.             foreach (var component in rendererComponents)
    51.                 component.enabled = true;
    52.  
    53.             // Enable colliders:
    54.             foreach (var component in colliderComponents)
    55.                 component.enabled = true;
    56.  
    57.             // Enable canvas':
    58.             foreach (var component in canvasComponents)
    59.                 component.enabled = true;
    60.         }
    61.  
    62.         if (OnTargetFound != null)
    63.             OnTargetFound.Invoke();
    64.  
    65.         //Play Sound, IF detect an target
    66.  
    67.         if (mTrackableBehaviour.TrackableName == "Trompeta")
    68.         {
    69.             //playSound("sounds/escalaDomayor");
    70.             playMidi("MIDI/escalaDomayorMIDI");
    71.         }
    72.  
    73.     }
    I think that the error is in the fucntion "playMidi".
    thanks in advance.

    I am looking forward to your response
     
  26. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    I need to better understand your goal.
    Why using an array of MidiFilePlayer ? have you the need to play at the same time several midis ?
    BR
    Thierry
     
  27. alezfdezgar

    alezfdezgar

    Joined:
    Feb 27, 2020
    Posts:
    6
    Hello Thierry,
    I need to use MidiFilePlayer for play a midi when the camera detect an image. It is an app of AR. If you want, I send you the file.
    Kind regards
    Alex
     
  28. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    ok send me to my private email (see here)
     
  29. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    20
    Hi Thierry,
    I have a virtual keyboard and I create MPTKEvents, just NoteOn, for the keypresses, and send that to the midiStreamPlayer.MPTK_PlayEvent(midiNote);
    I can change the instruments with it also. It all works fine, but for some instruments the note will stop automatically, the Duration and Velocity set to some user define values. But for some instruments the notes don't stop, they just keep playing. I know I can send a NoteOff, that stops it, but doesn't fade nicely.
    I was wondering why some instruments are like that i.e. Harpiscorde or Distortion Guitar work and drop off after the note is played without a NoteOff, but instruments like Rock Organ or Alto Sax or Clarinet don't stop playing the note until I send a NoteOff.
    Maybe that is the way its supposed to be, is there a way to find out all of the Instruments that I have to send a NoteOff and how to fade it out properly?
    I should add that for Duration of 1, then these fade properly with the NoteOn, but anything > 1 they just keep going.
    Thanks
     
  30. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    Strange behavior, for sure ! Are youunsing the default SoundFont or another SoundFont ?
    What do you mean by a virtual keyboard ?
     
  31. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    20
    Its the default SoundFont.
    Virtual Keyboard I just mean that I have a Piano UI screen, when I press the key it makes a MidiEvent.
     
  32. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    20
    I think I found it, I am not setting the Duration correctly. I thought i was setting it in milliseconds, but I guess I was setting it larger. So it works :) I should have checked that first, sorry.
     
  33. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Yes, the setting is in milliseconds and -1 for infinite.
    Another point: "have to send a NoteOff and how to fade it out properly?" Are you using an internally fonction ?
    Please, use rather MPTK function: MPTK_StopEvent. See example bellow from the demo TestMidiStream.cs

    Code (CSharp):
    1.   private void PlayOneNote()
    2.         {
    3.             // Stop previous note playing
    4.             StopOneNote();
    5.  
    6.             // Start playing a new note
    7.             NotePlaying = new MPTKEvent()
    8.             {
    9.                 Command = MPTKCommand.NoteOn,
    10.                 Value = CurrentNote,
    11.             };
    12.             midiStreamPlayer.MPTK_PlayEvent(NotePlaying);
    13.         }
    14.  
    15.         private void StopOneNote()
    16.         {
    17.             if (NotePlaying != null)
    18.             {
    19.                 // Stop the note (method to simulate a real human on a keyboard :
    20.                 // duration is not known when note is triggered)
    21.                 midiStreamPlayer.MPTK_StopEvent(NotePlaying);
    22.                 NotePlaying = null;
    23.             }
    24.         }
    Best Regards
    Thierry
     
  34. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    I didn't received anything. Have you find a solution ?
     
  35. URGr8

    URGr8

    Joined:
    Sep 10, 2012
    Posts:
    20
    I was creating NoteOff Event and sending that, I didn't see the StopEvent, that is much better. I will use that if I need to stop, just have to keep track of the playing notes.
    Thanks
     
  36. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Perhaps there is another way because you are using a Virtual Keyboard: if a same note is played on the same channel, the previous note is automatically stopped.It's a default behavior for every synth.
    You could experiment this with the demo TestMidiStream. Enabled Verbose Voice int the MidiStreamPlayer inspector.
    upload_2020-6-6_11-15-21.png
    And play one note twice, you get this log even if you change of preset.
    upload_2020-6-6_11-17-13.png
     

    Attached Files:

  37. alezfdezgar

    alezfdezgar

    Joined:
    Feb 27, 2020
    Posts:
    6
    Sorry, I misspelled your email. Look to see if it has reached you.
     
  38. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Yes, I responded you !
     
  39. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    36
    Is there any chance that the MIDI list player could seamlessly transition between MIDI files at some point? I'd like to be able to add transitions to some of my music tracks, but MIDI list player pauses for a few moments between MIDI files when the overlap is at 0. Setting that higher prevents moments of silence, but still isn't seamless since the next MIDI file isn't in sync with the first.

    What I'm trying to do is seamlessly transition between pieces. For testing purposes I've created two MIDI files, one that loops and one that's meant to be a seamless transition from the loop. In theory, if I set up a MIDI list that ends the looping MIDI at the end of a measure, and immediately starts playing the transition, it should result in a very natural sounding change in the song. With the pause between MIDI files currently, that isn't possible.

    I've noticed that the MIDI player takes a few moments to start up when you first hit play, but I've also noticed it starts almost immediately when unpaused. It makes me wonder if there's some way the MIDI list player could be set up so that the next MIDI file in queue is buffered before it's ready to be played, so that when it is played it can be played with no delay. That would be amazing!

    On a related note, it would also be nice to have an option for the MIDI list player to allow whatever notes were started before switching songs to finish, instead of fading out the previous MIDI track as the new one begins. As it is currently, even if there was no pause between MIDI tracks in the list, the sounds from the previous MIDI are immediately stopped which doesn't make for a natural sounding transition between pieces.

    A good example of what I mean with seamless transitions is the iMUSE system used in Monkey Island II, which allows for seamless transitions between certain tracks. Note that whenever the player enters a new room, there's a short transition piece followed by the theme for that room:



    I believe iMUSE is a bit more complex than what I'm asking for, but it gets the idea across. If MIDI list player had no pause between tracks, I'm thinking something very close to this effect would be possible by queuing MIDI files as such:
    First song (End point set to the end of the next measure in real time)
    Appropriate transition piece
    Second song

    Of course, having the ability to queue up MIDI files on the fly with a normal MIDI player would be cool too. (Think MPTL_Queue(int nextMidiIndex, int midiTickToStartNextMidiOn)).

    If it was possible to create such an effect, that would be absolutely amazing!

    On another related note, while I was messing with the MIDI list file player to see if it could pull this effect off, I noticed that the duration format setting cannot be changed. I was trying to change it to use MIDI ticks (As I know exactly when notes start and stop with those), but doing so bugged out the numbers on the Start/End times and whenever I refreshed the inspector it would revert back to hours/minutes/second.

    Anyways, thanks for reading and for all the hard work you've put into this asset! I can't tell you how glad I am to be able to use it in my game, it's going to allow for some really cool stuff!
     
    Last edited: Jul 9, 2020
  40. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    Thank for your test on the prefab MidiListPlayer.

    Could you be more precise with "few moments" ? 100ms, 1s ? 2 s ?

    The loading of a Midi file is very fast (< 1 ms) but often, the first note in the Midi is delayed by the composer. Sometimes until 1 s !
    Luckily, There is an option to start immediately at the first note.
    Have a look to the MidiListPlayer in your hierarchy, there is 2 MidiFilePlayer (which are played each in turn)
    upload_2020-7-9_22-20-34.png

    Enable "Start play From First Note" for the two MidiFilePlayer.
    upload_2020-7-9_22-22-52.png

    Please say me is that correct your issue !

    I will answer to your other questions ASAP !

    Best Regards
    Thierry
     
    Last edited: Jul 10, 2020
  41. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    36
    Well, that didn't work, MIDI list player still kind of behaves weird when switching songs. However, I tested a script I created a few months ago to try making a seamless transition manually again, and now it works almost perfectly! Not sure if it's because of something I changed, or an update to MIDI Toolkit Pro, but either way I'm really excited!

    The way my script works is it gets the transition piece ready to play, and then waits until a specific MIDI event occurs within the song. When that event is read, it stops the MIDI player playing the loop, and starts the one ready to play the transition. When I first created the script there was a noticeable pause between MIDIs, but now it's just about perfect!
     
  42. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    That a good news !
    For sure, the prefab MidiListPlayer is not designed to sync Midi, your solution is perfect for that. Yes, I confirm, Pause, Start, Set position are now quite good!

    Also
    will be corrected in the next release.
    Thank for this information.

    Best Regards
    Thierry
     
  43. Jezeus

    Jezeus

    Joined:
    Sep 27, 2018
    Posts:
    6
    Hi,
    I am looking forward to using your asset in an app I am building. I want to test it and luckily there is a free version for that. I am using Unity 2019.4.6f1 (LTS). However, I cannot hear any sounds, it keeps saying I need to load a soundfont. But from the menu, adding a soundfont requires the pro version. When reading the doc, there is a demonstration SF and I see it in the Project, but cannot link it. Can you please help ? Thanks in advance !
     
  44. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    Thank for your interest with MPTK.
    I'm quite worried. Perhaps, I've forgot the SoudFont in the last publish. I will try it.
    On your side, could you try to reimport It ?
    Best Regards
    Thierry
     
  45. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Sorry, I can't reproduce your issue.
    Could you delete folder MidiPlayer and reimport ?
    upload_2020-8-6_14-5-17.png
    And take me inform.
    Thank
    Thierry
     
  46. Jezeus

    Jezeus

    Joined:
    Sep 27, 2018
    Posts:
    6
    Hi,
    Thanks for the answer. My bad I did move this folder, looking at the code I understand this an mandatory path to keep. My bad. Thanks for the tip !
     
  47. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Good to know !
     
  48. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    The next version will enhance the switch between Midis.
    See here
     
  49. BasicallyGames

    BasicallyGames

    Joined:
    Aug 31, 2018
    Posts:
    36
    I'm having a small issue, I can't seem to figure out a fix. I want music to play on my game's loading screen, however the Midi player won't play when Time.timeScale is equal to 0. I'm not sure how to have it play regardless of the time scale.
     
  50. BachmannT

    BachmannT

    Joined:
    Nov 20, 2016
    Posts:
    165
    Hello
    I need to test with Time.timeScale = 0. I'll go back ASAP.
    BR
    Thierry
     
unityunity