/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2629 - (show annotations) (download) (as text)
Thu Jun 12 18:25:11 2014 UTC (9 years, 10 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 3079 byte(s)
* Implemented built-in instrument script function "note_off()".
* Bumped version (1.0.0.svn52).

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_INSTRSCRIPTVMFUNCTIONS_H
11 #define LS_INSTRSCRIPTVMFUNCTIONS_H
12
13 #include "../../common/global.h"
14 #include "../../scriptvm/CoreVMFunctions.h"
15
16 namespace LinuxSampler {
17
18 class InstrumentScriptVM;
19
20 class InstrumentScriptVMFunction_play_note : public VMIntResultFunction {
21 public:
22 InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);
23 int minRequiredArgs() const { return 1; }
24 int maxAllowedArgs() const { return 4; }
25 bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
26 ExprType_t argType(int iArg) const { return INT_EXPR; }
27 VMFnResult* exec(VMFnArgs* args);
28 protected:
29 InstrumentScriptVM* m_vm;
30 };
31
32 class InstrumentScriptVMFunction_set_controller : public VMIntResultFunction {
33 public:
34 InstrumentScriptVMFunction_set_controller(InstrumentScriptVM* parent);
35 int minRequiredArgs() const { return 2; }
36 int maxAllowedArgs() const { return 2; }
37 bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
38 ExprType_t argType(int iArg) const { return INT_EXPR; }
39 VMFnResult* exec(VMFnArgs* args);
40 protected:
41 InstrumentScriptVM* m_vm;
42 };
43
44 class InstrumentScriptVMFunction_ignore_event : public VMEmptyResultFunction {
45 public:
46 InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent);
47 int minRequiredArgs() const { return 1; }
48 int maxAllowedArgs() const { return 1; }
49 bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
50 ExprType_t argType(int iArg) const { return INT_EXPR; }
51 VMFnResult* exec(VMFnArgs* args);
52 protected:
53 InstrumentScriptVM* m_vm;
54 };
55
56 class InstrumentScriptVMFunction_ignore_controller : public VMEmptyResultFunction {
57 public:
58 InstrumentScriptVMFunction_ignore_controller(InstrumentScriptVM* parent);
59 int minRequiredArgs() const { return 0; }
60 int maxAllowedArgs() const { return 1; }
61 bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
62 ExprType_t argType(int iArg) const { return INT_EXPR; }
63 VMFnResult* exec(VMFnArgs* args);
64 protected:
65 InstrumentScriptVM* m_vm;
66 };
67
68 class InstrumentScriptVMFunction_note_off : public VMEmptyResultFunction {
69 public:
70 InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);
71 int minRequiredArgs() const { return 1; }
72 int maxAllowedArgs() const { return 2; }
73 bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
74 ExprType_t argType(int iArg) const { return INT_EXPR; }
75 VMFnResult* exec(VMFnArgs* args);
76 protected:
77 InstrumentScriptVM* m_vm;
78 };
79
80 } // namespace LinuxSampler
81
82 #endif // LS_INSTRSCRIPTVMFUNCTIONS_H

  ViewVC Help
Powered by ViewVC