summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/synth.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/midi/synth.c')
-rw-r--r--apps/plugins/midi/synth.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 4e04975e0b..ca59c76a8b 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -43,12 +43,8 @@ void readTextBlock(int file, char * buf)
43 rb->lseek(file, -1, SEEK_CUR); 43 rb->lseek(file, -1, SEEK_CUR);
44} 44}
45 45
46/* Filename is the name of the config file */ 46void resetControllers()
47/* The MIDI file should have been loaded at this point */
48int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
49{ 47{
50 char patchUsed[128];
51 char drumUsed[128];
52 int a=0; 48 int a=0;
53 for(a=0; a<MAX_VOICES; a++) 49 for(a=0; a<MAX_VOICES; a++)
54 { 50 {
@@ -71,6 +67,18 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
71 chLastCtrlMSB[a]=0; /* Set to pitch bend depth */ 67 chLastCtrlMSB[a]=0; /* Set to pitch bend depth */
72 chLastCtrlLSB[a]=0; /* Set to pitch bend depth */ 68 chLastCtrlLSB[a]=0; /* Set to pitch bend depth */
73 } 69 }
70}
71
72/* Filename is the name of the config file */
73/* The MIDI file should have been loaded at this point */
74int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
75{
76 char patchUsed[128];
77 char drumUsed[128];
78 int a=0;
79
80 resetControllers();
81
74 for(a=0; a<128; a++) 82 for(a=0; a<128; a++)
75 { 83 {
76 patchSet[a]=NULL; 84 patchSet[a]=NULL;