summaryrefslogtreecommitdiff
path: root/src/instrument.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-03-23 22:38:44 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-29 22:43:33 +0200
commit324502145b2a5fec38928509c8b3d9f8eb8bf47d (patch)
tree393f9e40bf4ae033217df49eacb0ed76b64d475c /src/instrument.h
parent253a7fbc4a13d459cb2bd19f51ad578c0e1814f2 (diff)
Settings.
Diffstat (limited to 'src/instrument.h')
-rw-r--r--src/instrument.h50
1 files changed, 27 insertions, 23 deletions
diff --git a/src/instrument.h b/src/instrument.h
index e880d8d..549a5a4 100644
--- a/src/instrument.h
+++ b/src/instrument.h
@@ -36,46 +36,50 @@
#include "sample.h"
#include "versionstr.h"
+#include "settings.h"
+
class InstrumentParser;
class Instrument {
- friend class InstrumentParser;
+ friend class InstrumentParser;
public:
- Instrument();
- ~Instrument();
+ Instrument(Settings& settings);
+ ~Instrument();
- Sample *sample(level_t level, size_t pos);
+ Sample *sample(level_t level, size_t pos);
- std::string name();
- std::string description();
- std::string group();
+ std::string name();
+ std::string description();
+ std::string group();
- void setGroup(std::string group);
+ void setGroup(std::string group);
- // std::map<std::string, std::string> channelmap;
+ // std::map<std::string, std::string> channelmap;
- std::vector<AudioFile*> audiofiles;
+ std::vector<AudioFile*> audiofiles;
- bool isValid();
+ bool isValid();
private:
- void *magic;
+ void *magic;
+
+ std::string _group;
+ std::string _name;
+ std::string _description;
- std::string _group;
- std::string _name;
- std::string _description;
+ VersionStr version;
- VersionStr version;
+ RangeMap<level_t, Sample*> samples;
+ PowerList powerlist;
- RangeMap<level_t, Sample*> samples;
- PowerList powerlist;
+ void addSample(level_t a, level_t b, Sample *s);
+ void finalise(); ///< Signal instrument that no more samples will be added.
- void addSample(level_t a, level_t b, Sample *s);
- void finalise(); ///< Signal instrument that no more samples will be added.
+ std::vector<Sample*> samplelist;
- std::vector<Sample*> samplelist;
+ size_t lastpos;
+ float mod;
- size_t lastpos;
- float mod;
+ Settings& settings;
};
//typedef std::map< std::string, Instrument > Instruments;