]> ruin.nu Git - moosique.git/blob - Methods of Key Classes.txt
Added two text files that probably make things a bit easier.
[moosique.git] / Methods of Key Classes.txt
1 Synthesizer
2
3 Instrument[] getAvailableInstruments() 
4 Obtains a list of instruments that come with the synthesizer. 
5 MidiChannel[] getChannels() 
6 Obtains the set of MIDI channels controlled by this synthesizer. 
7 Soundbank getDefaultSoundbank() 
8 Obtains the default soundbank for the synthesizer, if one exists. 
9 long getLatency() 
10 Obtains the processing latency incurred by this synthesizer, expressed in microseconds. 
11 Instrument[] getLoadedInstruments() 
12 Obtains a list of the instruments that are currently loaded onto this Synthesizer. 
13 int getMaxPolyphony() 
14 Obtains the maximum number of notes that this synthesizer can sound simultaneously. 
15 VoiceStatus[] getVoiceStatus() 
16 Obtains the current status of the voices produced by this synthesizer. 
17 boolean isSoundbankSupported(Soundbank soundbank) 
18 Informs the caller whether this synthesizer is capable of loading instruments from the specified soundbank. 
19 boolean loadAllInstruments(Soundbank soundbank) 
20 Loads onto the Synthesizer all instruments contained in the specified Soundbank. 
21 boolean loadInstrument(Instrument instrument) 
22 Makes a particular instrument available for synthesis. 
23 boolean loadInstruments(Soundbank soundbank, Patch[] patchList) 
24 Loads the instruments referenced by the specified patches, from the specified Soundbank. 
25 boolean remapInstrument(Instrument from, Instrument to) 
26 Remaps an instrument. 
27 void unloadAllInstruments(Soundbank soundbank) 
28 Unloads all instruments contained in the specified Soundbank. 
29 void unloadInstrument(Instrument instrument) 
30 Unloads a particular instrument. 
31 void unloadInstruments(Soundbank soundbank, Patch[] patchList) 
32 Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified. 
33
34 \f
35 Sequencer
36
37 int[] addControllerEventListener(ControllerEventListener listener, int[] controllers) 
38 Registers a controller event listener to receive notification whenever the sequencer processes a control-change event of the requested type or types. 
39 boolean addMetaEventListener(MetaEventListener listener) 
40 Registers a meta-event listener to receive notification whenever a meta-event is encountered in the sequence and processed by the sequencer. 
41 Sequencer.SyncMode getMasterSyncMode() 
42 Obtains the current master synchronization mode for this sequencer. 
43 Sequencer.SyncMode[] getMasterSyncModes() 
44 Obtains the set of master synchronization modes supported by this sequencer. 
45 long getMicrosecondLength() 
46 Obtains the length of the current sequence, expressed in microseconds. 
47 long getMicrosecondPosition() 
48 Obtains the current position in the sequence, expressed in microseconds. 
49 Sequence getSequence() 
50 Obtains the sequence on which the Sequencer is currently operating. 
51 Sequencer.SyncMode getSlaveSyncMode() 
52 Obtains the current slave synchronization mode for this sequencer. 
53 Sequencer.SyncMode[] getSlaveSyncModes() 
54 Obtains the set of slave synchronization modes supported by the sequencer. 
55 float getTempoFactor() 
56 Returns the current tempo factor for the sequencer. 
57 float getTempoInBPM() 
58 Obtains the current tempo, expressed in beats per minute. 
59 float getTempoInMPQ() 
60 Obtains the current tempo, expressed in microseconds per quarter note. 
61 long getTickLength() 
62 Obtains the length of the current sequence, expressed in MIDI ticks. 
63 long getTickPosition() 
64 Obtains the current position in the sequence, expressed in MIDI ticks. 
65 boolean getTrackMute(int track) 
66 Obtains the current mute state for a track. 
67 boolean getTrackSolo(int track) 
68 Obtains the current solo state for a track. 
69 boolean isRecording() 
70 Indicates whether the Sequencer is currently recording. 
71 boolean isRunning() 
72 Indicates whether the Sequencer is currently running. 
73 void recordDisable(Track track) 
74 Disables recording to the specified track. 
75 void recordEnable(Track track, int channel) 
76 Prepares the specified track for recording events received on a particular channel. 
77 int[] removeControllerEventListener(ControllerEventListener listener, int[] controllers) 
78 Removes a controller event listener's interest in one or more types of controller event. 
79 void removeMetaEventListener(MetaEventListener listener) 
80 Removes the specified meta-event listener from this sequencer's list of registered listeners, if in fact the listener is registered. 
81 void setMasterSyncMode(Sequencer.SyncMode sync) 
82 Sets the source of timing information used by this sequencer. 
83 void setMicrosecondPosition(long microseconds) 
84 Sets the current position in the sequence, expressed in microseconds 
85 void setSequence(InputStream stream) 
86 Sets the current sequence on which the sequencer operates. 
87 void setSequence(Sequence sequence) 
88 Sets the current sequence on which the sequencer operates. 
89 void setSlaveSyncMode(Sequencer.SyncMode sync) 
90 Sets the slave synchronization mode for the sequencer. 
91 void setTempoFactor(float factor) 
92 Scales the sequencer's actual playback tempo by the factor provided. 
93 void setTempoInBPM(float bpm) 
94 Sets the tempo in beats per minute. 
95 void setTempoInMPQ(float mpq) 
96 Sets the tempo in microseconds per quarter note. 
97 void setTickPosition(long tick) 
98 Sets the current sequencer position in MIDI ticks 
99 void setTrackMute(int track, boolean mute) 
100 Sets the mute state for a track. 
101 void setTrackSolo(int track, boolean solo) 
102 Sets the solo state for a track. 
103 void start() 
104 Starts playback of the MIDI data in the currently loaded sequence. 
105 void startRecording() 
106 Starts recording and playback of MIDI data. 
107 void stop() 
108 Stops recording, if active, and playback of the currently loaded sequence, if any. 
109 void stopRecording() 
110 Stops recording, if active. 
111
112 \f
113 MidiChannel
114
115 void allNotesOff()
116 Turns off all notes that are currently sounding on this channel. 
117 void allSoundOff()
118 Immediately turns off all sounding notes on this channel, ignoring the state of the Hold Pedal and the internal decay rate of the current Instrument. 
119 void controlChange(int controller, int value)
120 Reacts to a change in the specified controller's value. 
121 int getChannelPressure()
122 Obtains the channel's keyboard pressure. 
123 int getController(int controller)
124 Obtains the current value of the specified controller. 
125 boolean getMono()
126 Obtains the current mono/poly mode. 
127 boolean getMute()
128 Obtains the current mute state for this channel. 
129 boolean getOmni()
130 Obtains the current omni mode status. 
131 int getPitchBend()
132 Obtains the upward of downward pitch offset for this channel. 
133 int getPolyPressure(int noteNumber)
134 Obtains the pressure with which the specified key is being depressed. 
135 int getProgram()
136 Obtains the current program number for this channel. 
137 boolean getSolo()
138 Obtains the current solo state for this channel. 
139 boolean localControl(boolean on)
140 Turns local control on or off. 
141 void noteOff(int noteNumber)
142 Turns the specified note off. 
143 void noteOff(int noteNumber, int velocity)
144 Turns the specified note off. 
145 void noteOn(int noteNumber, int velocity)
146 Starts the specified note sounding. 
147 void programChange(int program)
148 Changes a program (patch). 
149 void programChange(int bank, int program)
150 Changes the program using bank and program (patch) numbers. 
151 void resetAllControllers()
152 Resets all the implemented controllers to their default values. 
153 void setChannelPressure(int pressure)
154 Reacts to a change in the keyboard pressure. 
155 void setMono(boolean on)
156 Turns mono mode on or off. 
157 void setMute(boolean mute)
158 Sets the mute state for this channel. 
159 void setOmni(boolean on)
160 Turns omni mode on or off. 
161 void setPitchBend(int bend)
162 Changes the pitch offset for all notes on this channel. 
163 void setPolyPressure(int noteNumber, int pressure)
164 Reacts to a change in the specified note's key pressure. 
165 void setSolo(boolean soloState)
166 Sets the solo state for this channel. 
167
168 \f
169 Sequence
170
171 Track createTrack() 
172 Creates a new, initially empty track as part of this sequence. 
173 boolean deleteTrack(Track track) 
174 Removes the specified track from the sequence. 
175 float getDivisionType() 
176 Obtains the timing division type for this sequence. 
177 long getMicrosecondLength() 
178 Obtains the duration of this sequence, expressed in microseconds. 
179 Patch[] getPatchList() 
180 Obtains a list of patches referenced in this sequence. 
181 int getResolution() 
182 Obtains the timing resolution for this sequence. 
183 long getTickLength() 
184 Obtains the duration of this sequence, expressed in MIDI ticks. 
185 Track[] getTracks() 
186 Obtains an array containing all the tracks in this sequence. 
187
188 \f
189 Track
190
191 boolean add(MidiEvent event) 
192 Adds a new event to the track. 
193 MidiEvent get(int index) 
194 Obtains the event at the specified index. 
195 boolean remove(MidiEvent event) 
196 Removes the specified event from the track. 
197 int size() 
198 Obtains the number of events in this track. 
199 long ticks() 
200 Obtains the length of the track, expressed in MIDI ticks. 
201
202 \f
203 MidiEvent
204
205 MidiMessage getMessage() 
206 Obtains the MIDI message contained in the event. 
207 long getTick() 
208 Obtains the time-stamp for the event, in MIDI ticks 
209 void setTick(long tick) 
210 Sets the time-stamp for the event, in MIDI ticks 
211
212 \f
213 MidiMessage
214
215 abstract  Object clone() 
216 Creates a new object of the same class and with the same contents as this object. 
217 int getLength() 
218 Obtains the total length of the MIDI message in bytes. 
219 byte[] getMessage() 
220 Obtains the MIDI message data. 
221 int getStatus() 
222 Obtains the status byte for the MIDI message. 
223 protected  void setMessage(byte[] data, int length) 
224 Sets the data for the MIDI message. 
225
226 \f
227 ShortMessage
228
229 Object clone() 
230 Creates a new object of the same class and with the same contents as this object. 
231 int getChannel() 
232 Obtains the MIDI channel associated with this event. 
233 int getCommand() 
234 Obtains the MIDI command associated with this event. 
235 int getData1() 
236 Obtains the first data byte in the message. 
237 int getData2() 
238 Obtains the second data byte in the message. 
239 protected  int getDataLength(int status) 
240 Retrieves the number of data bytes associated with a particular status byte value. 
241 void setMessage(int status) 
242 Sets the parameters for a MIDI message that takes no data bytes. 
243 void setMessage(int status, int data1, int data2) 
244 Sets the parameters for a MIDI message that takes one or two data bytes. 
245 void setMessage(int command, int channel, int data1, int data2) 
246 Sets the short message parameters for a channel message which takes one or two data bytes.