Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    MML Player

    Work In Progress
    12
    37
    2543
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Discostew
      Discostew F @Spacemario last edited by Discostew

      @Spacemario SW-6473-2521-3817. Still need to share the program after they changed a few things that caused the share feature to not work. Been working on the program, since, so it needs some clean-up.

      It still crashes. Tried a few methods, and while I've been able to extend the playback time, it still ultimately stops because of the stack overflow. It's something that will just have to wait until the next patch that hopefully fixes this problem.

      Spacemario 2 Replies Last reply Reply Quote 0
      • M
        MikeDX last edited by

        stack overflow is fixed in the next patch

        Spacemario 1 Reply Last reply Reply Quote 4
        • Spacemario
          Spacemario F @Discostew last edited by

          @Discostew Awesome, sounds good! And friend request sent

          1 Reply Last reply Reply Quote 0
          • Spacemario
            Spacemario F @MikeDX last edited by

            @MikeDX Fantastic!

            1 Reply Last reply Reply Quote 0
            • Spacemario
              Spacemario F @Discostew last edited by

              @Discostew Commenting back in your main thread... I know it's not solving the real problem, but could you avoid the crash by picking some period of time-- let's say, 40 seconds-- and fade out the music, then restart it?

              This would limit people to 40 second songs, but at least then the code would be usable until you can isolate the real issue? Also, the "fade out and restart" thing would evoke the Red Book 32-bit days, which wouldn't be a bad thing.

              Just a random thought anyway.

              Discostew 1 Reply Last reply Reply Quote 0
              • Discostew
                Discostew F @Spacemario last edited by

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

                1 Reply Last reply Reply Quote 0
                • spikey
                  spikey F last edited by spikey

                  @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.

                  1 Reply Last reply Reply Quote 3
                  • Jonboy
                    Jonboy Fuze Team last edited by

                    @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.

                    Discostew 1 Reply Last reply Reply Quote 7
                    • vinicity
                      vinicity F last edited by

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

                      1 Reply Last reply Reply Quote 2
                      • Discostew
                        Discostew F @Jonboy last edited by

                        @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.

                        1 Reply Last reply Reply Quote 2
                        • Martin
                          Martin Fuze Team last edited by

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

                          1 Reply Last reply Reply Quote 1
                          • PickleCatStars
                            PickleCatStars F last edited by

                            https://electronicmusic.fandom.com/wiki/Music_Macro_Language

                            1 Reply Last reply Reply Quote 0
                            • vinicity
                              vinicity F last edited by

                              @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.

                              1 Reply Last reply Reply Quote 0
                              • Gothon
                                Gothon F last edited by

                                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.

                                1 Reply Last reply Reply Quote 3
                                • vinicity
                                  vinicity F last edited by

                                  Thanks, @Gothon!

                                  1 Reply Last reply Reply Quote 1
                                  • First post
                                    Last post