Subversion Repositories svn.mios

Rev

Rev 505 | Rev 666 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 505 Rev 628
1
/*
1
/*
2
 * @(#)SIDV2librarian.java  beta1   2008/01/21
2
 * @(#)SIDV2librarian.java  beta1   2008/01/21
3
 *
3
 *
4
 * Copyright (C) 2008    Rutger Vlek (rutgervlek@hotmail.com)
4
 * Copyright (C) 2008    Rutger Vlek (rutgervlek@hotmail.com)
5
 *
5
 *
6
 * This application is free software; you can redistribute it and/or modify
6
 * This application is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 2 of the License, or
8
 * the Free Software Foundation; either version 2 of the License, or
9
 * (at your option) any later version.
9
 * (at your option) any later version.
10
 *
10
 *
11
 * This application is distributed in the hope that it will be useful,
11
 * This application is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
14
 * GNU General Public License for more details.
15
 *
15
 *
16
 * You should have received a copy of the GNU General Public License
16
 * You should have received a copy of the GNU General Public License
17
 * along with this application; if not, write to the Free Software
17
 * along with this application; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 */
19
 */
20
20
21
package org.midibox.sidedit;
21
package org.midibox.sidedit;
22
22
23
import java.awt.BorderLayout;
-
 
24
import java.util.Vector;
23
import java.util.Vector;
25
import org.midibox.sidedit.*;
-
 
26
import org.midibox.sidlibr.Patch;
-
 
27
24
28
import javax.sound.midi.Receiver;
25
import org.midibox.sidlibr.Patch;
29
import javax.swing.JToggleButton;
-
 
