Add Polyend Tracker instrument (PTI) format support (read + write)#151
Open
douglas-carmichael wants to merge 1 commit into
Open
Add Polyend Tracker instrument (PTI) format support (read + write)#151douglas-carmichael wants to merge 1 commit into
douglas-carmichael wants to merge 1 commit into
Conversation
20da98a to
f864fad
Compare
…riting A PTI file is a single binary file which holds one 16-bit / 44.1kHz sample (mono or stereo, stored non-interleaved) together with the instrument parameters. Reading translates the play mode, the playback start/end and loop points, the loop mode (forward / backward / ping-pong), the filter (low-, high- and band-pass with cutoff, resonance and a cutoff envelope), the amplitude and pitch envelopes as well as volume, panning and tuning. Instruments in a slice play mode are split into one trimmed sample zone per slice, mapped chromatically from MIDI note 60. Writing stores the play mode (one-shot or a loop mode), the start/end and loop points, the filter, the amplitude/cutoff/pitch envelopes as well as volume, panning and tuning. The audio is converted to 16-bit / 44.1kHz; mono or stereo is preserved. As the format holds only a single sample, the zone covering MIDI note 60 (otherwise the first zone) is stored and the others are ignored. The binary layout matches the factory files (audio at offset 388, a 372 byte parameter block, a trailing checksum); the playback start/end, loop and slice positions are stored proportionally to the sample length (0 - 65535). This has not been verified on physical Polyend Tracker hardware; it was validated against the tracker-lib reference implementation and round-trip conversions.
f864fad to
39ae2e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the Polyend Tracker instrument format (
.pti) — used by the Polyend Tracker, Tracker Mini and Tracker+ — for both reading and writing. A PTI file is a single binary file holding one 16-bit / 44.1 kHz sample (mono or stereo) together with the instrument parameters. It is registered like every other format inConverterBackend(CLI tokenpolyendtracker).What is converted
Read (
.pti→ multi-sample):Write (multi-sample →
.pti):Implementation notes
format/polyend/(PolyendTrackerDetector,PolyendTrackerCreator,PolyendTrackerConstants,PolyendTrackerValueConverter). No new settings classes — the detector uses the standard metadata settings and the creator has no options.Testing
.ptifiles (forward-loop, beat-slice, wavetable and granular play modes) detect without error..pti→ 23 of the 24 writable formats succeed. (The Maschine creator rejects its default "version 1" regardless of the source, which is unrelated to this change.) The SFZ output was verified by hand — slice key ranges, sample offsets, loop points, filter and volume are all correct..pti, and all 100 written files re-detect OK. The stereo de-interleave was verified to be a byte-perfect inverse, and a PTI → PTI round-trip is near-lossless (audio identical; loop points within ~0.01 % due to the proportional storage).Caveat