Skip to content

Add support for the Teenage Engineering OP-XY format (#72) - #302

Merged
git-moss merged 3 commits into
git-moss:mainfrom
douglas-carmichael:opxy-format
Aug 2, 2026
Merged

git-moss merged 3 commits into
git-moss:mainfrom
douglas-carmichael:opxy-format

Conversation

@douglas-carmichael

Copy link
Copy Markdown
Contributor

The multi-sample presets of the OP-XY are open, as #72 describes: 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. 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:

  • A preset holds at most 24 zones; a source with more reports how many were dropped.
  • Multiple velocities are not supported, so of several zones which cover the same keys the one which plays at the highest velocity is kept.
  • A sample may be at most 20 seconds long. Those are reported rather than truncated silently, so the trim processing option can be used deliberately.

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.

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
git-moss merged commit c00c334 into git-moss:main Aug 2, 2026
@douglas-carmichael
douglas-carmichael deleted the opxy-format branch August 4, 2026 09:48
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants