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