Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

Envelope/Envelope.h

Committer:
lukeocarwright
Date:
2020-05-21
Revision:
18:204cd747b54a
Child:
19:08862f49cd9e

File content as of revision 18:204cd747b54a:

#ifndef ENVELOPE_H
#define ENVELOPE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"

/** Envelope class
 * @author Luke Cartwright, University of Leeds
 * @brief converts output to env output
 * @date May 2020
*/

class Envelope
{
public://-----------------------------------------------------------------------
//variables

//methods
    //Methods
    //Constructor
    Envelope();

    //Destructior
    ~Envelope();

    //Modifies input to envelope
    uint16_t env_in(int a, int d, int s, int r, int in, bool init);


private://----------------------------------------------------------------------
//variables
    uint16_t out;
    int samples;
    //float time;
    int av; //a volume
    int dv;
    int sv;
    int rv;
    int a_vec;
    int d_vec;
    int r_vec;
    int at;

//methods
    int a_vector_calc(int av);

};
#endif