summaryrefslogtreecommitdiffstats
path: root/src/adsr.h
blob: 713c95f81ad62a8b411b7e65385ee7c43787719c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef ADSR_H
#define ADSR_H

typedef struct adsr_t {
  float a;
  float peak;
  float d;
  float s;
  float r;
  unsigned long long elapsed;
} adsr_t;

float adsr_amplitude(adsr_t *adsr, float noteOn, float noteOff, unsigned long long elapsed);

#endif /* ADSR_H */