-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
80 lines (58 loc) · 1.08 KB
/
Copy pathmain.cpp
File metadata and controls
80 lines (58 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "streamer.h"
#include <portaudio.h>
#include "op.h"
int main (int argc, char **argv)
{
Streamer *streamer = Streamer::initStreamer ("PortAudio");
if (!streamer)
{
printf ("Can't init streamer.\n");
return 0;
}
/*
Exp exp1;
exp1 ("cu") = 880.0f;
exp1 ("to") = 0.0f;
exp1 ("sp") = 0.00001f;
Osc osc1;
osc1 ("fq").ln (exp1, "ou");
Saw lfo1;
lfo1 ("w").ln (osc1, "ou");
streamer->ln (lfo1, "ou");
*/
Osc osc1;
osc1 ("fq") = 3.0f;
Saw lfo1;
lfo1 ("w").ln (osc1, "ou");
lfo1 ("ga") = -440.0f;
lfo1 ("of") = 440.0f;
Osc osc2;
osc2 ("fq").ln (lfo1, "ou");
Square wf;
wf ("w").ln (osc2, "ou");
streamer->ln (wf, "ou");
/*
Exp exp1;
exp1 ("to") = 0.0f;
exp1 ("sp") = 0.0001f;
exp1 ("cu") = 880.0f;
Osc osc1;
osc1 ("fq") = 440.0f;
Sin lfo1;
lfo1 ("to") = 0.0f;
exp1 ("sp") = 0.0001f;
exp1 ("cu") = 880.0f;
Square wf1;
wf1 ("cy") = 0.1f;
wf1 ("w").ln (osc1, "ou");
streamer->ln (wf1, "ou");
*/
streamer->start ();
Pa_Sleep (10*1000);
streamer->stop ();
streamer->release ();
return 0;
}