/[svn]/jsampler/trunk/src/org/jsampler/SamplerModel.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/SamplerModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1143 by iliev, Mon Apr 2 21:18:31 2007 UTC revision 1737 by iliev, Thu May 8 17:26:19 2008 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 113  public interface SamplerModel { Line 113  public interface SamplerModel {
113           */           */
114          public AudioOutputDriver[] getAudioOutputDrivers();          public AudioOutputDriver[] getAudioOutputDrivers();
115                    
116            
117            
118            /**
119             * Gets the model of the audio device at the specified position.
120             * @param index The position of the audio device to return.
121             * @return The model of the audio device at the specified position.
122             * @see #getAudioDeviceCount
123             */
124            public AudioDeviceModel getAudioDevice(int index);
125            
126          /**          /**
127           * Gets the model of the audio device with ID <code>deviceId</code>.           * Gets the model of the audio device with ID <code>deviceId</code>.
128           * @param deviceId The ID of the audio device whose model should be obtained.           * @param deviceId The ID of the audio device whose model should be obtained.
129           * @return The model of the specified audio device or <code>null</code>           * @return The model of the specified audio device or <code>null</code>
130           * if there is no audio device with ID <code>deviceId</code>.           * if there is no audio device with ID <code>deviceId</code>.
131           */           */
132          public AudioDeviceModel getAudioDeviceModel(int deviceId);          public AudioDeviceModel getAudioDeviceById(int deviceId);
133                    
134          /**          /**
135           * Gets the current number of audio devices.           * Gets the current number of audio devices.
# Line 131  public interface SamplerModel { Line 141  public interface SamplerModel {
141           * Gets the current list of audio device models.           * Gets the current list of audio device models.
142           * @return The current list of audio device models.           * @return The current list of audio device models.
143           */           */
144          public AudioDeviceModel[] getAudioDeviceModels();          public AudioDeviceModel[] getAudioDevices();
145                    
146          /**          /**
147           * Adds the specified audio device.           * Adds the specified audio device.
# Line 145  public interface SamplerModel { Line 155  public interface SamplerModel {
155           * @return <code>true</code> if the audio device is removed successfully, <code>false</code>           * @return <code>true</code> if the audio device is removed successfully, <code>false</code>
156           * if the device list does not contain audio device with ID <code>deviceId</code>.           * if the device list does not contain audio device with ID <code>deviceId</code>.
157           */           */
158          public boolean removeAudioDevice(int deviceId);          public boolean removeAudioDeviceById(int deviceId);
159                    
160          /**          /**
161           * Removes (on the backend side) the specified audio device.           * Removes (on the backend side) the specified audio device.
# Line 162  public interface SamplerModel { Line 172  public interface SamplerModel {
172          public MidiInputDriver[] getMidiInputDrivers();          public MidiInputDriver[] getMidiInputDrivers();
173                    
174          /**          /**
175             * Gets the model of the MIDI device at the specified position.
176             * @param index The position of the MIDI device to return.
177             * @return The model of the MIDI device at the specified position.
178             */
179            public MidiDeviceModel getMidiDevice(int index);
180            
181            /**
182           * Gets the model of the MIDI device with ID <code>deviceId</code>.           * Gets the model of the MIDI device with ID <code>deviceId</code>.
183           * @param deviceId The ID of the MIDI device whose model should be obtained.           * @param deviceId The ID of the MIDI device whose model should be obtained.
184           * @return The model of the specified MIDI device or <code>null</code>           * @return The model of the specified MIDI device or <code>null</code>
185           * if there is no MIDI device with ID <code>deviceId</code>.           * if there is no MIDI device with ID <code>deviceId</code>.
186           */           */
187          public MidiDeviceModel getMidiDeviceModel(int deviceId);          public MidiDeviceModel getMidiDeviceById(int deviceId);
188                    
189          /**          /**
190           * Gets the current number of MIDI input devices.           * Gets the current number of MIDI input devices.
# Line 179  public interface SamplerModel { Line 196  public interface SamplerModel {
196           * Gets the current list of MIDI device models.           * Gets the current list of MIDI device models.
197           * @return The current list of MIDI device models.           * @return The current list of MIDI device models.
198           */           */
199          public MidiDeviceModel[] getMidiDeviceModels();          public MidiDeviceModel[] getMidiDevices();
200                    
201          /**          /**
202           * Adds the specified MIDI device.           * Adds the specified MIDI device.
# Line 200  public interface SamplerModel { Line 217  public interface SamplerModel {
217           * @return <code>true</code> if the MIDI device is removed successfully, <code>false</code>           * @return <code>true</code> if the MIDI device is removed successfully, <code>false</code>
218           * if the device list does not contain MIDI device with ID <code>deviceId</code>.           * if the device list does not contain MIDI device with ID <code>deviceId</code>.
219           */           */
220          public boolean removeMidiDevice(int deviceId);          public boolean removeMidiDeviceById(int deviceId);
221                    
222          /**          /**
223           * Schedules a new task for removing the specified MIDI device.           * Schedules a new task for removing the specified MIDI device.
# Line 236  public interface SamplerModel { Line 253  public interface SamplerModel {
253          public MidiInstrumentMap[] getMidiInstrumentMaps();          public MidiInstrumentMap[] getMidiInstrumentMaps();
254                    
255          /**          /**
256             * Gets the position of the specified MIDI instrument map in the list.
257             * @param map The map whose index should be returned.
258             * @return The position of the specified map in the list,
259             * or -1 if <code>map</code> is <code>null</code> or
260             * the map list does not contain the specified map.
261             */
262            public int getMidiInstrumentMapIndex(MidiInstrumentMap map);
263            
264            /**
265           * Adds the specified MIDI instrument map.           * Adds the specified MIDI instrument map.
266           * @param map The MIDI instrument map to be added.           * @param map The MIDI instrument map to be added.
267           */           */
# Line 255  public interface SamplerModel { Line 281  public interface SamplerModel {
281           * <code>false</code> if the MIDI instrument map's list does not contain           * <code>false</code> if the MIDI instrument map's list does not contain
282           * MIDI instrument map with ID <code>mapId</code>.           * MIDI instrument map with ID <code>mapId</code>.
283           */           */
284          public boolean removeMidiInstrumentMap(int mapId);          public boolean removeMidiInstrumentMapById(int mapId);
285                    
286          /** Removes all MIDI instrument maps. */          /** Removes all MIDI instrument maps. */
287          public void removeAllMidiInstrumentMaps();          public void removeAllMidiInstrumentMaps();
# Line 311  public interface SamplerModel { Line 337  public interface SamplerModel {
337           * Gets the current list of sampler channel models.           * Gets the current list of sampler channel models.
338           * @return The current list of sampler channel models.           * @return The current list of sampler channel models.
339           */           */
340          public SamplerChannelModel[] getChannelModels();          public SamplerChannelModel[] getChannels();
341            
342            /**
343             * Gets the model of the sampler channel in the specified position.
344             * @param index The position of the channel to return.
345             * @return The model of the specified sampler channel.
346             * @see #getchannelCount
347             */
348            public SamplerChannelModel getChannel(int index);
349                    
350          /**          /**
351           * Gets the model of the sampler channel with ID <code>channelId</code>.           * Gets the model of the sampler channel with ID <code>channelId</code>.
# Line 319  public interface SamplerModel { Line 353  public interface SamplerModel {
353           * @return The model of the specified sampler channel or <code>null</code>           * @return The model of the specified sampler channel or <code>null</code>
354           * if there is no channel with ID <code>channelId</code>.           * if there is no channel with ID <code>channelId</code>.
355           */           */
356          public SamplerChannelModel getChannelModel(int channelId);          public SamplerChannelModel getChannelById(int channelId);
357                    
358          /**          /**
359           * Gets the current number of sampler channels.           * Gets the current number of sampler channels.
# Line 349  public interface SamplerModel { Line 383  public interface SamplerModel {
383           * @return <code>true</code> if the channel is removed successfully, <code>false</code>           * @return <code>true</code> if the channel is removed successfully, <code>false</code>
384           * if the channel's list does not contain channel with ID <code>channelId</code>.           * if the channel's list does not contain channel with ID <code>channelId</code>.
385           */           */
386          public boolean removeChannel(int channelId);          public boolean removeChannelById(int channelId);
387                    
388          /**          /**
389           * Schedules a new task for removing the specified sampler channel on the backend side.           * Schedules a new task for removing the specified sampler channel on the backend side.
# Line 365  public interface SamplerModel { Line 399  public interface SamplerModel {
399          public void updateChannel(SamplerChannel channel);          public void updateChannel(SamplerChannel channel);
400                    
401          /**          /**
402             * Determines whether there are known upcoming changes to the
403             * channel list, which should be considered as part of a single action.
404             */
405            public boolean getChannelListIsAdjusting();
406            
407            /**
408             * Sets whether the upcoming changes to the
409             * channel list should be considered part of a single action.
410             */
411            public void setChannelListIsAdjusting(boolean b);
412            
413            /**
414             * Schedules a new task for starting an instrument editor for editing
415             * the loaded instrument on the specified sampler channel.
416             * @param channelId The sampler channel number.
417             */
418            public void editBackendInstrument(int channelId);
419            
420            /**
421           * Determines whether there is at least one solo channel in the current list           * Determines whether there is at least one solo channel in the current list
422           * of sampler channels.           * of sampler channels.
423           * @return <code>true</code> if there is at least one solo channel in the current list of           * @return <code>true</code> if there is at least one solo channel in the current list of
# Line 392  public interface SamplerModel { Line 445  public interface SamplerModel {
445          public int getMutedBySoloChannelCount();          public int getMutedBySoloChannelCount();
446                    
447          /**          /**
448             * Gets the total number of active streams.
449             * @return The total number of active streams.
450             */
451            public int getTotalStreamCount();
452            
453            /**
454           * Gets the total number of active voices.           * Gets the total number of active voices.
455           * @return The total number of active voices.           * @return The total number of active voices.
456           */           */
# Line 427  public interface SamplerModel { Line 486  public interface SamplerModel {
486          public void resetBackend();          public void resetBackend();
487                    
488          /**          /**
489             * Updates the current number of active disk streams in the sampler.
490             * @param count The new number of active streams.
491             */
492            public void updateActiveStreamsInfo(int count);
493            
494            /**
495           * Updates the current and the maximum number of active voices in the sampler.           * Updates the current and the maximum number of active voices in the sampler.
496           * @param count The new number of active voices.           * @param count The new number of active voices.
497           * @param countMax The maximum number of active voices.           * @param countMax The maximum number of active voices.
498           */           */
499          public void updateActiveVoiceInfo(int count, int countMax);          public void updateActiveVoiceInfo(int count, int countMax);
500            
501            /**
502             * Determines whether the sampler configuration is modified.
503             */
504            public boolean isModified();
505            
506            /**
507             * Sets whether the sampler configuration is modified.
508             */
509            public void setModified(boolean b);
510            
511            /** Resets the model. */
512            public void reset();
513  }  }

Legend:
Removed from v.1143  
changed lines
  Added in v.1737

  ViewVC Help
Powered by ViewVC