[PD] fast way to convert two 8 bit data to one 16 bit data in big lists ?
reduzent at gmail.com
Fri Sep 25 11:23:14 CEST 2020
On Fri, 2020-09-25 at 00:30 +0200, Benjamin ~ b01 wrote:
> I'm looking for a fast way to convert two 8 bit data to one 16 bit
> in big lists
> a device send continuously packets of 16 000 bytes threw the network
> at the moment, to reconstitute from two bytes a 16 bit value, I'm
> a list-drip and a counter to discriminate the MSB and LSB and do the
> *256 and + operation
> the aim is to feed a table with the result (see attached) and produce
> sound from it
> it works with packets of 2 000 bytes but pd freeze with bigger
> I'm wondering if there is a better way to achieve this ?
You may have a look at netpd-tabwrite16.pd from . It uses signal
objects in [switch~]ed subpatch. This seems more efficient than
iterating with control objects.
Please note the following caveats:
* It detects whether DSP is on and falls back to control object
iteration when not. This works only when actually running in netpd. You
might want to skip that [spigot]s
* Since it was designed for audio, the resulting values in the table
are scaled to -1 and 1. You can skip the scaling to get values from 0-
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: This is a digitally signed message part
More information about the Pd-list