HISE Logo Forum
    • Categories
    • Register
    • Login

    MIDI Player Questions

    Scheduled Pinned Locked Moved Unsolved General Questions
    midiplayermidi
    6 Posts 3 Posters 221 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.
    • d.healeyD
      d.healey
      last edited by

      The create-midi-sequence snippet is missing from the current docs.

      1. How do we extend a sequence that was added with the Create function?
      2. How do we create a sequence that uses multiple time signatures?
      3. What is the difference between a sequence and a track?
      4. How many sequences can I have?
      5. If I make a sequence that is one bar in 4/4 and I add 5 quarter notes to it, what happens?

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

      clevername27C ulrikU 2 Replies Last reply Reply Quote 3
      • clevername27C
        clevername27 @d.healey
        last edited by

        @d-healey All of the answers depend on whether create appends the currently-loaded sequence. There's a typo in the docs, so the answer is unclear.

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

          @clevername27 Create adds a new sequence.

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

          1 Reply Last reply Reply Quote 1
          • ulrikU
            ulrik @d.healey
            last edited by

            @d-healey said in MIDI Player Questions:

            The create-midi-sequence snippet is missing from the current docs.

            1. How do we extend a sequence that was added with the Create function?

            get the sequence time signature, modify it, set it back add your extra notes

            	//	get current sequence event list
            	local list = MIDIPlayer1.getEventListFromSequence(1);
            	
            	//	get current sequence timesignature
            	local ts = MIDIPlayer1.getTimeSignatureFromSequence(1);
            	Console.print(trace(ts));
            	
            	//	modify timesignature, here we extend it to 2 bars instead of 1
            	ts.NumBars = 2;
            	MIDIPlayer1.setTimeSignatureToSequence(1, ts);
            	
            	//	add extra notes
            	local extraNotes = [];
            	
            	addNote(extraNotes, 1, 75, 127, 4, 1);
            	addNote(extraNotes, 1, 72, 127, 5, 0.5);
            	addNote(extraNotes, 1, 67, 127, 5.5, 0.3);
            	addNote(extraNotes, 1, 65, 127, 6.11, 0.5);
            	addNote(extraNotes, 1, 63, 127, 7, 1);
            	
            	//	push the "extra notes" into the current event list
            	for (e in extraNotes)
            		list.push(e);
            	
            	//	set the list back into the right sequence
            	MIDIPlayer1.flushMessageListToSequence(list, 1);
            
            
            HiseSnippet 1981.3oc2X0uaiabDmz1LsRsWPR6gh9mKNTfR2JvSRVVxFGNDaKIaq3Oqk7cMIHMXM4Rw0G4tLjqrOkh7dzGq9nj2f1Y3Ghj1xWLLZJZpNf6tclY28278r77HoMKNVFooWex7Pll9u1X7bgxquGkKzFMPS+4FCeuhIbNg6vGy91YLgMSau4gz3Xlilt9pGfRpWaMsje+vmsG0mhxrfjl1ajba1w7.tpf546bD22eepCaBOnjzc1YjsTzW5KmAnZUilZgT62QmxNkhhshg1gzXOM8+jQyM6xX81v0wgtwFNc61c6s1ty1sntM6PupU2s6ztSu1a0yUS+iF5vUxnwJphEqou1dRm4i8j2JRuf2vi4W4yvEszFC2bJ48k9NnJhT056w8cNO2bEqooabdgwa0Ti2yMPqzB5EFwOIgAoXGkMf5qTEdqVAdsJCulkf2RfzJkfzuH2el.Ie5bVTBT9XiSFMXDIkRqJ.o+rnHlPsvKWxolwZRD3KJS+XoLbnfBvyoLY7zuBDcbHqJC8Uez5ZqOntpgp09beFp254K.oQcDBRFPUTM8+gQqlaaIlz8ns5umy6N1x5hwWOv1p6zA8rYWdYyajzQGdt8Q1WayFbwY64b63waM5f29lyhlb1YhaYG38EgeYXmqN1+xc6d7a2M51gV9dcYGc43YaczQ6cz28dmorAitPXc7gi2di12LcvmGY84tG6o5acv16d3oewjq+t1e40rqilbc3j8mzenkFB1EAz55XJvX9TAUMKBn8QmNKXOJnlE4P6bpLfC7QWaNwOYmALwxHidEvBGoJmDl5pp3MlvBBkED9a6nUJ.Zsz.nO0XrcDOTUvAsv+1LpEgzUCkR4psRuZF8kBn9gxJf9N19QvhQv5HWpMyb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CmtIR56isaWBaL1J5CsQyEizP8mwVHHL9U0AkMdbCJmUhtjfRwHAWcVHS7PujQKaBM3+c4nj4lgI3xncdRAPEGgf9.1Mv63RGKrlw.V76TxPskLyH7bGoyLebrzxuABeoXFCvFTYdQblPALfv7JOV3+TOL5wBwO03btx1a4XbkkfQ7MW+DfwrmS9LigttLaUA.WyX++5OMucr70+woW+uxXLz3IYBhjK+2krl7VbbfCXBVDZ7Z8A9V.+yG62BH7Q+s.NyVAWO7LTQLLPYkCdLKfOAlcn7qlztLFZ3v91KPuYY58kP6fkw5G9r8Akbo6YL1fHIrX2.4LQkGWc220t1iKc8G4SLr1+y8IF9YPxttdILVKGii43qRFJvWoATPL9afRXtzY9pbpUikOQJjgdRA2tri9BlB5EMkEUF6KUg1Uop7wRd9NWv7YzxAs+gcNFB1nQfch8DsEsd71hOj+52ajBWBl.R94aQ5U++6hzWHmo3homPgfv2CCE.y0NFpMZyxdiNNnf9JX8sz0Mw0oEGENIK9WvuLlsv05YLaky7+J2Q.0NR9M1oi.gwo+xDJfdKR9nX0LNAWSZokLVTYeY.Tk6arsqdT2aisepabim5F67T23lO0M18otwdO0Mt0O9FwlP6NSICRSM0zN47goeKV8EemX8U0925Mn6L.
            
            1. How do we create a sequence that uses multiple time signatures?

            I don't think that is possible, you have only 1 time signature object per sequence
            But you could have several sequences with different time signatures and flip between them I guess

            1. If I make a sequence that is one bar in 4/4 and I add 5 quarter notes to it, what happens?

            The length of the sequence will be the same

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

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

              @ulrik said in MIDI Player Questions:

              The length of the sequence will be the same

              Thank you for the details answers. So for this one, will the last note just not be played since it is beyond the length of the sequence?

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

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

                @d-healey Yes

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

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

                22

                Online

                1.7k

                Users

                11.9k

                Topics

                103.4k

                Posts