-
Notifications
You must be signed in to change notification settings - Fork 12
/
synthesizer.h
94 lines (74 loc) · 2.43 KB
/
synthesizer.h
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* Komposter
*
* Copyright (c) 2010 Noora Halme et al. (see AUTHORS)
*
* This code is licensed under the GNU General Public
* License version 2. See LICENSE for full text.
*
* Synthesizer editor page
*
*/
#ifndef __SYNTHESIZER_H__
#define __SYNTHESIZER_H__
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
#include "arch.h"
#include "audio.h"
#include "buffermm.h"
#include "constants.h"
#include "console.h"
#include "dialog.h"
#include "dotfile.h"
#include "filedialog.h"
#include "fileops.h"
#include "modules.h"
#include "widgets.h"
//#include "synthesizer_file.h"
void synth_lockaudio(void);
void synth_releaseaudio(void);
void synth_clear(int csyn);
int hovertest_module(int x, int y, synthmodule *list, int count);
int hovertest_output(int x, int y, synthmodule *list, int count);
int hovertest_input(int x, int y, synthmodule *mod);
void resetactive(synthmodule *list, int count);
int getactive(synthmodule *list, int count);
int getactiveout(synthmodule *list, int count);
int getactivein(synthmodule *list, int count);
// kb&mouse functions for synthesizer page
void synth_mouse_hover(int x, int y);
void synth_mouse_drag(int x, int y);
void synth_mouse_click(int button, int state, int x, int y);
void synth_keyboard(unsigned char key, int x, int y);
void synth_specialkey(unsigned char key, int x, int y);
// draw functions for synthesizer page
void synth_draw(void);
// modify the synth data
void synth_init(void);
void synth_addmodule(int type);
void synth_deletemodule(int m);
// callbacks for the add module dialog
void synth_draw_addmodule(void);
void synth_addmodule_hover(int x, int y);
void synth_addmodule_click(int button, int state, int x, int y);
void synth_addmodule_keyboard(unsigned char key, int x, int y);
// file dialog functions
void synth_draw_file(void);
void synth_file_hover(int x, int y);
void synth_file_click(int button, int state, int x, int y);
void synth_file_keyboard(unsigned char key, int x, int y);
void synth_file_drag(int x, int y);
void synth_file_checkstate(void);
// functions for converting the module graph into a stack according to signal flow
void synth_stackify(int syn);
int synth_trace(int syn, int pm, int fifo);
// label edit dialog
void synthlabel_draw(void);
void synthlabel_hover(int x, int y);
void synthlabel_click(int button, int state, int x, int y);
void synthlabel_keyboard(unsigned char key, int x, int y);
#endif