Hi All,
I'm sure this has been asked many times, but nothing comes up in an
archive search.
I'm using a multiple toggles to activate each element of a sequence.
Is it possible to interrogate the status of a toggle or in fact any
gui object.
Thanks for any help,
/S
On Sat, 23 Apr 2011, Saul wrote:
I'm using a multiple toggles to activate each element of a sequence. Is it possible to interrogate the status of a toggle or in fact any gui object.
If you have many toggles, you may have an incentive to use [#many] :
http://gridflow.ca/help/%23many-help.html
from GridFlow : http://gridflow.ca/
You may plug it into [#to_l] to get a normal list, or use any of the many classes that can process grids. You can select one or more elements by row number and column number using [#store].
In the example of the web page, you have two sets of 91 toggles (13 rows of 7 toggles).
Some screenshots in action :
http://gridflow.ca/gallery/qbert.pd.png http://gridflow.ca/gallery/pdmtl-33-image-many.png http://gridflow.ca/gallery/sequenceur.pd.png http://gridflow.ca/gallery/sequenceur.pd.mp3
and same thing with many numberboxes :
http://gridflow.ca/gallery/bezier.png
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
banging most GUI objects will get their values. But with toggle, it
changes it, so you would just need to connect the toggle to the right
inlet of [float], and bang the left inlet when you want to know the
toggle's state.
.hc
On Apr 23, 2011, at 12:00 PM, Saul wrote:
Hi All,
I'm sure this has been asked many times, but nothing comes up in an
archive search.I'm using a multiple toggles to activate each element of a sequence.
Is it possible to interrogate the status of a toggle or in fact any
gui object.Thanks for any help,
/S
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Access to computers should be unlimited and total. - the hacker ethic
Or you can use [value] instead of [float] and its cold inlet. ++
Jack
Le samedi 23 avril 2011 à 14:13 -0400, Hans-Christoph Steiner a écrit :
banging most GUI objects will get their values. But with toggle, it
changes it, so you would just need to connect the toggle to the right
inlet of [float], and bang the left inlet when you want to know the
toggle's state..hc
On Apr 23, 2011, at 12:00 PM, Saul wrote:
Hi All,
I'm sure this has been asked many times, but nothing comes up in an
archive search.I'm using a multiple toggles to activate each element of a sequence.
Is it possible to interrogate the status of a toggle or in fact any
gui object.Thanks for any help,
/S
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Access to computers should be unlimited and total. - the hacker ethic
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
--- On Sat, 4/23/11, Saul saul@atonic.com wrote:
From: Saul saul@atonic.com Subject: Re: [PD] Toggle Status To: pd-list@iem.at Date: Saturday, April 23, 2011, 6:00 PM Hi All,
I'm sure this has been asked many times, but nothing comes up in an archive search.
I'm using a multiple toggles to activate each element of a sequence. Is it possible to interrogate the status of a toggle or in fact any gui object.
I haven't used it, but there's a patch on the tracker that adds a "get" method to tgl:
http://sourceforge.net/tracker/index.php?func=detail&aid=2419952&gro...
I think matju's #many abstraction is probably your best bet.
As for other GUIs-- [cnv] has a get_pos method to report it's x y position in a patch.
Also, I started coding a "get" method for canvases, which happens to do what Miller describes in his comment about the above patch.
-Jonathan
Thanks for any help,
/S
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Also, I started coding a "get" method for canvases, which happens to do what Miller describes in his comment about the above patch.
so in the meantime you can either apply a diff to the sources of Pd, recompile Pd and change your patch accordingly, so it is incompatible with all past versions of Pd (and probably a number of future versions of Pd as well), or use [f] to store the values of [tgl] and query them via bang, change your patch accordingly and be happy.
i'm not saying that things should be kept deliberately complicated, but it is really simple to implement what you need with what is there.
mfdst IOhannes
PS: you could also "double bang" the toggle, which wil give you the current value and will restore this value. or use "bang" + "set <value>" to restore the original.
IOhannes m zmoelnig wrote:
Also, I started coding a "get" method for canvases, which happens to do what Miller describes in his comment about the above patch.
so in the meantime you can either apply a diff to the sources of Pd, recompile Pd and change your patch accordingly, so it is incompatible with all past versions of Pd (and probably a number of future versions of Pd as well), or use [f] to store the values of [tgl] and query them via bang, change your patch accordingly and be happy.
i'm not saying that things should be kept deliberately complicated, but it is really simple to implement what you need with what is there.
This question made me think. Is there a kind of reverse [route] object? What I mean is something like:
[name_of_the_object_im_thinking_of 10]
Would create 10 inlets and 1 outlet. Sending "something" through inlet n would output "n somwthing" which could for instance be saved in an array eventually be re-used with a [route] etc.
This is of course easily created for a known number of "somethings" but dynamic (as rout is) would be nice.
Hopefully I managed to explain what I mean.
Lorenzo.
mfdst IOhannes
PS: you could also "double bang" the toggle, which wil give you the current value and will restore this value. or use "bang" + "set <value>" to restore the original.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi,
On Sun, Apr 24, 2011 at 05:47:44PM +0200, IOhannes m zmoelnig wrote:
Also, I started coding a "get" method for canvases, which happens to do what Miller describes in his comment about the above patch.
so in the meantime you can either apply a diff to the sources of Pd, recompile Pd and change your patch accordingly, so it is incompatible with all past versions of Pd (and probably a number of future versions of Pd as well), or use [f] to store the values of [tgl] and query them via bang, change your patch accordingly and be happy.
i'm not saying that things should be kept deliberately complicated, but it is really simple to implement what you need with what is there.
mfdst IOhannes
PS: you could also "double bang" the toggle, which wil give you the current value and will restore this value. or use "bang" + "set <value>" to restore the original.
PPS: Or make a GOP abstraction around [tgl] wrapping whatever added functionality you desire into it. Attached is a [gtgl] abstraction with a "get" method.
Frank Barknecht Do You RjDj.me? _ ______footils.org__
I had to do this recently for a monome-ish thing. There are already good suggestions from others, but here's yet another approach: I ended up making a table and accompanying abstraction for each column of the grid so that clicking on the toggle at row N in any particular column writes to index N of that column's table. Then it's easy to check the state of all toggles in a column with [tabread].
On Sat, Apr 23, 2011 at 12:00 PM, Saul saul@atonic.com wrote:
Hi All,
I'm sure this has been asked many times, but nothing comes up in an archive search.
I'm using a multiple toggles to activate each element of a sequence. Is it possible to interrogate the status of a toggle or in fact any gui object.
Thanks for any help,
/S
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Saul
I had the same problem some years ago and I wrote the attached object to achieve what you say, even if in an indirect way. Just connect the toggle to the left inlet of fm and use it as a normal f object. When you bang the right outlet tho, status is let out thru left object.
The name of the object it's not correct tho, but you can easily change it yourself.
Cheers, p.
On Sat, Apr 23, 2011 at 6:00 PM, Saul saul@atonic.com wrote:
Hi All,
I'm sure this has been asked many times, but nothing comes up in an archive search.
I'm using a multiple toggles to activate each element of a sequence. Is it possible to interrogate the status of a toggle or in fact any gui object.
Thanks for any help,
/S
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
The easiest way to find out about the toggle status is to write all of the switches into a table with [tabwrite] as you are changing the stataus. Then you use [tabread] to check the status. No external required.
Ingo
-----Ursprüngliche Nachricht----- Von: pd-list-bounces@iem.at [mailto:pd-list-bounces@iem.at] Im Auftrag von Saul Gesendet: Samstag, 23. April 2011 18:00 An: pd-list@iem.at Betreff: Re: [PD] Toggle Status
Hi All,
I'm sure this has been asked many times, but nothing comes up in an archive search.
I'm using a multiple toggles to activate each element of a sequence. Is it possible to interrogate the status of a toggle or in fact any gui object.
Thanks for any help,
On Sat, Apr 23, 2011 at 18:00, Saul saul@atonic.com wrote:
Hi All,
I'm sure this has been asked many times, but nothing comes up in an archive search.
I'm using a multiple toggles to activate each element of a sequence. Is it possible to interrogate the status of a toggle or in fact any gui object.
Thanks for any help,
/S
A possible workaround is to feed each toggle to the right inlet of an [i]
and then you can bang those [i]s anytime to get their values.
Andras