Re: [PD] integer values
Le mercredi 03 mars 2010 à 10:01 -0800, Jonathan Wilkes a écrit : --- On Wed, 3/3/10, Jack j...@rybn.org wrote: From: Jack j...@rybn.org Subject: Re: [PD] integer values To: Jonathan Wilkes jancs...@yahoo.com Cc: pd-list@iem.at, volker böhm vbo...@gmx.ch Date: Wednesday, March 3, 2010, 2:20 PM Le mardi 02 mars 2010 à 22:47 -0800, Jonathan Wilkes a écrit : --- On Wed, 3/3/10, Jack j...@rybn.org wrote: From: Jack j...@rybn.org Subject: Re: [PD] integer values To: Jonathan Wilkes jancs...@yahoo.com Cc: pd-list@iem.at, volker böhm vbo...@gmx.ch Date: Wednesday, March 3, 2010, 2:16 AM There is a very small error in the patch : [s linked_array] - [s linked_garray]. However, this is a nice example. I'm working on data structures (for automations) and it would be nice to have a 'return' from [struct] (or something like that, but i don't know what :) when you modify an array of scalars (with mouse) without [metro] to update some values (like in your patch with the array 'linked_garray', but without a [metro] to update). Hope what i mean is enough clear ? ++ Jack Thanks for finding the error-- I must have forgotten to save after I made that needless change. So which [struct] would the message come out of when modifying an element of an array-- the [struct] that defines the array or the [struct] that defines the element being modified? I don't know, that's why i ask ;) When you modify the size of a polygon, [struct] return a message. Why is it not possible with a [struct] that defines the array ? If it's the [struct] that defines the array, then how do you specify which array and which index number of the thing that's getting moved? Just receive a message there is an update of the array ? I don't think that would help very much, because you don't know which value was changed, or to which array it belongs (if you have more than one array in a struct). You would at least want to know the array name and index of the element being modified. So if I move the first element of the boxes array in that patch, it would be nice if I got the following message: change boxes 0 (pointer) So the pointer here points to the [graph] data structure-- in other words the one that defines that array. Putting the atoms of the message in that order would work well because you can route according to the array name, then immediately send the next message to the left inlet of [element] to do whatever it is you want to do with that data (or precede it with an [unpack 0 p] if you want to be finicky). But if the message is to come out of the [struct] that defines the element (box), you'd probably want a different set of info in the message. Btw- if you hook up [print] to the outlet of [struct box] in that patch, you'll see that every time you click somewhere in the array a series of messages is output. I don't understand what the numbers mean, and the (pointer) doesn't correspond to either of the data structures I have defined. But even if it did, that would be a lot of messages to deal with every time you happen to click the containing scalar (imagine if you're using a ds-array to visualize/manipulate five seconds of audio...) With the [print] object on [struct graph], i have something in the console when i click somewhene on the array only in edit mode, not in run mode. Something like : print: select \\p(0x0xbfb28e08) print: displace \\p(0x0xbfb28e80) 0 print: displace \\p(0x0xbfb28e80) 1 print: deselect \\p(0x0xbfb28dd8) But nothing from [struct box]. I miss something ? For my patch, a bang message should be enough to update my [table] object with (for example) : [bang( : when a value change from the array (or as you suggest : change boxes :) [until] [element] [pointer] [get] [tabwrite] Now i use a [metro] to update the content of my [table] every 100 ms : [metro 100] [until] [element] [pointer] [get] [tabwrite] Thanx. ++ Jack -Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
Le mardi 02 mars 2010 à 22:47 -0800, Jonathan Wilkes a écrit : --- On Wed, 3/3/10, Jack j...@rybn.org wrote: From: Jack j...@rybn.org Subject: Re: [PD] integer values To: Jonathan Wilkes jancs...@yahoo.com Cc: pd-list@iem.at, volker böhm vbo...@gmx.ch Date: Wednesday, March 3, 2010, 2:16 AM There is a very small error in the patch : [s linked_array] - [s linked_garray]. However, this is a nice example. I'm working on data structures (for automations) and it would be nice to have a 'return' from [struct] (or something like that, but i don't know what :) when you modify an array of scalars (with mouse) without [metro] to update some values (like in your patch with the array 'linked_garray', but without a [metro] to update). Hope what i mean is enough clear ? ++ Jack Thanks for finding the error-- I must have forgotten to save after I made that needless change. So which [struct] would the message come out of when modifying an element of an array-- the [struct] that defines the array or the [struct] that defines the element being modified? I don't know, that's why i ask ;) When you modify the size of a polygon, [struct] return a message. Why is it not possible with a [struct] that defines the array ? If it's the [struct] that defines the array, then how do you specify which array and which index number of the thing that's getting moved? Just receive a message there is an update of the array ? This is not possible at all ? ++ Jack If it's the [struct] of the element being modified, I suppose the same question applies. Also, how do you do it in a way that handles nested arrays gracefully? -Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
--- On Wed, 3/3/10, Jack j...@rybn.org wrote: From: Jack j...@rybn.org Subject: Re: [PD] integer values To: Jonathan Wilkes jancs...@yahoo.com Cc: pd-list@iem.at, volker böhm vbo...@gmx.ch Date: Wednesday, March 3, 2010, 2:20 PM Le mardi 02 mars 2010 à 22:47 -0800, Jonathan Wilkes a écrit : --- On Wed, 3/3/10, Jack j...@rybn.org wrote: From: Jack j...@rybn.org Subject: Re: [PD] integer values To: Jonathan Wilkes jancs...@yahoo.com Cc: pd-list@iem.at, volker böhm vbo...@gmx.ch Date: Wednesday, March 3, 2010, 2:16 AM There is a very small error in the patch : [s linked_array] - [s linked_garray]. However, this is a nice example. I'm working on data structures (for automations) and it would be nice to have a 'return' from [struct] (or something like that, but i don't know what :) when you modify an array of scalars (with mouse) without [metro] to update some values (like in your patch with the array 'linked_garray', but without a [metro] to update). Hope what i mean is enough clear ? ++ Jack Thanks for finding the error-- I must have forgotten to save after I made that needless change. So which [struct] would the message come out of when modifying an element of an array-- the [struct] that defines the array or the [struct] that defines the element being modified? I don't know, that's why i ask ;) When you modify the size of a polygon, [struct] return a message. Why is it not possible with a [struct] that defines the array ? If it's the [struct] that defines the array, then how do you specify which array and which index number of the thing that's getting moved? Just receive a message there is an update of the array ? I don't think that would help very much, because you don't know which value was changed, or to which array it belongs (if you have more than one array in a struct). You would at least want to know the array name and index of the element being modified. So if I move the first element of the boxes array in that patch, it would be nice if I got the following message: change boxes 0 (pointer) So the pointer here points to the [graph] data structure-- in other words the one that defines that array. Putting the atoms of the message in that order would work well because you can route according to the array name, then immediately send the next message to the left inlet of [element] to do whatever it is you want to do with that data (or precede it with an [unpack 0 p] if you want to be finicky). But if the message is to come out of the [struct] that defines the element (box), you'd probably want a different set of info in the message. Btw- if you hook up [print] to the outlet of [struct box] in that patch, you'll see that every time you click somewhere in the array a series of messages is output. I don't understand what the numbers mean, and the (pointer) doesn't correspond to either of the data structures I have defined. But even if it did, that would be a lot of messages to deal with every time you happen to click the containing scalar (imagine if you're using a ds-array to visualize/manipulate five seconds of audio...) -Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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 jancs...@yahoo.com wrote: --- On Tue, 3/2/10, João Pais jmmmp...@googlemail.com wrote: From: João Pais jmmmp...@googlemail.com Subject: Re: [PD] integer values To: volker böhm vbo...@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. -- Friedenstr. 58 10249 Berlin (Deutschland) Tel +49 30 42020091 | Mob +49 162 6843570 Studio +49 30 69509190 jmmmp...@googlemail.com | skype: jmmmpjmmmp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
--- On Tue, 3/2/10, volker böhm vbo...@gmx.ch wrote: From: volker böhm vbo...@gmx.ch Subject: Re: [PD] integer values To: pd-list@iem.at Date: Tuesday, March 2, 2010, 12:02 PM 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. You pretty much just build your own [tabread] objects using [element]. Here's an example (not optimized at all!) thanks, volker. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ds-sliders.pd Description: application/puredata ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
There is a very small error in the patch : [s linked_array] - [s linked_garray]. However, this is a nice example. I'm working on data structures (for automations) and it would be nice to have a 'return' from [struct] (or something like that, but i don't know what :) when you modify an array of scalars (with mouse) without [metro] to update some values (like in your patch with the array 'linked_garray', but without a [metro] to update). Hope what i mean is enough clear ? ++ Jack Le mardi 02 mars 2010 à 13:10 -0800, Jonathan Wilkes a écrit : --- On Tue, 3/2/10, volker böhm vbo...@gmx.ch wrote: From: volker böhm vbo...@gmx.ch Subject: Re: [PD] integer values To: pd-list@iem.at Date: Tuesday, March 2, 2010, 12:02 PM 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. You pretty much just build your own [tabread] objects using [element]. Here's an example (not optimized at all!) thanks, volker. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
--- On Wed, 3/3/10, Jack j...@rybn.org wrote: From: Jack j...@rybn.org Subject: Re: [PD] integer values To: Jonathan Wilkes jancs...@yahoo.com Cc: pd-list@iem.at, volker böhm vbo...@gmx.ch Date: Wednesday, March 3, 2010, 2:16 AM There is a very small error in the patch : [s linked_array] - [s linked_garray]. However, this is a nice example. I'm working on data structures (for automations) and it would be nice to have a 'return' from [struct] (or something like that, but i don't know what :) when you modify an array of scalars (with mouse) without [metro] to update some values (like in your patch with the array 'linked_garray', but without a [metro] to update). Hope what i mean is enough clear ? ++ Jack Thanks for finding the error-- I must have forgotten to save after I made that needless change. So which [struct] would the message come out of when modifying an element of an array-- the [struct] that defines the array or the [struct] that defines the element being modified? If it's the [struct] that defines the array, then how do you specify which array and which index number of the thing that's getting moved? If it's the [struct] of the element being modified, I suppose the same question applies. Also, how do you do it in a way that handles nested arrays gracefully? -Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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 -- Friedenstr. 58 10249 Berlin (Deutschland) Tel +49 30 42020091 | Mob +49 162 6843570 Studio +49 30 69509190 jmmmp...@googlemail.com | skype: jmmmpjmmmp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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
Re: [PD] integer values
Have you looked at ds-arrays at all? You can quantize the values and change them in one go as you describe (see attached). -Jonathan --- On Mon, 3/1/10, volker böhm vbo...@gmx.ch wrote: From: volker böhm vbo...@gmx.ch Subject: Re: [PD] integer values To: pd-list@iem.at Date: Monday, March 1, 2010, 7:26 PM 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 ds-sliders.pd Description: application/puredata ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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 -- Friedenstr. 58 10249 Berlin (Deutschland) Tel +49 30 42020091 | Mob +49 162 6843570 Studio +49 30 69509190 jmmmp...@googlemail.com | skype: jmmmpjmmmp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
--- On Tue, 3/2/10, João Pais jmmmp...@googlemail.com wrote: From: João Pais jmmmp...@googlemail.com Subject: Re: [PD] integer values To: volker böhm vbo...@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. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] integer values
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 ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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? -- ::: derek holzer ::: http://macumbista.net ::: ---Oblique Strategy # 40: Decorate, decorate ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
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
Re: [PD] integer values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: However, have a look at the attached proposed workaround. I use two sliders one on top of the other, and take advantage of the fact that in Pd the gui object on the background catches mouse interaction, not the one on the front. attachment missing. in the meantime i did the same :-) dfgmasdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkuKoRkACgkQkX2Xpv6ydvTKYwCgpdLVIH2nOjTV/CJScTFTWXTn JG8AoLdpHnVUAYWBmDLukfP22ZHkQrmG =9Mah -END PGP SIGNATURE- #N canvas 210 51 450 367 10; #X obj 100 102 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 5300 1; #X obj 100 102 vsl 15 128 0 1 0 0 \$0-intslider \$0-intslider empty 0 -9 0 10 -262144 -1 -1 3629 1; #X obj 100 17 inlet; #X obj 100 323 outlet; #X obj 100 238 * \$1; #X obj 100 260 i; #X obj 100 282 t f f; #X obj 165 297 s \$0-intslider; #X obj 165 274 / \$1; #X obj 100 69 / \$1; #X obj 100 39 route float set; #X obj 151 65 / \$1; #X obj 151 87 t f f; #X msg 151 109 set \$1; #X connect 0 0 4 0; #X connect 2 0 10 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 3 0; #X connect 6 1 8 0; #X connect 8 0 7 0; #X connect 9 0 0 0; #X connect 10 0 9 0; #X connect 10 1 11 0; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 12 1 4 0; #X connect 13 0 0 0; #X coords 0 -1 1 1 15 133 2 100 100; #N canvas 0 0 450 300 10; #X obj 184 79 islider 7; #X obj 219 79 islider 3; #X text 184 61 7; #X text 218 61 3; #X text 276 139 [islider max]; ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
IOhannes m zmölnig escribió: attachment missing. in the meantime i did the same :-) Oh, I did attach it. Maybe it was stripped away because it was a zip file?? Let's try with the individual .pd files -- Matteo Sisti Sette matteosistise...@gmail.com http://www.matteosistisette.com #N canvas 329 283 651 355 12; #X obj 153 112 int; #X obj 153 145 t f f; #X msg 190 174 set \$1; #X obj 153 225 outlet; #X obj 153 74 r \$1-sl1-send; #X obj 190 200 s \$1-sl2-receive; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 1 1 2 0; #X connect 2 0 5 0; #X connect 4 0 0 0; #N canvas 388 403 450 300 12; #X floatatom 155 153 5 0 0 0 - - -; #X obj 155 115 quantized_slider_control mycontrol; #X obj 52 57 vsl 15 80 0 10 0 0 mycontrol-sl1-send unused-receive empty 0 -9 0 10 -262144 -1 -1 7900 1; #X obj 52 57 vsl 15 80 0 10 0 0 unused-send mycontrol-sl2-receive empty 0 -9 0 10 -262144 -1 -1 7900 1; #X connect 1 0 0 0; ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: IOhannes m zmölnig escribió: attachment missing. in the meantime i did the same :-) Oh, I did attach it. Maybe it was stripped away because it was a zip file?? ah no, it was because i have weird settings on my monitor, which strips of the lower 168 samples, so i didn't see the end of the message in my mail-reader. sorry for the noise. fgamsdr IOhannes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkuKon0ACgkQkX2Xpv6ydvQx7QCgiMXNPPoLtspaPO67VfKUS+0Z 3UwAn10ESaIVm7H8zySgiDCDcJKYttya =gRiK -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] integer values
I'm not sure this might solve your problem, but it can suggest a workaround - given I correctly understood your problem. Check Pd browser 5.reference mapping stepper-help.pd 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. -- Marco Donnarumma aka TheSAD Independent New Media Arts Professional, Performer, Teacher - Edinburgh, UK LAB: http://www.thesaddj.com | http://cntrl.sourceforge.net | http://www.flxer.net EVENT: http://www.liveperformersmeeting.net ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list