[PD] Multi-slider attempt

Jonathan Wilkes jancsika at yahoo.com
Sun Dec 21 16:15:31 CET 2008


After screwing around with ds for awhile, I figured out that if you scale a point on a polygon or curve in the opposite direction of the y-scale for the plot, you get an anchored point that doesn't move, as in the attached bargraph.pd.  Same thing works for drawnumber.

When I tested this using Miller's 0.42-0test06, I noticed some new features for data structures:
1.  Clicking a ds graphical object in non-editmode outputs a "click" message, pointer, and y-value from the corresponding struct.
2.  Clicking a plotted array outputs a series of lists: one for each element of the array.  These lists come out of the struct box for the ds defined as the element of that array-- "bar" in my example.  However, I can't figure out what the pointer in this list is pointing at: I get an empty/stale pointer error if I try to use it for either of the ds I created.

I also made a little scrolling bar graph test to get some heavy use out of ds while dealing with sound.  In barscroll.pd, traversing the array every 40ms works fine with about 30 elements (at least with the simple, gritty sounds I'm using), but with 200 both video and audio get chopped up considerably.  Sluggish redrawing seems to affect all data structures, too-- even in other patches.

Finally, I noticed a few things that might be nice additions to ds, if they're possible and/or desirable:

* quantization by variable: y0(0:100)(10:110)(variable)
* jump-on-click flag
* vertical plot
* drawsymbol outputting +1 or -1 msg (& pointer) on change
* keyboard entry for drawsymbol (same as drawnumber)
* fonts/sizes for drawnumber/drawsymbol
* ability to change pixels per increment for drawnumber
* [drawinlet var x y]
* [drawoutlet var x y -onClick -onSelect etc.]
* individual elements of an array outputting a list to the struct when changed
* some way to define a selectable size for grobs that move in non-editmode
* constraints on drawnumber scrolling when scaled
* have drawnumber ignore non-numeric input (instead of jumping to zero)

I have no idea how to implement any of these, but I hope at least a few of them would be generally useful.

-Jonathan

--- On Tue, 12/2/08, Jonathan Wilkes <jancsika at yahoo.com> wrote:

> From: Jonathan Wilkes <jancsika at yahoo.com>
> Subject: Re: [PD] Multi-slider attempt
> To: "Hans-Christoph Steiner" <hans at eds.org>, "hard off" <hard.off at gmail.com>
> Cc: "PD-List" <pd-list at iem.at>
> Date: Tuesday, December 2, 2008, 2:53 AM
> I haven't put it to practical use yet.  But if I
> weren't using arrays, I would just have a scalable
> rectangle, for example, and get the y-value from the outlet
> of the corresponding struct.  When stretching the rectangle,
> it gives a "change" message plus a pointer to the
> object, so there's no need to poll.
> 
> But a struct won't output anything when moving an array
> element.  If it did, then maybe it's as simple as using
> [tabwrite] to link to a table for audio processing.
> 
> 
> --- On Mon, 12/1/08, hard off <hard.off at gmail.com>
> wrote:
> 
> > From: hard off <hard.off at gmail.com>
> > Subject: Re: [PD] Multi-slider attempt
> > To: "Hans-Christoph Steiner"
> <hans at eds.org>
> > Cc: "PD-List" <pd-list at iem.at>
> > Date: Monday, December 1, 2008, 5:47 AM
> > i understand your question, and unfortunately
> don't have
> > the answer because
> > datastructs are a bit foreign to me.
> > 
> > however...if you are going to use this structure for
> > controlling audio or
> > visual processes, then won't you need to
> constantly
> > poll the y-values of the
> > handles anyway?
> > _______________________________________________
> > Pd-list at iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> 
> 
>       
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list


      
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bargraph.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081221/e538e1cc/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: barscroll.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081221/e538e1cc/attachment.txt>


More information about the Pd-list mailing list