Details and Options
ResourceFunction["FunctionAudiolize"] outputs a piece of audio such that the frequency at a particular moment is determined by the value of the plotted function for the corresponding value of the independent variable. The volume is constant.
ResourceFunction["FunctionAudiolize"] only accepts real-valued functions.
Frequency as a function of time,
f(t), is determined by
, where
y(x) is the plotted function and
k>=0,T>0. The higher the value of
y, the higher the frequency. If
y is negative and has a large absolute value, the frequency is low.
ResourceFunction["FunctionAudiolize"] can be useful to mathematicians/math enthusiasts who want to enhance their intuition about a particular function by converting it to audio; this especially applies to audials, people who perceive information better through hearing.
An audiolization can often be more intuitive than a regular plot. The ability to perceive functions through sound can potentially be tremendously helpful to sight-impaired people who want to learn math, but do not have access to the traditional teaching techniques that rely heavily on visual input.
ResourceFunction["FunctionAudiolize"] supports the following options:
"BaselineFrequency" | 440 | average frequency of the audiolization, in hertz |
"MinFrequency" | 120 | a lower bound below which the frequency is not allowed to fall, in hertz |
"MaxFrequency" | 1910 | an upper bound above which the frequency is not allowed to rise, in hertz |
"TimeStep" | 0.01 | time steps for discretization of the plotting domain |
SampleRate | 8000 | SampleRate of ResourceFunction["FunctionAudiolize"]; determines the quality of sound |
The frequency cannot surpass "MinFrequency" and "MaxFrequency", but it is not obliged to touch both of these bounds. The frequency generally touches exactly one of those limits, either the upper or the lower one.
The mean value of
log(f(t)) over the length of the audio is bound to be equal to
Log["BaselineFrequency"].
ResourceFunction["FunctionAudiolize"] uses the built-in function
Play to make sounds. It computes the frequency as a function of time by rescaling the plotted function, finds the sound pressure as a piecewise sine function, and uses
Play.