Subversion Repositories svn.mios

Rev

Rev 712 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 712 Rev 738
Line 36... Line 36...
36
    private static int simplerotary = 7;
36
    private static int simplerotary = 7;
37
    private static int radio = 8;
37
    private static int radio = 8;
38
38
39
    public static Vector createMSTR(Patch patch, int offset) {
39
    public static Vector createMSTR(Patch patch, int offset) {
40
        Vector basslineControl = new Vector();
40
        Vector basslineControl = new Vector();
41
        basslineControl.add(new SIDSysexParameterControl(button, null, 0, patch, 112 + offset, 0, 1, "Legato"));
41
        basslineControl.add(new SIDSysexParameterControl(button, null, 0,
-
 
42
                patch, 112 + offset, 0, 1, "Legato"));
-
 
43
        basslineControl
-
 
44
                .add(new SIDSysexParameterControl(button, null, 0, patch,
42
        basslineControl.add(new SIDSysexParameterControl(button, null, 0, patch, 112 + offset, 2, 1, "Fing.Porta","Fingered Portamento"));
45
                        112 + offset, 2, 1, "Fing.Porta", "Fingered Portamento"));
43
        basslineControl.add(new SIDSysexParameterControl(button, null, 0, patch, 112 + offset, 1, 1, "Manual/Seq", "MIDI Note playing/Sequencer mode"));
46
        basslineControl.add(new SIDSysexParameterControl(button, null, 0,
-
 
47
                patch, 112 + offset, 1, 1, "Manual/Seq",
-
 
48
                "MIDI Note playing/Sequencer mode"));
44
        basslineControl.add(new SIDSysexParameterControl(button, null, 0, patch, 112 + offset, 3, 1, "Phase Sync", "Oscillator phase synchronisation"));
49
        basslineControl.add(new SIDSysexParameterControl(button, null, 0,
-
 
50
                patch, 112 + offset, 3, 1, "Phase Sync",
-
 
51
                "Oscillator phase synchronisation"));
45
        // OSC2
52
        // OSC2
46
        basslineControl.add(new SIDSysexParameterControl(waveselect, null, 0, patch, 160 + offset, 0, 8, "Waveform", "Select a waveform"));
53
        basslineControl.add(new SIDSysexParameterControl(waveselect, null, 0,
-
 
54
                patch, 160 + offset, 0, 8, "Waveform", "Select a waveform"));
47
        basslineControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 161 + offset, 0, 12, "Pulse Width", "Pulse Width"));
55
        basslineControl.add(new SIDSysexParameterControl(rotary, null, 0,
-
 
56
                patch, 161 + offset, 0, 12, "Pulse Width", "Pulse Width"));
-
 
57
        basslineControl.add(new SIDSysexParameterControl(rotary,
-
 
58
                SIDSysexInfo.bassOctaves, 0, patch, 163 + offset, 0, 3,
-
 
59
                "Octave"));
48
        basslineControl.add(new SIDSysexParameterControl(rotary, SIDSysexInfo.bassOctaves, 0, patch, 163 + offset, 0, 3, "Octave"));
60
        basslineControl.add(new SIDSysexParameterControl(rotary,
49
        basslineControl.add(new SIDSysexParameterControl(rotary, createStatic(), 0, patch, 164 + offset, 0, 7, "Static note"));
61
                createStatic(), 0, patch, 164 + offset, 0, 7, "Static note"));
50
        // OSC3
62
        // OSC3
51
        basslineControl.add(new SIDSysexParameterControl(waveselect, null, 0, patch, 168 + offset, 0, 8, "Waveform", "Select a waveform"));
63
        basslineControl.add(new SIDSysexParameterControl(waveselect, null, 0,
-
 
64
                patch, 168 + offset, 0, 8, "Waveform", "Select a waveform"));
52
        basslineControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 169 + offset, 0, 12, "Pulse Width", "Pulse Width"));
65
        basslineControl.add(new SIDSysexParameterControl(rotary, null, 0,
-
 
66
                patch, 169 + offset, 0, 12, "Pulse Width", "Pulse Width"));
