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

Contents of /jsampler/trunk/src/org/jsampler/SamplerChannelModel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 787 - (show annotations) (download)
Mon Oct 10 16:03:12 2005 UTC (18 years, 6 months ago) by iliev
File size: 4464 byte(s)
* The first alpha-release of JSampler

1 /*
2 * JSampler - a java front-end for LinuxSampler
3 *
4 * Copyright (C) 2005 Grigor Kirilov Iliev
5 *
6 * This file is part of JSampler.
7 *
8 * JSampler is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * JSampler is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with JSampler; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 package org.jsampler;
24
25 import org.jsampler.event.SamplerChannelListener;
26
27 import org.linuxsampler.lscp.SamplerChannel;
28
29
30 /**
31 *
32 * @author Grigor Iliev
33 */
34 public interface SamplerChannelModel {
35 /**
36 * Registers the specified listener for receiving event messages.
37 * @param l The <code>SamplerChannelListener</code> to register.
38 */
39 public void addSamplerChannelListener(SamplerChannelListener l);
40
41 /**
42 * Removes the specified listener.
43 * @param l The <code>SamplerChannelListener</code> to remove.
44 */
45 public void removeSamplerChannelListener(SamplerChannelListener l);
46
47 /**
48 * Gets the sampler channel number.
49 * @return The sampler channel number or -1 if the sampler channel number is not set.
50 */
51 public int getChannelID();
52
53 /**
54 * Gets the current settings of the sampler channel.
55 * @return <code>SamplerChannel</code> instance containing
56 * the current settings of the sampler channel.
57 */
58 public SamplerChannel getChannelInfo();
59
60 /**
61 * Sets the current settings of the sampler channel.
62 * @param channel A <code>SamplerChannel</code> instance containing
63 * the new settings for this sampler channel.
64 */
65 public void setChannelInfo(SamplerChannel channel);
66
67 /**
68 * Gets the number of active disk streams.
69 * @return The number of active disk streams.
70 */
71 public int getStreamCount();
72
73 /**
74 * Sets the number of active disk streams.
75 * @param count The new number of active disk streams.
76 */
77 public void setStreamCount(int count);
78
79 /**
80 * Gets the number of active voices.
81 * @return The number of active voices.
82 */
83 public int getVoiceCount();
84
85 /**
86 * Sets the number of active voices.
87 * @param count The new number of active voices.
88 */
89 public void setVoiceCount(int count);
90
91 /**
92 * Sets the sampler engine type to be used.
93 * @param engine The name of the engine type to be used.
94 */
95 public void setEngineType(String engine);
96
97 /**
98 * Sets the mute mode of the channel.
99 * @param mute Specifies the mute mode. If <code>true</code> the channel is muted, else
100 * the channel is unmuted.
101 */
102 public void setMute(boolean mute);
103
104 /**
105 * Sets the solo mode of the channel.
106 * @param solo Specifies the solo mode. If <code>true</code> the channel is soloed, else
107 * the channel is unsoloed.
108 */
109 public void setSolo(boolean solo);
110
111 /**
112 * Sets the channel volume.
113 * @param volume Specifies the new volume value.
114 */
115 public void setVolume(float volume);
116
117 /**
118 * Sets the MIDI input device of the channel represented by this model.
119 * @param deviceID Specifies the numerical ID of the MIDI input device to be set.
120 */
121 public void setMidiInputDevice(int deviceID);
122
123 /**
124 * Sets the MIDI input port of the channel represented by this model.
125 * @param port Specifies the number of the MIDI input port.
126 */
127 public void setMidiInputPort(int port);
128
129 /**
130 * Sets the MIDI channel that the channel represented by this model should listen to.
131 * @param channel Specifies the MIDI channel that the channel
132 * represented by this model should listen to.
133 */
134 public void setMidiInputChannel(int channel);
135
136 /**
137 * Sets the audio output device of the channel represented by this model.
138 * @param deviceID Specifies the numerical ID of the audio output device to be set.
139 */
140 public void setAudioOutputDevice(int deviceID);
141
142 /**
143 * Loads and assigns the specified instrument
144 * to the sampler channel represented by this model.
145 * @param filename The file name of the instrument to be loaded.
146 * @param InstrIndex The index of the instrument in the instrument file to be loaded.
147 */
148 public void loadInstrument(String filename, int InstrIndex);
149 }

  ViewVC Help
Powered by ViewVC