HISE Logo Forum
    • Categories
    • Register
    • Login

    MidiPlayer ClearSequences?

    Scheduled Pinned Locked Moved Scripting
    16 Posts 6 Posters 959 Views
    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.
    • ?
      A Former User
      last edited by

      Okay more discoveries:

      Connecting a non-momentary button to the "Play" Parameter, instead changes the Sequence number between 0-1.

      e3a1fb7e-d35a-4e15-aa2d-eec04eba701a-image.png

      @Christoph-Hart Master I summon thee :)

      1 Reply Last reply Reply Quote 1
      • Dan KorneffD
        Dan Korneff
        last edited by

        Running into the same issues. I'm unable to clear sequences, and Parameter Properties seem incorrect.

        Dan Korneff - Producer / Mixer / Audio Nerd

        1 Reply Last reply Reply Quote 0
        • Dan KorneffD
          Dan Korneff
          last edited by

          @Christoph-Hart Any chance you can take a quick look at the midi player? I don't think any of the Parameter Properties are working, which makes it a little difficult to use the player without Play/stop/set sequence/ clear sequence/ etc... 😲

          Dan Korneff - Producer / Mixer / Audio Nerd

          DimitrisSPD 1 Reply Last reply Reply Quote 0
          • DimitrisSPD
            DimitrisSP @Dan Korneff
            last edited by

            @dustbro Play, Stop, getTimeSignature and Drag to DAW works but there are some problems...see this post and if you have the time test the snippet in your system...this way we will be sure if it is a Midi Overlay bug or not
            https://forum.hise.audio/topic/4656/midi-overlay-panels-in-compiled-plugin-crashing-daws

            About Drag To DAW it works ok but there are 2 problems...

            1. If you load a midi and drag n drop to any daw it works like a charm...but if you load another midi after that(or try to drag n drop the same midi for second time) it does not work...I noticed that if you close the interface from the edit button of the daw and load again the instrument you can drag n drop again any loaded midi file...and that story goes on...Or if you try it from Hise plugin in any daw the same thing happens...you can drag n drop any loaded midi file but in order to drag again a second midi file you have to close and open again the (interface preview, or Hit compile and it works...and so on)

            2. The midi file that is created and dropped to daw is named as temp...
              Is there a way to have the name of the actual midi file that was loaded?

            1 Reply Last reply Reply Quote 0
            • Dan KorneffD
              Dan Korneff
              last edited by

              @DimitrisSP said in MidiPlayer ClearSequences?:

              Play, Stop, getTimeSignature and Drag to DAW works

              I can't get them to work from the Property Editor (like above). Some values do nothing, and other values control the wrong parameter.

              Do you know of a way to clear a sequence via script?

              Dan Korneff - Producer / Mixer / Audio Nerd

              DimitrisSPD 1 Reply Last reply Reply Quote 0
              • DimitrisSPD
                DimitrisSP @Dan Korneff
                last edited by

                @dustbro They will not work from the Property editor...
                Did you read the post that i mentioned above?
                You will find a lot of answers there...and load my snippet and test it in your system...you will see that most of the functionality is there and working ok and finaly you will come to the most serious problem that i mention in that post above (the crashing senario) but strangely noone (of the users here not even @Christoph-Hart) was interested about...and in some point anyone who is using a midi overlay panel (for drag to daw or any other functionality) will face it.

                The part of the code that controls play and stop is that below...

                //The callback to control playback of the loaded midi file
                inline function onPlayControl(component, value)
                {    
                    var position = Engine.getPlayHead().ppqPosition;
                    var last = Engine.getPlayHead().ppqPositionOfLastBarStart;
                    var currentposition = (position - last)/4;  
                    
                    if (Play.getValue())        
                       {
                         Player.play(0);
                         Player.setPlaybackPosition(currentposition);
                       }
                	else
                	   Player.stop(0);
                };
                
                Content.getComponent("Play").setControlCallback(onPlayControl);
                
                Dan KorneffD 1 Reply Last reply Reply Quote 1
                • Dan KorneffD
                  Dan Korneff @DimitrisSP
                  last edited by

                  @DimitrisSP said in MidiPlayer ClearSequences?:

                  Did you read the post that i mentioned above?

                  I did. I'll check out that snip today for any crashes on my rig.
                  Thanks!

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  1 Reply Last reply Reply Quote 1
                  • Dan KorneffD
                    Dan Korneff
                    last edited by

                    Looks like you can use this to clear all sequences

                    MIDIPlayer.setFile("", 1, 1);
                    

                    Dan Korneff - Producer / Mixer / Audio Nerd

                    ulrikU 1 Reply Last reply Reply Quote 2
                    • ulrikU
                      ulrik @Dan Korneff
                      last edited by ulrik

                      @dustbro Good catch! I'll test this now!

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

                      ulrikU 1 Reply Last reply Reply Quote 0
                      • ulrikU
                        ulrik @ulrik
                        last edited by

                        @ulrik I just want to confirm that @dustbro example works great for clearing all sequences!

                        Hise Develop branch
                        MacOs 15.3.1, Xcode 16.2
                        http://musikboden.se

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

                        58

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts