Re: [PD] unpack: type mismatch catch offending list?
Hi Tim - Mathieu's unpost object apparently hijacks printout and sends it back to the patch in a particularly elegant way, using ths sys_printhook variable in Pd. his object is written for his own variant of Pd and would have to be slightly adapted for either vanilla or for pd extended... the source is only 50-ish lines so it would be doable. cheers Miller On Fri, Jul 27, 2012 at 11:37:54PM +0200, tim vets wrote: Hi all, I have a stream of lists that I run through something like [unpack s f f f f] The lists are generated by a python script and send to pd over a network socket. Every now and then I get 'unpack: type mismatch', but afaict my script should send the all lists in the same format. Is there a way to 'catch' the offending lists for debugging? thanks, Tim ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] unpack type mismatch?
On 02/16/12 19:49, Hans-Christoph Steiner wrote: What if this was handled in [float]? Something like this: - add a symbol method to [float] - convert the symbol to a float, then back and compare - if it matches, output the float out of the left inlet - if it does not match, output the original symbol out of a new right outlet, which would be an everything else outlet like [select] [route], etc. i like the idea, so i added it to zexy's [atoi] and [atof] methods. regarding [f], i think it would be feature bloat and would rather not have it. mgf IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] unpack type mismatch?
Unlike MIDI, OSC isn't a tightly defined protocol, so some implementations of OSC Controllers are different to others. Print out the data in its raw form, before you try to route it to a control destination and see what is different. On Thu, Feb 16, 2012 at 10:23:31AM +0100, Christoph Kuhr wrote: Hi, i route OSC messages an then unpack it. [unpack 0 0 0 0] with one OSC controller i get the error: error: unpack: type mismatch unpacked: 3 14.8743 14.0385 20 with another OSC Controller nothing: unpacked: 3 85.539 85.3286 20 unpacked: 3 15.0827 85.9539 20 why does unpack behave like that? ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] unpack type mismatch?
On Thu, 2012-02-16 at 10:23 +0100, Christoph Kuhr wrote: Hi, i route OSC messages an then unpack it. [unpack 0 0 0 0] with one OSC controller i get the error: error: unpack: type mismatch unpacked: 3 14.8743 14.0385 20 with another OSC Controller nothing: unpacked: 3 85.539 85.3286 20 unpacked: 3 15.0827 85.9539 20 why does unpack behave like that? It might be that the controller is sending the numbers as strings instead of floats or ints. [unpackOSC] will then just output them as symbol elements. If that really is the case, you might be able to convert those symbol-numbers to floats with zexy's [atof] which was added just a few minutes ago. Check zexy from svn. Roman ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] unpack type mismatch?
On Thu, 2012-02-16 at 18:37 +0100, Roman Haefeli wrote: On Thu, 2012-02-16 at 10:23 +0100, Christoph Kuhr wrote: Hi, i route OSC messages an then unpack it. [unpack 0 0 0 0] with one OSC controller i get the error: error: unpack: type mismatch unpacked: 3 14.8743 14.0385 20 with another OSC Controller nothing: unpacked: 3 85.539 85.3286 20 unpacked: 3 15.0827 85.9539 20 why does unpack behave like that? It might be that the controller is sending the numbers as strings instead of floats or ints. [unpackOSC] will then just output them as symbol elements. If that really is the case, you might be able to convert those symbol-numbers to floats with zexy's [atof] which was added just a few minutes ago. Check zexy from svn. What if this was handled in [float]? Something like this: - add a symbol method to [float] - convert the symbol to a float, then back and compare - if it matches, output the float out of the left inlet - if it does not match, output the original symbol out of a new right outlet, which would be an everything else outlet like [select] [route], etc. .hc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list