HISE Logo Forum
    • Categories
    • Register
    • Login

    Working with MidiPlayer

    Scheduled Pinned Locked Moved General Questions
    9 Posts 3 Posters 583 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.
    • ulrikU
      ulrik
      last edited by

      I've successfully implemented the MIDIPlayer into one of my projects, I want to use it for demoing the plugin, so the user would be able to chose from a couple of midi files stored in the plug.

      1. Is it possible to make the keyboard in the plugin visually show the keys pressed? (As it is now nothing shows)
        If yes, how do I set it up?

      2. Is it possible to script accelerandos and ritardandos that will follow the midi files? Or is it possible to store tempo changes in the midi files and will the MIDIPlayer follow it?

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

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

        @ulrik how did you do that, I'm trying but can't quite figure it out

        Joansi Villalona

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

          @Jay this is the code for declaring it and connecting it to my "demobtn", I will expand it so the user will be able to chose from a list of songs....

          //  MidiPlayer  ----------------------------------------------
          const var MIDIPlayer1 = Synth.getMidiProcessor("MIDI Player1");
          const var MIDIPlay = Synth.getMidiPlayer("MIDI Player1");
          const var DemoBtn = Content.getComponent("DemoBtn");
          
          inline function onDemoBtnControl(component, value)
          {
              if(value == 1)
              {
                  MIDIPlay.setFile("{PROJECT_FOLDER}lordamornar.mid", true, true);
                  MIDIPlay.play(100);
                  Engine.setHostBpm(45);
                  midi.push(MIDIPlay.getEventList());
              }
              
              if(value == 0)
              {
                  MIDIPlay.stop(10);
              }
              
          };
          
          Content.getComponent("DemoBtn").setControlCallback(onDemoBtnControl);
          

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

          JayJ 1 Reply Last reply Reply Quote 1
          • JayJ
            Jay @ulrik
            last edited by

            @ulrik thanks buddy

            Joansi Villalona

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

              @Jay No problem, you can ignore the line "midi.push(MIDIPlay.getEventList());" it has nothing to do with the code, I just forgot to erase it :)

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

              1 Reply Last reply Reply Quote 1
              • Christoph HartC
                Christoph Hart
                last edited by

                There's no support for tempo changes - it's primary use case is playing MIDI loops that sync to the DAW so it just reacts on external tempo changes.

                ulrikU 1 Reply Last reply Reply Quote 1
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  Oh and no, you can't show the notes being played on the keyboard for the same reason that it won't show script generated ones - the keyboard shows the MIDI notes coming in, there's no way to display the internal ones.

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

                    @Christoph-Hart Ok I see, what about my other question "Is it possible to make the keyboard in the plugin visually show the keys pressed?"

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

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

                      @Christoph-Hart Sorry, I didn't see that answer :)

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

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

                      43

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      101.9k

                      Posts