Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to modify the code of the ADSR generator to obtain an automatic trigger?

edited October 2018 in General

Simply that, how to modify the ADSR code to obtain a kind of LFO with variable waveforms. I think an automatic trigger is possible, but my programming capacity is very poor. Any help related to the modification of the code is welcome.

Tagged:

Comments

  • Try replacing the code in lines 175-191 with the following:

    void triggerADSR() {                      //triggers the envelope continuously
        if (readyToAttack){ 
          readyToAttack = false;
          readyToRelease = true;
          readADS();
        }
       else if (readyToRelease){
          readyToAttack = true;
          readyToRelease = false;
          readR();
        }
    }  
    

    I haven't tested this yet, but I think it could work. Normally the program waits for an external input, but this way it should retrigger the ADSR in a loop. With this change the external trigger won't work anymore, though, but if it's a useful feature I could think of ways of properly adding it to the program.

  • edited November 2018

    Hello again! I've revised the program to include your suggestion. (thanks a lot! :D)

    Now the ADSR has two modes, slave (by default), and Autotrigger (turn the unit ON with the button pressed and release the button after the battery check).

    I'm going to write a blog entry explaining the changes, but in the meantime you can grab the program here.

    UPDATE: the blog entry is ready -read it here! I also want to record a video demo eventually.

  • Thank you very much Jose!! I'm going to try it when I have some free time. I'm thinking about controlling an echo integrated circuit (PT2399).
    Any developments will be communicated!!!
    Thanks again :) B)

Sign In or Register to comment.