wavetable synth - columbia university
TRANSCRIPT
![Page 1: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/1.jpg)
Wavetable Synth
MIDI WavetableSynthe
Evan Ziebart, Lancelot Wathieu, Doga Ozesmi, Varun Varahabhotla
Advisor: John Hui
![Page 2: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/2.jpg)
Overview
![Page 3: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/3.jpg)
Wavetable Synthesis
● A sound wave signature is stored in memory
● Loop through this wave to make a sound
![Page 4: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/4.jpg)
Different Notes
● Suppose a wave is sampled at 440 Hz and stored
● To sample at 880 Hz, skip every other address
● 1320 Hz = every third
![Page 5: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/5.jpg)
MIDI Instruments
● Send status of key press and release
![Page 6: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/6.jpg)
Our Design
● Send MIDI packets over USB to software synth program
● Synth converts MIDI signal data into calls to a hardware driver
● The driver accepts configuration of pitches (up to 10 notes)
● Each note requests samples from sampler
● Sampler can take samples from 2 wavetables and combine them with different
coefficients
● The current samples can be configured from the software program
● The samples from all the 10 notes are combined and sent via interface to audio codec
![Page 7: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/7.jpg)
![Page 8: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/8.jpg)
Synth Software
![Page 9: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/9.jpg)
Software: MIDI Decoder
● The MIDI decoder program is responsible for taking the MIDI Protocol messages utilizing
the Libusb software library and translating the instructions into logic output:○ MIDI Packets are 64 bytes○ note, attack velocity, modulation
● Wave tales generated through Matlab and conversion script in python for any .wav files
which normalizes the audio format..○ 48kHz○ 16bit
![Page 10: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/10.jpg)
Matlab Generated Audio Wavessine_wave pulse_wavesaw_wavetriangle_wave
Hardware
Python Audio Waves ConverterUse existing .wav files and convert to 48kHz, 16bit audio
MIDI_SW_DriverLibusb Input MIDI Datasend_notesend_wavestart_wave
MIDI Input DeviceKeyboard Device which sends in MIDI Commands
MIDI DriverSetup Memory Mapped IOWrite Data to buff
![Page 11: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/11.jpg)
Synth Hardware
![Page 12: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/12.jpg)
Wave Table 0
Wave Table 1
Wave Table 2
AUDIO CODEC
NOTES
DRIVER
![Page 13: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/13.jpg)
Note Data: Note, Octave, Velocity
Data from driver, destination note controlled by top level module
Wave Sample
Counters
![Page 14: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/14.jpg)
ADSR enveloping
● Attack
● Decay
● Synthesis
● Release
![Page 15: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/15.jpg)
![Page 16: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/16.jpg)
![Page 17: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/17.jpg)
![Page 18: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/18.jpg)
![Page 19: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/19.jpg)
Wave Tables2 wavetables for reading
1 wavetable for writing
Swap these around whenever a different wave is loaded
Wave Table 0
Wave Table 1
Wave Table 2
Wave 0
Wave 1
![Page 20: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/20.jpg)
Wave Tables2 wavetables for reading
1 wavetable for writing
Swap these around whenever a different wave is loaded
Wave Table 0
Wave Table 1
Wave Table 216 bits * 48,000 samples * 3 waves =
288kB used
Wave 0
Wave 1
![Page 21: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/21.jpg)
Wave Table 0
Wave Table 1
Wave Table 2
AUDIO CODEC
NOTES
DRIVER
![Page 22: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/22.jpg)
Performance Constraints
Time to write from memory to wavetables in BRAM is negligible
Longest portion of hardware is taken by the arbiter
Still responds to Codec requests about ~10 times faster than necessary
![Page 23: Wavetable Synth - Columbia University](https://reader030.vdocuments.us/reader030/viewer/2022012807/61bd4e5e61276e740b1179ae/html5/thumbnails/23.jpg)
What works:
Testbenches for each individual module
Testbenches for each major module (wavetables, note_top)
Software for interpreting MIDI signals
Software driver for the synth hardware
Interfacing with the Audio Codec
What doesn’t:
When they all come together