Subversion Repositories svn.mios

Rev

Rev 303 | Rev 696 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 303 Rev 628
Line 17... Line 17...
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
import java.util.Vector;
23
import java.util.Vector;
23
24
24
import org.midibox.sidlibr.Patch;
25
import org.midibox.sidlibr.Patch;
25
26
26
public class DrumSpecs {
27
public class DrumSpecs {
Line 36... Line 37...
36
   
37
37
    public static Vector createDrumInstr(Patch patch) {
38
    public static Vector createDrumInstr(Patch patch) {
38
        Vector drumInstrControl = new Vector();
39
        Vector drumInstrControl = new Vector();
39
       
40
40
        for(int i=0;i<16;i++) {
41
        for (int i = 0; i < 16; i++) {
41
            drumInstrControl.add(new SIDSysexParameterControl(rotary,SIDSysexInfo.voiceAssign,patch,96+(10*i),4,4,"Voice Assign","Voice assignment"));
42
            drumInstrControl.add(new SIDSysexParameterControl(rotary,
-
 
43
                    SIDSysexInfo.voiceAssign, patch, 96 + (10 * i), 4, 4,
-
 
44
                    "Voice Assign", "Voice assignment"));
42
            drumInstrControl.add(new SIDSysexParameterControl(rotary,SIDSysexInfo.drumModel,patch,97+(10*i),0,8,"Drum Model"));
45
            drumInstrControl.add(new SIDSysexParameterControl(rotary,
-
 
46
                    SIDSysexInfo.drumModel, patch, 97 + (10 * i), 0, 8,
-
 
47
                    "Drum Model"));
43
            drumInstrControl.add(new SIDSysexParameterControl(slider,null,patch,98+(10*i),4,4,"Attack","DCA Attack Rate"));
48
            drumInstrControl.add(new SIDSysexParameterControl(slider, null,
-
 
49
                    patch, 98 + (10 * i), 4, 4, "Attack", "DCA Attack Rate"));
44
            drumInstrControl.add(new SIDSysexParameterControl(slider,null,patch,98+(10*i),0,4,"Decay","DCA Decay Rate"));
50
            drumInstrControl.add(new SIDSysexParameterControl(slider, null,
-
 
51
                    patch, 98 + (10 * i), 0, 4, "Decay", "DCA Decay Rate"));
-
 
52
            drumInstrControl
45
            drumInstrControl.add(new SIDSysexParameterControl(slider,null,patch,99+(10*i),4,4,"Sustain","DCA Sustain Level"));
53
                    .add(new SIDSysexParameterControl(slider, null, patch,
-
 
54
                            99 + (10 * i), 4, 4, "Sustain", "DCA Sustain Level"));
46
            drumInstrControl.add(new SIDSysexParameterControl(slider,null,patch,99+(10*i),0,4,"Release","DCA Release Rate"));          
55
            drumInstrControl.add(new SIDSysexParameterControl(slider, null,
-
 
56
                    patch, 99 + (10 * i), 0, 4, "Release", "DCA Release Rate"));
47
            drumInstrControl.add(new SIDSysexParameterControl(rotary,null,patch,100+(10*i),0,-8,"Tune"));
57
            drumInstrControl.add(new SIDSysexParameterControl(rotary, null,
-
 
58
                    patch, 100 + (10 * i), 0, -8, "Tune"));
48
            drumInstrControl.add(new SIDSysexParameterControl(rotary,null,patch,101+(10*i),0,-8,"Gatelength","Parameter #1: Gatelength"));
59
            drumInstrControl.add(new SIDSysexParameterControl(rotary, null,
-
 
60
                    patch, 101 + (10 * i), 0, -8, "Gatelength",
-
 
61
                    "Parameter #1: Gatelength"));
49
            drumInstrControl.add(new SIDSysexParameterControl(rotary,null,patch,102+(10*i),0,-8,"Speed","Parameter #2: Speed"));
62
            drumInstrControl.add(new SIDSysexParameterControl(rotary, null,
-
 
63
                    patch, 102 + (10 * i), 0, -8, "Speed",
-
 
64
                    "Parameter #2: Speed"));
50
            drumInstrControl.add(new SIDSysexParameterControl(rotary,null,patch,103+(10*i),0,-8,"Param #3","Parameter #3: depends on Drum Model"));        
65
            drumInstrControl.add(new SIDSysexParameterControl(rotary, null,
-
 
66
                    patch, 103 + (10 * i), 0, -8, "Param #3",
-
 
67
                    "Parameter #3: depends on Drum Model"));
51
            drumInstrControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.drumParams,patch,104+(10*i),0,8,"Velocity Assign","Velocity parameter assignment"));      
68
            drumInstrControl.add(new SIDSysexParameterControl(combo,
-
 
69
                    SIDSysexInfo.drumParams, patch, 104 + (10 * i), 0, 8,
-
 
70
                    "Velocity Assign", "Velocity parameter assignment"));
52
        }      
71
        }
53
        return drumInstrControl;
72
        return drumInstrControl;
54
    }
73
    }
55
   
