My MIDI Plugin is outputting notes from all instances of itself?

Learn about building and using Max for Live devices.
Post Reply
whiteballoonsin1978
Posts: 6
Joined: Thu Jul 30, 2009 6:26 pm

My MIDI Plugin is outputting notes from all instances of itself?

Post by whiteballoonsin1978 » Mon Aug 03, 2020 11:01 pm

Hi, I created my first M4L plugin this weekend. It takes only MIDI notes in, and sends only MIDI notes out (and even then not too many of them):

https://maxforlive.com/library/device/6492/hotstepper

I used a single [midiin] to receive MIDI into it, and three [midiout] to send MIDI out of it. If I use the M4L MIDI Monitor after my plugin with only a single instance of it running inside Ableton, I'm seeing exactly what I expect to see in terms of note output.

But: If I add two instances of my M4L Plugin (be these two instances in different Chains, with different Key Zones, of a single Instrument Rack -- or in different MIDI Tracks entirely separated by MIDI Channel), I see the notes I expect, plus an exact duplicate of them: if I expect to see one C4 NoteOn, I'm seeing two in M4L MIDI Monitor instead.

Plus, indeed, if each instance of my M4L plugin has an Instrument behind it, both Instruments play when I only send MIDI to a single instance of my plugin.

Is there some "global" or "information sharing" aspect of the way data within M4L plugins work that I'm not understanding? I watched the M4L "best coding practices" videos and didn't see anything, but maybe I missed it? I have a feeling it's something simple, at any rate.

Thanks for any help at all! I am experienced in development, but I'm a total beginner to making M4L plugins! rs

dave dove
Posts: 101
Joined: Sat Apr 09, 2011 5:25 pm
Location: Mid-Wales

Re: My MIDI Plugin is outputting notes from all instances of itself?

Post by dave dove » Mon Aug 03, 2020 11:32 pm

do you have any send and returns inside?
if so did you put 3 dashes before the name: s —-potato, r —-potato
the dashes tell max to keep data within that instance
otherwise the data goes system wide

dave

whiteballoonsin1978
Posts: 6
Joined: Thu Jul 30, 2009 6:26 pm

Re: My MIDI Plugin is outputting notes from all instances of itself?

Post by whiteballoonsin1978 » Tue Aug 04, 2020 12:27 am

I do indeed have Sends! And I did NOT use the Dashes. That would 100% explain it. Thanks!

EDIT: Patched and Re-released as v1.2.

rs


Post Reply