*I have this common situation:* I have an abstraction which has a parameter control visible to the parent via graph-on-parent. Let's call the parameter $0-FOO
I want the user to be able to adjust the control via the GUI. I also want to be able to drive $0-FOO via an inlet or a message. And when that happens, I want the knob in the GUI to update and show the current value.
When I set up
[inlet] -> [hsl]
Now the [hsl] cannot be moved via the GUI. I am trying to find a way to solve this.
One possible solution is gate the inlet with a [spigot] which would work if I could detect if something was connected to the inlet or not.
*Q1: Is there a way for me to tell, inside an abstraction,*
*whether something is connected to a particular* *[inlet] or [inlet~]?*
*Q2: *Or else *how can I read the output of a control *(e.g., hsl) *and drive it also*? (this sounds like an application for a syncho/servo)
Thanks! BH
I guess I left out an important detail.
The control inlet is for PWM (duty cycle). I want high resolution so I use an [inlet~] and drive it at signal rate.
So I actually must drive the [hsl] input with a [snapshot~].
If I could tell if something was connected at the [inlet~], then I could gate the [snapshot~].
Or maybe I only update the hsl if I see that the snapshot value is changing?
OK... I have some ideas now, thanks :)
Would still like a way to tell if an inlet has an external connection.
On Mon, Aug 17, 2015 at 2:13 PM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 08/17/2015 08:05 PM, William Huston wrote:
When I set up
[inlet] -> [hsl]
Now the [hsl] cannot be moved via the GUI.
why?
fgmards IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 08/17/2015 08:29 PM, William Huston wrote:
I guess I left out an important detail.
The control inlet is for PWM (duty cycle). I want high resolution so I use an [inlet~] and drive it at signal rate.
So I actually must drive the [hsl] input with a [snapshot~].
If I could tell if something was connected at the [inlet~], then I could gate the [snapshot~].
Or maybe I only update the hsl if I see that the snapshot value is changing?
i *think* this is all ugly hacks.
Pd messages are perfectly capable of having a very high time resolution (actually sub-sample accurate; that's better than what you get with signals), so you might re-think your assumption of having to use signals *here* (use [vline~] to convert numbers into signals sample-accurately).
OK... I have some ideas now, thanks :)
Would still like a way to tell if an inlet has an external connection.
answer is simple: you can't¹.
fmsad IOhannes
¹however, this has been discussed before; so you might find some more pointers in the archives.
I've asked this before on the list cause it'd be useful, but the answer is: "nope"
2015-08-17 15:05 GMT-03:00 William Huston williamahuston@gmail.com:
*I have this common situation:* I have an abstraction which has a parameter control visible to the parent via graph-on-parent. Let's call the parameter $0-FOO
I want the user to be able to adjust the control via the GUI. I also want to be able to drive $0-FOO via an inlet or a message. And when that happens, I want the knob in the GUI to update and show the current value.
When I set up
[inlet] -> [hsl]
Now the [hsl] cannot be moved via the GUI. I am trying to find a way to solve this.
One possible solution is gate the inlet with a [spigot] which would work if I could detect if something was connected to the inlet or not.
*Q1: Is there a way for me to tell, inside an abstraction,*
*whether something is connected to a particular* *[inlet] or [inlet~]?*
*Q2: *Or else *how can I read the output of a control *(e.g., hsl) *and drive it also*? (this sounds like an application for a syncho/servo)
Thanks! BH
--
May you, and all beings be happy and free from suffering :) -- ancient Buddhist Prayer (Metta)
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list