HISE Logo Forum
    • Categories
    • Register
    • Login

    Bounce Audio Sample

    Scheduled Pinned Locked Moved General Questions
    5 Posts 2 Posters 203 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.
    • oskarshO
      oskarsh
      last edited by

      Hey, I would like to Bounce a audio sample from my AudioLoop Player with all the effects.

      I think I need to use Engine.renderAudio(eventList, callback); however I am not so sure how I can create a single MIDI Player.

      How can I trigger a single midi note and render the Audio?

      breathing HISE

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

        @oskarsh create an array with two message holders, one note on and one note off and pass that into the function as eventList.

        oskarshO 1 Reply Last reply Reply Quote 1
        • oskarshO
          oskarsh @Christoph Hart
          last edited by

          @Christoph-Hart I got the Audio to render however I am still wondering how someone would go about dragging this audio to a DAW? Can you share a minimal example or guide me into the correct direction with this?

          inline function createEventList()
          	{
          		local events = [];
          		
          		local on = Engine.createMessageHolder();
          		on.setType(1);
          		on.setChannel(1);
          		on.setVelocity(127);
          		
          		on.setNoteNumber(60);
          		on.setTimestamp(0);
          		
          		local off = Engine.createMessageHolder();
          		off.setType(2);
          		off.setChannel(1);
          		off.setNoteNumber(60);
          		
          		local numSamples = 24516;
          		
          		off.setTimestamp(numSamples/8);
          		
          		events.push(on);
          		events.push(off);
          	
          		return events;
          	}
          	
          	inline function onRender(obj)
          	{
          		local isFinished = obj.finished;
          		
          		if (isFinished) {
          			Console.print('DRAG TO DAW NOW');
          		}
          	}
          	
          	inline function renderAudio()
          	{
          		Engine.renderAudio(createEventList(), onRender);
          	}
          

          breathing HISE

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

            @oskarsh in the render finished callback, pass on the rendered buffer to a scriptpanel (save it in its data object). Then in the mouse callback on click, write the buffer to a temp file, then use this method:

            Link Preview Image
            HISE | Docs

            favicon

            (docs.hise.audio)

            (You might have to write the file in the render finished callback because it might start lagging the drag, but you‘ll see).

            oskarshO 1 Reply Last reply Reply Quote 0
            • oskarshO
              oskarsh @Christoph Hart
              last edited by

              @Christoph-Hart Awesome thanks alot, will try!

              breathing HISE

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

              54

              Online

              1.7k

              Users

              11.7k

              Topics

              101.9k

              Posts