HISE Logo Forum
    • Categories
    • Register
    • Login

    Resetting MidiPlayer

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 243 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.
    • Adam_GA
      Adam_G
      last edited by

      What is the best way to reset a MidiPlayer module via scripting?

      currently I am using a button to trigger an inline function to set the file to "" but it seems to have problems:

      1. it works but the player and the overlay panel do not update to show it is empty.

      2. after i use it once in the exported plugin it no longer lets me drag in new midi files

      heres the code im using for it:

      inline function onButton1Control(component, value)
      {
      if (value)
      
      	MIDIPlayer1.setFile("", true, false);
      };
      
      Content.getComponent("Button1").setControlCallback(onButton1Control);
      
      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Adam_G
        last edited by

        @Adam_G The second bool should be set to true as well so the empty sequence is selected.
        Though I don't know if this will fix the dragging issue...

        Can't help pressing F5 in the forum...

        Adam_GA 1 Reply Last reply Reply Quote 0
        • Adam_GA
          Adam_G @ustk
          last edited by

          @ustk that worked for both! thanks so much

          now if i can just figure out why the new midi doesnt show visibly until i press play..

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @Adam_G
            last edited by

            @Adam_G Do you mean the note overlay? I think you'll need to provide a snippet example because everything works fine here, the overlay updates as soon as I set an empty file or a sequence...

            Can't help pressing F5 in the forum...

            Adam_GA 1 Reply Last reply Reply Quote 0
            • Adam_GA
              Adam_G @ustk
              last edited by

              @ustk yes, I have a paint routine painting the midi notes onto a panel and a draggable filter panel connected to the midi player that is over the panel.

              i will try to put a snippet together today

              ustkU 1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @Adam_G
                last edited by ustk

                @Adam_G So you probably have to call myMidiNotePanel.repaint() and or getNoteRetangleList() but it's hard to say without seeing a bit of code...

                Can't help pressing F5 in the forum...

                1 Reply Last reply Reply Quote 0
                • CatABCC CatABC referenced this topic on
                • First post
                  Last post

                48

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts