[PD-dev] MIDI-HD support in Pd (was: Re: HD support in Pd)

IOhannes m zmoelnig zmoelnig at iem.at
Mon Feb 23 09:46:50 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

hi,

On 2015-02-22 13:03, BEB Digital Audio wrote:
> Hello everybody,
> 
[...]
> 
> I have taken a look to the possibility to include HD support in Pd

great!

> (since I am the creator of the HD Max externals), but there is
> currently a huge stone in the middle of the road : HD is
> exclusively based on 32 bits unsigned integer atoms... so it's
> simply impossile for now to encode HD messages in Pd because of the
> restricted range of integers (due to the use of float for numbers).
> It would be eventually possible to use 64 bits version, but this
> would restrict Pd with HD support to "high end" platforms (and I
> like the idea of running Pd on small 32 bits platforms)
> 


i think the way to go is to (with the least preferred suggestion at
the bottom)

- - internally use whatever representation fits your needs (uint32_t)

- - for in-patch communication, create a semantic layer that does not
require uint32_t.
(use a symbolic "noteon" message instead of it's encoded uint32_t
equivalent¹)

- - use Pd native types where this is not possible but still feasible
(e.g. if your "channel number" is encoded as 32bit uint, you will get
away with a 23bit integer - as is provided by Pd's t_float type) in
virtually all cases)

- - where it's absolutely necessary to be able to feed your objects with
a 32uint_t from within a Pd-patch, you could always use list of two
numbers (just read them as two shorts and recreate the uint32_t from
that). just make sure that you don't end up with multiple pairs in a
single (user-exposed) message)

fgmasdr
IOhannes





PS: congratulations to the MMA committee for chossing a clever, unique
and unambiguous name like "HD".


¹ please note that i have absolutely no clue about the internals of
MIDI-HD; so the "noteon" example might not be the best one; but i hope
you get my point.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJU6uj1AAoJELZQGcR/ejb46g0P/2S2ilG2CSGUG3qieqdlElzM
V3geR92nrk2J96ahu03SW1Z4FM7Gfh+Xvff3Gpez8+Dv7EeoDD4bGlLSHNQ96Ig+
gJws2TOGILKhtC/s25J7C5OxPHIG6C7H9+wIwlRljaa8UqvXpDDRLGmPIuE8BxTK
sCo/HlBYXBLEu9fjuam9M3SlTAxjIMYPKGuoNUUeUkZx3pRX2n7hd0+WPak4BOlI
WMtuJrqYH7ReYtgxupQsvwwvuXN9CzYVmeFDaYimQabBY+areU6S/BXWLrSB4Hfb
KhTYO2nPatvgE5smfovgvSqb2fQTIlUDvriV4zXDWaP+tpoAULagcAcLNDiMPxaC
jbpRRjYI+q4sxyb59mLYxtXMJsVkJOy/BvPjVo/6J2I0yjiZSqHa1zohysA5/5Lu
rYUogSg4cAryrw4LS30b44COt1IxgxK574IVYGqpDC04zItQu3OnwduPsuuUmZKi
mNbmKWnXuk2fpGDGeLc3SyFbgIKzA7fadQcG3yM7A6+gFbdZM+npfQNRtZwdRoNv
QiJHehIpBlUr/I1X2cdHS6IVGRs7COkzblAR4MFhEQs7zmZ9IYZfoFfOmpGpUgMx
kYQCDHBGaZGKR9wQWe1NE9XRDJMuJwO1/QVTeSc2UlWdj4Ei/VFG4/gVt268mvg4
K9dE7uHFNBEc/ACcmKKo
=dN9m
-----END PGP SIGNATURE-----



More information about the Pd-dev mailing list