Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #22

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion brighton/brightonMixerMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ removeInterface(guiSynth *synth)
return(NULL);
}

#if 0
brightonEvent event;

int
Expand All @@ -1190,4 +1191,10 @@ doAlarm()
/* brightonSendEvent((void *) theSynth->win, 2, DISPLAY1 - 1, &event); */
return(0);
}

#else
int
doAlarm()
{
return(0);
}
#endif
2 changes: 1 addition & 1 deletion bristol/aksdco.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "bristol.h"
#include "aksdco.h"

static float note_diff, *zbuf;
GLOBAL_STATE static float note_diff, *zbuf;

#define BRISTOL_SQR 4
#define SINE_LIM 0.05f
Expand Down
2 changes: 1 addition & 1 deletion bristol/aksenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#define AKSENV_OUT_IND 0

static float rate;
GLOBAL_STATE static float rate;

/*
* Reset any local memory information.
Expand Down
4 changes: 2 additions & 2 deletions bristol/arpdco.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "bristolblo.h"
#include "arpdco.h"

float note_diff, *zbuf;
GLOBAL_STATE static float note_diff, *zbuf;

#define BRISTOL_SQR 4

Expand Down Expand Up @@ -70,7 +70,7 @@ static void fillWave();
* We should not be doing this however I need a quick resolution to some issues
* with sync of square waves and this is a scratch buffer for the edge detector
*/
static float *sbuf = NULL;
GLOBAL_STATE static float *sbuf = NULL;

/*
* Reset any local memory information.
Expand Down
2 changes: 1 addition & 1 deletion bristol/arpeggiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "bristol.h"
#include "bristolarpeggiation.h"

extern bristolMidiHandler bristolMidiRoutines;
GLOBAL_STATE extern bristolMidiHandler bristolMidiRoutines;

/* This is required for 2602222, voices left hanging when terminating */
static void desequence(audioMain *am, Baudio *ba)
Expand Down
4 changes: 2 additions & 2 deletions bristol/audioEngine.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "dco.h"

extern tableEntry defaultTable[];
GLOBAL_STATE extern tableEntry defaultTable[];
extern void freeBristolAudio();
static void a440();

Expand All @@ -40,7 +40,7 @@ extern void rbMidiNote(audioMain *, bristolMidiMsg *);
/*
* Used by the a440 sine generator.
*/
int s440holder = 0;
GLOBAL_STATE int s440holder = 0;

static void
bristolUnlinkVoice(audioMain *audiomain, bristolVoice *v)
Expand Down
4 changes: 2 additions & 2 deletions bristol/audiothread.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ extern int bristolJackInterface();

/*int atStatus = 0; */

extern int dupfd;
extern char *outputfile;
GLOBAL_STATE extern int dupfd;
GLOBAL_STATE extern char *outputfile;
extern int buildCurrentTable(Baudio *, float);
extern void initMicrotonalTable(fTab []);

Expand Down
6 changes: 3 additions & 3 deletions bristol/bit1osc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#include "bristolblo.h"
#include "bit1osc.h"

static float note_diff;
int samplecount;
GLOBAL_STATE static float note_diff;
GLOBAL_STATE static int samplecount;

static void fillWave(float *, int, int);
static void buildBitoneSound(bristolOP *, bristolOPParams *);
Expand All @@ -67,7 +67,7 @@ static void buildBitoneSound(bristolOP *, bristolOPParams *);
*
* We have 16, 8, 4, 2, 1
*/
static float sweeps[16] = {2, 4, 8, 16, 1, 32, 12, 20, 24, 32, 0,0,0,0,0,0};
static const float sweeps[16] = {2, 4, 8, 16, 1, 32, 12, 20, 24, 32, 0,0,0,0,0,0};