30
26
31
public class EngineSpecs { 
27
public class EngineSpecs {
32
    // Control types:
28
    // Control types:
33
    private static int rotary = 0;
29
    private static int rotary = 0;
34
    private static int button = 1;
30
    private static int button = 1;
35
    private static int simplebutton = 2;
31
    private static int simplebutton = 2;
36
    private static int slider = 3; 
32
    private static int slider = 3;
37
    private static int waveselect = 4; 
33
    private static int waveselect = 4;
38
    private static int lfoselect = 5;
34
    private static int lfoselect = 5;
39
    private static int combo = 6;
35
    private static int combo = 6;
40
   
36
41
    public static Vector getEngine(Patch patch) {
37
    public static Vector getEngine(Patch patch) {
42
        Vector engine = new Vector();
38
        Vector engine = new Vector();
43
        if (patch.getEngine() == patch.LEAD) {
39
        if (patch.getEngine() == patch.LEAD) {
44
            // Lead engine
40
            // Lead engine
45
            engine.add(createGlobal(patch,SIDSysexInfo.leadParams));    // 0: Global parameters
41
            engine.add(createGlobal(patch, SIDSysexInfo.leadParams)); // 0:
-
 
42
            // Global
-
 
43
            // parameters
46
            engine.add(createExt(patch));                               // 1: External parameters
44
            engine.add(createExt(patch)); // 1: External parameters
47
            engine.add(createFilter(patch,0));                          // 2: Filter Left
45
            engine.add(createFilter(patch, 0)); // 2: Filter Left
48
            engine.add(createFilter(patch,6));                          // 3: Filter right              
46
            engine.add(createFilter(patch, 6)); // 3: Filter right
49
            engine.add(LeadSpecs.createMSTR(patch));                    // 4: Master settings           
47
            engine.add(LeadSpecs.createMSTR(patch)); // 4: Master settings
50
            engine.add(createVoice(patch,0));                           // 5: Voice 1 Left
48
            engine.add(createVoice(patch, 0)); // 5: Voice 1 Left
51
            engine.add(createVoice(patch,16));                          // 6: Voice 2 Left
49
            engine.add(createVoice(patch, 16)); // 6: Voice 2 Left
52
            engine.add(createVoice(patch,32));                          // 7: Voice 3 Left
50
            engine.add(createVoice(patch, 32)); // 7: Voice 3 Left
53
            engine.add(createVoice(patch,48));                          // 8: Voice 4 Right
51
            engine.add(createVoice(patch, 48)); // 8: Voice 4 Right
54
            engine.add(createVoice(patch,64));                          // 9: Voice 5 Right
52
            engine.add(createVoice(patch, 64)); // 9: Voice 5 Right
55
            engine.add(createVoice(patch,80));                          //10: Voice 6 Right         
53
            engine.add(createVoice(patch, 80)); // 10: Voice 6 Right
56
            engine.add(LeadSpecs.createLFO(patch));                     //11: LFO's             
54
            engine.add(LeadSpecs.createLFO(patch)); // 11: LFO's
57
            engine.add(LeadSpecs.createENV(patch,0));                   //12: Envelope 1
55
            engine.add(LeadSpecs.createENV(patch, 0)); // 12: Envelope 1
58
            engine.add(LeadSpecs.createENV(patch,2));                   //13: Envelope 2            
56
            engine.add(LeadSpecs.createENV(patch, 2)); // 13: Envelope 2
59
            engine.add(LeadSpecs.createMOD(patch));                     //14: Modulation paths
57
            engine.add(LeadSpecs.createMOD(patch)); // 14: Modulation paths
60
            engine.add(LeadSpecs.createTRIG(patch));                    //15: Trigger matrix            
58
            engine.add(LeadSpecs.createTRIG(patch)); // 15: Trigger matrix
61
            engine.add(LeadSpecs.createWT(patch));                      //16: Wavetable sequencer
59
            engine.add(LeadSpecs.createWT(patch)); // 16: Wavetable sequencer
62
        }
-
 
63
        else if (patch.getEngine() == patch.BASSLINE) {
60
        } else if (patch.getEngine() == patch.BASSLINE) {
64
            // Bassline
61
            // Bassline
65
            engine.add(createGlobal(patch,SIDSysexInfo.basslineParams));// 0: Global parameters
62
            engine.add(createGlobal(patch, SIDSysexInfo.basslineParams));// 0:
-
 
63
            // Global
-
 
64
            // parameters
66
            engine.add(createExt(patch));                               // 1: External parameters
65
            engine.add(createExt(patch)); // 1: External parameters
67
            engine.add(createFilter(patch,0));                          // 2: Filter Left
66
            engine.add(createFilter(patch, 0)); // 2: Filter Left
68
            engine.add(createFilter(patch,6));                          // 3: Filter right  
67
            engine.add(createFilter(patch, 6)); // 3: Filter right
69
            engine.add(createVoice(patch,0));                           // 4: Left Oscillator
68
            engine.add(createVoice(patch, 0)); // 4: Left Oscillator
70
            engine.add(createVoice(patch,80));                          // 5: Right Oscillator          
69
            engine.add(createVoice(patch, 80)); // 5: Right Oscillator
71
            engine.add(BasslineSpecs.createMSTR(patch,0));              // 6: Left master set
70
            engine.add(BasslineSpecs.createMSTR(patch, 0)); // 6: Left master
-
 
71
            // set
72
            engine.add(BasslineSpecs.createMSTR(patch,80));             // 7: Right master set          
72
            engine.add(BasslineSpecs.createMSTR(patch, 80)); // 7: Right master
-
 
73
            // set
73
            engine.add(BasslineSpecs.createLFO(patch,0));               // 8: Left LFO's
74
            engine.add(BasslineSpecs.createLFO(patch, 0)); // 8: Left LFO's
74
            engine.add(BasslineSpecs.createLFO(patch,80));              // 9: Right LFO's
75
            engine.add(BasslineSpecs.createLFO(patch, 80)); // 9: Right LFO's
75
            engine.add(BasslineSpecs.createENV(patch,0));               //10: Left Envelope
76
            engine.add(BasslineSpecs.createENV(patch, 0)); // 10: Left Envelope
76
            engine.add(BasslineSpecs.createENV(patch,80));              //11: Right Envelope
77
            engine.add(BasslineSpecs.createENV(patch, 80)); // 11: Right
-
 
78
            // Envelope
77
            engine.add(BasslineSpecs.createSEQ(patch,0));               //12: Left Sequencer
79
            engine.add(BasslineSpecs.createSEQ(patch, 0)); // 12: Left Sequencer
78
            engine.add(BasslineSpecs.createSEQ(patch,80));              //13: Right Sequencer
80
            engine.add(BasslineSpecs.createSEQ(patch, 80)); // 13: Right
-
 
81
            // Sequencer
79
            engine.add(BasslineSpecs.createSEQData(patch));             //14: Sequencer data
82
            engine.add(BasslineSpecs.createSEQData(patch)); // 14: Sequencer
80
        }
83
            // data
81
        else if (patch.getEngine() == patch.DRUM) {
84
        } else if (patch.getEngine() == patch.DRUM) {
82
            // Drum
85
            // Drum
83
            engine.add(createGlobal(patch,SIDSysexInfo.drumParams));    // 0: Global parameters
86
            engine.add(createGlobal(patch, SIDSysexInfo.drumParams)); // 0:
-
 
87
            // Global
-
 
88
            // parameters
84
            engine.add(createExt(patch));                               // 1: External parameters
89
            engine.add(createExt(patch)); // 1: External parameters
85
            engine.add(createFilter(patch,0));                          // 2: Filter Left
90
            engine.add(createFilter(patch, 0)); // 2: Filter Left
86
            engine.add(createFilter(patch,6));                          // 3: Filter right
91
            engine.add(createFilter(patch, 6)); // 3: Filter right
87
            engine.add(DrumSpecs.createDrumInstr(patch));               // 4: Drum Instruments          
92
            engine.add(DrumSpecs.createDrumInstr(patch)); // 4: Drum Instruments
88
            engine.add(DrumSpecs.createSEQ(patch));                     // 5: Sequencer
93
            engine.add(DrumSpecs.createSEQ(patch)); // 5: Sequencer
89
            engine.add(DrumSpecs.createSEQData(patch));                 // 6: Sequencer data
94
            engine.add(DrumSpecs.createSEQData(patch)); // 6: Sequencer data
90
        }
-
 
91
        else if (patch.getEngine() == patch.MULTI) {
95
        } else if (patch.getEngine() == patch.MULTI) {
92
            // Multi
96
            // Multi
93
            engine.add(createGlobal(patch,SIDSysexInfo.multiParams));   // 0: Global parameters
97
            engine.add(createGlobal(patch, SIDSysexInfo.multiParams)); // 0:
-
 
98
            // Global
-
 
99
            // parameters
94
            engine.add(createExt(patch));                               // 1: External parameters
100
            engine.add(createExt(patch)); // 1: External parameters
95
            engine.add(createFilter(patch,0));                          // 2: Filter Left
101
            engine.add(createFilter(patch, 0)); // 2: Filter Left
96
            engine.add(createFilter(patch,6));                          // 3: Filter right                      
102
            engine.add(createFilter(patch, 6)); // 3: Filter right
97
            engine.add(createVoice(patch,0));                           // 4: Inst.1 Voice
103
            engine.add(createVoice(patch, 0)); // 4: Inst.1 Voice
98
            engine.add(createVoice(patch,48));                          // 5: Inst.2 Voice
104
            engine.add(createVoice(patch, 48)); // 5: Inst.2 Voice
99
            engine.add(createVoice(patch,96));                          // 6: Inst.3 Voice
105
            engine.add(createVoice(patch, 96)); // 6: Inst.3 Voice
100
            engine.add(createVoice(patch,144));                         // 7: Inst.4 Voice
106
            engine.add(createVoice(patch, 144)); // 7: Inst.4 Voice
101
            engine.add(createVoice(patch,192));                         // 8: Inst.5 Voice
107
            engine.add(createVoice(patch, 192)); // 8: Inst.5 Voice
102
            engine.add(createVoice(patch,240));                         // 9: Inst.6 Voice          
108
            engine.add(createVoice(patch, 240)); // 9: Inst.6 Voice
103
            engine.add(MultiSpecs.createInstrument(patch,0));           //10: Inst.1 Rest
109
            engine.add(MultiSpecs.createInstrument(patch, 0)); // 10: Inst.1
-
 
110
            // Rest
104
            engine.add(MultiSpecs.createInstrument(patch,48));          //11: Inst.2 Rest
111
            engine.add(MultiSpecs.createInstrument(patch, 48)); // 11: Inst.2
-
 
112
            // Rest
105
            engine.add(MultiSpecs.createInstrument(patch,96));          //12: Inst.3 Rest
113
            engine.add(MultiSpecs.createInstrument(patch, 96)); // 12: Inst.3
-
 
114
            // Rest
106
            engine.add(MultiSpecs.createInstrument(patch,144));         //13: Inst.4 Rest
115
            engine.add(MultiSpecs.createInstrument(patch, 144)); // 13: Inst.4
-
 
116
            // Rest
107
            engine.add(MultiSpecs.createInstrument(patch,192));         //14: Inst.5 Rest
117
            engine.add(MultiSpecs.createInstrument(patch, 192)); // 14: Inst.5
-
 
118
            // Rest
108
            engine.add(MultiSpecs.createInstrument(patch,240));         //15: Inst.6 Rest
119
            engine.add(MultiSpecs.createInstrument(patch, 240)); // 15: Inst.6
-
 
120
            // Rest
109
            engine.add(MultiSpecs.createWTdata(patch));                 //16: Wavetable data            
121
            engine.add(MultiSpecs.createWTdata(patch)); // 16: Wavetable data
110
        }      
122
        }
111
        return engine;
123
        return engine;
112
    }
124
    }
113
       
125
114
    private static Vector createGlobal(Patch patch, String[] engineParams) {
126
    private static Vector createGlobal(Patch patch, String[] engineParams) {
115
        Vector globalControl = new Vector();
127
        Vector globalControl = new Vector();
116
128
117
        globalControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.sidRestrict,patch,17,0,2,"SID type","SID chip type to be used"));
129
        globalControl.add(new SIDSysexParameterControl(combo,
-
 
130
                SIDSysexInfo.sidRestrict, patch, 17, 0, 2, "SID type",
-
 
131
                "SID chip type to be used"));
118
        globalControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.monoStereo,patch,17,3,1,"Stereo","Stereo/Mono type to be used "));
