Repository navigation
Add support for the Teenage Engineering OP-XY format (#72) - #302
Merged
Merged
Conversation
The multi-sample presets of the OP-XY are open: a preset is a folder with the ending '.preset' which holds all samples as WAV files and a 'patch.json' with the mapping and the settings of the engine. See issue git-moss#72, which contains an example of the description file. Reading gives the key range, root key, tuning, gain, play range and loop of every region plus the amplitude envelope and the pitch bend range, which the device stores once for the whole preset. Writing creates such a folder, which only needs to be copied to the device. Two limits of the format are handled explicitly: it maps only across the keyboard, so of several zones which cover the same keys the one which plays at the highest velocity is kept, and the device plays at most 24 regions. The regions are written the way the device expects them, covering the keyboard without gaps - a region ends at its own upper key and starts one key above the previous one. Verified by converting an E-mu Emulator X bank of 509 presets: 5152 regions, no structural problems, no gaps and no duplicate key ranges, and all 509 written presets read back with their key ranges and root keys unchanged.
The device manual states that a sample may be at most 20 seconds long (and that a multi-sample preset holds at most 24 zones, which was already handled). Samples are not truncated silently - the number of too long samples is reported so that the trim processing option can be used.
git-moss
added a commit
that referenced
this pull request
Sep 25, 2026
* Add support for the Teenage Engineering OP-XY format The multi-sample presets of the OP-XY are open: a preset is a folder with the ending '.preset' which holds all samples as WAV files and a 'patch.json' with the mapping and the settings of the engine. See issue #72, which contains an example of the description file. Reading gives the key range, root key, tuning, gain, play range and loop of every region plus the amplitude envelope and the pitch bend range, which the device stores once for the whole preset. Writing creates such a folder, which only needs to be copied to the device. Two limits of the format are handled explicitly: it maps only across the keyboard, so of several zones which cover the same keys the one which plays at the highest velocity is kept, and the device plays at most 24 regions. The regions are written the way the device expects them, covering the keyboard without gaps - a region ends at its own upper key and starts one key above the previous one. Verified by converting an E-mu Emulator X bank of 509 presets: 5152 regions, no structural problems, no gaps and no duplicate key ranges, and all 509 written presets read back with their key ranges and root keys unchanged. * OP-XY: report samples which exceed the length the device plays The device manual states that a sample may be at most 20 seconds long (and that a multi-sample preset holds at most 24 zones, which was already handled). Samples are not truncated silently - the number of too long samples is reported so that the trim processing option can be used. --------- Co-authored-by: Jürgen Moßgraber <juergen.mossgraber@googlemail.com>
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.
The multi-sample presets of the OP-XY are open, as #72 describes: a preset is a folder with the ending
.presetwhich holds all samples as WAV files and apatch.jsonwith the mapping and the settings of the engine. The example of that file in the issue was the starting point.Reading gives the key range, root key, tuning, gain, play range and loop of every region, plus the amplitude envelope and the pitch bend range, which the device stores once for the whole preset.
Writing creates such a folder, which only needs to be copied to the device.
Three limits which the device manual states are handled explicitly:
The regions are written the way the device expects them and the way the community tools produce them: covering the keyboard without gaps, each region ending at its own upper key and starting one key above the previous one.
Verified by converting an E-mu Emulator X bank of 509 presets - 5152 regions, no structural problems, no key range gaps and no duplicate ranges, every referenced sample present - and by reading all 509 written presets back, which reproduces their key ranges and root keys unchanged. Not tested on the device itself.
The feature matrix has the two rows for the format.