CSC 558 - Audio
Signal Overview for Assignment 1, Spring 2020, generated new
dataset for Fall 2021
Dr. Parson's home
Assignment 1 is due via make turnitin on acad by end of TBD.
slides for instance-based (lazy) learning
series Wikipedia page (I verify Wikipedia pages before I use
Sine wave, triangle wave,
centroid, root mean squared (RMS),
frequency and spectral flux
(no flux change in assn1).
The roll25, roll50, and roll75 are the
frequency where 25%/50%/75% of the energy rolls off going low to
See the ChucK
Unit Analyzers for docs on the library modules used.
Assignment 1 normalizes the first bin of the 20-bin spectrum
(amplbin0) as the fundamental frequency with an amplitude of 1.0.
1. To estimate the closest measure of frequency within the 20-bin
resolution, perform the following:
1a. Get the Nyquist
frequency (upper limit on frequency) as Sampling Rate / 2.0.
nyfreq = smprate / 2.0.
1b. There are fftbins bins in the nyfreq spectrum. Fundamental
frequency funfreq = nyfreq / fftbins * (shftfftfund + 0.5),
where shftfftfund is how
many fftbins the fundamental was shifted left in the original Fast
Fourier Transform in order to place it at amplbin0.
The added .5 puts the
estimate in the middle of the fftbin.
Note that in a dataset,
smprate and fftbins could differ within each record from other
record, but thet are consistent within that record.
The hrmbins at amplbin1..amplbin(hrmbins-1)
are the overtones of the fundamental, which is at amplbin0.
1c. For the centroid, roll25, roll50, and roll75 in the dataset,
multiply each * nyfreq to gets its actual
centrfreq = centroid *
roll25freq = roll25 * nyfreq
roll50freq = roll50 * nyfreq
roll75freq = roll75 * nyfreq
1d. For each of centrfreq, roll25freq, roll50freq, roll75freq,
divide it / funfreq to get its normalized frequency
nc, n25, n50, n75.
This normalization of
frequency value is needed when classifying oscillator/waveform
type tosc, because it is frequency-invariant.
2. Scale the raw rms voltage level by multiplying it by the
amplscale, thereby normalizing it:
normrms = rms *
genwav.py statistical waveform
waveformAnalyzer.ck WAV file
una2csv.py for converting
waveformAnalyzer output to a CSV file for Weka
rununa2csv.sh that invokes
una2csv.py across all waveformAnalyzer output files
example training set during assignment preparation
Here are the TIME and FREQ plots for the 5 noiseless
training instances in csc558lazytrain5sp2020.arff in
(1000Hz, .9 out of 1.0 gain, 0.0 out of 1.0 white noise, serial
(341Hz, .51 out of 1.0 gain, .25 out of 1.0 white noise, serial
Here are the TIME and FREQ plots for the 5
noise-bearing training instances in 2018's
csc558lazynoise5sp2018.arff in assignment 1.
Other than the above training instances from 2018 &
2020, I have generated new data for fall 2021 that have
similar statistical distributions on 9/12/2021.