-
 
67
        basslineControl.add(new SIDSysexParameterControl(rotary,
-
 
68
                SIDSysexInfo.bassOctaves, 0, patch, 171 + offset, 0, 3,
-
 
69
                "Octave"));
53
        basslineControl.add(new SIDSysexParameterControl(rotary, SIDSysexInfo.bassOctaves, 0, patch, 171 + offset, 0, 3, "Octave"));
70
        basslineControl.add(new SIDSysexParameterControl(rotary,
54
        basslineControl.add(new SIDSysexParameterControl(rotary, createStatic(), 0, patch, 172 + offset, 0, 7, "Static note"));
71
                createStatic(), 0, patch, 172 + offset, 0, 7, "Static note"));
55
   
72
56
        return basslineControl;
73
        return basslineControl;
57
    }
74
    }
58
   
75
59
    public static Vector createMSTRBOTH(Patch patch) {
76
    public static Vector createMSTRBOTH(Patch patch) {
60
        Vector masterBoth = new Vector();
77
        Vector masterBoth = new Vector();
61
        masterBoth.add(new SIDSysexParameterControl(rotary, null, 0, patch, 81, 0, 8, "Detune","Oscillators Detune"));
78
        masterBoth.add(new SIDSysexParameterControl(rotary, null, 0, patch, 81,
-
 
79
                0, 8, "Detune", "Oscillators Detune"));
62
        masterBoth.add(new SIDSysexParameterControl(rotary, null, 0, patch, 83, 0, 8, "Phase Offset", "Oscillators Phase Offset"));
80
        masterBoth.add(new SIDSysexParameterControl(rotary, null, 0, patch, 83,
-
 
81
                0, 8, "Phase Offset", "Oscillators Phase Offset"));
63
        return masterBoth;
82
        return masterBoth;
64
    }
83
    }
65
84
66
    public static Vector createLFO(Patch patch, int offset) {
85
    public static Vector createLFO(Patch patch, int offset) {
67
        Vector lfoControl = new Vector();
86
        Vector lfoControl = new Vector();
68
        // LFO1
87
        // LFO1
69
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 116 + offset, 0, 1, "On/Off", "Enable/disable LFO"));
88
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
89
                116 + offset, 0, 1, "On/Off", "Enable/disable LFO"));
70
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 116 + offset, 1, 1, "Key Sync", "Key synchronisation"));
90
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
91
                116 + offset, 1, 1, "Key Sync", "Key synchronisation"));
-
 
92
        lfoControl
71
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 116 + offset, 2, 1, "MIDI Sync", "Global clock synchronisation"));
93
                .add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
94
                        116 + offset, 2, 1, "MIDI Sync",
-
 
95
                        "Global clock synchronisation"));
72
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 116 + offset, 3, 1, "Oneshot", "Oneshot mode"));
96
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
97
                116 + offset, 3, 1, "Oneshot", "Oneshot mode"));
73
        lfoControl.add(new SIDSysexParameterControl(lfoselect, null, 0, patch, 116 + offset, 4, 4, "Waveform"));
98
        lfoControl.add(new SIDSysexParameterControl(lfoselect, null, 0, patch,
-
 
99
                116 + offset, 4, 4, "Waveform"));
74
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 117 + offset, 0, 8, "Pitch Depth", "Pitch modulation depth"));
100
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
101
                117 + offset, 0, 8, "Pitch Depth", "Pitch modulation depth"));
75
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 118 + offset, 0, 8, "Rate")); // Let op CSn flag!
102
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
103
                118 + offset, 0, 8, "Rate")); // Let op CSn flag!
76
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 119 + offset, 0, 8, "Delay"));
104
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
105
                119 + offset, 0, 8, "Delay"));
77
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 120 + offset, 0, 8, "Phase"));
106
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
107
                120 + offset, 0, 8, "Phase"));
-
 
108
        lfoControl
78
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,  121 + offset, 0, 8, "PWM depth", "Pulse width modulation depth"));
109
                .add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
110
                        121 + offset, 0, 8, "PWM depth",
