AmigaPal
Sample prep/converter tool for Protracker
Install / Use
/learn @echolevel/AmigaPalREADME
AmigaPal
A desktop app for preparing and converting 8bit samples to use in Protracker on the Commodore Amiga. Also suitable for some other trackers, perhaps certain old hardware samplers, Nintendo Game Boy running LSDJ, and similar stuff.
<p align="center"> <img align src="./screenshot.png" width="450" height="664"> </p>Features:
- Built with Electron, so should run on MacOS, Windows and Linux.
- Drag and drop files to load, or load an entire directory for batch conversion to 8SVX or WAV
- Supports PCM WAV, MP3, AAC, OGG, and FLAC as source audio files
- Waveform display and preview player for selecting time ranges to which the output will be trimmed
- Keyboard controls: preview notes with classic tracker-style QWERTY pianokey layout, F1/F2 to shift octaves and
\(next to Left Shift on UK keyboards) to kill a currently-playing note. Up/down arrows highlight previous or next file items - Target filesize and duration are calculated on the fly, so you can trim/downsample a sample to fit within your tracker module format's size limit (128kb for Protracker MOD, though commonly believed to be 64kb - including by some older replayers)
- Select a target ProTracker note to automatically set the relevant samplerate
- Optional preview of how the sample(s) will sound after being downsampled and converted to 8bit. The reduction factor of the samplerate preview is determined by the 'ProTracker note' setting
- Lowpass and highpass filters: they can be used separately, or together as a bandpass. Previewing in AmigaPal will let you hear a very close approximation of the way it'll sound in ProTracker
- Waveform display is now peak-normalised, for extra visual clarity when trimming
- Global volume control for previewing audio (does not affect output gain/normalisation)
- All options are saved automatically for next time
- If you've got a big list of files but want different settings for each of them, just tweak the settings between conversions - they all take immediate effect on any subsequent conversions
- Output to the same directory as the source, or choose a target path for all converted files (this option will be saved)
- Optional per-item brickwall limiter, for beefing up samples before conversion. See changelog for details
- WAV export option added - writes 8bit mono RIFF PCM WAVs which might be useful for Game Boy musicians. Let me know how this works out!
- Optionally save a 4-channel Amiga Protracker MOD file as well as the converted samples. This MOD will have whatever title you give it, or a default title and filename, and will contain all the samples you've converted occupying sample slots in whatever order they appear in AmigaPal. This is probably as fast as it's possible to get started with Protracker!
Changelog:
16th March 2022 -
- Copy-to-all buttons added per item: these copy the current limiter, lo cut, hi cut and PT note values from the currently selected item to all other items in the list (they don't look pretty, yet, but they're there)
- Tooltips have been added to lots of buttons to make things a bit clearer
- Tick-boxes can now be toggled when clicking on the tick/x, rather than just the text label
- Lots of tidy-up in the code, in case anyone else ever wants to mess with it
15th March 2022 -
-
‘Preview output’ now lets you hear almost exactly how the exported 8SVX/WAV file will sound. Previously the preview was quite a rough approximation; now it renders an output buffer using the current SR/filter/limiter settings every time you play a note, so you can do quick comparisons before deciding on the best compromise between quality and size.
-
When ‘Preview output’ is disabled, the original sample is always played dry - no filters or limiters. This reduces the variables when you’re trying to objectively compare the (presumably) high quality source sample with the lower quality output sample.
-
Since preview playback involves the non-realtime rendering of the requested note, any changes made to the lo/hi cut filters or the limiter won’t be heard until a new note is played.
-
In case it’s not obvious, importing gargantuan samples might involve commensurately long delays when playing preview notes! Having said that, previewing a short trim section only renders that section, so loading big samples in order to export short sections shouldn’t cause noticeable delays on a reasonably modern computer.
-
“Near total accuracy” is what I said in the commit message for this update… What does this mean? Previously I used some realtime DSP effects to create a preview playback buss: the lo/hi cut filters and the limiters (user-programmable and internal) were identical to those used on the non-realtime output rendering stage, but the bitdepth and sample reduction were faked in an…unsatisfactory way. Akira (aka FastRam, one of the PT-1210 team) asked me about the discontinuities (clicks’n’pops) in that mode which made quality comparisons difficult and it motivated me to do what I should’ve done ages ago and fix it. Now the preview playback buffer is fed by the exact same offline rendering process that does the file export, so you’re hearing the output bytes as close as possible to the way their target platforms will play them back. ‘As possible’ - so what I can’t emulate is e.g. the Amiga’s DAC stage and its inherent aliasing artefacts, or similar characteristics of other vintage systems and samplers, but I’ve done my best to get our 8bit output buffer back into WebAudio’s native 32bit float buffer in as harsh and unsanitised a way as I can :)
-
“Why are some samples, or sample sections, mega loud in the preview output?” - probably because they’ve been normalised as part of the output render. This will be especially noticeable if you trim to a quiet section within a generally louder sample; AmigaPal always aims to get the best SNR before doing any conversion, so if there’s any headroom available within your trim points, that section will be amplified just short of clipping. Bear in mind that this is NOT the same as maximisation, where hard limiting/compression is applied to destructively bring up the perceived level without clipping. You can do that with the Limiter :)
-
There's a slight inconsistency between playback durations depending on whether 'Preview output' is enabled. This is due to some latency in the non-preview chain not being compensated for. The preview duration, however, is the exact duration of the output file (give or take a single byte, if the output buffer has to be padding to the nearest even number of bytes). So rely on preview for getting your trim markers set right!
1st December 2020 -
- v0.0.7-beta.2 hopefully fixes the mysterious Windows 10 bug where dropping or loading multiple files caused them to be decoded badly (or not at all), followed by their item entries disappearing.
13th May 2020 -
- SoX is no longer a dependency! No more messing about with unreliable installation paths, environment variables or stdin/stdout. Now all file reading, signal processing, resampling, bit-reduction and file export is done natively in the app.
- Migrating away from SoX means that what you hear in AmigaPal when previewing a sample is much closer to what you'll hear after exporting. Previously the preview system used vague approximations of the settings that were passed to SoX, but now the offline processing and export system uses exactly the same DSP chains as the preview system. Any further difference is due to your tracker's internal resampling algorithm or the Amiga's hardware.
- Previewing notes is now done with the QWERTY keys and mimics Protracker's non-keyjazz-mode behaviour almost exactly: preview the note on three octaves (switch between upper and lower octave pairs using F1 and F2), and kill a playing note with the
\key (the one next to Left Shift on my keyboard). - One major improvement in that area is the addition of a per-item brickwall limiter/maximiser, which lets you smash the hell out of a sample before conversion - often desirable when trying to get good signal to noise performance out of Protracker on a hardware Amiga. It has a very fast attack and a pretty quick release, and the only exposed controls are threshold (reduce this to slam down the dynamic range) and make-up gain, which is usually necessary for bringing the level back up once the dynamics have been flattened. Experiment with this...
- The limiter's makeup gain can also be used when the limiter is switched off, if you simply want to boost a track's level before it's downsampled and bit-reduced. Every time you turn off an item's limiter, however, the makeup gain will drop to zero. This is to protect your ears in case you had the makeup gain way up and the threshold right down while using the limiter...
- Stereo-mono mixdown has been simplified: now everything is merged with a pan-law gain drop to avoid clipping
- AmigaPal still exports Protracker-friendly 8SVX files, but can optionally save 8bit mono RIFF PCM WAVs instead. The audio is identical, and as with 8SVX the samplerate is dictated by the 'Protracker note' option (global or per-item). There was a request for WAV export by Game Boy musician tobokegao so hopefully this is useful to some people. I believe the samplerate you need for LSDJ is 11468hz and the closest Protracker note to this value is F#2 (11744), so hopefully that works. If not, please let me know and I'll add an option to export 11468hz WAV.
- Everything should be running more quickly as a whole bunch of code's been optimised.
- AmigaPal can now (optionally) save a Protracker mod file along with the converted 8SVX samples! It simply writes your samples into the mod's instrument slots (to a maximum of 31) and takes an optional songname/filename, then all you need to do is load that module into a tracker, add some notes, and you've got a hit on your hands. By default the samples will be limited to 64kb no matter how large the converted 8SVX file is, but the 1
