hello,
ok, pd doesn't have an integer type. what do people use, when they
need to generate a sequence of integer values?
i'm looking for a GUI solution with multiple sliders (e.g. like
multislider in max) which are quantized to integer values.
any suggestions?
thanks,
v
You could use a array/table with as many elements as you need sliders, and use [int] to quantize them integers.
Most GUI elements give "integers" already, for example a default slider gives 0-127. The type is float but the output values are all without a decimal, unless you change the size or range of the slider of course, so for your purposes you could consider them integers.
D.
volker böhm wrote:
ok, pd doesn't have an integer type. what do people use, when they need to generate a sequence of integer values? i'm looking for a GUI solution with multiple sliders (e.g. like multislider in max) which are quantized to integer values. any suggestions?
thanks for your responses.
On 28.02.2010, at 15:19, Derek Holzer wrote:
You could use a array/table with as many elements as you need
sliders, and use [int] to quantize them integers.
that's what i wanted to use in the first place. quantizing the table
values _after_ output, is of course possible, but then the
quantisation is not graphically visible, which makes for a lame
interface.
Most GUI elements give "integers" already, for example a default
slider gives 0-127. The type is float but the output values are all
without a decimal, unless you change the size or range of the slider
of course, so for your purposes you could consider them integers.
ja, but changing the range is what i'd often have to do, e.g. having
the user choose a step number between 0 and 7.
i tried quantizing the slider output and to use the set message to
immediately set the quantized value back into the fader for display,
but didn't get any usable results.
On 28.02.2010, at 15:48, Frank Barknecht wrote:
I once wrote a wrapper around arrays as [g_pattern32]: http://more.rjdj.me/2009/06/23/editing-drum-patterns-in-rjdj/ where
you can easily set table values with a number box which moves in integer
steps as default.
thanks for the link. yes, this is certainly usable. but i'm still not
completely happy with this approach, either.
i think a well designed interface allows viewing and editing of the
data in the same location.
volker.
can you put an example of the patch you're doing? it might be easier to
give suggestions in that way.
João
thanks for your responses.
On 28.02.2010, at 15:19, Derek Holzer wrote:
You could use a array/table with as many elements as you need sliders,
and use [int] to quantize them integers.that's what i wanted to use in the first place. quantizing the table
values _after_ output, is of course possible, but then the quantisation
is not graphically visible, which makes for a lame interface.Most GUI elements give "integers" already, for example a default slider
gives 0-127. The type is float but the output values are all without a
decimal, unless you change the size or range of the slider of course,
so for your purposes you could consider them integers.ja, but changing the range is what i'd often have to do, e.g. having the
user choose a step number between 0 and 7. i tried quantizing the slider output and to use the set message to
immediately set the quantized value back into the fader for display, but
didn't get any usable results.On 28.02.2010, at 15:48, Frank Barknecht wrote:
I once wrote a wrapper around arrays as [g_pattern32]: http://more.rjdj.me/2009/06/23/editing-drum-patterns-in-rjdj/ where you
can easily set table values with a number box which moves in integer steps
as default.thanks for the link. yes, this is certainly usable. but i'm still not
completely happy with this approach, either. i think a well designed interface allows viewing and editing of the data
in the same location.volker.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
thanks everybody for your suggestions.
matteo's example is close to what i need.
thanks for this trick, i'd probably never have thought of stacking two
sliders on top of each other.
i tried the same thing with an array (to have an arbitrary number of
sliders grouped together) - but it doesn't work :(
[#many] looks interesting. i haven't fully explored its possibilities.
my impression is, it's good for clicking, but dragging to change
multiple values in one go, seems not possible (see my poor example
below).
On 01.03.2010, at 11:27, João Pais wrote:
can you put an example of the patch you're doing? it might be easier
to give suggestions in that way.
it's basically what matteo has posted - a slider, with values
quantized to integer steps.
why integers if you can have floats, you might ask:
suppose you wanted to cut a sample into 8 equal slices, and then want
to specify the order in which to playback the slices by a specific
sequence. in this szenario i'm not interested e.g. in the 2.4th slice,
i want either slice number 2 or 3.
therefore i'd like to have an interface that allows only integer
values and nothing in between.
this is just a simple example, but maybe it shows, why such a thing
might be useful from time to time.
ok, one slider is fine, only for making sequences it would be great to
have multiple sliders combined, to be able to drag horizontally for
easy editing of multiple values.
so here goes my akward design of an integer multislider thing:
#N canvas 78 22 553 384 10; #N canvas 0 0 450 300 (subpatch) 0; #X array a 8 float 3; #A 0 1 5 3 5 2 4 6 2; #X coords 0 7 8 0 200 140 1; #X restore 71 53 graph; #X obj 344 207 tabread a; #X obj 344 121 until; #X msg 344 98 8; #X obj 344 149 counter 0 7; #X obj 344 229 + 0.5; #X obj 344 253 int; #X obj 344 278 tabwrite a; #X obj 344 176 t f f; #X text 41 183 0 --; #X text 43 46 7 --; #X obj 344 73 metro 100; #X obj 344 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 62 21 click and drag to edit values with mouse; #X obj 344 20 loadbang; #X connect 1 0 5 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 8 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 8 0 1 0; #X connect 8 1 7 1; #X connect 11 0 3 0; #X connect 12 0 11 0; #X connect 14 0 12 0;
since what you need most is a click/activity detector to trigger your
quantizer, it might be possible to do this with data structures - to avoid
adding a [metro]. unfortunately data structures are complex to work with
and I have no time now do try something. but you could look at my
jmmmp/sliders abstraction and go from there. recent versions of pd have a
click on/off detector in data structures, I think.
next week I could say something more about it, if this isn't something
urgent.
João
thanks everybody for your suggestions.
matteo's example is close to what i need. thanks for this trick, i'd probably never have thought of stacking two
sliders on top of each other.i tried the same thing with an array (to have an arbitrary number of
sliders grouped together) - but it doesn't work :([#many] looks interesting. i haven't fully explored its possibilities.
my impression is, it's good for clicking, but dragging to change
multiple values in one go, seems not possible (see my poor example
below).On 01.03.2010, at 11:27, João Pais wrote:
can you put an example of the patch you're doing? it might be easier to
give suggestions in that way.it's basically what matteo has posted - a slider, with values quantized
to integer steps. why integers if you can have floats, you might ask: suppose you wanted to cut a sample into 8 equal slices, and then want to
specify the order in which to playback the slices by a specific
sequence. in this szenario i'm not interested e.g. in the 2.4th slice, i
want either slice number 2 or 3. therefore i'd like to have an interface that allows only integer values
and nothing in between.this is just a simple example, but maybe it shows, why such a thing
might be useful from time to time.ok, one slider is fine, only for making sequences it would be great to
have multiple sliders combined, to be able to drag horizontally for easy
editing of multiple values.so here goes my akward design of an integer multislider thing:
#N canvas 78 22 553 384 10; #N canvas 0 0 450 300 (subpatch) 0; #X array a 8 float 3; #A 0 1 5 3 5 2 4 6 2; #X coords 0 7 8 0 200 140 1; #X restore 71 53 graph; #X obj 344 207 tabread a; #X obj 344 121 until; #X msg 344 98 8; #X obj 344 149 counter 0 7; #X obj 344 229 + 0.5; #X obj 344 253 int; #X obj 344 278 tabwrite a; #X obj 344 176 t f f; #X text 41 183 0 --; #X text 43 46 7 --; #X obj 344 73 metro 100; #X obj 344 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 62 21 click and drag to edit values with mouse; #X obj 344 20 loadbang; #X connect 1 0 5 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 8 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 8 0 1 0; #X connect 8 1 7 1; #X connect 11 0 3 0; #X connect 12 0 11 0; #X connect 14 0 12 0;
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
--- On Tue, 3/2/10, João Pais jmmmpais@googlemail.com wrote:
From: João Pais jmmmpais@googlemail.com Subject: Re: [PD] integer values To: "volker böhm" vboehm@gmx.ch, pd-list@iem.at Date: Tuesday, March 2, 2010, 1:06 AM since what you need most is a click/activity detector to trigger your quantizer, it might be possible to do this with data structures - to avoid adding a [metro]. unfortunately data structures are complex to work with and I have no time now do try something. but you could look at my jmmmp/sliders abstraction and go from there. recent versions of pd have a click on/off detector in data structures, I think.
next week I could say something more about it, if this isn't something urgent.
João
You can detect clicks for a scalar, but not for each individual element of an array. Unless there's a cool trick someone knows, I think you're still forced to use the [metro] workaround if you use data structures.
Hi,
in pd-0.43.0-devel-20100219 I get the following result from the [struct
$0-data-s float x float y array $0-array-s $0-element] on the before named
[sliders] abstraction, when I click on the data array:
print: click
(pointer)
0
Which comes out only at the first click, so it isn't perfect (maybe
coupled with a [del 150] or something). true, using scalars you get a
"change" flag each time a value changes, that's more elaborate.
another option would be to use one struct per slider - not really that
hard to program anyway, they can even be created dynamically if you need
multisliders with different sliders inside. (Volker, if you're not in a
hurry and this interests you, I could make an example around the end of
the week)
The good thing about data structures is that you can make a nice gui with
it (in case that matters).
João
On Tue, 02 Mar 2010 02:04:49 +0100, Jonathan Wilkes jancsika@yahoo.com
wrote:
--- On Tue, 3/2/10, João Pais jmmmpais@googlemail.com wrote:
From: João Pais jmmmpais@googlemail.com Subject: Re: [PD] integer values To: "volker böhm" vboehm@gmx.ch, pd-list@iem.at Date: Tuesday, March 2, 2010, 1:06 AM since what you need most is a click/activity detector to trigger your quantizer, it might be possible to do this with data structures - to avoid adding a [metro]. unfortunately data structures are complex to work with and I have no time now do try something. but you could look at my jmmmp/sliders abstraction and go from there. recent versions of pd have a click on/off detector in data structures, I think.
next week I could say something more about it, if this isn't something urgent.
João
You can detect clicks for a scalar, but not for each individual element of an array. Unless there's a cool trick someone knows, I think you're still forced to use the [metro] workaround if you use data structures.
On 02.03.2010, at 11:03, João Pais wrote:
(Volker, if you're not in a hurry and this interests you, I could
make an example around the end of the week)The good thing about data structures is that you can make a nice gui
with it (in case that matters).
hi joao,
no it's not urgent at all.
the looks aren't important to me, but the inteface should be intuitive
and responsive (the array solution is lacking responsiveness in my
opinion. it's actually not easy to control single values).
jonathan, thanks a lot for your examples using data structures, this
looks exactly like what i was hoping for.
i'm only an occasional pd-hacker, and i've never looked at ds - and i
know why: it seems complicated ;)
well, i had only a quick go with this patch, but fwiw, i couldn't find
a way to get the values back form the sliders to use them in the
patch. i'm sure this is somehow possible, so i'm going to check the
docs.
thanks, volker.
Hallo, volker böhm hat gesagt: // volker böhm wrote:
hello, ok, pd doesn't have an integer type. what do people use, when they need to generate a sequence of integer values? i'm looking for a GUI solution with multiple sliders (e.g. like
multislider in max) which are quantized to integer values. any suggestions?
I once wrote a wrapper around arrays as [g_pattern32]: http://more.rjdj.me/2009/06/23/editing-drum-patterns-in-rjdj/ where you can easily set table values with a number box which moves in integer steps as default.
Frank