/*
* The name of this operator, IO count, and IO names.
Expand Down
20 changes: 11 additions & 9 deletions bristol/blo.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@

#include "bristolblo.h"

static int init = 1;

float blosine[BRISTOL_BLO_SIZE];
float blocosine[BRISTOL_BLO_SIZE];
float blosquare[BRISTOL_BLO_SIZE];
float bloramp[BRISTOL_BLO_SIZE];
float blosaw[BRISTOL_BLO_SIZE];
float blotriangle[BRISTOL_BLO_SIZE];
float blopulse[BRISTOL_BLO_SIZE];
GLOBAL_STATE static int init = 1;

GLOBAL_STATE struct bristolBLO blo;

GLOBAL_STATE float blosine[BRISTOL_BLO_SIZE];
GLOBAL_STATE float blocosine[BRISTOL_BLO_SIZE];
GLOBAL_STATE float blosquare[BRISTOL_BLO_SIZE];
GLOBAL_STATE float bloramp[BRISTOL_BLO_SIZE];
GLOBAL_STATE float blosaw[BRISTOL_BLO_SIZE];
GLOBAL_STATE float blotriangle[BRISTOL_BLO_SIZE];
GLOBAL_STATE float blopulse[BRISTOL_BLO_SIZE];

/*
* Generate the waveforms to the given harmonic reference size. The code could
Expand Down
12 changes: 6 additions & 6 deletions bristol/bristolaks.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
* audio threads, unless we ensure a single thread deals with any given algo
* type, since then they are only used sequentially.
*/
static float *freqbuf = (float *) NULL;
static float *zerobuf = (float *) NULL;
static float *tmpbuf = (float *) NULL;
static float *patchbuf1 = (float *) NULL;
static float *patchbuf2 = (float *) NULL;
GLOBAL_STATE static float *freqbuf = (float *) NULL;
GLOBAL_STATE static float *zerobuf = (float *) NULL;
GLOBAL_STATE static float *tmpbuf = (float *) NULL;
GLOBAL_STATE static float *patchbuf1 = (float *) NULL;
GLOBAL_STATE static float *patchbuf2 = (float *) NULL;