132
        globalControl.add(new SIDSysexParameterControl(combo,
-
 
133
                SIDSysexInfo.monoStereo, patch, 17, 3, 1, "Stereo",
-
 
134
                "Stereo/Mono type to be used "));
119
        globalControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.caps,patch,17,4,4,"Filter caps","Type of filter capacitors to be used"));
135
        globalControl.add(new SIDSysexParameterControl(combo,
-
 
136
                SIDSysexInfo.caps, patch, 17, 4, 4, "Filter caps",
-
 
137
                "Type of filter capacitors to be used"));
120
        globalControl.add(new SIDSysexParameterControl(button,null,patch,18,0,1,"ABW","Workaround for the SID's ADSR-bug"));
138
        globalControl.add(new SIDSysexParameterControl(button, null, patch, 18,
-
 
139
                0, 1, "ABW", "Workaround for the SID's ADSR-bug"));
121
        globalControl.add(new SIDSysexParameterControl(rotary,null,patch,82,0,7,"Volume"));
140
        globalControl.add(new SIDSysexParameterControl(rotary, null, patch, 82,
-
 
141
                0, 7, "Volume"));
122
       
142
123
        for (int c = 0; c <8; c++) {
143
        for (int c = 0; c < 8; c++) {
124
            globalControl.add(new SIDSysexParameterControl(combo,engineParams,patch,24+(5*c),0,8,"Assign 1","Assign this control to a parameter"));
144
            globalControl.add(new SIDSysexParameterControl(combo, engineParams,
-
 
145
                    patch, 24 + (5 * c), 0, 8, "Assign 1",
-
 
146
                    "Assign this control to a parameter"));
125
            globalControl.add(new SIDSysexParameterControl(combo,engineParams,patch,25+(5*c),0,8,"Assign 2","Assign this control to a parameter"));
147
            globalControl.add(new SIDSysexParameterControl(combo, engineParams,
-
 
148
                    patch, 25 + (5 * c), 0, 8, "Assign 2",
-
 
149
                    "Assign this control to a parameter"));
126
            globalControl.add(new SIDSysexParameterControl(rotary,null,patch,26+(5*c),0,8,"Init.","Initial value"));
150
            globalControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
151
                    26 + (5 * c), 0, 8, "Init.", "Initial value"));
