summaryrefslogtreecommitdiff
path: root/synth/globals.cpp
blob: 1fa06f95df7a89f8c8c82c47ba5dbc43d107506b (plain)
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
/*
    Copyright (C) 2010-2012 Florian Jung
     
    This file is part of flo's FM synth.

    flo's FM synth is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    flo's FM synth is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with flo's FM synth.  If not, see <http://www.gnu.org/licenses/>.
*/


#include "globals.h"

fixed_t **lfo[N_LFOS];
fixed_t *curr_lfo[N_LFOS+1];

fixed_t* wave[N_WAVEFORMS];

fixed_t sample_and_hold[N_LFO_LEVELS];

int sample_and_hold_frames=0;
int lfo_res[N_LFOS];
int lfo_phase[N_LFOS];
float lfo_freq_hz[N_LFOS];

bool verbose=false;
bool fatal_warnings=false;
bool quiet=false;

bool connect_audio=true, connect_midi=true;

#ifdef WATCHFILES
bool watchfiles=true;
#endif

float cleanup_interval_sec=0;
float snh_freq_hz=0;
float max_port_time_sec=0;

float filter_update_freq_hz=0;
float lfo_update_freq_hz=0;
float envelope_update_freq_hz=0;

int filter_update_frames;
int lfo_update_frames;
int envelope_update_frames;

float xrun_time=0;
int xrun_n=0;

#ifndef FRAMESKIP
	int samp_rate;
#else
	int frameskip=-1;
	int samp_rate;

	jack_default_audio_sample_t outtemp[N_CHANNELS];
	#ifdef STEREO
		jack_default_audio_sample_t outtemp2[N_CHANNELS];
	#endif

	jack_nframes_t outtemp_nframes_left=0;
#endif


string programfile[128];



program_t *program_settings;
bool program_lock[128];

program_t default_program;


Channel *channel[N_CHANNELS];


jack_nframes_t cleanup_interval; //in jack frames