AMiGA section
Some useful tips for the best home computer platform ever made…
Convert 16 BIT WAV files to AMIGA IFF (8svx) with sox
SOX is a great tool to mass convert WAV files in order to use them in AMiGA trackers. Here is an example how to do this on Linux (target is a 16574 Hz mono file):
for i in *.wav; do sox -V -t wav $i -t sndfile -b 8 -c 1 $i.8svx gain -n -0.5 rate 16574 dither -S; done
In order to have the sample play at normal speed at a given note in your tracker, use these target frequencies (assuming you are using a PAL AMiGA):
| Note | Frequency |
|---|---|
C1 |
4143,6 |
C#1 |
4389,7 |
D1 |
4654,7 |
D#1 |
4926,2 |
E1 |
5231,4 |
F1 |
5542,0 |
F#1 |
5872,3 |
G1 |
6222,6 |
G#1 |
6592,7 |
A1 |
6982,1 |
A#1 |
7389,4 |
B1 |
7829,8 |
C2 |
8287,1 |
C#2 |
8779,4 |
D2 |
9309,4 |
D#2 |
9852,5 |
E2 |
10462,8 |
F2 |
11084,0 |
F#2 |
11744,7 |
G2 |
12445,2 |
G#2 |
13185,5 |
A2 |
13964,2 |
A#2 |
14778,7 |
B2 |
15694,2 |
C3 |
16574,3 |
C#3 |
17558,9 |
D3 |
18667,9 |
D#3 |
19705,0 |
E3 |
20864,1 |
F3 |
22168,1 |
F#3 |
23489,4 |
G3 |
24803,5 |
G#3 |
26273,3 |
A3 |
27928,3 |
A#3 |
29557,5 |
B3 |
31388,4 |
SOX can also be used as an external converter for Audacity to create .8svx files. The syntax for a stereo file looks like this:
sox -V -t wav - -t sndfile -b 8 -c 1 "%f.8svx" gain -n -0.5 rate 8287 dither -S
Use a real hard drive in E-UAE
Real hard drives can be used almost like on a real AMiGA. For partitioning, use HDinstTools from Aminet and configure the tooltype "device=uaehf.device".
Assuming the drive is seen as /dev/sdb on your host, insert exactly these lines into your .e-uaerc:
hardfile2=rw,:/dev/sdb,0,0,0,512,0, hardfile=rw,0,0,0,512,/dev/sdb
|
Note
|
You’ll have to start e-uae as root. |
Converting video files to CDXL format (wip)
Demuxing the source video to a set of ilbm images and an 8svx audio file can be done on Linux with a little script I created:
#!/bin/bash
if [ -d images ]; then
rm -r images/*
else
mkdir images
fi
# 160x100, 12 FPS version
#avconv -i "$1" -vsync 1 -r 12 -s 160x100 -pix_fmt rgb555 -f image2 images/%06d.ppm -acodec adpcm_ima_wav tmpaudio.wav
# 320x200, 12 FPS version
avconv -i "$1" -vsync 1 -r 12 -s 320x200 -pix_fmt rgb555 -f image2 images/%06d.ppm -acodec adpcm_ima_wav tmpaudio.wav
# 320x200, 24 FPS version
# avconv -i "$1" -s 320x200 -r 24 -f image2 images/%06d.ppm -acodec adpcm_ima_wav tmpaudio.wav
cd images
for i in *.ppm; do ppmtoilbm -ecs -ham6 $i > iff.`basename $i .ppm`; done
rm *.ppm
cd ..
# 22 KHz mono audio
sox -V -t wav tmpaudio.wav -t sndfile -b 8 -c 1 tmpaudio.8svx gain -n -0.5 rate 22050 dither -S
# 11 KHz mono audio, SOX seems to create a corrupted file
# sox -V -t wav tmpaudio.wav -t sndfile -b 8 -c 1 tmpaudio.8svx gain -n -0.5 rate 11025 dither -S
rm tmpaudio.wav
echo "Size of the audio file in bytes:"
du -hb tmpaudio.8svx
echo "Number of images:"
ls -1 images|wc -l
exit 0
As there is no possibility (yet) for creating the CDXL file on Linux directly, you will still need an Amiga with the relevant commands from the CDTV developer toolkit installed to create a CDXL file. This can be done with the following commands:
xlmake -a919 -bimages/iff.0000001 -h out.cdxl xlaudio -a919 tmpaudio.8svx -i out.cdxl
|
Note
|
the value for the "-a" parameter is calculated like this: size of the audio file in bytes divided by the number of images |
AMIGA misc. shell commands
Applies to AROS, too…
Create an lha archive recursively with subdirs
lha -e -r -a -x a ram:mydir.lha dh0:mydir/