127
            globalControl.add(new SIDSysexParameterControl(rotary,null,patch,27+(5*c),0,8,"Min.","Minimum value"));
152
            globalControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
153
                    27 + (5 * c), 0, 8, "Min.", "Minimum value"));
128
            globalControl.add(new SIDSysexParameterControl(rotary,null,patch,28+(5*c),0,8,"Max.","Maximum value"));
154
            globalControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
155
                    28 + (5 * c), 0, 8, "Max.", "Maximum value"));
129
        }
156
        }
130
       
157
131
        return globalControl;
158
        return globalControl;
132
    }
159
    }
133
   
160
134
    private static Vector createVoice(Patch patch, int offset) {
161
    private static Vector createVoice(Patch patch, int offset) {
135
        Vector voiceControl = new Vector();
162
        Vector voiceControl = new Vector();
136
        // Single voice
163
        // Single voice
137
        voiceControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.porta,patch,96+offset,0,2,"Portamento","Portamento type"));
164
        voiceControl.add(new SIDSysexParameterControl(combo,
-
 
165
                SIDSysexInfo.porta, patch, 96 + offset, 0, 2, "Portamento",
-
 
166
                "Portamento type"));
138
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,96+offset,2,1,"GAE","Gate Always Enabled"));       
167
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
168
                96 + offset, 2, 1, "GAE", "Gate Always Enabled"));
