libsidplayfp / sidplayfp

Console SID/MUS player
GNU General Public License v2.0
34 stars 8 forks source link

Feature Request: Panned Voices. #9

Closed clort81 closed 1 year ago

clort81 commented 2 years ago

I'd like to get individual voices panned slightly (not hard left/right) to resolve a bit better, audibly. e.g. 1: 25% left 2: 33% left 3: 25% right 4: 33% right.

Call it fake stereo, whatever.

Would sound better.

drfiemost commented 2 years ago

This is out of the scope of the project as we are emulating the inside working of the real chip. The voices are mixed when entering the analog stage inside the SID following a single channel path, trying to fake stereo would mess up the filter too.

As a workaround you might play a tune muting channels in turn and then mix the resulting files together. Using sox it would be possible to automate the task with a script. Not really handy and would break tunes using filter, ring-mod or hard sync but indeed produces good results with most of the tunes.

CustardFlan commented 1 year ago

@clort81 i have messing up with this concept last 7 days, and, my working solution was: `#!/bin/bash

Establecer el nivel de verbosidad de sidplayfp

spfpverb=v2

spfpverb=q

spfpverb=v0

Establecer la pista a convertir (por si necesitas elegir alguna antes de convertir)

sidsubtrack=1

echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- echo Convertidor de archivos de música SID a MP3 con paneo Stereo, por Custard! SandS - 230922 echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

echo Eliminando residuos anteriores del espacio de trabajo...

rm -f izq.wav i.wav der.wav d.wav id.wav cen.wav cenizq.wav cender.wav cenfin.wav final.wav final-fade.wav rm -f currfile1.txt cttitle.txt ctartist.txt ctcopyright.txt

echo Convirtiendo SID...

for file in "$@"; do

sidplayfp -f48000 -p32 $file -w --info

sidplayfp -$spfpverb -f48000 -p32 -rr --delay=1 --digiboost -u2 -u3 -w --info -ols$sidsubtrack $file

sidplayfp -$spfpverb -f48000 -p32 -rr --delay=1 -u2 -u3 -w --info -ols$sidsubtrack $file ls *.wav > currfile1.txt currfile1=cat currfile1.txt

exiftool -s -s -s -Title $currfile1 > cttitle.txt exiftool -s -s -s -Artist $currfile1 > ctartist.txt exiftool -s -s -s -Copyright $currfile1 > ctcopyright.txt

mv $currfile1 izq.wav

sidplayfp -$spfpverb -f48000 -p32 -rr --delay=1 -u1 -u3 -w --info -ols$sidsubtrack $file mv $currfile1 der.wav

sidplayfp -$spfpverb -f48000 -p32 -rr --delay=1 -u1 -u2 -w --info -ols$sidsubtrack $file mv $currfile1 cen.wav

echo Procesando con sox para mezclar el resultado...

sox izq.wav i.wav remix 1v0.75 2v0.25 sox der.wav d.wav remix 1v0.25 2v0.75 sox i.wav d.wav -c 2 id.wav --combine mix-power

sox cen.wav cenizq.wav remix 1v0.50 2v0 sox cen.wav cender.wav remix 1v0 2v0.50 sox cenizq.wav cender.wav -c 2 cenfin.wav --combine mix-power

sox id.wav cenfin.wav -c 2 final.wav --combine mix-power

sox -V4 final.wav final-fade.wav fade p 0 0 3

DEBUG:

read -p "PAUSADO - Para checar el audio procesado por sox..."

echo convirtiendo a MP3...

lame -V0 final-fade.wav $currfile1.mp3

fftitle=cat cttitle.txt ffartist=cat ctartist.txt ffcopyright=cat ctcopyright.txt

ffyear=cat ctcopyright.txt ffcutyear=${ffyear:0:4}

id3v2 -a "$ffartist" -t "$fftitle" --TCOP "$ffcopyright" --TYER "$ffcutyear" "$currfile1.mp3"

mp3tag -a "$ffartist" -s "$fftitle" -l "$ffcopyright" "$currfile1.mp3"

echo Eliminando archivos temporales del espacio de trabajo...

rm -f izq.wav i.wav der.wav d.wav id.wav cen.wav cenizq.wav cender.wav cenfin.wav final.wav final-fade.wav rm -f currfile1.txt cttitle.txt ctartist.txt ctcopyright.txt

done

echo ----------------------------------------------------------

echo Listo, Terminado!

echo /////////////////////////////////////////////////////////`

I hope this inspire you, obviously, i wrote and ran this script on Ubuntu 20.04, and needed to install sidplayfp, sox, lame, exiftool, id3v2 to get a nice tagged and good sounding output

drfiemost commented 1 year ago

@CustardFlan thanks, I've added to the wiki