74
56
    public static Vector createSEQ(Patch patch) {
75
    public static Vector createSEQ(Patch patch) {
57
        Vector seqControl = new Vector();          
76
        Vector seqControl = new Vector();
58
        // Sequencer
77
        // Sequencer
59
        seqControl.add(new SIDSysexParameterControl(rotary,null,patch,80,0,6,"Clock Divider","Clock divider (sets tempo)"));
78
        seqControl.add(new SIDSysexParameterControl(rotary, null, patch, 80, 0,
-
 
79
                6, "Clock Divider", "Clock divider (sets tempo)"));
60
        seqControl.add(new SIDSysexParameterControl(button,null,patch,80,6,1,"Manual/Seq","MIDI Note playing/Sequencer mode"));    
80
        seqControl.add(new SIDSysexParameterControl(button, null, patch, 80, 6,
-
 
81
                1, "Manual/Seq", "MIDI Note playing/Sequencer mode"));
61
        seqControl.add(new SIDSysexParameterControl(button,null,patch,80,7,1,"Pattern Sync","Pattern changes synchronised to measure"));       
82
        seqControl.add(new SIDSysexParameterControl(button, null, patch, 80, 7,
-
 
83
                1, "Pattern Sync", "Pattern changes synchronised to measure"));
62
        seqControl.add(new SIDSysexParameterControl(combo,SIDSysexInfo.seq,patch,81,0,4,"Sequence","Sequencer number"));
84
        seqControl.add(new SIDSysexParameterControl(combo, SIDSysexInfo.seq,
-
 
85
                patch, 81, 0, 4, "Sequence", "Sequencer number"));
63
        seqControl.add(new SIDSysexParameterControl(rotary,createSteps(),patch,83,0,4,"Steps","Number of steps"));     
86
        seqControl.add(new SIDSysexParameterControl(rotary, createSteps(),
-
 
87
                patch, 83, 0, 4, "Steps", "Number of steps"));
64
        return seqControl;
88
        return seqControl;
65
    }
89
    }
66
   
90
67
    public static Vector createSEQData(Patch patch) {
91
    public static Vector createSEQData(Patch patch) {
68
        Vector seqDataControl = new Vector();  
92
        Vector seqDataControl = new Vector();
Line 72... Line 96...
72
            for(int ch=0;ch<8;ch++) {              
96
            for (int ch = 0; ch < 8; ch++) {
73
                int offset = 4*(ch+(8*seq));
97
                int offset = 4 * (ch + (8 * seq));
74
                // Steps: 1-16
98
                // Steps: 1-16
75
                for(int s=0;s<16;s++) {
99
                for (int s = 0; s < 16; s++) {
76
                    if (s<8) {
100
                    if (s < 8) {
77
                        seqDataControl.add(new SIDSysexParameterControl(simplebutton,null,patch,256+offset,s,1,"Gate"+Integer.toString(s)+Integer.toString(ch)));
101
                        seqDataControl.add(new SIDSysexParameterControl(
-
 
102
                                simplebutton, null, patch, 256 + offset, s, 1,
-
 
103
                                "Gate" + Integer.toString(s)
-
 
104
                                        + Integer.toString(ch)));
78
                    } else {
105
                    } else {
79
                        seqDataControl.add(new SIDSysexParameterControl(simplebutton,null,patch,258+offset,s-8,1,"Gate"+Integer.toString(s)+Integer.toString(ch)));
106
                        seqDataControl.add(new SIDSysexParameterControl(
-
 
107
                                simplebutton, null, patch, 258 + offset, s - 8,
-
 
108
                                1, "Gate" + Integer.toString(s)
-
 
109
                                        + Integer.toString(ch)));
80
                    }                  
110
                    }
81
                }
111
                }
82
                for(int s=0;s<16;s++) {
112
                for (int s = 0; s < 16; s++) {
83
                    if (s<8) {
113
                    if (s < 8) {
84
                        seqDataControl.add(new SIDSysexParameterControl(simplebutton,null,patch,257+offset,s,1,"Accent"+Integer.toString(s)+Integer.toString(ch)));
114
                        seqDataControl.add(new SIDSysexParameterControl(
-
 
115
                                simplebutton, null, patch, 257 + offset, s, 1,
-
 
116
                                "Accent" + Integer.toString(s)
-
 
117
                                        + Integer.toString(ch)));
85
                    } else {
118
                    } else {
86
                        seqDataControl.add(new SIDSysexParameterControl(simplebutton,null,patch,259+offset,s-8,1,"Accent"+Integer.toString(s)+Integer.toString(ch)));
119
                        seqDataControl.add(new SIDSysexParameterControl(
-
 
120
                                simplebutton, null, patch, 259 + offset, s - 8,
-
 
121
                                1, "Accent" + Integer.toString(s)
-
 
122
                                        + Integer.toString(ch)));
87
                    }                  
123
                    }
88
                }
124
                }
89
               
-
 
90
               
125
91
            }
126
            }
92
        }
127
        }
93
        return seqDataControl;
128
        return seqDataControl;
94
    }
129
    }
Line 99... Line 134...
99
            s[i] = Integer.toString(i+1);
134
            s[i] = Integer.toString(i + 1);
100
        }
135
        }
101
        return s;
136
        return s;
102
    }
137
    }
103
}
138
}
104
-