[PD] Escape characters appear in message after rebooting patch

Jonathan Wilkes jancsika at yahoo.com
Sun Nov 6 20:47:51 CET 2011





----- Original Message -----
> From: Boris <borisaccount at gmail.com>
> To: pd-list at iem.at
> Cc: 
> Sent: Sunday, November 6, 2011 2:54 PM
> Subject: [PD]  Escape characters appear in message after rebooting patch
> 
> Hi,
> 
> I'm making an abstraction to make it easier to record audio to .wav. 
> Everything is fine with that, until I copy the abstraction and use it twice in 
> the same patch, because I use sends in the abstraction. This I fixed by making 
> all sends like [send $0-startrecording] etc. This works fine. 
> 
> The only problem I have is with the Start/Stop button. I made a button that when 
> clicked changes from Start to Stop. The color changes (from red to grey), and 
> the send-symbol also changes.

Why do you need to change the send symbol?

> I used to do this by sending a message with 
> 'send stop' to it. But since I now want to be able to use the recording 
> abstraction more than once in a patch, I had to change this to 'send 
> $0-stop'. And this doesn't work :-(
> 
> It changes the send value of my start/stop button, but it doesn't change it 
> to $0-stop. It changes it to 0-stop, without the dollar sign.

If you really need to change the send symbol on the fly, do this:

[f $0]
|
[; $1-whatever send $1-stop(

In other words, you're filling in $1 with whatever the value of $0 happens to 
be.  When you click "Properties" on that gui you'll see that your send symbol 
will be "1001-stop" or something like that.  Since you're using an abstraction 
where you won't be saving the state, it should be fine to use the explicit value.

> So the first thing 
> I tried was to change the message to 'send \$0-stop', but escape 
> characters aren't allowed. I tried some more stuff, and after a while I 
> tried 'send $$0-stop'. This works perfectly!
> 
> Until I reboot the patch.
> 
> The message is then surprisingly changed to 'send $\$0-stop'. I 
> thought escape characters weren't allowed!!!
> 
> Anyway, this translates to the following send-symbol in my start/stop button: 
> $#0-stop
> 
> I think this is a bug? So that's why I'm e-mailing this, maybe you can 
> do something with it.
> 
> If you open the attached test.pd, you'll see how my record abstraction 
> looks. You can then open it, and you will see a lot of 'send $0-xxx' 
> things there. If you open the 'stopknop' patch you'll see where the 
> problem is. I'm sorry the patches are in Dutch but you should be ok.
> 
> Cheers,
> 
> Boris
> 
> 
> 
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>



More information about the Pd-list mailing list