View Single Post
Old 11 April 2023, 22:51   #17
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,853
SoX seem to be OK with 8svx files - i use script like this to convert audio files into 8svx. Feel free to modify - it has some additional audio processing to deal with some Amiga limitations.

Code:
@setlocal

@REM Where to Find SoX
@set SoX=C:\sox
@set PATH=%PATH%;%SoX%


@SET PAL=28375160
@SET NTSC=28636363
@rem Paula PAL=3546895
@rem Paula NTSC=3579545.45454545


@rem LowPassFilter F=
@rem Amiga 500/2000: 4.42 kHz (100 nF, 360 ?)
@rem A600: 4.42 kHz (100 nF, 360 ?)11
@rem A1200 Rev1d: 27.7 kHz (3.9 nF, 1.5 k?)
@rem A1200 Rev2: 34.4 kHz (6.8 nF, 680 ?)
@rem A4000: 4.52 kHz (47 nF, 750 ?)

@SET LPF=4420 

@rem SET dither=dither -S
@rem SET dither=dither

@SET dither=

@rem lipshitz, f-weighted, modified-e-weighted, improved-e-weighted, gesemann, shibata, low-shibata, high-shibata
@set noiseshp=improved-e-weighted

@SET /a CLK=%PAL%/8
@SET PERIOD=128

@SET /a AFREQ_I = (((100*%CLK%)/(1*%PERIOD%))+1) / 100
@SET /a AFREQ_F = (((100*%CLK%)/(1*%PERIOD%))+1) %% 100
@SET AFREQ=%AFREQ_I%.%AFREQ_F%

@SET /a APREC_I = (((100*%CLK%)/(4*%PERIOD%))) / 100
@SET /a APREC_F = (((100*%CLK%)/(4*%PERIOD%))) %% 100
@SET APREC=%APREC_I%.%APREC_F%

@SET file=%1
@SET fname=%~n1

@ECHO Samplerate=%AFREQ%
@ECHO Precompensation=%APREC%
@ECHO %LPF%
@ECHO file=%file%
@ECHO filename=%fname%

@rem SET aproc=treble +6.0206 %LPF% .5 treble +6.0206 %APREC% .5 gain -n -0.085576 %dither%
@SET aproc=treble +6.0206 %LPF% .5 gain -n -0.085576 %dither%


@sox --multi-threaded --buffer 524288 --input-buffer 524288 -S -D -G %file% "%fname%.8svx" remix - rate -v -s -I %AFREQ% %aproc% stats -b 8 stat
@sox --multi-threaded --buffer 524288 --input-buffer 524288 "%fname%.8svx" -n spectrogram -z 64 -q 12 -w Kaiser -y 513 -x 496 -o "%fname%_8svx.png"

@pause
@endlocal
I use recent SoX build from https://audiodigitale.eu/repo/sox/ - it has some features not present in old SoX (seem SoX development was stopped few years ago)

Just checked that this particular SoX doesn't have integrated 'spectrogram' command as such it may be not the best one.

Last edited by pandy71; 12 April 2023 at 22:56.
pandy71 is offline  
 
Page generated in 0.05531 seconds with 10 queries