HISE Logo Forum
    • Categories
    • Register
    • Login

    MIDI FX Chord Plugin -- Using Message.sendToMidiOut() For Generated Notes

    Scheduled Pinned Locked Moved Scripting
    2 Posts 2 Posters 59 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
      dusseldorf
      last edited by

      I'm trying to create a MIDI FX plugin that generates chords based on a single note played by the user. I'm able to send the original played note to the host DAW using Message.sendToMidiOut(), but is doesn't include the additional notes generated using Synth.addNoteOn().

      When I test the plugin inside HISE with a temporary Sampler set up, it works just fine, but inside Ableton, it only forwards the original note played, and not the rest of the chord. I'm not sure how to use something like Message.sendToMidiOut() for the rest of the chord.

      Here is my onNoteOn code:

      function onNoteOn()
      {
      	var noteNumber = Message.getNoteNumber();
      	var noteChannel = Message.getChannel();
      	var noteVelocity = Message.getVelocity();
      	var noteID = Message.getEventId() % 128;	
      	
      	if(chordMode == true)
      	{
              // activeNotes is an array of Engine.createMidiList() objects
      		for(x = 0; x < activeNotes.length; x++) 
      		{
      			setKeyColor(noteNumber + tChord[x], "ON");
      			activeNotes[x].setValue(noteID, Synth.addNoteOn(noteChannel, noteNumber + tChord[x], noteVelocity, chordDelay));
      		}
      	}
      	
      	setKeyColor(noteNumber, "ON");
      	Message.sendToMidiOut();
      }
      
      VirtualVirginV 1 Reply Last reply Reply Quote 0
      • VirtualVirginV
        VirtualVirgin @dusseldorf
        last edited by VirtualVirgin

        @dusseldorf
        sendToMidiOut() will not capture generated notes at that level.
        You have to place sendToMidiOut() in a script in a container level beyond the one your MIDI notes are being generated in.

        Screenshot 2025-08-07 at 11.39.19 AM.png

        And don't forget to put it on the other MIDI callbacks as well!

        You can listen to my orchestral mockups here:
        https://www.virtualvirgin.net/

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

        34

        Online

        1.9k

        Users

        12.3k

        Topics

        106.8k

        Posts