48 lines
676 B
C
48 lines
676 B
C
/*
|
|
* Filename: fm_2op.h
|
|
*
|
|
* Description:
|
|
*
|
|
*
|
|
* Version:
|
|
* Created: Thu Oct 31 02:02:19 2019
|
|
* Revision: None
|
|
* Author: Rachel Fae Fox (foxiepaws),fox@foxiepa.ws
|
|
*
|
|
*/
|
|
|
|
#ifndef _H_FM2OP
|
|
#define _H_FM2OP
|
|
#include "../common.h"
|
|
#include "fm_core.h"
|
|
|
|
typedef enum FM2_ALG {_fm2_0, _fm2_1 } FM2_Alg;
|
|
/* FM Algorithms
|
|
|
|
alg 0
|
|
|
|
[ out ]
|
|
| |
|
|
[ 1] [ 2]-[fb]
|
|
|
|
alg 1
|
|
[fb] -> [2]-> [1] -> [ out ]
|
|
*/
|
|
typedef struct FM2 {
|
|
Operator Carrier;
|
|
Operator Modulator;
|
|
FM2_Alg Algorithm;
|
|
float freq;
|
|
float gate;
|
|
float(*process)(struct FM2 *, EngineState *);
|
|
} FM2;
|
|
|
|
float fm2_process(struct FM2 *, EngineState *);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|