-----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.