Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Envelope/Envelope.h
- Committer:
- lukeocarwright
- Date:
- 2020-05-22
- Revision:
- 19:08862f49cd9e
- Parent:
- 18:204cd747b54a
- Child:
- 21:60f01b17b0a6
File content as of revision 19:08862f49cd9e:
#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);
uint16_t release(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;
int samples_r;
//methods
int a_vector_calc(int av);
int d_vector_calc(int dv, int sv);
int r_vector_calc(int sv, int rv);
};
#endif