Software Designs

This page contains the software related designs of the project. Note that these are included with and referenced in more detail in the Final Report.

Waveform Table Generator

Rather than use sampled audio, the Arduinet uses a lookup table containing distinct voltage levels that a DAC is stepped through to generate an approximate sinusoidal wave.

The program on the left outputs 512 array instantiations of wave[i] where 'i' is the number of samples per period. The header text and first twelve arrays generated are shown below.

Button Key Mappings

Keys were manually mapped from the below fingering chart to the table shown. The inputs are active high (1) when buttons are pressed, and low (0) when buttons are depressed.

Source Code

  • When turned on or reset, device takes an ambient pressure reading from the sensor

  • The device continuously follows this pattern:

    • Take mouthpiece pressure reading

    • Shift in button combination using two separate registers (SR1 and SR2 are the binary codes from the section above)

    • Output the correct note using the two prior steps' data


The boxed section shown is repeated for every note on the instrument. The while loop catches the proper button codes SR1 and SR2, steps through the appropriate wave table with a calibrated delay to match the proper frequency, setting the DAC in the process, outputs the proper volume based on the mouthpiece sensor, then takes new button readings.