-
 
111
                        "Pulse width modulation depth"));
79
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 122 + offset, 0, 8, "Cutoff depth","Filter cutoff modulation depth"));
112
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
113
                122 + offset, 0, 8, "Cutoff depth",
-
 
114
                "Filter cutoff modulation depth"));
80
        // LFO2
115
        // LFO2
81
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 123 + offset, 0, 1, "On/Off", "Enable/disable LFO"));
116
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
117
                123 + offset, 0, 1, "On/Off", "Enable/disable LFO"));
82
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 116 + offset, 1, 1, "Key Sync", "Key synchronisation"));
118
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
119
                116 + offset, 1, 1, "Key Sync", "Key synchronisation"));
-
 
120
        lfoControl
83
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 123 + offset, 2, 1, "MIDI Sync", "Global clock synchronisation"));
121
                .add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
122
                        123 + offset, 2, 1, "MIDI Sync",
-
 
123
                        "Global clock synchronisation"));
84
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch, 123 + offset, 3, 1, "Oneshot", "One shot mode"));
124
        lfoControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
125
                123 + offset, 3, 1, "Oneshot", "One shot mode"));
85
        lfoControl.add(new SIDSysexParameterControl(lfoselect, null, 0, patch, 123 + offset, 4, 4, "Waveform"));
126
        lfoControl.add(new SIDSysexParameterControl(lfoselect, null, 0, patch,
-
 
127
                123 + offset, 4, 4, "Waveform"));
86
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 124 + offset, 0, 8, "Pitch Depth", "Pitch modulation depth"));
128
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
129
                124 + offset, 0, 8, "Pitch Depth", "Pitch modulation depth"));
87
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 125 + offset, 0, 8, "Rate"));
130
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
131
                125 + offset, 0, 8, "Rate"));
88
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 126 + offset, 0, 8, "Delay"));
132
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
133
                126 + offset, 0, 8, "Delay"));
89
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 127 + offset, 0, 8, "Phase"));
134
        lfoControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
135
                127 + offset, 0, 8, "Phase"));
-
 
136
        lfoControl
90
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 128 + offset, 0, 8, "PWM Depth", "Pulse width modulation depth"));
137
                .add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
138
                        128 + offset, 0, 8, "PWM Depth",
-
 
139
                        "Pulse width modulation depth"));
91
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 129 + offset, 0, 8, "Cutoff Depth", "Filter cutoff modulation depth"));
140
        lfoControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
141
                129 + offset, 0, 8, "Cutoff Depth",
-
 
142
                "Filter cutoff modulation depth"));
92
        return lfoControl;
143
        return lfoControl;
93
    }
144
    }
94
145
95
    public static Vector createENV(Patch patch, int offset) {
146
    public static Vector createENV(Patch patch, int offset) {
96
        Vector envControl = new Vector();
147
        Vector envControl = new Vector();
97
        // Envelope
148
        // Envelope
98
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch, 130 + offset, 4, 1, "Curve to Attack", "Curve assigned to Attack rate"));
149
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
150
                130 + offset, 4, 1, "Curve to Attack",
-
 
151
                "Curve assigned to Attack rate"));
99
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch, 130 + offset, 5, 1, "Curve to Decay", "Curve assigned to Decay rate"));
152
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
153
                130 + offset, 5, 1, "Curve to Decay",
-
 
154
                "Curve assigned to Decay rate"));
100
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch, 130 + offset, 6, 1, "Curve to Sustain", "Curve assigned to Sustain rate"));
155
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
156
                130 + offset, 6, 1, "Curve to Sustain",
-
 
157
                "Curve assigned to Sustain rate"));
-
 
158
        envControl
101
        envControl.add(new SIDSysexParameterControl(button, null, 0, patch, 130 + offset, 7, 1, "MIDI Sync", "Global clock synchronisation"));
159
                .add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
160
                        130 + offset, 7, 1, "MIDI Sync",
-
 
161
                        "Global clock synchronisation"));
