Swiftpack.co - orchetect/DAWFileKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by orchetect.
orchetect/DAWFileKit 0.2.0
A Swift library for reading and writing common import/export file formats between popular DAW applications.
⭐️ 5
🕓 27 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/orchetect/DAWFileKit.git", from: "0.2.0")


CI Build Status Platforms - macOS 10.12+ | iOS 10+ | tvOS 10+ | watchOS (beta) License: MIT

A Swift library for reading and writing common import/export file formats between popular DAW applications.

Supported File Formats

Format Read Write
Cubase: Track Archive XML yes† yes†
Pro Tools: Session Info Text file yes n/a
Logic Pro X‡ future? future?
Digital Performer‡ future? future?
(more platforms may be added in future)‡

† Full read/write support for Cubase Track Archive XML files is implemented for tracks with absolute timebase, as well as tracks with musical timebase where the tempo track uses only 'Jump' tempo events and there are no 'Ramp' tempo events

‡ Research is needed to determine what file formats are common and the viability of their implementation


The library implicitly makes use of TimecodeKit as the format to represent timecode values read/written from the files.


No formal documentation yet.

Unit Tests

Core unit tests implemented. More exhaustive tests can be added in future.

Known Issues

Cubase: Track Archive XML

  • Ascertaining the absolute time position of events on tracks that are in musical timebase when the tempo track contains 'Ramp' tempo event(s) is currently not possible. The internal curve function that Cubase uses to calculate tempo ramps is not intuitive (ie: not linear or any obvious known curve function), and it may be a proprietary function. So this may never be possible with this library. The workaround is to not use 'Ramp' tempo events in a session, or if that is unavoidable, move/copy events to a track that is using absolute timebase which can be interpreted reliably with this library.
  • Track Archive XML file read/write has not been tested with Nuendo yet but it is likely that it should work the same as with Cubase.

Pro Tools: Session Info Text file

  • Currently, the parser relies on certain export options to be selected when exporting a Session Text file from Pro Tools so that the parser can read it correctly. Additional routines/heuristics need to be added to add ruggedness to the parser so that it can detect all of the various export options based on the text file contents, and successfully parse the file regardless and/or output meaningful error conditions that describe why the file may not be in a parsable format.

  • ☐ Add subframes capability

  • ☐ Check frame rate strings PT outputs to Session Info text file and ensure parser reads them correctly

  • ☐ Handle new-line and tab characters in Markers list name/comment fields (Pro Tools allows them to be inserted or pasted from the clipboard when editing markers)

  • ☐ Add parsing modes specific for "TextEdit 'TEXT'" and "UTF-8 'TEXT'" File Format encodings

    • ☐ Analyze to see how extended characters are being encoded or (assumed to be) lossily converted to meaningless characters ("É" for "…", "Ñ" for "—", etc.)
    • ☐ Improve lossy character fix/replacement heuristic


The author(s) have no affiliation with Avid, Steinberg, or any other company relating to the software packages that are mentioned in this library. This library is built based on easily discernable open file data formats and at no time has reverse-engineering been employed to intuit their format or implementation. The goal of this library is to promote easier interoperability for developers with these common and useful data file formats.

The library is provided as-is with no warranties. See the LICENSE for more details.


Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself @orchetect.


Licensed under the MIT license. See LICENSE for details.


Contributions are welcome. Feel free to post an Issue to discuss.


Stars: 5
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

27 weeks ago
  • Refactored inits to be throwing instead of returning Optionals
  • Library no longer logs anything to the console autonomously - all parsing/encoding messages are now returned from their respective methods
  • ProTools.SessionInfo and Cubase.TrackArchive API is now more consistent
  • Library-wide file organization improvements

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics