Extracting Ensoniq SQ-80 Disk Images
Another Ensoniq SQ-80 project - to extract SQ80 disk images on a PC for the purposes of searching contents and extracting patches.
The project came about because I was organising my patches with a view to distributing some of the better ones. I have been using the wonderful SQ8L VST plugin as a librarian. It is not only an excellent emulation of the SQ80, but loads SYSEX dumps and allows the creation of large libraries. I have a lot of patches on disk, and want to make sure some of the ones that have ended up in my banks are not actually 3rd party. Large disks would have been a lot of work to go through manually, sending a SYSEX dump for each bank over MIDI to a computer one by one. As floppy disks start to fail, and floppy disk drives and the computers that they can be installed in become harder to find this is also an insurance policy for archival purposes.
Enter the sq80toolkit by Rainer Buchty. This works really well at what it does, which is make disk images. However, it didnāt have the functionality I needed, namely extracting individual banks/patches as SYSEX data.
So what I needed was a tool that could read the disk images, extract the needed data from them, and convert it to SYSEX format. I have written a command line tool - extract_sq80 - to do this and have open sourced it. Itās in python and should run on just about any platform.
It also enables just about anyone to use the disk images that are available on Rainerās page (and possibly elsewhere?) without having access to a floppy drive and the increasingly elusive double density 3 1/2ā³ floppies.
Visit the github to download the extract_sq80 tool here.
A quick step by step HOWTO:
You need a linux PC with a floppy drive in it to install the sq80toolkit on. I have no idea if sq80toolkit will work on a USB floppy drive, but I suspect it might not. I built a legacy hardware linux machine specially for this (which was a reasonable project in itself given failing hardware etc.)
Install the sq80toolkit. I also needed to install āfdutilsā, which I did using my linux distributionās package manager. There is a precompiled version of sq80toolkit, but I compiled the tool from source and had to make one change to the source. This was was to remove the check on line 74 of sq80dump.c which sees if the ioctl call fails. It was failing at run time with it on, but worked fine without it. Iām guessing this is something to do with modern linux kernels?
Once sq80toolkit is installed you can extract a disk image using the followingĀ command:
sq80dump -if=/dev/fd0 -of=IMAGE_FILE.img
/dev/fd0 indicates which floppy drive contains the disk image, the first one in this case.
The extract_sq80.py tool can be downloaded from the github. It needs python to be installed, but should run without any other dependencies.
You can then use extract_sq80.py to list the contents of the image generated in step 3, and extract whatever you need. It currently doesnāt know anything about sequences, but can extract banks or individual programs, either all at once, or individually. It also has a āvirtual bankā mode, where it combines all of the individual programs into banks so that you donāt have to deal with lots of individual programs in separate files. Some example commands are:
extract_sq80.py IMAGE_FILE.img bank --dump syx
which extracts all banks from the image in SYSEX format. Without the '--dump syx' option, it will just list them.
extract_sq80.py IMAGE_FILE.img bank --dump bin -n 2
extracts just the second bank from the image in the binary PCB format used by the SQ80 natively.
extract_sq80.py IMAGE_FILE.img prog --list
lists all of the individual programs in a more human readable format (5 programs per line, rather than one).
extract_sq80.py IMAGE_FILE.img bank --list > IMAGE_FILE_banks.txt
lists all of the banks and save the output to a text file. The --list option when used in bank mode will list all of the programs within each bank as well.
extract_sq80.py IMAGE_FILE.img virtbank -d syx
extracts all of the individual programs in up to 4 āvirtual banksā, as sysex files.
gives full usage information, so please refer to that for a more complete description.
On Linux, itās very easy to send the resulting SYSEX files to the synth. I do it like this:
amidi -p hw:2,0,0 -s BANK01.syx
where hw:2,0,0 is the MIDI port, and BANK01.syx is the sysex file dumped by extract_sq80 using the ā--dump syxā option.
gives you a list of all the MIDI ports available on your system.
Any number of tools (MIDIOx etc) can be used to do a similar thing on Windows. The SQ8L VST plugin will also read in the .syx files as is.
Please feel free to get in touch with any questions/comments.