sonic-pi
sonic-pi copied to clipboard
`sample` knows `cutoff:` but doesn't document it. Should it?
The following MWE audibly demonstrates that:
sampleseems to know acutoff:parameter, which is not documented anywhere insample's language reference entry (Sonic Pi > Lang > sample > Options); at least not in Sonic Pi v4.5.0.sampleinterprets thiscutoff:, as one would intuitively expect, the same way assynth: a low-pass filter is applied to cut out the high frequencies, with thecutoff:value corresponding to the respective MIDI note value.- It seems that for
sample, thecutoff:option is merely an alias of thelpf:option - at least a quick, ad-hoc test suggests they sound much the same.
# Original, unfiltered sample:
sample :loop_amen
sleep sample_duration(:loop_amen)
# Sounds noticeably low-pass-filtered:
sample :loop_amen, cutoff: 80
sleep sample_duration(:loop_amen)
# Sounds much the same as the previous example:
sample :loop_amen, lpf: 80
This raises two questions:
- Should
sample'scutoff:option be documented in its language reference entry? - If so, what should the text description of the
cutoff:option say? Would it be sufficient (and technically correct) to refer tocutoff:as an alias oflpf:?
If both questions can be answered 'Yes', I would be happy to submit a pull request for an according amendment of the language reference entry of sample (which, for the record, lives at app/server/ruby/lib/sonicpi/lang/sound.rb).