|
TracktionEngine
|
DAWproject interchange format support. More...
Namespaces | |
| namespace | xml |
| DAWproject XML element and attribute names. | |
Classes | |
| class | DAWprojectExporter |
| Internal class for exporting an Edit to DAWproject format. More... | |
| class | DAWprojectImporter |
| Internal class for importing DAWproject files into an Edit. More... | |
| class | IDGenerator |
| ID generator for DAWproject XML elements. More... | |
| class | IDRefResolver |
| ID reference resolver for parsing DAWproject XML. More... | |
| struct | ParseOptions |
| Options for parsing a DAWproject file. More... | |
| struct | WriteOptions |
| Options for writing a DAWproject file. More... | |
Functions | |
| std::unique_ptr< Edit > | parseDAWproject (Engine &engine, const juce::File &file, ParseOptions options={}) |
| Parses a .dawproject file and creates an Edit. | |
| tl::expected< std::unique_ptr< juce::XmlElement >, juce::String > | createDAWproject (Edit &edit, WriteOptions options={}) |
| Creates the project.xml content from an Edit. | |
| juce::Result | writeDAWprojectFile (const juce::File &file, Edit &edit, WriteOptions options={}) |
| Writes a complete .dawproject file from an Edit. | |
| float | velocityToNormalized (int velocity) |
| Velocity conversion between tracktion (0-127 int) and DAWproject (0.0-1.0 normalized). | |
| int | normalizedToVelocity (float normalized) |
| float | controllerValueToNormalized (int value, int controllerType) |
| MIDI controller value conversion. | |
| int | normalizedToControllerValue (float normalized, int controllerType) |
| const char * | controllerTypeToExpression (int type) |
| Maps tracktion MidiControllerEvent type to DAWproject expression type string. | |
| int | expressionToControllerType (const juce::String &expression) |
| Maps DAWproject expression type string to tracktion MidiControllerEvent type. | |
| double | ticksToBeats (int64_t ticks, int ticksPerQuarterNote=defaultTicksPerQuarterNote) |
| int64_t | beatsToTicks (double beats, int ticksPerQuarterNote=defaultTicksPerQuarterNote) |
| juce::String | colourToDAWprojectString (juce::Colour colour) |
| Color conversion between tracktion (juce::Colour) and DAWproject (CSS-style hex string). | |
| juce::Colour | dawprojectStringToColour (const juce::String &str) |
| double | gainToDecibels (float gain) |
| Volume conversion between linear gain and decibels. | |
| float | decibelsToGain (double dB) |
| void | setAttributeIfNotEmpty (juce::XmlElement &element, const char *name, const juce::String &value) |
| XML helper functions. | |
| void | setAttributeIfValid (juce::XmlElement &element, const char *name, double value) |
| std::unique_ptr< juce::XmlElement > | createXmlElement (const char *tagName) |
| juce::XmlElement * | addChildElement (juce::XmlElement &parent, const char *tagName) |
| double | parseDouble (const juce::String &str, double defaultValue=0.0) |
| Parses a double from a string, handling potential formatting differences. | |
| int | parseInt (const juce::String &str, int defaultValue=0) |
| Parses an int from a string. | |
| bool | parseBool (const juce::String &str, bool defaultValue=false) |
| Parses a bool from a string or attribute value. | |
DAWproject interchange format support.
DAWproject is an open interchange format for digital audio workstation projects. It stores project data as XML files (project.xml, metadata.xml) bundled in a ZIP archive along with embedded audio files.
| std::unique_ptr< Edit > tracktion::engine::dawproject::parseDAWproject | ( | Engine & | engine, |
| const juce::File & | file, | ||
| ParseOptions | options = {} |
||
| ) |
| tl::expected< std::unique_ptr< juce::XmlElement >, juce::String > tracktion::engine::dawproject::createDAWproject | ( | Edit & | edit, |
| WriteOptions | options = {} |
||
| ) |
| juce::Result tracktion::engine::dawproject::writeDAWprojectFile | ( | const juce::File & | file, |
| Edit & | edit, | ||
| WriteOptions | options = {} |
||
| ) |
Writes a complete .dawproject file from an Edit.
This creates a ZIP archive containing:
| file | The destination .dawproject file |
| edit | The Edit to export |
| options | Options controlling the export behavior |
| float tracktion::engine::dawproject::velocityToNormalized | ( | int | velocity | ) |
Velocity conversion between tracktion (0-127 int) and DAWproject (0.0-1.0 normalized).
| int tracktion::engine::dawproject::normalizedToVelocity | ( | float | normalized | ) |
| float tracktion::engine::dawproject::controllerValueToNormalized | ( | int | value, |
| int | controllerType | ||
| ) |
MIDI controller value conversion.
tracktion_engine stores most controller values as 14-bit (value << 7 for 7-bit CCs). DAWproject uses normalized 0.0-1.0 values.
References tracktion::engine::MidiControllerEvent::pitchWheelType.
| int tracktion::engine::dawproject::normalizedToControllerValue | ( | float | normalized, |
| int | controllerType | ||
| ) |
| const char * tracktion::engine::dawproject::controllerTypeToExpression | ( | int | type | ) |
Maps tracktion MidiControllerEvent type to DAWproject expression type string.
References tracktion::engine::MidiControllerEvent::aftertouchType, tracktion::engine::MidiControllerEvent::channelPressureType, tracktion::engine::MidiControllerEvent::pitchWheelType, and tracktion::engine::MidiControllerEvent::programChangeType.
| int tracktion::engine::dawproject::expressionToControllerType | ( | const juce::String & | expression | ) |
Maps DAWproject expression type string to tracktion MidiControllerEvent type.
For channelController, returns -1 (caller should use the controller attribute).
References tracktion::engine::MidiControllerEvent::aftertouchType, tracktion::engine::MidiControllerEvent::channelPressureType, tracktion::engine::MidiControllerEvent::pitchWheelType, and tracktion::engine::MidiControllerEvent::programChangeType.
| double tracktion::engine::dawproject::ticksToBeats | ( | int64_t | ticks, |
| int | ticksPerQuarterNote = defaultTicksPerQuarterNote |
||
| ) |
| int64_t tracktion::engine::dawproject::beatsToTicks | ( | double | beats, |
| int | ticksPerQuarterNote = defaultTicksPerQuarterNote |
||
| ) |
| juce::String tracktion::engine::dawproject::colourToDAWprojectString | ( | juce::Colour | colour | ) |
Color conversion between tracktion (juce::Colour) and DAWproject (CSS-style hex string).
| juce::Colour tracktion::engine::dawproject::dawprojectStringToColour | ( | const juce::String & | str | ) |
| double tracktion::engine::dawproject::gainToDecibels | ( | float | gain | ) |
Volume conversion between linear gain and decibels.
| float tracktion::engine::dawproject::decibelsToGain | ( | double | dB | ) |
| void tracktion::engine::dawproject::setAttributeIfNotEmpty | ( | juce::XmlElement & | element, |
| const char * | name, | ||
| const juce::String & | value | ||
| ) |
XML helper functions.
| void tracktion::engine::dawproject::setAttributeIfValid | ( | juce::XmlElement & | element, |
| const char * | name, | ||
| double | value | ||
| ) |
| std::unique_ptr< juce::XmlElement > tracktion::engine::dawproject::createXmlElement | ( | const char * | tagName | ) |
| juce::XmlElement * tracktion::engine::dawproject::addChildElement | ( | juce::XmlElement & | parent, |
| const char * | tagName | ||
| ) |
| double tracktion::engine::dawproject::parseDouble | ( | const juce::String & | str, |
| double | defaultValue = 0.0 |
||
| ) |
Parses a double from a string, handling potential formatting differences.
| int tracktion::engine::dawproject::parseInt | ( | const juce::String & | str, |
| int | defaultValue = 0 |
||
| ) |
Parses an int from a string.
| bool tracktion::engine::dawproject::parseBool | ( | const juce::String & | str, |
| bool | defaultValue = false |
||
| ) |
Parses a bool from a string or attribute value.