Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions include/Application.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include "common.h"

namespace DawProject
{
/* Metadata about the application which saved the DAWPROJECT file. */
struct Application
{
std::string name; // Name of the application.
std::string version; // Version number of the application.
};
} // namespace DawProject

33 changes: 33 additions & 0 deletions include/Arrangement.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once

#include "common.h"
#include "Lanes.h"
#include "Markers.h"
#include "Points.h"

namespace DawProject
{
/* Represents the main Arrangement timeline of a DAW. */
struct Arrangement
{
/* Automation data for time-signature inside this Arrangement.
<pre><code>
&lt;Arrangement&gt;
&lt;TimeSignatureAutomation target=&quot;id-of-TimeSignatureParameter&quot; ... &gt;
&lt;TimeSignaturePoint time=&quot;0&quot; numerator=&quot;7&quot;, denominator=&quot;8&quot;/&gt;
&lt;TimeSignaturePoint time=&quot;21&quot; numerator=&quot;4&quot;, denominator=&quot;4&quot;/&gt;
...
&lt;/TimeSignatureAutomation&gt;
&lt;/Arrangement&gt;
</code></pre> */
std::optional<Points> timeSignatureAutomation;
/* Automation data for tempo inside this Arrangement, which will define the conversion between seconds and beats
at the root level. */
std::optional<Points> tempoAutomation;
std::optional<Markers> markers; // Cue markers inside this arrangement
/* The lanes of this arrangement. Generally this would contain another Lanes timeline for (and scoped to) each
track which would then contain all Note, Audio, and Automation timelines. */
std::optional<Lanes> lanes;
};
} // namespace DawProject

13 changes: 13 additions & 0 deletions include/AuPlugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "common.h"
#include "Plugin.h"

namespace DawProject
{
struct AuPlugin
: public Plugin
{
};
} // namespace DawProject

16 changes: 16 additions & 0 deletions include/Audio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "common.h"
#include "MediaFile.h"

namespace DawProject
{
struct Audio
: public MediaFile
{
int sampleRate;
int channels;
std::optional<std::string> algorithm;
};
} // namespace DawProject

18 changes: 18 additions & 0 deletions include/AutomationTarget.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

#include "common.h"

namespace DawProject
{
struct Parameter;

struct AutomationTarget
{
Parameter* parameter;
std::optional<ExpressionType> expression;
std::optional<int> channel;
std::optional<int> key;
std::optional<int> controller;
};
} // namespace DawProject

15 changes: 15 additions & 0 deletions include/BoolParameter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include "common.h"
#include "Parameter.h"

namespace DawProject
{
/* Represents a parameter which can provide a boolean (true/false) value and be used as an automation target. */
struct BoolParameter
: public Parameter
{
std::optional<bool> value; // Boolean value for this parameter.
};
} // namespace DawProject

14 changes: 14 additions & 0 deletions include/BoolPoint.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include "common.h"
#include "Point.h"

namespace DawProject
{
struct BoolPoint
: public Point
{
bool value;
};
} // namespace DawProject

13 changes: 13 additions & 0 deletions include/BuiltinDevice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "common.h"
#include "Device.h"

namespace DawProject
{
struct BuiltinDevice
: public Device
{
};
} // namespace DawProject

29 changes: 29 additions & 0 deletions include/Channel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include "common.h"
#include "Lane.h"
#include "Send.h"
#include "BoolParameter.h"
#include "RealParameter.h"
#include "Device.h"

namespace DawProject
{
/* Represents a mixer channel. It provides the ability to route signals to other channels and can contain
Device/Plug-in for processing. */
struct Channel
: public Lane
{
std::optional<MixerRole> role; // Role of this channel in the mixer.
/* Number of audio-channels of this mixer channel. (1=mono, 2=stereo…) */
std::optional<int> audioChannels;
std::optional<RealParameter> volume; // Channel volume
std::optional<RealParameter> pan; // Channel pan/balance
std::optional<BoolParameter> mute; // Channel mute
std::optional<bool> solo; // Channel solo
Channel* destination; // Output channel routing
std::vector<Send> sends; // Send levels & destination
std::vector<Device> devices; // Devices & plug-ins of this channel
};
} // namespace DawProject

13 changes: 13 additions & 0 deletions include/ClapPlugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "common.h"
#include "Plugin.h"

namespace DawProject
{
struct ClapPlugin
: public Plugin
{
};
} // namespace DawProject

