Generating signals
SignalAnalysis.chirp
— Functionchirp(freq1, freq2, duration)
chirp(freq1, freq2, duration, fs; shape, phase, window)
Generates a frequency modulated chirp signal from freq1
to freq2
and specified duration
at frame rate fs
. The type of frequency modulation may be controlled using shape
(:linear
(default) or :hyperbolic
). The starting phase
and window
type may be optionally specified.
Examples:
julia> x = chirp(5kHz, 7kHz, 100ms, 44.1kHz)
4410-frame, 1-channel SampleBuf{Complex{Float64}, 1}
0.1s sampled at 44100.0Hz
julia> x = chirp(5kHz, 7kHz, 100ms, 44.1kHz; phase=45°, window=hamming)
4410-frame, 1-channel SampleBuf{Complex{Float64}, 1}
0.1s sampled at 44100.0Hz
julia> x = chirp(5kHz, 7kHz, 100ms, 44.1kHz; shape=:hyperbolic, window=(tukey,0.05))
4410-frame, 1-channel SampleBuf{Complex{Float64}, 1}
0.1s sampled at 44100.0Hz
SignalAnalysis.cw
— Methodcw(freq, duration, fs; phase, window)
Generates a sinusoidal signal with specified freq
and duration
at frame rate fs
. The starting phase
and window
type may be optionally specified.
Examples:
julia> x = cw(5kHz, 200ms, 44.1kHz)
8820-frame, 1-channel SampleBuf{Complex{Float64}, 1}
0.2s sampled at 44100.0Hz
julia> x = cw(5kHz, 200ms, 44.1kHz; window=hamming)
8820-frame, 1-channel SampleBuf{Complex{Float64}, 1}
0.2s sampled at 44100.0Hz
julia> x = cw(-5kHz, 200ms, 44.1kHz; phase=45°, window=(tukey, 0.05))
8820-frame, 1-channel SampleBuf{Complex{Float64}, 1}
0.2s sampled at 44100.0Hz