summaryrefslogtreecommitdiff
path: root/src/project.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-07-27 13:39:32 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2024-07-27 13:39:32 +0200
commitfc29354d86e6a8b5601e92405b89a1da27406ce7 (patch)
treee31069154ad5bd9497764b6205dd4d3a411b40eb /src/project.h
parent329110e3230a6518f024c612842b04afdea1cd03 (diff)
WIP
Diffstat (limited to 'src/project.h')
-rw-r--r--src/project.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/src/project.h b/src/project.h
index 3e2b886..bbc7771 100644
--- a/src/project.h
+++ b/src/project.h
@@ -26,13 +26,14 @@
*/
#pragma once
-#include <list>
+#include "audioextractor.h"
+#include "range.h"
#include <QObject>
#include <QString>
-#include "audioextractor.h"
-#include "selection.h"
+#include <list>
+#include <array>
class Project;
class Instrument;
@@ -57,6 +58,9 @@ public:
bool getMainChannel() const;
void setMainChannel(bool main);
+ bool getPositionChannel() const;
+ void setPositionChannel(bool pos);
+
private:
friend class ProjectSerialiser;
@@ -64,15 +68,19 @@ private:
QString name;
int channel_map_id;
bool main_channel;
+ bool pos_channel{false};
int id;
Instrument& instrument;
};
class Instrument
+ : public QObject
{
+ Q_OBJECT
public:
Instrument(Project& project, int id);
+ virtual ~Instrument() = default;
int getId() const;
@@ -102,17 +110,26 @@ public:
std::size_t getFadeLength() const;
void setFadeLength(std::size_t fade_length);
- float getThreshold() const;
- void setThreshold(float threshold);
+ double getThreshold() const;
+ double getPositionThreshold() const;
- Selections getSelections() const;
- void setSelections(const Selections& selectios);
+ Ranges getRanges() const;
+ void setRanges(const Ranges& ranges);
QString getPrefix() const;
void setPrefix(const QString& prefix);
Project& getProject();
+public slots:
+ void setThreshold(double threshold);
+ void setPositionThreshold(double threshold);
+
+signals:
+ void thresholdChanged();
+ void positionThresholdChanged();
+ void rangesChanged();
+
private:
friend class ProjectSerialiser;
@@ -131,10 +148,11 @@ private:
std::size_t fade_length{666};
// Canvas
- float threshold{0.5f};
+ double threshold{0.1};
+ double position_threshold{0.1f};
// Edit tab
- Selections selections;
+ Ranges ranges;
// Export tab
QString prefix;