<div dir="ltr"><div>Thanks for the update, Miller!<br><br>libpd already includes a workaround for this port number shift (i.e., it decrements on output, so that port numbers always start at 0), and I'll just get rid of the workaround when I merge 0.45.<br>
Cheers,<br></div> Peter<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 2, 2013 at 9:32 PM, Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm belatedly looking at this to try to figure out what if any policy is<br>
happening here...<br>
<br>
Objects like "noteon" should report MIDI "channel" 1-16 for the first port,<br>
17-32 for the second one, and so on. The only MIDI input objects that<br>
don't have a channel are the byte-by-byte ones, and so these get an outlet<br>
to specify port. This should be 1 for the first open MIDI port, etc.<br>
<br>
For some damn reason, the MIDI port numbers have started at 2 and not 1,<br>
probably since the dawn of Pd. I think it's worth fixing this - it's a<br>
bug and I think device numbers have been sliding around so much already<br>
that any notion of port-number compatibility is specious anyhow.<br>
<br>
I think thought that I should do this for the upcoming 0.45 and not any<br>
new 0.44 bugfix releases.<br>
<br>
cheers<br>
<span class="HOEnZb"><font color="#888888">Miller<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Jan 08, 2013 at 01:06:41PM -0800, Miller Puckette wrote:<br>
> I _think_ it would be safe to change this... anyone know of any way that<br>
> would break compatibility?<br>
><br>
> thanks<br>
> M<br>
><br>
> On Tue, Jan 08, 2013 at 02:58:41PM -0500, Peter Brinkmann wrote:<br>
> > Hi,<br>
> > I've been revisiting the MIDI support of libpd, and I noticed that the<br>
> > functions inmidi_byte and inmidi_sysex add one to the port number before<br>
> > passing the message on to the midiin/sysexin object. Is this the desired<br>
> > behavior? If so, why? If not, is it too late to change it?<br>
> ><br>
> > I also don't understand the output I'm getting from my Korg nanoKey: If I<br>
> > push a key on the keyboard, then [notein] outputs MIDI events for channel<br>
> > 1, while [midiin] outputs bytes for port 2. How to channel numbers and port<br>
> > numbers fit together?<br>
> > Thanks,<br>
> > Peter<br>
><br>
> > _______________________________________________<br>
> > Pd-dev mailing list<br>
> > <a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
> > <a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
><br>
><br>
> _______________________________________________<br>
> Pd-dev mailing list<br>
> <a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
> <a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
</div></div></blockquote></div><br></div>