[PD] array vertical values defined dinamic
IOhannes m zmoelnig
zmoelnig at iem.at
Thu Jul 14 08:45:03 CEST 2005
jmmmp wrote:
> I guess I didn't explaind correctly: I wanted to change the vertical
> borders, not only -1 to 1, but to set them when necessary. I use arrays to
> display envelopes, and it would be handy when I could change them
> accordingly.
>
> yes, I saw example 15, and the more arrays as well, but I think this
> feature isn't (yet) covered in pd. arrays were thought to be exclusive for
> audio data only.
ähmm, are you sure you have looked at 2.control.examples/16.more.arrays.pd ?
as far as i can tell the "bounds" message is exactly what you are
looking for.
the only weird thing is the order of arguments:
[bounds <Xmin> <Ymax> <Xmax> <Ymin>(
(i guess this is due to the constant turning the graph upside down: if
your origin is the upper-left corner of the screen, you will have
[bounds <Xmin> <Ymin> <Xmax> <Ymax>(, but unfortunately we are so used
to having the Y-axis pointing upwards)
so:
[bounds 0 128 100 0(
|
[s array]
should rescale your 100-points array for MIDI-values (visually!, the
values stay the same)
btw: you can also change the scaling factor via the properties menu of
the array (right click on a graph and select properties)
mfg.a.sdr
IOhannes
More information about the Pd-list
mailing list