# [PD] Prime limit sliders

Chuckk Hubbard badmuthahubbard at gmail.com
Mon Apr 4 05:54:17 CEST 2005

```Hi, Mathieu.  This sounds pretty intense, but maybe because I haven't
gotten that far into Pd.  That is dead on, though, to just have the
slider go smoothly decimal and use the closest value in the table.
That would work perfectly.  I never considered that the grid would
have to be double the exponents + 1.  Never occured to me.
Wow, I kind of understand this.

Might it be less involved to have the possible values of the sliders
determined by a prime to the power of -1 to 1 (maybe throwing 9 in as
a "prime"), but this ratio being multiplied by all of the last 7 or 8
pitches, and the results being the available pitches?  In that case, I
can't imagine what would happen if you changed a note in the middle of
the sequence.  But this would allow endless modulation in small,
rational steps.

Thanks.
-Chuckk

On Mar 31, 2005 2:43 PM, Mathieu Bouchard <matju at artengine.ca> wrote:
>
> On Tue, 29 Mar 2005, Chuckk Hubbard wrote:
> > For instance, with the prime limits:
> > 3-4
> > 5-1
> > 7-1
> > 11-1
> > 13-0
> > 17-0
>
> The set of all possible fractions can be expressed as a six-dimensional
> 9-by-3-by-3-by-3-by-1-by-1 grid (in this example). If you have GridFlow
> then you could do this:
>
> [9 3 3 3 1 1 6 # 3 5 7 11 13 17( <-- make many copies of prime list
>  |
>  | [#for (-4 5) (-1 2) (-1 2) (-1 2) (0 1) (0 1)] <-- make indices
>  |  |
>  | [#cast f] <-- convert to float (from int)
>  |  |
> [# **] <-- raise primes to all possible power combinations
>  |
> [#fold *, seed 1] <-- multiply prime powers together
>  |
>
> and then the next step is to make a sorted list of those values. It would
> involve [#ravel] and [#grade] and [#finished] and [#store].
>
> at that point, half of your problem is solved, and the other half is to
> take any number and find the closest possible value in your list. For that
> job, you can use [#convolve (1 2 # 1 1)] [# >> 1] to find the boundaries
> of the centered intervals (which are averages of successive values in the
> previous list). Each interval is centered on an allowed fraction and
> encompasses all values for which the closest allowed fraction is that one.
>
> If that list is any big, you'll have a hard time searching in it, but I
> guess you won't use big lists anyway because it'd make more pixel
> positions than are available on the actual slider...
>
> You can do the same with plain Pd of course (plus maybe zl), it's just
> that it'd take many times more boxes. (I mean, it doesn't matter if you
> decide to not use GridFlow, i am just trying to communicate a few concepts
> to you)
>
>    .-----------------------------------------------------------------.
>   /  The Diagram is the Program (TM) ,--------------------------------}
>  {----------------------------------"     http://artengine.ca/matju  /
>   `-----------------------------------------------------------------'
>

--
"Some people got attitude,
Backed up with attitude."
-G. Love

```

More information about the Pd-list mailing list