HISE Logo Forum
    • Categories
    • Register
    • Login

    Simple Note Player (not Arpeggiator)

    Scheduled Pinned Locked Moved General Questions
    18 Posts 6 Posters 823 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.
    • Dan KorneffD
      Dan Korneff @Christoph Hart
      last edited by

      @Christoph-Hart Any chance you'll have a Tutorial posted for this feature? Im digging in tonight

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 1
      • ?
        A Former User
        last edited by

        By the way, the midi player sync is not working properly.

        When I open a 4 bar midi loop, the loop plays 4 or 8 times faster.

        ulrikU Dan KorneffD 2 Replies Last reply Reply Quote 1
        • ulrikU
          ulrik @A Former User
          last edited by

          @Steve-Mohican said in Simple Note Player (not Arpeggiator):

          By the way, the midi player sync is not working properly.

          When I open a 4 bar midi loop, the loop plays 4 or 8 times faster.

          I've noticed that too

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

          1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff @A Former User
            last edited by

            @Steve-Mohican @ulrik
            Do you guys have a snippit of how you're implementing the feature? Looking for some programming inspiration.

            Dan Korneff - Producer / Mixer / Audio Nerd

            ? ulrikU 2 Replies Last reply Reply Quote 0
            • ?
              A Former User @Dan Korneff
              last edited by

              @dustbro For midi player I used drag and drop feature to load midi files. But every time I load different midi files, midi player began to so so speedy (as I mentioned above, 8 times faster). So I haven't got any special snippet yet, but I can share when I will.

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

                Hmm works for me well in a project I am currently working on.

                Can you send me the MIDI file, perhaps there is some metadata in my files that I am expecting to be standard, but are missing in yours?

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

                  @Christoph-Hart here's a midi file that I use inside Hise, the original tempo is quarter note = 200bpm, but when I play it in Hise I have to set global tempo to half the tempo, 100bpm.
                  Miss Karting.mid

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

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

                    @dustbro I use it for demoing the sample library so the user can can chose one of many built in midi files to play, it looks like this:

                    inline function onDemoSongsControl(component, value)
                    {
                        MIDIPlay.stop(0);
                    	DemoTimer.stopTimer();
                    	Engine.setHostBpm(-1);
                        DemoSongs.set("items", DemoSongsArr.join("\n"));
                        
                        if(value < SongInfo.length)
                        {
                            MIDIPlay.setFile("{PROJECT_FOLDER}"+DemoSongsArr[value]+".mid", true, true);
                            SongInfoPnl.set("visible", true);
                            SongInfoLbl.set("text", SongInfo[value]);
                            Engine.setHostBpm(DemoSongsTempi[value]);
                            MIDIPlay.play(50000);
                            DemoTimer.startTimer(7000);
                            DemoOnBtn.setValue(1);
                        }
                        else
                        {
                            SongInfoPnl.set("visible", false);
                            DemoSongsPnl.set("visible", false);
                            label7.set("enabled", false);
                            DemoOnBtn.setValue(0);
                        }
                    };
                    
                    Content.getComponent("DemoSongs").setControlCallback(onDemoSongsControl);
                    

                    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

                      Ah, thanks, it's what I thought, you're using a MIDI resolution of 480ppq, while I am expecting 960ppq, which I thought was standard.

                      Unfortunately fixing this is not as trivial as I hoped, I need to convert them manually if the resolution doesn't match (because internally I am doing everything in 960ppq).

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

                        @Christoph-Hart I see, is there a command to apply in the code when loading a midi file, that will half the tempo of the midi file, like "Engine.setHostBpm("midiFile.getResolution() * 2)"...
                        I mean "Engine.setHostBpm("midiFile.getTempo() / 2)". or something?

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

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

                        16

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        103.1k

                        Posts