Connecting to a virtual machine via serial console

Add serial port to VM with the settings:
Use named pipe:
<filename for the named pipe (unix-socket)>
This end is the server
The other end is an application

Connect with:

 socat unix-connect:/path/to/socket stdio,echo=0,raw

Make sure that the serial port is enabled in the VM bios if it doesn’t work.

Converting chiptunes to ogg

Use xmp to play the chiptune to stdout as wav,
boost the volume with sox (if needed),
encode it with oggenc

xmp -d wav -c filename.mod | sox -v1.5 -t wav - -t wav - | oggenc -o filename.ogg -

or if you want to convert all chiptunes in a directory:

for i in *.mod *.xm; do
    xmp -d wav -c $i | sox -v1.5 -t wav - -t wav - | oggenc -o ${i%.*}.ogg -