WORK IN PROGRESS - Utility to extract/convert Polyend Tracker PTI files
Right now there is code to parse/render Wav/Soundfont/PTI files. The Soundfont to PTI conversion is next.
This project is BSD-licensed. Some soundfont parser code is derived from HCodecs, which is licensed the same.
- Should have
<control>section- Optional
default_pathfor relative path to samples - Optional
hint_tempofor Hz to cycles/step conversion
- Optional
- Show have
<global>section- Automation mapping:
- lfo/eg01 -> volume
- lfo/eg02 -> panning
- lfo/eg03 -> cutoff
- lfo/eg04 -> pitch
- LFO attrs:
- lfoXX_wave = wav type as int
- lfoXX_freq = 0 to 20 in Hz
- lfoXX_{cat}={depth}
- Calculate cycles/step by 60 * freq / tempo (e.g. 60 s/min * 20 cycles/sec / 120 BPM = 10 cycles/beat)
- Envelope attrs:
- egXX_attack = 0 to 100 float in seconds
- egXX_decay = 0 to 100 float in seconds
- egXX_sustain = 0 to 100 float in %
- egXX_release = 0 to 100 float in seconds
- egXX_{cat}={depth}
- Only ONE automation can be defined per category
- If any attrs are defined, then lfo/eg_{cat}={depth} must also be defined and all attrs must be defined with it
- Automation mapping:
- Must have at least one
<region>section- Non-overlapping key ranges with
lokey=0on lowest andhikey=127on highest for full coverage
- Non-overlapping key ranges with
- Auto sampler settings:
- Range start: Cx
- Range end: Cy
- Sample every: 12 semi
- Round robin: No
- Sustain: 2.0 s
- Velocity layers: 1
- Velocity response: Custom
- Auto loop: Search with
- Auto loop start: 20
- Auto loop end: 90
- Input gain: -7 dB (depends on instrument)
- Take a patch and remove all LFO/Env/Filter (pure oscillators)
- Pick a middle C (one where 2 oct below and 2 oct above sound ok)
- Play some notes and set the input gain so it doesn't clip
- Name the patch InstName
- Sample those five notes for 3 seconds at velocity 100
- Initialize the patch (TODO add command to scrapti exe)
- Open in Sfortzando and edit according to model
- Convert to PTI (TODO add command to scrapti exe)
Can set REBUILD=1 to force builds.
./scrapti.sh init path/to/pack PackName
<global>
// General params
pan=0
tune=0
// Filter
fil_type=lpf_2p
cutoff=22050
resonance=0
// Volume Env
eg01_volume=0
eg01_attack=0
eg01_decay=0
eg01_sustain=100
eg01_release=0
// Volume LFO
lfo01_volume=0
lfo01_wave=0
lfo01_freq=0
// Panning Env
eg02_panning=0
eg02_attack=0
eg02_decay=0
eg02_sustain=100
eg02_release=0
// Panning LFO
lfo02_panning=0
lfo02_wave=0
lfo02_freq=0
// Cutoff Env
eg03_cutoff=0
eg03_attack=0
eg03_decay=0
eg03_sustain=100
eg03_release=0
// Cutoff LFO
lfo03_cutoff=0
lfo03_wave=0
lfo03_freq=0
// Pitch Env
eg04_pitch=0
eg04_attack=0
eg04_decay=0
eg04_sustain=100
eg04_release=0
// Pitch LFO
lfo04_pitch=0
lfo04_wave=0
lfo04_freq=0