HISE Logo Forum
    • Categories
    • Register
    • Login

    Simple Note Player (not Arpeggiator)

    Scheduled Pinned Locked Moved General Questions
    18 Posts 6 Posters 829 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.
    • hisefiloH
      hisefilo @d.healey
      last edited by

      @d-healey Yes I was diving in API, but can't figure out yet.

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @hisefilo
        last edited by

        @hisefilo Get the BPM you want in milliseconds and set the timer interval. Then in the timer callback use Synth.playNote();

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

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

          You can use a MidiPlayer and create this sequence by script.

          Dan KorneffD 1 Reply Last reply Reply Quote 3
          • Dan KorneffD
            Dan Korneff @Christoph Hart
            last edited by

            @Christoph-Hart said in Simple Note Player (not Arpeggiator):

            You can use a MidiPlayer and create this sequence by script.

            Do we have documentation yet?? :)

            Dan Korneff - Producer / Mixer / Audio Nerd

            hisefiloH 1 Reply Last reply Reply Quote 0
            • hisefiloH
              hisefilo @Dan Korneff
              last edited by

              @dustbro Can't find anything. :( A simple snippet maybe? @Christoph-Hart

              Also I'm trying to get this buttons light on and off on mouse click. But cant get it working. Any ideas guys?

              Screen Shot 2019-08-13 at 5.35.07 PM.png
              Screen Shot 2019-08-13 at 5.34.20 PM.png

              
              const var BD = Content.getComponent("BD");
              
              inline function onBDControl(component, value)
              {
              	Synth.playNote(36, 127);
              	Message.delayEvent(5000);
              	BD.setValue(0);
              };
              
              Content.getComponent("BD").setControlCallback(onBDControl);
              
              1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart
                last edited by

                Link Preview Image
                hise_documentation/hise-modules/midi-processors/list/midiplayer.md at new_docs · christophhart/hise_documentation

                The markdown files for the online documentation. Contribute to christophhart/hise_documentation development by creating an account on GitHub.

                favicon

                GitHub (github.com)

                Link Preview Image
                hise_documentation/scripting/scripting-api/midiplayer at new_docs · christophhart/hise_documentation

                The markdown files for the online documentation. Contribute to christophhart/hise_documentation development by creating an account on GitHub.

                favicon

                GitHub (github.com)

                These are the markdown files which will be rendered in the doc system (subject to HISE 3.0).

                Dan KorneffD 1 Reply Last reply Reply Quote 2
                • 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

                                    10

                                    Online

                                    1.7k

                                    Users

                                    11.8k

                                    Topics

                                    103.2k

                                    Posts