[PD] convert signal to 16bit stream

Roman Haefeli reduzent at gmail.com
Mon Nov 7 18:02:28 CET 2016


On Mon, 2016-11-07 at 17:49 +0100, patrice colet wrote:
> Hello,
> 
>   this is quite interesting but there is something I don't get in 
> attached patch, both 1 and -1 outputs the same thing, so I don't know
> if 
> I've misinterpreted something or if there is a mistake in message
> computing

No, you're right. The message based reference is already wrapping over.
I added a [clip -32768 32767] to avoid that. 

See attachment.

Roman




> Le 07/11/2016 à 16:24, Roman Haefeli a écrit :
> > 
> > Hi all
> > 
> > In order to store audio data more efficiently in netpd presets and
> > also
> > to transmit live audio through OSC, I'm thinking of ways to convert
> > an
> > signal to a 16-bit stream represented as two signals, one for each
> > byte, the first for MSB and the second for LSB. I already came up
> > with
> > a few solutions, but I'm not totally happy with any of them because
> > they are not very efficient or/and have strange edge cases. It
> > turns
> > out what seems a simple task is a bit more complex and probably has
> > quiet a few totally different solutions.
> > 
> > I would be interested to see with what solutions people come up
> > with.
> > Consider it a puzzle, a brain teaser (in case you're done writing
> > your
> > paper for pdcon and need some distraction).
> > 
> > Requirements:
> >   * It must be done in signal domain (I was doing it in message
> > domain
> >     yet, but performance is obviously bad)
> >   * Only vanilla objects are allowed.
> >   * Input is in the range -1 to 1. Input outside this range should
> > be
> >     clipped and not wrapped around.
> >   * Output is two signals, each consisting of an integer value
> > between
> >     0 and 255
> >   * The two bytes represent a 16-bit _signed_ integer
> > 
> > You can compare your output with the message version in attached
> > patch.
> > If this generates interest and makes some people participate, I'll
> > disclose my solutions after people submitted their solutions.
> > 
> > 
> > 
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> https://lists.puredata.info/l
> > istinfo/pd-list
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis
> tinfo/pd-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16bit-converter-challenge.pd
Type: text/x-pd-l2ork
Size: 1552 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161107/cafc21a8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161107/cafc21a8/attachment.sig>


More information about the Pd-list mailing list