<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&#39;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">&lt;<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m belatedly looking at this to try to figure out what if any policy is<br>
happening here...<br>
<br>
Objects like &quot;noteon&quot; should report MIDI &quot;channel&quot; 1-16 for the first port,<br>
17-32 for the second one, and so on.  The only MIDI input objects that<br>
don&#39;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&#39;s worth fixing this - it&#39;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>
&gt; I _think_ it would be safe to change this... anyone know of any way that<br>
&gt; would break compatibility?<br>
&gt;<br>
&gt; thanks<br>
&gt; M<br>
&gt;<br>
&gt; On Tue, Jan 08, 2013 at 02:58:41PM -0500, Peter Brinkmann wrote:<br>
&gt; &gt; Hi,<br>
&gt; &gt; I&#39;ve been revisiting the MIDI support of libpd, and I noticed that the<br>
&gt; &gt; functions inmidi_byte and inmidi_sysex add one to the port number before<br>
&gt; &gt; passing the message on to the midiin/sysexin object. Is this the desired<br>
&gt; &gt; behavior? If so, why? If not, is it too late to change it?<br>
&gt; &gt;<br>
&gt; &gt; I also don&#39;t understand the output I&#39;m getting from my Korg nanoKey: If I<br>
&gt; &gt; push a key on the keyboard, then [notein] outputs MIDI events for channel<br>
&gt; &gt; 1, while [midiin] outputs bytes for port 2. How to channel numbers and port<br>
&gt; &gt; numbers fit together?<br>
&gt; &gt; Thanks,<br>
&gt; &gt;      Peter<br>
&gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Pd-dev mailing list<br>
&gt; &gt; <a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
&gt; &gt; <a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Pd-dev mailing list<br>
&gt; <a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
&gt; <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>