Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

generate 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 play Joy to the World. When I pushed KEY1, it will play Merry Xmas tune. Please help me as soon as possible. Thank you very much!!!!

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    As the link you included suggests you need to create ROM images, one for each tune you wish to play, containing all the samples and timing required by each tune. Your logic will then, based on a key press, replay the chosen samples (from the appropriate ROM) to the DAC on the DE1. You may well need to cascade a number of M4K memory blocks for the longer tunes.