multislider log scaling/ fft equalization
hello,
regarding fft equalization (like the "forbidden planet" patch) i wonder how to display and edit data in the multislider gui on a logarithmic scale. in the forbidden planet patch the x axis displays the bins in a linear way. for precise changes in the low frequencies it would be nice to have a log scaling mode.
has someone already achive that?
any hints on how to do that in max are very welcome.
thanks, johannes
thought I'd give this a go:
it quantizes the sliders to a log base 2 scale, (ie groups bins into 1, 2, 4, 8 16 etc) but you could use other bases or other groupings to get 1/3 octave-approximations or whatever. There's probably an easier way to do this too btw. (but I don't know what it is)
Maybe iter -> linedrive -> zl group
A variation on Terry's approach using a function object.
thanks for the feedback, guys.
very interessting patches …
jvkr, i got some question on yours.
why you use the function object?
do you use it as a place to store linear data (via pack) and to recall it (by the uzi index)?
another thing that is not clear to me is the midi range that goes from
0 to 136. why 136? doesnt midi range up to 127, no?
is it possible to change the log scaling factor or is it fixed by the the mtof object?
and
lets say, after converting fom log to lin i want do it the other way arround – from lin to log.
what would be the expr calculation?
thanks alot,
j
> why you use the function object?
> do you use it as a place to store linear data (via pack) and to recall it (by the uzi index)?
Exactly. The uzi is not really recalling it, but reads out values given this linear interpolation.
> why 136? doesnt midi range up to 127, no?
Only if you want to send it as a value through a midi wire. More generally mtof can be seen as a nonlinear conversion from pitch space to frequency space. The midi value of 136 converted to frequency is close to half the sample rate at 44.1k.
> is it possible to change the log scaling factor or is it fixed by the the mtof object?
It is fixed, but you could easily try other conversions.
Doing the reversed of what happens in this patch is mathematically speaking relatively easy. Just work your way back object by object. I leave that as an exercise.
sorry for the late feedback.
here are two different way´s of doing a log to lin freq scaling using the ircam´s ftm libary. the first one simply show´s jvkr´s technic (using mtof conversion) acomplished with ftm.
didnt understand how do the inverse conversion - from lin to log.
the second technic uses much more ftm related features. in the patch below
you can draw a line on a log scale (black line) wich gets additionaly displayed on a lin scale (grey line).
for that i use a exponential scale function with a exponent (between 0-1)
my question is: how do i convert this log function back to linear scale.
all hints regarding lin/log freq scaling are very welcome. j