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, 2006 Christian Schoenebeck * |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program 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 * |
22 |
***************************************************************************/ |
***************************************************************************/ |
23 |
|
|
24 |
#include "EngineChannel.h" |
#include "EngineChannel.h" |
25 |
|
#include "../../network/lscpserver.h" |
26 |
|
|
27 |
namespace LinuxSampler { namespace gig { |
namespace LinuxSampler { namespace gig { |
28 |
|
|
193 |
instrid.Index = InstrumentIdx; |
instrid.Index = InstrumentIdx; |
194 |
newInstrument = Engine::instruments.Borrow(instrid, this); |
newInstrument = Engine::instruments.Borrow(instrid, this); |
195 |
if (!newInstrument) { |
if (!newInstrument) { |
196 |
InstrumentStat = -1; |
throw InstrumentResourceManagerException("resource was not created"); |
|
dmsg(1,("no instrument loaded!!!\n")); |
|
|
exit(EXIT_FAILURE); |
|
197 |
} |
} |
198 |
} |
} |
199 |
catch (RIFF::Exception e) { |
catch (RIFF::Exception e) { |
280 |
pChannelLeft = new AudioChannel(0, pAudioOut->MaxSamplesPerCycle()); |
pChannelLeft = new AudioChannel(0, pAudioOut->MaxSamplesPerCycle()); |
281 |
pChannelRight = new AudioChannel(1, pAudioOut->MaxSamplesPerCycle()); |
pChannelRight = new AudioChannel(1, pAudioOut->MaxSamplesPerCycle()); |
282 |
} |
} |
283 |
pEngine->Enable(); |
if (pEngine->EngineDisabled.GetUnsafe()) pEngine->Enable(); |
284 |
MidiInputPort::AddSysexListener(pEngine); |
MidiInputPort::AddSysexListener(pEngine); |
285 |
} |
} |
286 |
|
|
389 |
} |
} |
390 |
fxSends.push_back(pFxSend); |
fxSends.push_back(pFxSend); |
391 |
if (pEngine) pEngine->Enable(); |
if (pEngine) pEngine->Enable(); |
392 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_count, iSamplerChannelIndex, GetFxSendCount())); |
393 |
return pFxSend; |
return pFxSend; |
394 |
} |
} |
395 |
|
|
427 |
} |
} |
428 |
} |
} |
429 |
if (pEngine) pEngine->Enable(); |
if (pEngine) pEngine->Enable(); |
430 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_count, iSamplerChannelIndex, GetFxSendCount())); |
431 |
} |
} |
432 |
|
|
433 |
/** |
/** |
634 |
MidiVolume = 1.0; |
MidiVolume = 1.0; |
635 |
GlobalPanLeft = 1.0f; |
GlobalPanLeft = 1.0f; |
636 |
GlobalPanRight = 1.0f; |
GlobalPanRight = 1.0f; |
637 |
|
GlobalTranspose = 0; |
638 |
// set all MIDI controller values to zero |
// set all MIDI controller values to zero |
639 |
memset(ControllerTable, 0x00, 129); |
memset(ControllerTable, 0x00, 129); |
640 |
|
// reset all FX Send levels |
641 |
|
for ( |
642 |
|
std::vector<FxSend*>::iterator iter = fxSends.begin(); |
643 |
|
iter != fxSends.end(); iter++ |
644 |
|
) { |
645 |
|
(*iter)->Reset(); |
646 |
|
} |
647 |
} |
} |
648 |
|
|
649 |
/** |
/** |