Generate a list of frequencies above and below specific range

R_Gol's icon

I would like to generate a list of 127 frequencies from a list of 5-12 frequencies.

so if I will input 5 numbers: 220, 270, 300, 355, 440 the output will be a total of 127 numbers above and below those numbers

kind of deciding a list of frequencies/notes in one octave range and then creating those frequencies in different octaves/ranges (above and below that octave)

the idea is similar for the js scl reader.js object but instead of pre writing a file with a list of ratios/cents you enter a list of frequencies instead.

Is it clear? possible?

Thanks

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon


creating octaves is *2 and /2.

but first find out which octave the given values are in, by ftom -> / 12(int) -> + 1

R_Gol's icon

I'm not sure I understand what do you mean by /12(int) ?

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

"so if I will input 5 numbers: 220, 270, 300, 355, 440 the output will be a total of
127 numbers above and below those numbers "

if your list is one octave spread and you want to produce a list with total
127 items you can divide and multiply it by 2 to get your 127 frequencies.
or are they 128 all together - as midi notes ?

you run the list through vexpr $f1*2 and vexpr $f1/2 using scalarmode 1
and keep doing so till both produce enough values in both directions .

For example each vexpr can create as many items as (127??? / 2 - length of input list ).

from your example it is not possible to recognise any
preferences in terms of min / max freq range
or any other rules, so why not the joke above ?

Roman Thilenius's icon

i think he means within 0-127, not 127 values.

Source Audio's icon

if that were 128 midi notes that would trigger 128 frequencies

then ...
one could determine octave from the input list and
create more or less frequencies in one or the other direction, depending on prefered freq range.
but in case of 5 notes list, it would produce much wider freq range than 12 note input.
that example: 220, 270, 300, 355, 440
would end in 25.6 octaves, lowest freq 0.00412 and highest 17694720 Hz,
if spread in both directions equally.

Makes no sense at all, if it has anything to do with audible freq range,
unless all this is just a mathematical exercise.

cahen's icon

Hi,

Here is an easy way to create a list of values/pitches using array.fill and array.tolist (only in Max 9)

The demo patch shows a way to control it easily and to scale it in frequencies using scala scales.

Max Patch
Copy patch and select New From Clipboard in Max.

Best regards

Roland