Forum Discussion
Altera_Forum
Honored Contributor
12 years agogenerate music box; two or more push buttons as inputs
Hello! Could you help me in my project? My project is a music generator using DE1 module. similar to this music box http://www.fpga4fun.com/musicbox3.html. When I pushed KEY0 push button, it will pla...
Altera_Forum
Honored Contributor
12 years agoThe fpga4fun design uses a pwm signal to generate the tones. Each tone has frequency ( or period ) and a duration. You may write 2 roms, one for the period of each tone and the other for the lenght ( in pwm periods ) of the note. You read at same time both tables and get the all the information need to play this note. When finishes you increment a register and read the next value on table until end.