CSC 558 - Audio Signal Overview for Assignment 1, Spring 2020, generated new dataset for Fall 2021
   
Dr. Parson's home page.

Assignment 1 is due via make turnitin on acad by end of TBD.

Powerpoint slides for instance-based (lazy) learning
Harmonic series Wikipedia page (I verify Wikipedia pages before I use them).
Sine wave, triangle wave, square wave, sawtooth, digital pulse, white noise.
Spectral centroid, root mean squared (RMS), roll-off 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 high.
    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 frequency.
        centrfreq = centroid * nyfreq
        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 * amplscale

genwav.py statistical waveform generator
waveformAnalyzer.ck WAV file analyzer
una2csv.py for converting waveformAnalyzer output to a CSV file for Weka
rununa2csv.sh that invokes una2csv.py across all waveformAnalyzer output files

assn1NomTrain5.arff 5-instance example training set during assignment preparation


Here are the TIME and FREQ plots for the 5 noiseless training instances in csc558lazytrain5sp2020.arff in assignment 1.
lazy1_SinOsc_1000_0.9_0.0_0.ck.txt
lazy1_SinOsc_1000_0.9_0.0_0.wav (1000Hz, .9 out of 1.0 gain, 0.0 out of 1.0 white noise, serial number 0)
lazy1_SinOsc_1000_0.9_0.0_0.wav.una.txt
lazy1_SinOsc_1000_0.9_0.0_0.TIME.png
lazy1_SinOsc_1000_0.9_0.0_0.FREQ.png

lazy1_TriOsc_1000_0.9_0.0_0.ck.txt
lazy1_TriOsc_1000_0.9_0.0_0.wav
lazy1_TriOsc_1000_0.9_0.0_0.wav.una.txt
lazy1_TriOsc_1000_0.9_0.0_0.TIME.png
lazy1_TriOsc_1000_0.9_0.0_0.FREQ.png

lazy1_SqrOsc_1000_0.9_0.0_0.ck.txt
lazy1_SqrOsc_1000_0.9_0.0_0.wav
lazy1_SqrOsc_1000_0.9_0.0_0.wav.una.txt
lazy1_SqrOsc_1000_0.9_0.0_0.TIME.png
lazy1_SqrOsc_1000_0.9_0.0_0.FREQ.png

lazy1_SawOsc_1000_0.9_0.0_0.ck.txt
lazy1_SawOsc_1000_0.9_0.0_0.wav
lazy1_SawOsc_1000_0.9_0.0_0.wav.una.txt
lazy1_SawOsc_1000_0.9_0.0_0.TIME.png
lazy1_SawOsc_1000_0.9_0.0_0.FREQ.png

lazy1_PulseOsc_1000_0.9_0.0_0.ck.txt
lazy1_PulseOsc_1000_0.9_0.0_0.wav
lazy1_PulseOsc_1000_0.9_0.0_0.wav.una.txt
lazy1_PulseOsc_1000_0.9_0.0_0.TIME.png
lazy1_PulseOsc_1000_0.9_0.0_0.FREQ.png

lazy1_SinOsc_341_0.510394332522_0.249946792181_531147.ck.txt
lazy1_SinOsc_341_0.510394332522_0.249946792181_531147.wav (341Hz, .51 out of 1.0 gain, .25 out of 1.0 white noise, serial number 531147)
lazy1_SinOsc_341_0.510394332522_0.249946792181_531147.wav.una.txt
lazy1_SinOsc_341_0.510394332522_0.249946792181_531147.TIME.png
lazy1_SinOsc_341_0.510394332522_0.249946792181_531147.FREQ.png


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.
lazy1_SinOsc_1001_0.500235007566_0.139453694281_615143.TIME.png

lazy1_SinOsc_1001_0.500235007566_0.139453694281_615143.FREQ.png
lazy1_SinOsc_1001_0.500235007566_0.139453694281_615143.wav
lazy1_TriOsc_1000_0.550165803172_0.187167353289_513021.TIME.png
lazy1_TriOsc_1000_0.550165803172_0.187167353289_513021.FREQ.png
lazy1_TriOsc_1000_0.550165803172_0.187167353289_513021.wav
lazy1_SqrOsc_1000_0.743147025456_0.162010730076_822957.TIME.png
lazy1_SqrOsc_1000_0.743147025456_0.162010730076_822957.FREQ.png
lazy1_SqrOsc_1000_0.743147025456_0.162010730076_822957.wav
lazy1_SawOsc_1001_0.661812948435_0.18926762076_534545.TIME.png
lazy1_SawOsc_1001_0.661812948435_0.18926762076_534545.FREQ.png
lazy1_SawOsc_1001_0.661812948435_0.18926762076_534545.wav
lazy1_PulseOsc_1000_0.719825313513_0.153077641397_210081.TIME.png
lazy1_PulseOsc_1000_0.719825313513_0.153077641397_210081.FREQ.png
lazy1_PulseOsc_1000_0.719825313513_0.153077641397_210081.wav