You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the pen, after the user makes a selection of a group of rect elements in the PianoRollSvgVisualizer, I call a setLoopParams function that sets these parameters:
mm.Player.tone.Transport.loop = true
mm.Player.tone.Transport.loopStart = <number in seconds>
mm.Player.tone.Transport.loopEnd = <number in seconds>
I added a set of span elements to show what these settings are that gets updated in the player callbackObject...
First, if after loading the midi file you don't initially play and stop the midi file, selecting a group of notes DOES set the loop parameters but it doesn't honor them.
Next, if you have initially played the file, it will work, but pausing and playing and changing the selection ultimately causes the loop to no longer work even though you can see that those params are set. By the way, I didn't see any other way to set a loop other than using the mm.Player.Tone.Transport loop settings. If there is another more reliable way to do this, I'd love to know.
Thanks again for this awesome library. I have plans to leverage the power of all the other cool stuff like generating improve, etc.
The text was updated successfully, but these errors were encountered:
I just noticed that the magenta player has a currentPart object with the same loop, loopStart and loopEnd properties. I noticed that, the first time a loop is set using mm.Player.tone.Transport.loop the currentPart loop object is undefined. After that, it is set with the loop, loopStart and loopEnd properties but the loop property is set to false even though the loopStart and loopEnd properties are set correctly according to mm.Player.tone.Transport.loopStart and mm.Player.tone.Transport.loopEnd.
I added the following to my setLoopParams function but it didn't seem to make any difference...
I've determined that if I initially, start and stop the midi and then initially set the first loop to start at 0, subsequent loops work. I did notice that the this.player.currentPart.loop keeps getting set back to false on its own in some cases.
Did I post this in the wrong place or is this just not as much of an issue as I perceive it to be? Please let me know if there might be another place that would be more appropriate to post this. There's so little in stackoverflow, etc.
First, what an awesome set of libraries! Thanks so much!!
I'm building a simple midi player class with a looping feature as well as a tempo setting. The codepen is here...
https://codepen.io/swampthang/pen/vYdJYZy?editors=1010
In the pen, after the user makes a selection of a group of rect elements in the PianoRollSvgVisualizer, I call a setLoopParams function that sets these parameters:
I added a set of span elements to show what these settings are that gets updated in the player callbackObject...
First, if after loading the midi file you don't initially play and stop the midi file, selecting a group of notes DOES set the loop parameters but it doesn't honor them.
Next, if you have initially played the file, it will work, but pausing and playing and changing the selection ultimately causes the loop to no longer work even though you can see that those params are set. By the way, I didn't see any other way to set a loop other than using the mm.Player.Tone.Transport loop settings. If there is another more reliable way to do this, I'd love to know.
Thanks again for this awesome library. I have plans to leverage the power of all the other cool stuff like generating improve, etc.
The text was updated successfully, but these errors were encountered: