ECE 4760: Final Project

Dual-Mode Music Sequencer

One-voice Multi-algorithm Synthesizer

Zhengning Han (zh62@cornell.edu)

Yaxin (Gloria) Xiao (yx259@cornell.edu)

"One-voice music sequencer with Frequency Modulation synthesis, Karplus-Strong Synthesis and wavetable."

-project soundbyte

This project stems from our passion for music and the desire to build a device that can inspire creative works from individuals regardless of their musical backgrounds. We designed a music sequencer using the PIC32 MCU with a keypad-TFT display user interface and external DAC sound output. This music sequencer helps users generate music patterns based on the sounds they selected and allows users to save and playback the generated music pattern. Individual sounds are produced using either FM synthesis (with snare drum generated using wave table) or Karplus-Strong Synthesis depending on the mode the user is in, and aim to mimic sounds ranging from percussion instruments to string instrument such as guitar.

The finished product

The designers

As stated in the background math section, the sound is produced using exponential attack and decay schemes, which would generate an envelope over the sinusoidal signal. To view the shape of such an envelope, we also captured pictures of the resulting signals:

Figure 5. Bass Drum Signal

Figure 6. Triangle Signal

Figure 7. Hi-Hat Cymbal Signal

Observation: First, all three graphs show exponential decay after a burst of amplitude at the beginning of the sound. The Bass Drum signal and Triangle signal both have the same decay rate, which can be observed from the identical shape of the overall envelope. However, from the table above, we can see that Triangle signal has much higher frequency than the Bass Drum signal, which is also indicated in the graph above as the Triangle wave is much denser than the Bass Drum one. Note that, the density of the sinusoids under the envelope is directly proportional to the frequency of the signal in FM synthesis.

Second, comparing the shape of the Bass Drum signal to that of the Hi-Hat Cymbal signal, we can clearly observe a shorter and faster decay on the Hi-Hat signal, which produces the "crushing" sound effect that's needed to synthesize authentic cymbal sound. The faster decay is achieved by smaller dk_main and dk_fm values, which would result in a larger decay factor according to the analysis in the High-Level design section. With a larger decay rate, the decay phase of the signal would be sharper, which is exactly the observation here.

Karplus-Strong Synthesizer Result:

The following table captures the acoustic guitar-like sound that we were able to produce using Karplus-Strong Theorem. The array length field is the length of the dedicated array we initialized in the program for that node. As explained before, the frequency of output signals and the array length are closely related and such correlation can be observed below. The sample output data files are generated by an additional python script that we wrote.


Output Key Frequency Array Length
1
261.626
76
2
293.665
68
3
329.628
60
4
439.228
57
5
391.995
51
6
440
45
7
493.883
40
8
523.25
38
9
587.33
34

Overall: The program has no notiable delay and the sounds generated have no notiable clipping effect (even though the python program does generate the Karplus-Strong sound with little clipping). In the video linked below, we demoed both FM and KS sequences. Overall, we believe that we have achieved the goal of the project and we are proud of our product.

DEMO VIDEO

  • Check it out on YouTube!