Cutoff midi value and slope

Hi,

In sonicpi the cutoff value is a midi value from 0 to 131.

MIDI note representing the highest frequencies allowed to be present in the sound. A low value like 30 makes the sound round and dull, a high value like 100 makes the sound buzzy and crispy.

Default: 100
Must be zero or greater,must be a value less than 131
May be changed whilst playing
[Has slide options to shape changes](#slide)

Is there a way to translate this midi value on khz value ? 30 midi value represents **** hz value ?

Is there a parameter to control the slope of a filter ?

Thanks for your help

Check out the fns midi_to_hz and hz_to_midi.

I’m not quite sure what you mean here. Could you give an example? Are you using an FX or the sampler or a synth?

Neither do I :wink:

try to understand the fx low pass filter.

https://www.electronics-tutorials.ws/wp-content/uploads/2018/05/filter-fil10.gif

the slope seems to be a parameter …

ok

the cutoff midi value is between 0 to 131

puts hz_to_midi(1)
puts midi_to_hz(131)

gives that results

├─ -36.37631656250366
 └─ 15804.265640195976

so, it’s strange to see a negative midi value.

I understand the cutoff can’t be greater than 15,8 khz. Why this limit ?

Humans can hear sounds between 20 hz and 20 000 Hz (20 khz) so no need to go further ?

Yeah, that’s something we could perhaps look into exposing but I don’t think we currently do. It’s been a very long time since I designed all the synths and FX though.

Just that the low pass filter synth seemed to behave very badly with values over MIDI 131, so I added a restriction in the safety system. You can disable the safety system in the preferences to go higher - but be very careful with your volume levels as the noise that can come out might damage your ears/speakers.

ok Sam thanks for these explanations. No special needs for the slope parameter, just curious.

Filter slope describes how much the signal is attenuated as it goes above the cutoff frequency.
In the Moog ladder-filter, the signal is attenuated by 24db per octave, an MS-20 filter does 12db per octave.

Having options for slope would be nice.

2 Likes