102
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 131 + offset, 0, 8, "Depth Pitch", "Pitch modulation depth"));
162
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
163
                131 + offset, 0, 8, "Depth Pitch", "Pitch modulation depth"));
-
 
164
        envControl
103
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 132 + offset, 0, 8, "Depth PWM", "Pulse width modulation depth"));
165
                .add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
166
                        132 + offset, 0, 8, "Depth PWM",
-
 
167
                        "Pulse width modulation depth"));
104
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 133 + offset, 0, 8, "Depth Cutoff", "Filter cutoff modulation depth"));
168
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
169
                133 + offset, 0, 8, "Depth Cutoff",
-
 
170
                "Filter cutoff modulation depth"));
105
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch, 134 + offset, 0, 8, "Attack", "Attack rate"));
171
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch,
-
 
172
                134 + offset, 0, 8, "Attack", "Attack rate"));
106
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch, 135 + offset, 0, 8, "Decay", "Decay rate"));
173
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch,
-
 
174
                135 + offset, 0, 8, "Decay", "Decay rate"));
107
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch, 136 + offset, 0, 8, "Sustain", "Sustain level"));
175
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch,
-
 
176
                136 + offset, 0, 8, "Sustain", "Sustain level"));
108
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch, 137 + offset, 0, 8, "Release", "Release rate"));
177
        envControl.add(new SIDSysexParameterControl(slider, null, 0, patch,
-
 
178
                137 + offset, 0, 8, "Release", "Release rate"));
109
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch, 138 + offset, 0, 8, "Curve"));
179
        envControl.add(new SIDSysexParameterControl(rotary, null, -128, patch,
-
 
180
                138 + offset, 0, 8, "Curve"));
110
        envControl.add(new SIDSysexParameterControl(rotary, null, 0, patch, 144 + offset, 0, 8, "Accent Decay","Decay rate used on accented notes"));
181
        envControl.add(new SIDSysexParameterControl(rotary, null, 0, patch,
-
 
182
                144 + offset, 0, 8, "Accent Decay",
-
 
183
                "Decay rate used on accented notes"));
111
        return envControl;
184
        return envControl;
112
    }
185
    }
113
186
114
    public static Vector createSEQ(Patch patch, int offset) {
187
    public static Vector createSEQ(Patch patch, int offset) {
115
        Vector seqControl = new Vector();
188
        Vector seqControl = new Vector();
116
        // Sequencer
189
        // Sequencer
117
        seqControl.add(new SIDSysexParameterControl(rotary, createDividers(), 0, patch, 139 + offset, 0, 6, "Clock Divider", "Clock divider (sets tempo)"));
190
        seqControl.add(new SIDSysexParameterControl(rotary, createDividers(),
-
 
191
                0, patch, 139 + offset, 0, 6, "Clock Divider",
-
 
192
                "Clock divider (sets tempo)"));
118
        seqControl.add(new SIDSysexParameterControl(button, null, 0, patch, 139 + offset, 7, 1, "Pattern Sync", "Pattern changes synchronised to measure"));
193
        seqControl.add(new SIDSysexParameterControl(button, null, 0, patch,
-
 
194
                139 + offset, 7, 1, "Pattern Sync",
-
 
195
                "Pattern changes synchronised to measure"));
119
        seqControl.add(new SIDSysexParameterControl(radio, new String[]{"#1","#2","#3","#4","#5","#6","#7","#8","OFF"}, 0, patch, 140 + offset, 0, 4, "Sequence", "Sequencer number"));
196
        seqControl.add(new SIDSysexParameterControl(radio, new String[] { "#1",
-
 
197
                "#2", "#3", "#4", "#5", "#6", "#7", "#8", "OFF" }, 0, patch,
-
 
198
                140 + offset, 0, 4, "Sequence", "Sequencer number"));
120
        seqControl.add(new SIDSysexParameterControl(rotary, createSteps(), 0, patch, 141 + offset, 0, 4, "Steps", "Number of steps"));
199
        seqControl.add(new SIDSysexParameterControl(rotary, createSteps(), 0,
-
 
200
                patch, 141 + offset, 0, 4, "Steps", "Number of steps"));
-
 
201
        seqControl.add(new SIDSysexParameterControl(combo,
121
        seqControl.add(new SIDSysexParameterControl(combo, SIDSysexInfo.basslineParams, 0, patch, 142 + offset, 0, 8, "Assign"));
202
                SIDSysexInfo.basslineParams, 0, patch, 142 + offset, 0, 8,
-
 
203
                "Assign"));
122
        return seqControl;
204
        return seqControl;
123
    }
205
    }