139
        voiceControl.add(new SIDSysexParameterControl(waveselect,null,patch,97+offset,0,8,"Waveform","Select a waveform"));    
169
        voiceControl.add(new SIDSysexParameterControl(waveselect, null, patch,
-
 
170
                97 + offset, 0, 8, "Waveform", "Select a waveform"));
140
        voiceControl.add(new SIDSysexParameterControl(slider,null,patch,98+offset,4,4,"Attack","SID's DCA Attack rate"));
171
        voiceControl.add(new SIDSysexParameterControl(slider, null, patch,
-
 
172
                98 + offset, 4, 4, "Attack", "SID's DCA Attack rate"));
141
        voiceControl.add(new SIDSysexParameterControl(slider,null,patch,98+offset,0,4,"Decay","SID's DCA Decay rate"));
173
        voiceControl.add(new SIDSysexParameterControl(slider, null, patch,
-
 
174
                98 + offset, 0, 4, "Decay", "SID's DCA Decay rate"));
142
        voiceControl.add(new SIDSysexParameterControl(slider,null,patch,99+offset,4,4,"Sustain","SID's DCA Sustain level"));
175
        voiceControl.add(new SIDSysexParameterControl(slider, null, patch,
-
 
176
                99 + offset, 4, 4, "Sustain", "SID's DCA Sustain level"));
143
        voiceControl.add(new SIDSysexParameterControl(slider,null,patch,99+offset,0,4,"Release","SID's DCA Release rate"));    
177
        voiceControl.add(new SIDSysexParameterControl(slider, null, patch,
-
 
178
                99 + offset, 0, 4, "Release", "SID's DCA Release rate"));
144
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,100+offset,0,12,"Pulse Width","Pulse Width"));
179
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
180
                100 + offset, 0, 12, "Pulse Width", "Pulse Width"));
145
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,102+offset,0,8,"Accent","Bassline Accent")); // SwinSID Phase...
181
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
182
                102 + offset, 0, 8, "Accent", "Bassline Accent")); // SwinSID
-
 
183
        // Phase...
146
        voiceControl.add(new SIDSysexParameterControl(slider,null,patch,103+offset,0,8,"Delay","DCA Envelope delay"));
184
        voiceControl.add(new SIDSysexParameterControl(slider, null, patch,
-
 
185
                103 + offset, 0, 8, "Delay", "DCA Envelope delay"));
147
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,104+offset,0,-7,"Transpose"));
186
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
187
                104 + offset, 0, -7, "Transpose"));
148
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,105+offset,0,-8,"Finetune"));
188
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
189
                105 + offset, 0, -8, "Finetune"));
149
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,106+offset,0,7,"Pitchrange","Range of the Pitch Bender"));
190
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
191
                106 + offset, 0, 7, "Pitchrange", "Range of the Pitch Bender"));
150
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,107+offset,0,8,"Porta. Rate","Portamento speed"));
192
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
193
                107 + offset, 0, 8, "Porta. Rate", "Portamento speed"));
151
        //Arpeggiator
194
        // Arpeggiator
152
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,108+offset,0,1,"Arp On/Off","Enables/disables the arpeggiator"));
195
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
196
                108 + offset, 0, 1, "Arp On/Off",
-
 
197
                "Enables/disables the arpeggiator"));
-
 
198
        voiceControl.add(new SIDSysexParameterControl(combo,
153
        voiceControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.direction,patch,108+offset,1,3,"Direction","Direction of the arpeggio"));
199
                SIDSysexInfo.direction, patch, 108 + offset, 1, 3, "Direction",
-
 
200
                "Direction of the arpeggio"));
154
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,108+offset,4,1,"Sorted","Sort notes"));
201
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
202
                108 + offset, 4, 1, "Sorted", "Sort notes"));
