Apr 11, 2012 3:06 PM
Simple Tutorial?
-
Like (0)
I have owned one of these things for a while and I would really love to get into programming it. Assembly does not really scare me. However, it is a bit over whelming to try to read through the complete effects that I have seen posted online. Are there any beginners tutorials? Something that starts off super basic, like a volume pedal, mute pedal, or something similar, but explains most or all of the code for beginners like myself. I have walked myself through some of the source out there and I understand parts of it, but not enough to make something simple like I just said.
It seems like a mute pedal could be easily changed to a volume pedal and from there changed into a stutter effect and that would show all the beginners how to work with volume, knobs, and timing. If someone would be interested in making a tutorial or point me to some info like this that would be awesome! Basically, what I want is a "Hello World!" program to get me started. Any help would be appreciated. Thanks!
I'm not aware of any simple tutorials out there, but you could start with the two band stereo EQ sample code. First build it and download to the pedal. Once you have that working, strip out the processing code so it is just a pass through.
Here is the code that processes both channels:
;Process Left Channel (left input sample is in a)
move #>Switch_1,r6 ; point to x:mem (switch states)
move #>Filter_1_K,r4 ; point to x:mem (coefficients)
move #>Filter_1_A_Left,r3 ; point to y:mem (filter mem)
bsr TwoBand_EQ ; input in a, output in a
move a,y:LeftOutput
;Process Right Channel (r6 is currently pointing to Switch 1)
move y:RightInput,a ; load right input sample in a
move #>Filter_1_K,r4 ; point to x:mem (coefficients)
move #>Filter_1_A_Right,r3 ; point to y:mem (filter mem)
bsr TwoBand_EQ ; input in a, output in a
move a,y:RightOutput
To make it a pass through, change the above block to:
;Process Left Channel (left input sample is in a)
; do your own processing here
move a,y:LeftOutput
;Process Right Channel (r6 is currently pointing to Switch 1)
move y:RightInput,a ; load right input sample in a
; do your own processing here
move a,y:RightOutput
Everything under "Common Subroutines" can be deleted (unless you want to use them). Then start building a simple volume pedal. Use git/subversion/whatever and commit/checkin frequently so you can back up as soon as you take a wrong turn.
You don't have to worry about timing for a simple volume pedal. The processing in the TwoBandStereoEQ sample code happens in one of the sample receive interrupts (called once per sample). The knob and switch registers are defined at the top of the sample file (Knob_1, Switch_1, etc.). For debugging, you can also write to the Debug_Read_from_DSP_x registers to display values in the UI.
Here are a few simple things to get started:
Once you get those basic things working, you can smooth the volume changes to avoid clicks and zipper noises. Then add log scaling to give the knob a better response.
Thanks for all the advice! I successfully made a mute pedal last night. I couldn't figure out the mpy command the way I wanted to use it so I used the mov command instead to make the signal 0. This weekend I'll hopefully get a chance to try my hand at a simple volume pedal. Thanks again!
Also, could someone tell me what registers we have available? Sorry for the total noob question. I think I will start making a tutorial to help other complete beginners out and help concrete my thoughts.
All of the DSP56364 registers are available. However, I think a couple of the address registers are reserved for interrupt processing in the sample code.
Stay in the mix and in the know.
Latest offers, special deals and insider updates.