/[svn]/linuxsampler/trunk/src/effects/EffectControl.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/effects/EffectControl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2135 - (show annotations) (download) (as text)
Thu Sep 30 20:00:43 2010 UTC (13 years, 6 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1476 byte(s)
* added and implemented a set of 19 new LSCP commands for controlling
  internal effects:
  - added LSCP command "GET AVAILABLE_EFFECTS"
  - added LSCP command "LIST AVAILABLE_EFFECTS"
  - added LSCP command "GET EFFECT INFO <effect-index>"
  - added LSCP command "CREATE EFFECT_INSTANCE <effect-index>"
  - added LSCP command
    "CREATE EFFECT_INSTANCE <effect-system> <module> <effect-name>"
  - added LSCP command "DESTROY EFFECT_INSTANCE <effect-instance>"
  - added LSCP command "GET EFFECT_INSTANCES"
  - added LSCP command "LIST EFFECT_INSTANCES"
  - added LSCP command "GET EFFECT_INSTANCE INFO <effect-instance>"
  - added LSCP command "GET EFFECT_INSTANCE_INPUT_CONTROL INFO
    <effect-instance> <input-control>"
  - added LSCP command "SET EFFECT_INSTANCE_INPUT_CONTROL <effect-instance>
    <input-control> <value>"
  - added LSCP command "GET MASTER_EFFECT_CHAINS <audio-device>"
  - added LSCP command "LIST MASTER_EFFECT_CHAINS <audio-device>"
  - added LSCP command "ADD MASTER_EFFECT_CHAIN <audio-device>"
  - added LSCP command
    "REMOVE MASTER_EFFECT_CHAIN <audio-device> <effect-chain>"
  - added LSCP command
    "GET MASTER_EFFECT_CHAIN INFO <audio-device> <effect-chain>"
  - added LSCP command "APPEND MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance>"
  - added LSCP command "INSERT MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance> <effect-chain-pos>"
  - added LSCP command "REMOVE MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance>"
* bumped version to 1.0.0.cvs7

1 /*
2 Copyright (C) 2010 Christian Schoenebeck
3 */
4
5 #ifndef LS_EFFECTCONTROL_H
6 #define LS_EFFECTCONTROL_H
7
8 #include "../common/Exception.h"
9 #include "../common/optional.h"
10 #include <vector>
11
12 namespace LinuxSampler {
13
14 // just symbol prototyping
15 class Effect;
16
17 /**
18 * Represents an effect parameter. As the set of parameters an effect offers,
19 * varies quite a bit, this class provides necessary informations about the
20 * respective effect parameter.
21 */
22 class EffectControl {
23 public:
24 enum Type_t {
25 TYPE_FLOAT,
26 TYPE_INT,
27 TYPE_BOOL
28 };
29
30 EffectControl();
31 virtual ~EffectControl();
32 virtual void SetValue(float val) throw (Exception);
33 virtual float& Value();
34 Type_t Type() const;
35 String TypeAsString() const;
36 String Description() const;
37 optional<float> DefaultValue() const;
38 optional<float> MinValue() const;
39 optional<float> MaxValue() const;
40 std::vector<float> Possibilities() const;
41
42 protected:
43 void SetDefaultValue(float val);
44 void SetMinValue(float val);
45 void SetMaxValue(float val);
46 void SetType(Type_t t);
47 void SetDescription(String s);
48 void SetPossibilities(const std::vector<float>& v);
49
50 friend class Effect;
51
52 private:
53 float value;
54 Type_t type;
55 String description;
56 optional<float> defaultValue;
57 optional<float> minValue;
58 optional<float> maxValue;
59 std::vector<float> possibilities;
60 };
61
62 } // namespace LinuxSampler
63
64 #endif // LS_EFFECTCONTROL_H

  ViewVC Help
Powered by ViewVC