Skip navigation
204 Views 4 Replies Latest reply: Apr 14, 2012 5:35 PM by RedPandaCurt RSS
cheezor Just Startin' 6 posts since
Mar 18, 2011
Currently Being Moderated

Apr 11, 2012 3:06 PM

Simple Tutorial?

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!

  • RedPandaCurt Just Startin' 23 posts since
    Oct 30, 2009
    Currently Being Moderated
    Apr 11, 2012 5:06 PM (in response to cheezor)
    Re: Simple Tutorial?

    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.

  • RedPandaCurt Just Startin' 23 posts since
    Oct 30, 2009
    Currently Being Moderated
    Apr 12, 2012 5:09 AM (in response to cheezor)
    Re: Simple Tutorial?

    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:

    1. Remove the calls (bsr) to Generate_Coeffs and TwoBand_EQ to create a pass-through (see previous reply).
    2. Set Debug_Read_from_DSP_1 to 0x000001 when the effect is on and 0x000000 when the effect is off.  Look for the code that turns LED_Green on/off based on the footswitch.  (Note that the Generate_Coeffs subroutine also writes to the debug registers.)
    3. Mute the signal (e.g., by multiplying input by 0) when the effect is off.
    4. Multiply the signal by the Knob_1 value to create a simple volume pedal.

     

    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.

More Like This

  • Retrieving data ...

Bookmarked By (0)