|
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) |
| float | normalizedToPan (double normalized) |
| Pan conversion between tracktion (-1.0 to 1.0) and DAWproject (0.0-1.0 normalized, 0.5 = centre). | |
| double | panToNormalized (float pan) |
| 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 > engine::dawproject::parseDAWproject | ( | Engine & | engine, |
| const juce::File & | file, | ||
| ParseOptions | options = {} |
||
| ) |
Parses a .dawproject file and creates an Edit.
| engine | The Engine to use for the new Edit |
| file | The .dawproject file |
| options | Options controlling the import behavior |
References parseDAWproject().
Referenced by parseDAWproject().
| tl::expected< std::unique_ptr< juce::XmlElement >, juce::String > engine::dawproject::createDAWproject | ( | Edit & | edit, |
| WriteOptions | options = {} |
||
| ) |
Creates the project.xml content from an Edit.
| edit | The Edit to export |
| options | Options controlling the export behavior |
References createDAWproject().
Referenced by createDAWproject().
| juce::Result 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 |
References writeDAWprojectFile().
Referenced by writeDAWprojectFile().
| float engine::dawproject::velocityToNormalized | ( | int | velocity | ) |
Velocity conversion between tracktion (0-127 int) and DAWproject (0.0-1.0 normalized).
References velocityToNormalized().
Referenced by velocityToNormalized().
| int engine::dawproject::normalizedToVelocity | ( | float | normalized | ) |
References normalizedToVelocity().
Referenced by normalizedToVelocity().
| float 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 controllerValueToNormalized().
Referenced by controllerValueToNormalized().
| int engine::dawproject::normalizedToControllerValue | ( | float | normalized, |
| int | controllerType | ||
| ) |
References normalizedToControllerValue().
Referenced by normalizedToControllerValue().
| const char * engine::dawproject::controllerTypeToExpression | ( | int | type | ) |
Maps tracktion MidiControllerEvent type to DAWproject expression type string.
References controllerTypeToExpression().
Referenced by controllerTypeToExpression().
| int 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 expressionToControllerType().
Referenced by expressionToControllerType().
| double engine::dawproject::ticksToBeats | ( | int64_t | ticks, |
| int | ticksPerQuarterNote = defaultTicksPerQuarterNote |
||
| ) |
References ticksToBeats().
Referenced by ticksToBeats().
| int64_t engine::dawproject::beatsToTicks | ( | double | beats, |
| int | ticksPerQuarterNote = defaultTicksPerQuarterNote |
||
| ) |
References beatsToTicks().
Referenced by beatsToTicks().
| juce::String engine::dawproject::colourToDAWprojectString | ( | juce::Colour | colour | ) |
Color conversion between tracktion (juce::Colour) and DAWproject (CSS-style hex string).
References colourToDAWprojectString().
Referenced by colourToDAWprojectString().
| juce::Colour engine::dawproject::dawprojectStringToColour | ( | const juce::String & | str | ) |
References dawprojectStringToColour().
Referenced by dawprojectStringToColour().
| float engine::dawproject::normalizedToPan | ( | double | normalized | ) |
Pan conversion between tracktion (-1.0 to 1.0) and DAWproject (0.0-1.0 normalized, 0.5 = centre).
References normalizedToPan().
Referenced by normalizedToPan().
| double engine::dawproject::panToNormalized | ( | float | pan | ) |
References panToNormalized().
Referenced by panToNormalized().
| double engine::dawproject::gainToDecibels | ( | float | gain | ) |
Volume conversion between linear gain and decibels.
References gainToDecibels().
Referenced by gainToDecibels().
| float engine::dawproject::decibelsToGain | ( | double | dB | ) |
References decibelsToGain().
Referenced by decibelsToGain().
| void engine::dawproject::setAttributeIfNotEmpty | ( | juce::XmlElement & | element, |
| const char * | name, | ||
| const juce::String & | value | ||
| ) |
| void engine::dawproject::setAttributeIfValid | ( | juce::XmlElement & | element, |
| const char * | name, | ||
| double | value | ||
| ) |
References setAttributeIfValid().
Referenced by setAttributeIfValid().
| std::unique_ptr< juce::XmlElement > engine::dawproject::createXmlElement | ( | const char * | tagName | ) |
References createXmlElement().
Referenced by createXmlElement().
| juce::XmlElement * engine::dawproject::addChildElement | ( | juce::XmlElement & | parent, |
| const char * | tagName | ||
| ) |
References addChildElement().
Referenced by addChildElement().
| double engine::dawproject::parseDouble | ( | const juce::String & | str, |
| double | defaultValue = 0.0 |
||
| ) |
Parses a double from a string, handling potential formatting differences.
References parseDouble().
Referenced by parseDouble().
| int engine::dawproject::parseInt | ( | const juce::String & | str, |
| int | defaultValue = 0 |
||
| ) |
| bool engine::dawproject::parseBool | ( | const juce::String & | str, |
| bool | defaultValue = false |
||
| ) |