Converting Audio/Samples for Removers Library Playback

Converting Audio/Samples for Removers Library Playback

We have found ourselves a bit frustrated with prepping audio or samples for audio playback in the Removers Library. Either with MOD files or just playing back a raw sample with the set_voice() function. Specifically, we spend time learning how to properly do it, we then generate the audio that we need, and then a few months later forget how to do it. Time to make a record of our process in order make this relearning a bit easier. There are a couple methods we are going to cover. These are the AmigaPal method, and a more long term, command line, solution using sox.

Build/Compile & Running AmigaPal

First off, the “simplest” approach to converting your audio/samples is to use a program called AmigaPal to do the conversion for you read the instructions there for how to use the application itself). If you are on a windows machine, this is easy since the developer releases a prebuilt executable for Windows users. For other OS users, we aren’t so lucky, so lets go over how to build the application.

The developer is using node.js to build the programs which means that we have to install a few development tools to compile, build, and run the program. Here are the steps for that for any version of Linux that has access to the Debian/Ubuntu repositories. Credit goes to the developer for some of the instructions listed on their GitHub page.

1. Install npm, git, sox, and snap so we can download the necessary tools to build AmigaPal.

sudo apt-get install npm git snap sox

2. Install a few developer tools through npm.

sudo npm install -g electron-forge

3. Install a few developer tools through npm.

snap install bower --classic

4. Navigate to a directory that you wish to store the source code for AmigaPal and clone the AmigaPal repository.

git clone https://github.com/echolevel/AmigaPal.git

5. Navigate to the cloned project and execute the following commands.

npm install && bower install

Next we can do a couple things in order to actually run the application. We can run it natively in Linux or we can run it in wine.

Running Natively

To immediately start using it like a developer just run this command in the AmigaPal directory. This will launch the application and is usable on Linux. The drawback here is that you have to navigate to this directory and run this command to launch the application.

electron-forge start

Running in Wine & Packaging for All Platforms

We are actually going to be building final packages for all platforms here. After running this you will have binaries that you can run for Windows and Linux. Unfortunately we haven’t been able to figure out why the native Linux binary won’t run, but the Windows executable does work through wine.

There are a few more tools we need to install to build a Windows and run a windows binary.

sudo npm install electron-packager --save-dev

Install wine and winbind.

sudo apt-get install wine winbind

Then run the included script in the AmigaPal directory.

bash ./buildrelease.sh

After the build process is complete navigate to to the ./releases/amigapal-win32-x64 directory and run the executable through wine.

NOTE: There may still be something missing in the build process here. I have tried this process to build a Windows executable a couple times on a few systems and it will work on one computer but not on the other. If it doesn’t work for you, you will need to use the instructions for running it as a developer.

Command Line Conversions Using Sox

If don’t want to deal with an application that is a bit combursome to actual build, you can just use sox. sox is a long standing command line utility for audio conversion and manipulation, and is very simple to install in a debian distribution. The draw back here is tweaking options to get a good sample or audio file that sounds good on the Jaguar can be difficult. Things like hissing and cutting out the highs and lows are a bit manual and take more time to work out. In contrast with the nice sliders and instant preview in AmigaPal. If you need need a quick and dirty conversion though, this is the way to go.

Below I have provided a generic example, based off of the examples from the AmigaPal GitHub page.

sox INPUTFILENAME.wav OUTPUTFILENAME.8SVX norm 0.5 remix - highpass -1 1000 lowpass -1 20 rate 27928 norm 0.5 dither -S