Altera_Forum
Honored Contributor
14 years agohelp on Music Synthesizer
Hi everyone,
Has anyone encountered using the starter code on Terasic website for the implementation of the DE2 board Music Synthesizer? I was wondering how they came up with the demo_sound block codes, key codes etc. I think that there is a formula for figuring out the frequency for the notes but they are only in hexadecimal. Thanks in Advance! Here is the snippet of the code: /////////// note list /////////// always @(step) begin case (step) 0:TT=8'h1a; 1:TT=8'h97; 2:TT=8'hf6; 3:TT=8'h35; 4:TT=8'h84; 5:TT=8'h13; 6:TT=8'h12; 7:TT=8'h31; 8:TT=8'h85; 9:TT=8'h36; 10:TT=8'h86; 11:TT=8'h37; 12:TT=8'h87; 13:TT=8'h3a; 14:TT=8'h8a; 15:TT=8'h8a; 16:TT=8'h87; 17:TT=8'h86; 18:TT=8'h85; 19:TT=8'h95; 20:TT=8'hf4; 21:TT=8'h83; 22:TT=8'h8a; 23:TT=8'h8a; 24:TT=8'h87; 25:TT=8'h86; 26:TT=8'h85; 27:TT=8'h95; 28:TT=8'hf4; 29:TT=8'h83; 30:TT=8'h83; 31:TT=8'h83; 32:TT=8'h83; 33:TT=8'h83; 34:TT=8'hf3; 35:TT=8'hf4; 36:TT=8'h35; 37:TT=8'hf4; 38:TT=8'hf3; 39:TT=8'h82; 40:TT=8'h82; 41:TT=8'h82; 42:TT=8'hf2; 43:TT=8'hf3; 44:TT=8'h34; 45:TT=8'hf3; 46:TT=8'hf2; 47:TT=8'h81; 48:TT=8'h1a; 49:TT=8'h86; 50:TT=8'h95; 51:TT=8'hf4; 52:TT=8'h83; 53:TT=8'h84; 54:TT=8'h13; 55:TT=8'h12; 56:TT=8'h21; 57:TT=8'h1f;//end endcase end assign step_r=57;///Total note