hamster Posted September 23, 2012 Report Share Posted September 23, 2012 I've finally got my 'Synth' project to the point that it can act as an OK sounding music box:http://www.hamsterwo.../Synth_Envelopehttp://youtu.be/XRITkbgBR4cIt plays Brahms Lullaby in monophonic glory! One pair of switches changes between a Sine wave and a richer waveform I made in a spreadsheet. Other pairs control the envelope (Attack, decay and release rates). I'm thinking of using the ADC on the LogicStart to give me analogue control inputs...It only 'does stuff' one clock cycle in 666 of the 32MHz clock, so there is plenty of scope to move to direct digital synthesis or massive polyphony.Buried on the related pages are the C utilities to convert arrays to either 9 or 18 bit BRAM VHDL instances...This post has been promoted to an article Link to comment Share on other sites More sharing options...
Jack Gassett Posted September 24, 2012 Report Share Posted September 24, 2012 Sweet! Do you have a bit file that I can use to record a demo to post?Jack. Link to comment Share on other sites More sharing options...
hamster Posted September 24, 2012 Author Report Share Posted September 24, 2012 will email one through ... Link to comment Share on other sites More sharing options...
Jack Gassett Posted October 1, 2012 Report Share Posted October 1, 2012 Hamster was kind enough to send me an email with the bit file so here is the result: BTW, I setup a mime type for bit files so people can upload bit files now.Jack.Hamster_music_box_P1_500K_LogicStart_MegaWing.bit Link to comment Share on other sites More sharing options...
Dhia Posted October 2, 2012 Report Share Posted October 2, 2012 very cool project I want to try on my boards Link to comment Share on other sites More sharing options...
Tb_ Posted October 16, 2012 Report Share Posted October 16, 2012 Hello Mike,I am going to ask you to expose some of your secret How did you manage to have the melody into a memory ? Did you extract it from a midi file ?Thomas Link to comment Share on other sites More sharing options...
hamster Posted October 17, 2012 Author Report Share Posted October 17, 2012 My secret is that I am useless at playing guitar, but did learn how to read music. :-)It was hand transcribed from a page of sheet music found in Google.If you want a tune, send me a link and I'll send you back some numbers. Link to comment Share on other sites More sharing options...
james1095 Posted December 5, 2013 Report Share Posted December 5, 2013 Just FYI that posted bit file doesn't work on the P1-500K as the name suggests. I grabbed the code from the link and noticed it's set in the .ucf to use the 250K. Changed that and was able to build it for the 500K no problem and it works. Neat! Now to figure out how to make some different tunes. Link to comment Share on other sites More sharing options...
james1095 Posted December 20, 2013 Report Share Posted December 20, 2013 I was annoyed by the very long pause between looping the short melody so I added this (in bold): process(clk32) begin if rising_edge(clk32) then if count = 666 then score_counter <= score_counter + 4; count <= (others => '0'); if score_counter = 8192000 then score_counter <= (others => '0'); end if; All this does is reset score_counter when it reaches 8,192,000 rather than wait for it to hit 16,777,215 and wrap around. A much cleaner solution would be to place some sort of "end of tune" marker in the RAM that stores the melody and reset score_counter at that, but this was a quick and easy addition while I was playing with counters. Now what we need is a brief tutorial on creating new melodies. It would also be cool to be able to connect some sort of input device to play notes manually. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.