Parent Directory | Revision Log
* Implemented built-in instrument script function "set_controller()". * Fixed built-in script functions "ignore_event()" and "ignore_controller()". * Added extended instrument script VM for the Gigasampler/GigaStudio format sampler engine, which extends the general instrument script VM with Giga format specific variables and functions. * Giga format instrument scripts: added built-in script int constant variables $GIG_DIM_CHANNEL, $GIG_DIM_LAYER, $GIG_DIM_VELOCITY, $GIG_DIM_AFTERTOUCH, $GIG_DIM_RELEASE, $GIG_DIM_KEYBOARD, $GIG_DIM_ROUNDROBIN, $GIG_DIM_RANDOM, $GIG_DIM_SMARTMIDI, $GIG_DIM_ROUNDROBINKEY, $GIG_DIM_MODWHEEL, $GIG_DIM_BREATH, $GIG_DIM_FOOT, $GIG_DIM_PORTAMENTOTIME, $GIG_DIM_EFFECT1, $GIG_DIM_EFFECT2, $GIG_DIM_GENPURPOSE1, $GIG_DIM_GENPURPOSE2, $GIG_DIM_GENPURPOSE3, $GIG_DIM_GENPURPOSE4, $GIG_DIM_SUSTAIN, $GIG_DIM_PORTAMENTO, $GIG_DIM_SOSTENUTO, $GIG_DIM_SOFT, $GIG_DIM_GENPURPOSE5, $GIG_DIM_GENPURPOSE6, $GIG_DIM_GENPURPOSE7, $GIG_DIM_GENPURPOSE8, $GIG_DIM_EFFECT1DEPTH, $GIG_DIM_EFFECT2DEPTH, $GIG_DIM_EFFECT3DEPTH, $GIG_DIM_EFFECT4DEPTH, $GIG_DIM_EFFECT5DEPTH. * Giga format instrument scripts: Implemented built-in script function "gig_set_dim_zone(event_id, dimension, zone)", which allows to override dimension zone(s) for new voices. * Bumped version (1.0.0.svn45).
1 | /* |
2 | * Copyright (c) 2014 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 | #ifndef LS_INSTRUMENT_SCRIPT_VM_H |
11 | #define LS_INSTRUMENT_SCRIPT_VM_H |
12 | |
13 | #include "../../common/global.h" |
14 | #include "../../scriptvm/ScriptVM.h" |
15 | #include "Event.h" |
16 | #include "InstrumentScriptVMFunctions.h" |
17 | |
18 | namespace LinuxSampler { |
19 | |
20 | /** @brief Real-time instrument script virtual machine. |
21 | * |
22 | * Extends the core ScriptVM implementation with MIDI specific built-in |
23 | * script functions and MIDI specific built-in script variables required |
24 | * for MIDI processing by instrument script for all sampler engine |
25 | * implementations (sampler formats) of this sampler. |
26 | * |
27 | * Note that this class is currently re-entrant safe, but @b not thread |
28 | * safe! See also comments of base class ScriptVM regarding this issue. |
29 | */ |
30 | class InstrumentScriptVM : public ScriptVM { |
31 | public: |
32 | InstrumentScriptVM(); |
33 | VMExecStatus_t exec(VMParserContext* parserCtx, ScriptEvent* event); |
34 | VMFunction* functionByName(const String& name) OVERRIDE; |
35 | std::map<String,VMIntRelPtr*> builtInIntVariables() OVERRIDE; |
36 | std::map<String,VMInt8Array*> builtInIntArrayVariables() OVERRIDE; |
37 | std::map<String,int> builtInConstIntVariables() OVERRIDE; |
38 | protected: |
39 | ScriptEvent* m_event; ///< The event currently executed by exec(). |
40 | |
41 | // buil-in script variables |
42 | VMInt8Array m_CC; |
43 | VMInt8RelPtr m_CC_NUM; |
44 | VMIntRelPtr m_EVENT_ID; |
45 | VMInt8RelPtr m_EVENT_NOTE; |
46 | VMInt8RelPtr m_EVENT_VELOCITY; |
47 | //VMIntArray m_KEY_DOWN; //TODO: ... |
48 | //VMIntArray m_POLY_AT; //TODO: ... |
49 | //int m_POLY_AT_NUM; //TODO: ... |
50 | |
51 | // buil-in script functions |
52 | InstrumentScriptVMFunction_play_note m_fnPlayNote; |
53 | InstrumentScriptVMFunction_set_controller m_fnSetController; |
54 | InstrumentScriptVMFunction_ignore_event m_fnIgnoreEvent; |
55 | InstrumentScriptVMFunction_ignore_controller m_fnIgnoreController; |
56 | |
57 | friend class InstrumentScriptVMFunction_play_note; |
58 | friend class InstrumentScriptVMFunction_set_controller; |
59 | friend class InstrumentScriptVMFunction_ignore_event; |
60 | friend class InstrumentScriptVMFunction_ignore_controller; |
61 | }; |
62 | |
63 | } // namespace LinuxSampler |
64 | |
65 | #endif // LS_INSTRUMENT_SCRIPT_VM_H |
ViewVC Help | |
Powered by ViewVC |