3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 Christian Schoenebeck * |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
40 |
#include "lscpparser.h" |
#include "lscpparser.h" |
41 |
#include "lscp.h" |
#include "lscp.h" |
42 |
#include "lscpevent.h" |
#include "lscpevent.h" |
|
#include "lscpinstrumentloader.h" |
|
43 |
#include "../Sampler.h" |
#include "../Sampler.h" |
44 |
#include "../common/Thread.h" |
#include "../common/Thread.h" |
45 |
#include "../common/Mutex.h" |
#include "../common/Mutex.h" |
46 |
#include "../common/Condition.h" |
#include "../common/Condition.h" |
47 |
|
|
48 |
|
#include "../drivers/midi/MidiInstrumentMapper.h" |
49 |
|
|
50 |
/// TCP Port on which the server should listen for connection requests. |
/// TCP Port on which the server should listen for connection requests. |
51 |
#define LSCP_ADDR INADDR_ANY |
#define LSCP_ADDR INADDR_ANY |
52 |
#define LSCP_PORT 8888 |
#define LSCP_PORT 8888 |
126 |
String SetMIDIInputType(String MidiInputDriver, uint uiSamplerChannel); |
String SetMIDIInputType(String MidiInputDriver, uint uiSamplerChannel); |
127 |
String SetMIDIInput(uint MIDIDeviceId, uint MIDIPort, uint MIDIChannel, uint uiSamplerChannel); |
String SetMIDIInput(uint MIDIDeviceId, uint MIDIPort, uint MIDIChannel, uint uiSamplerChannel); |
128 |
String SetVolume(double dVolume, uint uiSamplerChannel); |
String SetVolume(double dVolume, uint uiSamplerChannel); |
129 |
|
String SetChannelMute(bool bMute, uint uiSamplerChannel); |
130 |
|
String SetChannelSolo(bool bSolo, uint uiSamplerChannel); |
131 |
|
String AddOrReplaceMIDIInstrumentMapping(uint MidiMapID, uint MidiBank, uint MidiProg, String EngineType, String InstrumentFile, uint InstrumentIndex, float Volume, MidiInstrumentMapper::mode_t LoadMode, String Name, bool bModal); |
132 |
|
String RemoveMIDIInstrumentMapping(uint MidiMapID, uint MidiBank, uint MidiProg); |
133 |
|
String GetMidiInstrumentMappings(uint MidiMapID); |
134 |
|
String GetAllMidiInstrumentMappings(); |
135 |
|
String GetMidiInstrumentMapping(uint MidiMapID, uint MidiBank, uint MidiProg); |
136 |
|
String ListMidiInstrumentMappings(uint MidiMapID); |
137 |
|
String ListAllMidiInstrumentMappings(); |
138 |
|
String ClearMidiInstrumentMappings(uint MidiMapID); |
139 |
|
String ClearAllMidiInstrumentMappings(); |
140 |
|
String AddMidiInstrumentMap(String MapName = ""); |
141 |
|
String RemoveMidiInstrumentMap(uint MidiMapID); |
142 |
|
String RemoveAllMidiInstrumentMaps(); |
143 |
|
String GetMidiInstrumentMaps(); |
144 |
|
String ListMidiInstrumentMaps(); |
145 |
|
String GetMidiInstrumentMap(uint MidiMapID); |
146 |
|
String SetMidiInstrumentMapName(uint MidiMapID, String NewName); |
147 |
|
String SetChannelMap(uint uiSamplerChannel, int MidiMapID); |
148 |
|
String CreateFxSend(uint uiSamplerChannel, uint MidiCtrl, String Name = ""); |
149 |
|
String DestroyFxSend(uint uiSamplerChannel, uint FxSendID); |
150 |
|
String GetFxSends(uint uiSamplerChannel); |
151 |
|
String ListFxSends(uint uiSamplerChannel); |
152 |
|
String GetFxSendInfo(uint uiSamplerChannel, uint FxSendID); |
153 |
|
String SetFxSendAudioOutputChannel(uint uiSamplerChannel, uint FxSendID, uint FxSendChannel, uint DeviceChannel); |
154 |
|
String SetFxSendMidiController(uint uiSamplerChannel, uint FxSendID, uint MidiController); |
155 |
|
String SetFxSendLevel(uint uiSamplerChannel, uint FxSendID, double dLevel); |
156 |
String ResetChannel(uint uiSamplerChannel); |
String ResetChannel(uint uiSamplerChannel); |
157 |
String ResetSampler(); |
String ResetSampler(); |
158 |
String GetServerInfo(); |
String GetServerInfo(); |
159 |
|
String GetTotalVoiceCount(); |
160 |
|
String GetTotalVoiceCountMax(); |
161 |
|
String GetGlobalVolume(); |
162 |
|
String SetGlobalVolume(double dVolume); |
163 |
String SubscribeNotification(LSCPEvent::event_t); |
String SubscribeNotification(LSCPEvent::event_t); |
164 |
String UnsubscribeNotification(LSCPEvent::event_t); |
String UnsubscribeNotification(LSCPEvent::event_t); |
165 |
String QueryDatabase(String query); |
String QueryDatabase(String query); |
179 |
sockaddr_in SocketAddress; |
sockaddr_in SocketAddress; |
180 |
Sampler* pSampler; |
Sampler* pSampler; |
181 |
Condition Initialized; |
Condition Initialized; |
|
LSCPInstrumentLoader InstrumentLoader; ///< thread responsible for loading instruments in the background |
|
182 |
|
|
183 |
int Main(); ///< Implementation of virtual method from class Thread |
int Main(); ///< Implementation of virtual method from class Thread |
184 |
|
|
194 |
*/ |
*/ |
195 |
int GetMidiInputDeviceIndex (MidiInputDevice *pDevice); |
int GetMidiInputDeviceIndex (MidiInputDevice *pDevice); |
196 |
|
|
197 |
|
bool HasSoloChannel(); |
198 |
|
void MuteNonSoloChannels(); |
199 |
|
void UnmuteChannels(); |
200 |
|
|
201 |
static std::map<int,String> bufferedNotifies; |
static std::map<int,String> bufferedNotifies; |
202 |
static Mutex NotifyMutex; |
static Mutex NotifyMutex; |
203 |
static Mutex NotifyBufferMutex; |
static Mutex NotifyBufferMutex; |