155
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,108+offset,5,1,"Hold","Hold the last arpeggio"));
203
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
204
                108 + offset, 5, 1, "Hold", "Hold the last arpeggio"));
-
 
205
        voiceControl
156
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,108+offset,6,1,"Key Sync","Synchronize with key presses"));
206
                .add(new SIDSysexParameterControl(button, null, patch,
-
 
207
                        108 + offset, 6, 1, "Key Sync",
-
 
208
                        "Synchronize with key presses"));
157
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,108+offset,7,1,"Constant Cycle","Constant arpeggiator cycle"));
209
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
210
                108 + offset, 7, 1, "Constant Cycle",
-
 
211
                "Constant arpeggiator cycle"));
158
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,109+offset,0,6,"Speed Divider","Speed divider (sets the tempo)"));
212
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
213
                109 + offset, 0, 6, "Speed Divider",
-
 
214
                "Speed divider (sets the tempo)"));
159
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,109+offset,7,1,"Oneshot"));
215
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
216
                109 + offset, 7, 1, "Oneshot"));
160
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,110+offset,0,5,"Gatelength"));
217
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
218
                110 + offset, 0, 5, "Gatelength"));
161
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,110+offset,5,3,"Octave Range"));
219
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
220
                110 + offset, 5, 3, "Octave Range"));
162
        //SwinSID
221
        // SwinSID
163
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,111+offset,0,4,"Waveform OSC2","Waveform of second oscillator"));
222
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
223
                111 + offset, 0, 4, "Waveform OSC2",
-
 
224
                "Waveform of second oscillator"));
164
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,111+offset,4,1,"Enable OSC2","Enable second oscillator"));
225
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
226
                111 + offset, 4, 1, "Enable OSC2", "Enable second oscillator"));
165
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,111+offset,5,1,"x2 pitch","scale pitch"));
227
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
228
                111 + offset, 5, 1, "x2 pitch", "scale pitch"));
166
        voiceControl.add(new SIDSysexParameterControl(button,null,patch,111+offset,6,1,"Rev. Waveform","Reverse Waveform"));   
229
        voiceControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
230
                111 + offset, 6, 1, "Rev. Waveform", "Reverse Waveform"));
167
        voiceControl.add(new SIDSysexParameterControl(rotary,null,patch,102+offset,0,8,"Phase"));
231
        voiceControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
232
                102 + offset, 0, 8, "Phase"));
168
        return voiceControl;
233
        return voiceControl;
169
    }
234
    }
170
   
235
171
    private static Vector createFilter(Patch patch, int offset) {
236
    private static Vector createFilter(Patch patch, int offset) {
172
        Vector filterControl = new Vector();
237
        Vector filterControl = new Vector();
173
        filterControl.add(new SIDSysexParameterControl(rotary,null,patch,85+offset,0,12,"Cutoff","Cutoff frequency"));
238
        filterControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
239
                85 + offset, 0, 12, "Cutoff", "Cutoff frequency"));
174
        filterControl.add(new SIDSysexParameterControl(rotary,null,patch,87+offset,0,8,"Resonance"));
240
        filterControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
241
                87 + offset, 0, 8, "Resonance"));
175
        filterControl.add(new SIDSysexParameterControl(rotary,null,patch,88+offset,0,8,"Keytrack","Key tracking"));
242
        filterControl.add(new SIDSysexParameterControl(rotary, null, patch,
-
 
243
                88 + offset, 0, 8, "Keytrack", "Key tracking"));
176
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,0,1,"OSC1->Filt","OSC1 routed through filter"));
244
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
245
                84 + offset, 0, 1, "OSC1->Filt", "OSC1 routed through filter"));
177
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,1,1,"OSC2->Filt","OSC2 routed through filter"));
246
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
247
                84 + offset, 1, 1, "OSC2->Filt", "OSC2 routed through filter"));
178
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,2,1,"OSC3->Filt","OSC3 routed through filter"));
248
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
249
                84 + offset, 2, 1, "OSC3->Filt", "OSC3 routed through filter"));
179
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,3,1,"EXT->Filter","External input routed through filter"));
250
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
251
                84 + offset, 3, 1, "EXT->Filter",
-
 
252
                "External input routed through filter"));
180
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,4,1,"Low  Pass","Low pass filter"));
253
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
254
                84 + offset, 4, 1, "Low  Pass", "Low pass filter"));
