219 |
///////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////// |
220 |
// class Instrument |
// class Instrument |
221 |
|
|
222 |
Instrument::Instrument(std::string name, SampleManager* pSampleManager) : KeyBindings(128, false), KeySwitchBindings(128, false) |
Instrument::Instrument(File* file, std::string name, SampleManager* pSampleManager) : KeyBindings(128, false), KeySwitchBindings(128, false) |
223 |
{ |
{ |
224 |
|
this->file = file; |
225 |
this->name = name; |
this->name = name; |
226 |
this->pSampleManager = pSampleManager ? pSampleManager : this; |
this->pSampleManager = pSampleManager ? pSampleManager : this; |
227 |
pLookupTable = 0; |
pLookupTable = 0; |
905 |
octave_offset(0), |
octave_offset(0), |
906 |
note_offset(0) |
note_offset(0) |
907 |
{ |
{ |
908 |
_instrument = new Instrument(LinuxSampler::Path::getBaseName(file), pSampleManager); |
_instrument = new Instrument(this, LinuxSampler::Path::getBaseName(file), pSampleManager); |
909 |
ContainerDefinition* defaultGlobalContainer = new ContainerDefinition(ContainerDefinition::GLOBAL); |
ContainerDefinition* defaultGlobalContainer = new ContainerDefinition(ContainerDefinition::GLOBAL); |
910 |
_current_containers.push(defaultGlobalContainer); |
_current_containers.push(defaultGlobalContainer); |
911 |
pCurDef = defaultGlobalContainer; |
pCurDef = defaultGlobalContainer; |