Though on the downside... a [sig~] is more expensive.
The good part about implicit conversion is you have to do it once and the object can retain that state.
cheers
a.
On Wed, 3 Nov 2010 16:20:57 +0000 Jamie Bullock jamie@postlude.co.uk wrote:
On 3 Nov 2010, at 16:14, Andy Farnell wrote:
There are some uses of [sig~] which are not immediately obvious but turn out to be desirable. By definition it is useful any place you want a message domain value converted to a signal, without any further ado. Without it, relying only on implicit conversion you might never have access to a signal except by a degenerate idiom like
[$1( | [line~]
Crucially, [sig~] can be given a creation parameter, as in [sig~ 1], and will not need any messy initialisation like using a [loadbang] in order to obtain a signal constant immediately.
Why might you want a signal constant? Perhaps for a relation like (1 - x), useful in panning, crossfading, or (1 / x) common in waveshaping.
Matju raises a question over DSP on/off. I have encountered problems relying on implicit right inlet conversion with deep abstractions, so from practical experience it seems safer to use [sig~] in these circumsatnces.
It also make code more readable to make important message/signal distinctions explicit.
Thanks Andy. So:
[sig~ 1] | [tabosc4~ foo]
avoids:
[loadbang] | |1( | [tabosc4~ foo]
This is reason enough for me.
best,
Jamie
On Wed, 3 Nov 2010 14:46:51 +0000 Jamie Bullock jamie@postlude.co.uk wrote:
Hi all,
This is more of philosophical question than anything else. I'm curious to know why [sig~] hasn't been designed out of Pd. Why not have implicit control -> signal conversion everywhere it is possible?
For example why not allow this?
|2( |3( | | [+~ ]
Jamie
-- http://www.jamiebullock.com
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Andy Farnell padawan12@obiwannabe.co.uk
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list