124
206
125
    public static Vector createSEQData(Patch patch) {
207
    public static Vector createSEQData(Patch patch) {
126
        Vector seqDataControl = new Vector();
208
        Vector seqDataControl = new Vector();
127
        // Sequencer data
209
        // Sequencer data
128
        for (int i = 0; i < 16 * 8; i++) {
210
        for (int i = 0; i < 16 * 8; i++) {
129
            seqDataControl.add(new SIDSysexParameterControl(simplerotary, null, 0, patch, 256 + i, 0, 4, "Note"));
211
            seqDataControl.add(new SIDSysexParameterControl(simplerotary, null,
-
 
212
                    0, patch, 256 + i, 0, 4, "Note"));
130
            seqDataControl.add(new SIDSysexParameterControl(simplerotary, SIDSysexInfo.octaves, 0, patch, 256 + i, 4, 2, "Oct", "Octave"));
213
            seqDataControl.add(new SIDSysexParameterControl(simplerotary,
-
 
214
                    SIDSysexInfo.octaves, 0, patch, 256 + i, 4, 2, "Oct",
-
 
215
                    "Octave"));
131
            seqDataControl.add(new SIDSysexParameterControl(simplerotary, null, 0, patch, 384 + i, 0, 7, "Par", "Parameter value"));
216
            seqDataControl.add(new SIDSysexParameterControl(simplerotary, null,
-
 
217
                    0, patch, 384 + i, 0, 7, "Par", "Parameter value"));
132
            seqDataControl.add(new SIDSysexParameterControl(simplebutton, null, 0, patch, 256 + i, 6, 1, "Glide"));
218
            seqDataControl.add(new SIDSysexParameterControl(simplebutton, null,
-
 
219
                    0, patch, 256 + i, 6, 1, "Glide"));
133
            seqDataControl.add(new SIDSysexParameterControl(simplebutton, null, 0, patch, 384 + i, 7, 1, "Acc", "Accent"));
220
            seqDataControl.add(new SIDSysexParameterControl(simplebutton, null,
-
 
221
                    0, patch, 384 + i, 7, 1, "Acc", "Accent"));
134
            seqDataControl.add(new SIDSysexParameterControl(simplebutton, null, 0, patch, 256 + i, 7, 1, "Gate"));
222
            seqDataControl.add(new SIDSysexParameterControl(simplebutton, null,
-
 
223
                    0, patch, 256 + i, 7, 1, "Gate"));
135
        }
224
        }
136
        return seqDataControl;
225
        return seqDataControl;
137
    }
226
    }
138
   
227
139
    public static String[] createStatic() {    
228
    public static String[] createStatic() {
140
        String[] staticStr = new String[128];
229
        String[] staticStr = new String[128];
141
        String[] notes = { "c-", "c#", "d-", "d#", "e-", "f-", "f#", "g-", "g#", "a-", "a#", "b-" };
230
        String[] notes = { "c-", "c#", "d-", "d#", "e-", "f-", "f#", "g-",
-
 
231
                "g#", "a-", "a#", "b-" };
142
232
143
        for (int i = 0; i < 128; i++) {
233
        for (int i = 0; i < 128; i++) {
144
            int octave = (int) Math.floor((i) / 12) - 2;
234
            int octave = (int) Math.floor((i) / 12) - 2;
145
            if (octave < 0) {
235
            if (octave < 0) {
146
                staticStr[i] = notes[(i) % 12] + Math.abs(octave);
236
                staticStr[i] = notes[(i) % 12] + Math.abs(octave);