/*
* All buffers are going to be collapsed into a single 'megabuf', this will be
* used for all local information for every possible one of these voices. As
* such it might get big, but will allow for arbitrary buffering.
*/
static struct {
GLOBAL_STATE static struct {
float *buf;
float *outputs[128][AKS_OUTCOUNT]; /* offsets into buffer for data */
/* float *inputs[128][AKS_INCOUNT]; pointer offsets for input source */
Expand Down
36 changes: 18 additions & 18 deletions bristol/bristolarp2600.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@
* audio threads, unless we ensure a single thread deals with any given algo
* type, since then they are only used sequentially.
*/
static float *fmbuf = (float *) NULL;
static float *filtbuf = (float *) NULL;
static float *noisebuf = (float *) NULL;
static float *adsrbuf = (float *) NULL;
static float *arbuf = (float *) NULL;
static float *mixbuf = (float *) NULL;
static float *shmix = (float *) NULL;
static float *zerobuf = (float *) NULL;
static float *lfosh = (float *) NULL;
static float *lfosine = (float *) NULL;
static float *lfosquare = (float *) NULL;
static float *osc1ramp = (float *) NULL;
static float *osc1puls = (float *) NULL;
static float *osc2ramp = (float *) NULL;
static float *osc2puls = (float *) NULL;
static float *ringmod = (float *) NULL;
static float *scratch = (float *) NULL;
GLOBAL_STATE static float *fmbuf = (float *) NULL;
GLOBAL_STATE static float *filtbuf = (float *) NULL;
GLOBAL_STATE static float *noisebuf = (float *) NULL;
GLOBAL_STATE static float *adsrbuf = (float *) NULL;
GLOBAL_STATE static float *arbuf = (float *) NULL;
GLOBAL_STATE static float *mixbuf = (float *) NULL;
GLOBAL_STATE static float *shmix = (float *) NULL;
GLOBAL_STATE static float *zerobuf = (float *) NULL;
GLOBAL_STATE static float *lfosh = (float *) NULL;
GLOBAL_STATE static float *lfosine = (float *) NULL;
GLOBAL_STATE static float *lfosquare = (float *) NULL;
GLOBAL_STATE static float *osc1ramp = (float *) NULL;
GLOBAL_STATE static float *osc1puls = (float *) NULL;
GLOBAL_STATE static float *osc2ramp = (float *) NULL;
GLOBAL_STATE static float *osc2puls = (float *) NULL;
GLOBAL_STATE static float *ringmod = (float *) NULL;
GLOBAL_STATE static float *scratch = (float *) NULL;

/*
* All buffers are going to be collapsed into a single 'megabuf', this will be
* used for all local information for every possible one of these voices. As
* such it might get big, but will allow for arbitrary buffering.
*/
static struct {
GLOBAL_STATE static struct {
float *buf;
float *outputs[128][ARP_OUTCNT]; /* offsets into buffer for data */
float *inputs[128][ARP_INCOUNT]; /* pointer offsets for input source */
Expand Down
20 changes: 10 additions & 10 deletions bristol/bristolaxxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
* audio threads, unless we ensure a single thread deals with any given algo
* type, since then they are only used sequentially.
*/
static float *freqbuf = (float *) NULL;
static float *filtbuf = (float *) NULL;
static float *noisebuf = (float *) NULL;
static float *adsrbuf = (float *) NULL;
static float *lfosh = (float *) NULL;
static float *lfosine = (float *) NULL;
static float *lfosquare = (float *) NULL;
static float *osc1buf = (float *) NULL;
static float *osc2buf = (float *) NULL;
static float *scratch = (float *) NULL;
GLOBAL_STATE static float *freqbuf = (float *) NULL;
GLOBAL_STATE static float *filtbuf = (float *) NULL;
GLOBAL_STATE static float *noisebuf = (float *) NULL;
GLOBAL_STATE static float *adsrbuf = (float *) NULL;
GLOBAL_STATE static float *lfosh = (float *) NULL;
GLOBAL_STATE static float *lfosine = (float *) NULL;
GLOBAL_STATE static float *lfosquare = (float *) NULL;
GLOBAL_STATE static float *osc1buf = (float *) NULL;
GLOBAL_STATE static float *osc2buf = (float *) NULL;
GLOBAL_STATE static float *scratch = (float *) NULL;

int
axxeController(Baudio *baudio, u_char operator, u_char controller, float value)
Expand Down
30 changes: 15 additions & 15 deletions bristol/bristolbitone.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ extern void mapVelocityCurve(int, float []);
* audio threads, unless we ensure a single thread deals with any given algo
* type, since then they are only used sequentially.
*/
static float *freqbuf = (float *) NULL;
static float *adsr1buf = (float *) NULL;
static float *adsr2buf = (float *) NULL;
static float *filtbuf = (float *) NULL;
static float *dco1buf = (float *) NULL;
static float *dco2buf = (float *) NULL;
static float *zerobuf = (float *) NULL;
static float *outbuf = (float *) NULL;
static float *lfo1buf = (float *) NULL;
static float *lfo2buf = (float *) NULL;
static float *noisebuf = (float *) NULL;
static float *scratchbuf = (float *) NULL;
static float *pwmbuf = (float *) NULL;
static float *syncbuf = (float *) NULL;
GLOBAL_STATE static float *freqbuf = (float *) NULL;
GLOBAL_STATE static float *adsr1buf = (float *) NULL;
GLOBAL_STATE static float *adsr2buf = (float *) NULL;
GLOBAL_STATE static float *filtbuf = (float *) NULL;
GLOBAL_STATE static float *dco1buf = (float *) NULL;
GLOBAL_STATE static float *dco2buf = (float *) NULL;
GLOBAL_STATE static float *zerobuf = (float *) NULL;
GLOBAL_STATE static float *outbuf = (float *) NULL;
GLOBAL_STATE static float *lfo1buf = (float *) NULL;
GLOBAL_STATE static float *lfo2buf = (float *) NULL;
GLOBAL_STATE static float *noisebuf = (float *) NULL;
GLOBAL_STATE static float *scratchbuf = (float *) NULL;
GLOBAL_STATE static float *pwmbuf = (float *) NULL;
GLOBAL_STATE static float *syncbuf = (float *) NULL;

/*
* These need to go into some local structure for multiple instances
Expand All @@ -68,7 +68,7 @@ static float *syncbuf = (float *) NULL;
#define BITONE_FM 0x00004000
#define BITONE_NO_DCO1 0x00008000

typedef struct bMods {
GLOBAL_STATE typedef struct bMods {
unsigned int flags;
float *lout;
float *rout;
Expand Down
28 changes: 14 additions & 14 deletions bristol/bristolcs80.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ extern void mapVelocityCurve(int, float []);
* audio threads, unless we ensure a single thread deals with any given algo
* type, since then they are only used sequentially.
*/
static float *freqbuf = (float *) NULL;
static float *adsr1buf = (float *) NULL;
static float *adsr2buf = (float *) NULL;
static float *filtbuf = (float *) NULL;
static float *dco1buf = (float *) NULL;
static float *zerobuf = (float *) NULL;
static float *outbuf = (float *) NULL;
static float *lfo1buf = (float *) NULL;
static float *lfo2buf = (float *) NULL;
static float *noisebuf = (float *) NULL;
static float *scratchbuf = (float *) NULL;
static float *pwmbuf = (float *) NULL;
static float *sinebuf = (float *) NULL;
static float *modbuf = (float *) NULL;
GLOBAL_STATE static float *freqbuf = (float *) NULL;
GLOBAL_STATE static float *adsr1buf = (float *) NULL;
GLOBAL_STATE static float *adsr2buf = (float *) NULL;
GLOBAL_STATE static float *filtbuf = (float *) NULL;
GLOBAL_STATE static float *dco1buf = (float *) NULL;
GLOBAL_STATE static float *zerobuf = (float *) NULL;
GLOBAL_STATE static float *outbuf = (float *) NULL;
GLOBAL_STATE static float *lfo1buf = (float *) NULL;
GLOBAL_STATE static float *lfo2buf = (float *) NULL;
GLOBAL_STATE static float *noisebuf = (float *) NULL;
GLOBAL_STATE static float *scratchbuf = (float *) NULL;
GLOBAL_STATE static float *pwmbuf = (float *) NULL;
GLOBAL_STATE static float *sinebuf = (float *) NULL;
GLOBAL_STATE static float *modbuf = (float *) NULL;

/*
* These need to go into some local structure for multiple instances
Expand Down
2 changes: 1 addition & 1 deletion bristol/bristoldx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

extern int bristolGlobalController(struct BAudio *, u_char, u_char, float);

float *lfobuf, *op0buf, *op1buf, *op2buf, *op3buf, *op4buf, *modbuf;
GLOBAL_STATE static float *lfobuf, *op0buf, *op1buf, *op2buf, *op3buf, *op4buf, *modbuf;

int
DXGlobalController(Baudio *baudio, u_char controller,
Expand Down
32 changes: 16 additions & 16 deletions bristol/bristolexplorer.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
#include "bristol.h"
#include "bristolexplorer.h"

static float *freqbuf = (float *) NULL;
static float *osc3buf = (float *) NULL;
static float *osc1buf = (float *) NULL;
static float *noisebuf = (float *) NULL;
static float *filtbuf = (float *) NULL;
static float *filtbuf2 = (float *) NULL;
static float *lfotri = (float *) NULL;
static float *lforamp = (float *) NULL;
static float *lfosh = (float *) NULL;
static float *adsrbuf = (float *) NULL;
static float *mbuf1 = (float *) NULL;
static float *mbuf2 = (float *) NULL;
static float *onbuf = (float *) NULL;
static float *zerobuf = (float *) NULL;
static float *syncbuf = (float *) NULL;
GLOBAL_STATE static float *freqbuf = (float *) NULL;
GLOBAL_STATE static float *osc3buf = (float *) NULL;
GLOBAL_STATE static float *osc1buf = (float *) NULL;
GLOBAL_STATE static float *noisebuf = (float *) NULL;
GLOBAL_STATE static float *filtbuf = (float *) NULL;
GLOBAL_STATE static float *filtbuf2 = (float *) NULL;
GLOBAL_STATE static float *lfotri = (float *) NULL;
GLOBAL_STATE static float *lforamp = (float *) NULL;
GLOBAL_STATE static float *lfosh = (float *) NULL;
GLOBAL_STATE static float *adsrbuf = (float *) NULL;
GLOBAL_STATE static float *mbuf1 = (float *) NULL;
GLOBAL_STATE static float *mbuf2 = (float *) NULL;
GLOBAL_STATE static float *onbuf = (float *) NULL;
GLOBAL_STATE static float *zerobuf = (float *) NULL;
GLOBAL_STATE static float *syncbuf = (float *) NULL;

extern int buildCurrentTable(Baudio *, float);

extern int s440holder;
GLOBAL_STATE extern int s440holder;

static int
expGlobalController(Baudio *baudio, u_char controller,
Expand Down
Loading