26 changes: 26 additions & 0 deletions include/Clip.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#include "common.h"
#include "Nameable.h"
#include "Timeline.h"

namespace DawProject
{
struct Clip
: public Nameable
{
double time;
std::optional<double> duration;
std::optional<TimeUnit> contentTimeUnit;
std::optional<double> playStart;
std::optional<double> playStop;
std::optional<double> loopStart;
std::optional<double> loopEnd;
std::optional<TimeUnit> fadeTimeUnit;
std::optional<double> fadeInTime;
std::optional<double> fadeOutTime;
std::optional<Timeline> content;
Timeline* reference;
};
} // namespace DawProject

16 changes: 16 additions & 0 deletions include/ClipSlot.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "common.h"
#include "Timeline.h"
#include "Clip.h"

namespace DawProject
{
struct ClipSlot
: public Timeline
{
std::optional<bool> hasStop;
std::optional<Clip> clip;
};
} // namespace DawProject

15 changes: 15 additions & 0 deletions include/Clips.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include "common.h"
#include "Timeline.h"
#include "Clip.h"

namespace DawProject
{
struct Clips
: public Timeline
{
std::vector<Clip> clips;
};
} // namespace DawProject

22 changes: 22 additions & 0 deletions include/Compressor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include "common.h"
#include "BuiltinDevice.h"
#include "BoolParameter.h"
#include "RealParameter.h"

namespace DawProject
{
struct Compressor
: public BuiltinDevice
{
std::optional<RealParameter> threshold;
std::optional<RealParameter> ratio;
std::optional<RealParameter> attack;
std::optional<RealParameter> release;
std::optional<RealParameter> inputGain;
std::optional<RealParameter> outputGain;
std::optional<BoolParameter> autoMakeup;
};
} // namespace DawProject

22 changes: 22 additions & 0 deletions include/Device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include "common.h"
#include "FileReference.h"
#include "Parameter.h"
#include "BoolParameter.h"

namespace DawProject
{
struct Device
{
std::optional<BoolParameter> enabled;
DeviceRole deviceRole;
std::optional<bool> loaded;
std::string deviceName;
std::optional<std::string> deviceID;
std::optional<std::string> deviceVendor;
std::optional<FileReference> state;
std::vector<Parameter> automatedParameters;
};
} // namespace DawProject

18 changes: 18 additions & 0 deletions include/EnumParameter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

#include "common.h"
#include "Parameter.h"

namespace DawProject
{
/* Represents an enumerated parameter which can provide a value and be used as an automation target. */
struct EnumParameter
: public Parameter
{
std::optional<int> value; // Index of the enum value.
/* Number of entries in enum value. value will be in the range [0 .. count-1]. */
int count;
std::vector<std::string> labels; // Labels of the individual enum values.
};
} // namespace DawProject

14 changes: 14 additions & 0 deletions include/EnumPoint.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include "common.h"
#include "Point.h"

namespace DawProject
{
struct EnumPoint
: public Point
{
int value;
};
} // namespace DawProject

19 changes: 19 additions & 0 deletions include/EqBand.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include "common.h"
#include "BoolParameter.h"
#include "RealParameter.h"

namespace DawProject
{
struct EqBand
{
RealParameter freq;
std::optional<RealParameter> gain;
std::optional<RealParameter> Q;
std::optional<BoolParameter> enabled;
EqBandType type;
std::optional<int> order;
};
} // namespace DawProject

18 changes: 18 additions & 0 deletions include/Equalizer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

#include "common.h"
#include "BuiltinDevice.h"
#include "RealParameter.h"
#include "EqBand.h"

namespace DawProject
{
struct Equalizer
: public BuiltinDevice
{
std::vector<EqBand> bands;
std::optional<RealParameter> inputGain;
std::optional<RealParameter> outputGain;
};
} // namespace DawProject

19 changes: 19 additions & 0 deletions include/FileReference.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include "common.h"

namespace DawProject
{
/* References a file either within a DAWPROJECT container or on disk. */
struct FileReference
{
/* File path. either
<li>path within the container</li>
<li>relative to .dawproject file (when external = "true")</li>
<li>absolute path (when external = "true" and path starts with a slash or windows drive letter)</li> */
std::string path;
/* When true, the path is relative to the .dawproject file. Default value is false. */
std::optional<bool> external;
};
} // namespace DawProject

Loading