This project demonstrates the usage of the Nexys 4 DDR's
XADC port, DDR2 memory, and PWM audio output. The behavior is as follows:
The looper has 8 'banks' that can contain data. The user can record audio tracks to these banks and play them back simultaneously.
Audio data is constantly sampled at roughly 44.1 KHz through the XADC and output through the headphone jack using PWM.
When the record button is pressed, the timer on the 7-segment display is started, and the audio data is recorded into one bank.
If the record button is pressed again, the length of the loop is saved and the audio data is read from beginning to end and mixed with the input signal.
If the stop button is pressed while recording, the data is overwritten with a blank signal and the data is erased.
While a bank is playing, the user can record additional tracks on other banks by pressing BTNL or BTNR to select another bank to record to. If the user presses play/record on a bank that is already playing, it will overwrite the audio on that bank.
The onboard LEDs display which banks are recorded and which banks are still empty.
Holding the stop button on any specific bank for 1.5 seconds will delete it.
Pressing BTNU swaps the track you are on. Flipping SW0 to the ON position will allow you to edit which banks are playing on the opposite track. Make sure SW0 is in the off position before you start
The left 7-segment display shows which bank you are currently on as well as the state of that bank: E for empty, S for stopped, and P for playing. The right 7-segment display shows the time in the current loop.