Skip to main content

Soundcard

State of the part

This part is only a concept. We will most likely not be able to build and integrate it.
Participators: Ferdinand, Johannes K.

Soundcard

Our construction consists of one physically realized voice and an arbitrary number of other voices simulated in an FPGA (Intel Cyclone V) in order to save chips. A list of all projected required parts including if more than one voice was realized physically can be found here. TODO: upload file and covert link
Furthermore the soundcard is supported by our timer module to allow for simpler MIDI Playback.

Core Ideas

  • Timer signals the CPU to input new data into the soundcard
  • FPGA generates 80kHz and 20kHz clock signals.
  • FPGA also contains more voices.
  • Flash chip contains waves (sine, square, triangle and sawtooth waves), which are chosen together with the octave, the waveform and note.
  • FIR (finite impulse response) Filter filters the frequencies and regulates the volume with PWM signals.
  • Digital signals are converted to analog signals with a DAC
  • Adding the analog signals together to get the final signal

Schematics

Work in Progress

TODO add KiCad schematics

Soundcard sketch

A more detailed explanation can be found in the slides.

Note Selection

Note

The 12 possible notes are encoded into 4 bits, whereby 0b0000 encodes the lowest playable note depending on the input clock rate (the Flash script does output the mapping).

Octave

The 8 playable octaves are encoded into 3 bits. The lowest bit shifts the counter output by one, effectively skipping every second sample. This lifts the octave by one. The second bit switches to a 4 times higher clock input and lifting the octave by 2. The third bit switches to a 4 octave higher version of the waveform.

Flash Program

Address layout waveforms:

BitsNameDescription
0-8SampleSelects a sample out of the waveform
9-11WAVindexSelects a waveform or Sample
12-15NoteSelects a note in one Octave (A0+minTone+Note)
16ShiftSelects between the tone and a 4 Octave higher version

Address layout Drum Samples:

BitsNameDescription
0-8Sample_LowSelects a sample out of the Drum Sample(Lower bits)
9-11WAVindexSelects a waveform or Sample
12-15Sample_HighSelects a sample out of the Drum Sample(higher bits)
16HighVSelects a secondary Drum Sample that is stored where the higher version of the waveforms would be
WAVindexWaveform/sample
0Sine wave
1Square wave
2Triangle wave
3Sawtooth wave
4aSnare (20Khz)
4bHigh Noise (40Khz)
5aBase (20Khz (also good on 40Khz))
5bTom (20Khz)
6aHigh Hat closed (20Khz)
6bempty
7aempty
7bempty

See here for the python script.

Software

A simulation in form of a VST Plugin to for DAWs exists but is not shared here due to License issues with used software and sounds.

Addressing

Address range not yet fixed

Testing

Due to time limitations we will not be able to build, and therefore test, the soundcard. It is only a concept for now.

Findings

  • How simple sound synthesis works
  • How to use pulse width modulation for analog multiplication
  • How to design FIR Filters
  • How to write VST-Plugins