MML Player


  • F

    @Spacemario The problem is cumulative from within FUZE itself. It'll just keep adding up as playback continues.


  • F

    @Discostew I think I found a fix. Couldn't wait for the patch. Having such an MML player would be much of a help (I mean it contains portamento effect, I love that). My vision is to try to export sound from my Musical USB Keyboard or another music editor to your format. I hope you don't mind or let me know. Because your format is containing a lot (also a lot of work I guess). I can imagine it could become a standard format to integrate complex music.

    @Gothon, quoted by @chiizujin in this post about structs and arrays mentioned that assigning a complete struct to another object like this, can cause problems over time:

    first[0] = [.xpos = 4, .ypos = 1]
    

    so I checked for other kind of assignments like (in the function _dmmlUpdateSystem())
    t = dmml_Main.t
    which assigns a reference to t (what would make the code more readable). Changing t then also changes dmml_Main.t later. Well it seems to, and does, but it crashs after a while.
    So, I replaced t with a declared local struct, and filled it with the content of dmml_Main.t one element by one.

    sDMML_track t[8]
    for j = 0 to len(t) loop
       t[j].isPlaying = dmml_Main.t[j].isPlaying
      ...
    repeat
    

    and there the assignments to t, I replaced by direct dmml_Main.t[tID].{any struct attribute} assignments.

    I shared it as version 0.31. Please have a look if it still works as expected. I wonder if this patch is useful.


  • Fuze Team

    @Discostew Sorry dude this is a big ask, and no worries if you're not up for it. Any chance you could fire me an email - and please include an explanation in layman's terms about MML and or similar concepts and comparisons . I really do need to have a better understanding.

    All going well, or at least reasonably so, we will soon begin the FUZE Music Editor and as such it would be good to know we have considered our user's concerns.

    Of course, and as is always the case, we will not be able to please everyone but if we can at least satisfy most then we will stand a chance of coming up with something pretty decent.

    My email: jon.silvera@fuze.co.uk

    And like I said, no worries if you're not into it.


  • F

    Fuze Music Editor?! Wow, that’s something to look forward to, for sure!


  • F

    @Jonboy Honestly, my only experience prior to making my MML functions was utilizing MML on the user end with Petit Computer on the DSi, so I'm just attempting to mimic how that operated in FUZE. The way I go about it works, but may not be the correct method. It's really just a sequencer where for each channel, you have a start, and then go through them instruction by instruction (I convert MML strings to an numeric array where each instruction is assigned a code, and additional values follow, mainly for speed purposes as continually working with it as strings requires more processing). I keep a state for most instructions for when they are needed later (like if you set the Octave, and later down the line, you wish to drop it by 1), and each note is given an amount of time to play, either individually or based on the default length, so instructions generally halt until the note is done. This includes when at rest.

    It has been a while since I last touched the code, and I don't have my Switch on me atm to review what I did. Maybe when I have the time, I could go through my code and document it thoroughly.

    @spikey I'll take a look at it when I get the chance. I figured it was an issue with struct-copying, but I thought I had tried something like copying each piece one at a time when tested the issue, and my results came up no different. Maybe I was missing something. Anyways, I'll check it out later.


  • Fuze Team

    Let's face it, a lot has happened in Fuze in 7 months too :)


  • F


  • F

    @Discostew ‘s mml player no longer works after the latest patch. I would love if he (or someone else) could get it up and running again.


  • F

    It would seem that in addition to a few cases of needing to replace 'handle' with var, the code uses reference variables (similar to a 'with' block).

    For example 't' is used as shorthand for 'dmml_Main.t' throughout the code.

    t = dmml_Main.t
    ...
    t[ tID ].something = [ stuff ]
    

    This no longer works since 't', is now only a copy of 'dmml_Main.t' but replacing t with 'dmml_Main.t' seems to have fixed it. My version also has changes I made to stabilize it prior to v2.15. Although I am not sure those changes are needed anymore, I have left them in.

    I have friend shared the program for now. I don't want to submit for public sharing it since I am not the author.


  • F

    Thanks, @Gothon!


Log in to reply