181
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,5,1,"Band Pass","Band pass filter"));
255
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
256
                84 + offset, 5, 1, "Band Pass", "Band pass filter"));
182
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,6,1,"High Pass","High pass filter"));
257
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
258
                84 + offset, 6, 1, "High Pass", "High pass filter"));
183
        filterControl.add(new SIDSysexParameterControl(button,null,patch,84+offset,7,1,"OSC3 off","Turn off oscillator 3"));       
259
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
260
                84 + offset, 7, 1, "OSC3 off", "Turn off oscillator 3"));
184
        filterControl.add(new SIDSysexParameterControl(button,null,patch,86+offset,7,1,"FIP","Filter Interpolation"));
261
        filterControl.add(new SIDSysexParameterControl(button, null, patch,
-
 
262
                86 + offset, 7, 1, "FIP", "Filter Interpolation"));
185
        return filterControl;
263
        return filterControl;
186
    }
264
    }
187
   
265
188
    private static Vector createExt(Patch patch) {
266
    private static Vector createExt(Patch patch) {
189
        Vector extControl = new Vector();
267
        Vector extControl = new Vector();
190
        // External switches 1-8
268
        // External switches 1-8
191
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,7,1,"Switch 1","External Switch 1"));
269
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 7,
-
 
270
                1, "Switch 1", "External Switch 1"));
192
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,6,1,"Switch 2","External Switch 2"));
271
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 6,
-
 
272
                1, "Switch 2", "External Switch 2"));
193
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,5,1,"Switch 3","External Switch 3"));
273
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 5,
-
 
274
                1, "Switch 3", "External Switch 3"));
194
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,4,1,"Switch 4","External Switch 4"));
275
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 4,
-
 
276
                1, "Switch 4", "External Switch 4"));
195
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,3,1,"Switch 5","External Switch 5"));
277
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 3,
-
 
278
                1, "Switch 5", "External Switch 5"));
196
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,2,1,"Switch 6","External Switch 6"));
279
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 2,
-
 
280
                1, "Switch 6", "External Switch 6"));
197
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,1,1,"Switch 7","External Switch 7"));
281
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 1,
-
 
282
                1, "Switch 7", "External Switch 7"));
198
        extControl.add(new SIDSysexParameterControl(button,null,patch,20,0,1,"Switch 8","External Switch 8"));
283
        extControl.add(new SIDSysexParameterControl(button, null, patch, 20, 0,
-
 
284
                1, "Switch 8", "External Switch 8"));
199
        // External Parameter CV 1-8
285
        // External Parameter CV 1-8
200
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,64,0,16,"Ext.CV 1","External Parameter CV 1"));
286
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 64, 0,
-
 
287
                16, "Ext.CV 1", "External Parameter CV 1"));
201
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,66,0,16,"Ext.CV 2","External Parameter CV 2"));
288
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 66, 0,
-
 
289
                16, "Ext.CV 2", "External Parameter CV 2"));
202
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,68,0,16,"Ext.CV 3","External Parameter CV 3"));
290
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 68, 0,
-
 
291
                16, "Ext.CV 3", "External Parameter CV 3"));
203
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,70,0,16,"Ext.CV 4","External Parameter CV 4"));
292
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 70, 0,
-
 
293
                16, "Ext.CV 4", "External Parameter CV 4"));
204
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,72,0,16,"Ext.CV 5","External Parameter CV 5"));
294
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 72, 0,
-
 
295
                16, "Ext.CV 5", "External Parameter CV 5"));
205
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,74,0,16,"Ext.CV 6","External Parameter CV 6"));
296
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 74, 0,
-
 
297
                16, "Ext.CV 6", "External Parameter CV 6"));
206
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,76,0,16,"Ext.CV 7","External Parameter CV 7"));
298
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 76, 0,
-
 
299
                16, "Ext.CV 7", "External Parameter CV 7"));
207
        extControl.add(new SIDSysexParameterControl(rotary,null,patch,78,0,16,"Ext.CV 8","External Parameter CV 8"));
300
        extControl.add(new SIDSysexParameterControl(rotary, null, patch, 78, 0,
-
 
301
                16, "Ext.CV 8", "External Parameter CV 8"));
208
        return extControl;
302
        return extControl;
209
    }
303
    }
210
   
-
 
211
   
-
 
212
   
304
213
}
305
}