Project Name: 6-voice Phase Modulated Synthesis Mini-Music Box.
Author/Designer: Y H
Project Description: A port from the skds40A - http://forum.cytron.com.my/viewtopic.php?f=30&t=11600, using SKPIC32.
The architecture and the cache in the microcontroller lets it do even more. Future plans including using an entire external DAC and a bigger sine table to reduce noise.
Compiler: MPLAB X IDE 1.10, MPLAB XC32 1.00
Hardware: skPIC32, Carrefour Speakers, breadboard, RC filter (R = 270ohm, C = 0.05uF).
PWM Frequency is 78.125kHZ and module is running at 72MHz
Source code: Attached.
Note: Please modify TEMPO, PRESCALER_HIGH_BIT, PRESCALER_LOW_BIT if the song zips too fast. The Prescalers are to slow down the timer for playing the notes.
Schematic:
Video:
References: Auto-Composing Piano by Chaorong Chen and Siyu Zhan - http://people.ece.cornell.edu/land/cour ... 899_sz259/
Analog Dialogue - http://www.analog.com/library/analogDia ... 8/dds.html
elm-chan wavetable melody generator - http://elm-chan.org/works/mxb/report.html
Markus Gritsch's Music Box - http://dangerousprototypes.com/forum/vi ... =56&t=3472
Edit: This mini music box can be used in a doorbell, clocks, music-box and others. Programmers are welcome to experiment on it.