Reference
Here, you can see the documentation for each function provided by AuditorySignalUtils.jl.
Synthesis
Synthesize stimuli. Right now just ramps and pure tones.
AuditorySignalUtils.pure_tone
— Functionpure_tone(freq, phase, dur, fs)
Synthesizes a pure tone with specified frequency, phase offset (in radians), duration, and sampling rate
AuditorySignalUtils.cosine_ramp
— Functioncosine_ramp(signal, dur_ramp, fs)
Applies a raised-cosine ramp to the input signal, where dur_ramp is the duration of each samp segment in seconds
Digital signal processing tools
Various functions to handle things like calculating rms, setting levels, etc.
AuditorySignalUtils.rms
— Functionrms(signal)
Calculates the room-mean-square (RMS) of a signal
AuditorySignalUtils.dbspl
— Functiondbspl(signal)
Calculates the dB SPL value of a signal (assuming that the units of the signal are in Pa)
AuditorySignalUtils.scale_dbspl
— Functionscale_dbspl(signal, dB)
Adjusts a signals level to be a certain level in dB SPL
AuditorySignalUtils.amplify
— Functionamplify(signal, dB)
Amplifies a signal (in terms of power) by an amount in dB (or attenuates the signal if dB is negative)
A few functions include in-place versions to optimize performance. These versions are marked with a trailing exclamation mark (!) per standard Julia style.
AuditorySignalUtils.scale_dbspl!
— Functionscale_dbspl!(signal, dB)
Adjusts a signals level to be a certain level in dB SPL
AuditorySignalUtils.amplify!
— Functionamplify!(signal, dB)
Amplifies a signal (in terms of power) by an amount in dB (or attenuates the signal if dB is negative).
Note, this version of the function operates in-place (i.e., no extra memory is allocated and the input is modified in-place)
Other utilities
Various functions I frequently need and don't want to redefine in every file.
AuditorySignalUtils.LogRange
— FunctionLogRange(a, b, n)
Creates a vector with n elements spaced logarithmically from a to b