Giter VIP home page Giter VIP logo

ptformat's Introduction

ptformat travis

ptformat reads and parses ProTools session files.

Audio and MIDI source/region/track information is extracted, as well as MIDI note events.

The idea is to make ardour open PT sessions.

Current functionality

Decrypt and parse a PT file:

make
./ptftool file.pt{s,5,f,x}

API

See ptftool.cc for example usage

What works?

PT version Decryption Audio (Sources) Audio (Regions) Audio (Tracks) MIDI (Chunks) MIDI (Regions) MIDI (Tracks)
5 Yes Yes Yes Yes ? ? ?
6 Yes Yes Yes Yes ? ? ?
7 Yes Yes Yes Yes ? ? ?
8 Yes Yes Yes Yes Yes Yes Yes
9 Yes Yes Yes Yes Yes Yes Yes
10 Yes Yes No groups Yes Yes No groups Yes
11 Yes Yes No groups Yes Yes No groups Yes
12 Yes Yes No groups Yes Yes No groups Yes

Regression testing

To test that nothing has broken since code has been changed:

make
./ptreg

Dummy audio file generation

To make a sox script for regenerating all audio in a PT session as dummy wavs:

make
./ptgenmissing file.pt{s,5,f,x}

Hacking

To decrypt a PT session for further inspection or adding features:

make
./ptunxor file.pt{s,5,f,x} > file.unxor

License

LGPLv2.1+

TODO

  • Add >= PT10 Compound MIDI/Audio region support

Binaries in bins/

The binaries located in bins/ directory are specially crafted test sessions for regression testing this library. They are not programs!

ptformat's People

Contributors

30346044 avatar dilineshan avatar jonjonarnearne avatar mauritslamers avatar x42 avatar zamaudio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ptformat's Issues

Sample PTS file from ProTools 6 LE

Hi,

This repo is amazing ! Thanks for the effort !

Sadly I'm trying to recover some sessions recorded like 14 years ago with Protools 5 / 6 LE and a digi001 interface that isn't compatible with anything modern anymore. Also sadly younger me was not keen enough to make an export to any other filetype when shutting down the old home studio.

I originally created this file back in 2004 and has not been opened since then.

It should be like:

  • Version 6 (though some are still maybe 5 ? if so let me know and I'll upload a newer file, albeit more complex)
  • Original Sample Rate: 44100 Hz
  • Bitrate: 32 (at least the audio files seem to have this bitrate)
  • Tracks: 4 mono (2 guitars, 2 voices if I recall correctly.
  • Total audio files: 12 .wav + 1 .gkp file
  • Total fade files: 1

QADS_2003.zip

Hope it is of use to you,

Thanks!

Support for Video Timeline?

Hi there - Thanks for making this tool. I'm looking for something like this that also supports video tracks. Not a feature request really, mainly wondering any thoughts/experience on feasibility for such a thing?
Thanks!

pt import failure

Hi,

I am running Ardour 6.8.0 under Lubuntu 18.04 and when I try to import the attached protools file, Ardour crashes. The protools file was created with ProTools version 2021.12. I asked the Ardour folks about it and they directed me here stating that they use your software for ptx import.

Suggestions?

session26Mar2022.zip

PT10 session - does not open

ProTools session is attached. User reports that the session is 96k, and was created in ProTools version 10.

When importing the file, the dialog reports:
PT v10 Session @ 96000Hz
0 audio files
52 regions
40 active regions

... so apparently the audio files are not recognized in the "Audio Files" folder?

Kopie von Hot Chilli Berlin Mix_2.zip

Erroneous regions appearing (PT2019)

When running a test session we created I notice PTFormat is outputting extra regions that aren't in the project.

The incorrect regions always appear to start immediately after a real region.

See below:

Track_Name t(0) r(1) @0
Audio 1 t(1) r(1) @0
Audio 1 t(1) r(2) @26500000 (Does not exist)
Audio 2 t(2) r(1) @0
Audio 2 t(3) r(1) @0
Audio 3 t(4) r(2) @950000
Audio 3 t(4) r(0) @2240000 (Does not exist)
Audio 3 t(5) r(2) @950000
Audio 3 t(5) r(1) @2240000 (Does not exist)

Any thoughts on why this might be happening?

Attached is the test session file & session info .txt.

Regions.zip

Sample PT Cloud file for development reference

I've attached a zipped ".ptproject" folder containing a ".ptxl" file, the "Revision History" folder containing the latest project revision, and two audio files.

In our fork I've added some code to take in a .ptxl file and open the latest revision here:
Pro-Sound-Effects@6c7457a

To run ptftool with the provided session, you'll have to pass in the ".ptxl" file like so:
./ptftool "1onItLzyb9gKyQAUYP0Xkb#.ptproject/TestCloudProject.ptxl"

This is so the "Revision History" can be found relative to the .ptxl file.

1onItLzyb9gKyQAUYP0Xkb#.ptproject.zip
Note that PT cloud projects may be tied to the account that created them... so maybe there's some encryption here?

TestCloudProject_PTSettings
TestCloudProject_ProjectWindow

Compilation fails on OS X

Under OSX El Capitan, compilation fails with all options:

I only include make clangall, as c++ is an alias for clang++, which makes the other options fail because of incorrect command line parameters.

make clangall

clang++ -o ptftool -g -I/usr/local/Cellar/glib/2.46.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.46.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I. -Woverloaded-virtual -Wno-mismatched-tags -ansi -Wnon-virtual-dtor -Woverloaded-virtual -fstrict-overflow -Wall -Wcast-align -Wextra -Wwrite-strings -Wno-unused-function -std=c++98 ptftool.cc ptfformat.cc
ptftool.cc:35:3: error: use of undeclared identifier 'exit'
                exit(0);
                ^
ptftool.cc:44:3: error: use of undeclared identifier 'exit'
                exit(-1);
                ^
ptftool.cc:131:2: error: use of undeclared identifier 'exit'
        exit(0);
        ^
3 errors generated.
ptfformat.cc:686:4: warning: variable 'rindex' is uninitialized when used here [-Wuninitialized]
                        rindex,
                        ^~~~~~
ptfformat.cc:551:17: note: initialize the variable 'rindex' to silence this warning
        uint16_t rindex;
                       ^
                        = 0
ptfformat.cc:1170:24: warning: taking the absolute value of unsigned type 'unsigned long long' has no effect [-Wabsolute-value]
                                mtr.reg.startpos = labs(region_pos - mtr.reg.startpos);
                                                   ^
ptfformat.cc:1170:24: note: remove the call to 'labs' since unsigned values cannot be negative
                                mtr.reg.startpos = labs(region_pos - mtr.reg.startpos);
                                                   ^~~~
ptfformat.cc:1349:24: warning: taking the absolute value of unsigned type 'unsigned long long' has no effect [-Wabsolute-value]
                                mtr.reg.startpos = labs(region_pos - mtr.reg.startpos);
                                                   ^
ptfformat.cc:1349:24: note: remove the call to 'labs' since unsigned values cannot be negative
                                mtr.reg.startpos = labs(region_pos - mtr.reg.startpos);
                                                   ^~~~
3 warnings generated.
make: *** [clangall] Error 1

Add parsing of compound regions for v10+

In PT you can group regions together and they appear as a single region in the editor.
We need to figure out how these groupings are stored in the session file, they are probably in a particular content type, with offsets and z-layer items, but I'm not sure.

File Paths

Awesome utility! Thank you.

Is there a way to print/store the file paths?

On a reverse, note, any way to write a new .ptx file and linking files to it?

If you need any more test material, I can provide some.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.