/[svn]/linuxsampler/trunk/src/engines/common/AbstractInstrumentManager.cpp
ViewVC logotype

Contents of /linuxsampler/trunk/src/engines/common/AbstractInstrumentManager.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3733 - (show annotations) (download)
Sat Feb 1 18:11:20 2020 UTC (4 years, 2 months ago) by schoenebeck
File size: 842 byte(s)
NKSP: Added support for 'patch' variables.

* NKSP language: Added support for 'patch' variable qualifier
  (as new dedicated keyword 'patch').

* NKSP parser: capture locations of 'patch' variable declarations
  in script's source code.

* ScriptVM: Allow patching 'patch' script variables by replacing
  their default assignment expression with a supplied replacement
  variable initialization expression by optional 2nd argument when
  calling loadScript().

* ScriptVM: Allow retrieval of default initialization expressions
  of all 'patch' variables by optional 3rd argument when calling
  loadScript() (i.e. for instrument editors).

* gig engine: Implemented support for loading real-time instrument
  scripts with 'patch' variables bundled with gig instruments.

* Bumped version (2.1.1.svn46).


1 /*
2 * Copyright (c) 2014 - 2020 Christian Schoenebeck
3 *
4 * http://www.linuxsampler.org
5 *
6 * This file is part of LinuxSampler and released under the same terms.
7 * See README file for details.
8 */
9
10 #include "AbstractInstrumentManager.h"
11 #include "../AbstractEngine.h"
12 #include "../AbstractEngineChannel.h"
13
14 namespace LinuxSampler {
15
16 VMParserContext* AbstractInstrumentManager::ScriptResourceManager::Create(ScriptKey key, InstrumentScriptConsumer* pConsumer, void*& pArg) {
17 AbstractEngineChannel* pEngineChannel = dynamic_cast<AbstractEngineChannel*>(pConsumer);
18 return pEngineChannel->pEngine->pScriptVM->loadScript(key.code, key.patchVars);
19 }
20
21 void AbstractInstrumentManager::ScriptResourceManager::Destroy(VMParserContext* pResource, void* pArg) {
22 delete pResource;
23 }
24
25 } // namespace LinuxSampler

  ViewVC Help
Powered by ViewVC