-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsonifier_main.c
44 lines (30 loc) · 886 Bytes
/
sonifier_main.c
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
#include "musicbox.h"
/**********************************************
© Alex Holtzman 2018
Betterbox - A simple Csound based, algorithmic
music generator that runs from the command line
Made by Alex Holtzman, May 2018
Compile with: gcc betterbox_main.c -o betterbox
***********************************************/
int main(int argc, char **argv){
boxdata data;
//initialize our data structure
init(&data);
//get file info...
getarguments(&data);
//process our image file's data
imageDataProcess(&data);
//open our csd file that we'll be writing to.
data.scorefile = fopen(data.filename, "w");
//build our csd file's orchestra
csdbuild(&data);
//build our score
scorebuild(&data);
//close our csd file
fclose(data.scorefile);
//run our csound file from the command line
runscore(&data);
//clean up after ourselves
cleanup(&data);
return 0;
}