English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 15 August 2015, 13:00   #41
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by Akira View Post
Not mine, I destroyed two filters on purpose on my A600s to get cleaner audio
I'm talking about first stage amplifier-integrator which is essential to properly reconstruct audio in Amiga and it should suppress anything above 55kHz with at least 50dB efficiency.

Quote:
Originally Posted by ReadOnlyCat View Post
What do you mean by "regular listening"?
I know only one way of listening but I'm not sure if it is the "regular" one you mention.
Regular means you are not working on creating sound samples and music with for example tracker as IMHO you should work with 16 bit samples and at render stage they should be converted in real time to 8 bit with dithering (and this is impossible on Amiga without additional hardware).
So imagine regular listening as listening audio track, or watching movies so 'consuming' audio not creating audio.


Quote:
Originally Posted by ReadOnlyCat View Post
I have planned to test this (Copper audio) since I read that fascinating discussion about Paula's Pulse Width Modulation about six months ago. And I must admit I am a bit surprised no one has tried yet if it could be used mid scanline to output at 56kHz. The blitter is fast enough to fill the copperlist in real time so there really are no technical obstacles to experimenting it.
I even wonder if it could be used as a form of temporal multiplexing to allow 8 28kHz channels? I plan to give it a try eventually but I have more important projects for now.
IMHO this is possible or offline (so prepare copper list offline) or by using additional HW (DSP? not a problem from HW perspective but software not exist and i don't feel capable to create such software - there is plenty small DSP on market capable to do this - they cos few Euros, they can be attached for example to ATA port).
number of channels will be virtually unlimited - i had hope that thanks to time interleaving this can be arranged on regular Paula but Toni and Yaqube ruined my dreams saying that there is no time interleaving in samples (seem that there four independent DAC in Paula - waste of silicone IMHO anyway)


Quote:
Originally Posted by ReadOnlyCat View Post
Which is why 14 bits stereo at 28kHz is the current practical best on a real Amiga.
Unless copper audio can beat it of course!
It is 14 bits only if both DAC are perfect and no calibration is required (which is usually not the case) IMHO it will be more close to 12 bit which lead me to my point that going to 56kHz and proper noise shaping (aggressive usage of the Gerzon-Craven noise shaping theorem, most of errors pushed above 22kHz) 8 bit will be more efficient and should create significantly better audio than 14 bit currently (albeit 56kHz require or ECS\AGA and higher than PAL\NTSC mode, or Copper Audio or Copper driven OCS to simulate ECS\AGA - reduce scanline length)

Quote:
Originally Posted by ReadOnlyCat View Post
(Apologies for the off-topic.)
Mine apologies also. I will try to create ffmpeg + sox version of script so it should be possible to convert any known to ffmpeg audio to one of Amiga targets (with and without dither, noise shaping maybe etc).

Additional weird idea - need to verify this - perhaps someone will be faster - use 2 channels so combine them to form 1 but 9 bit channel + use a noise shaping (very aggressive) however each channel have differential noise shaping (with opposite sign) - two signal with same sign will combine but noise in channels will be subtracted (and as a noise shaping is correlated it should removed completely from channel) - this should improve SNR significantly - side cost is more memory (4 buffers in CHIP instead 2) however it should be same as form 14 bit audio perspective. Ideally data should be calculated on the fly so for example 16 bit re-quantized to 8(9) bits and noise shaping with opposite sign used.

Last edited by pandy71; 15 August 2015 at 14:13.
pandy71 is offline  
Old 20 August 2015, 13:06   #42
Hagotae
 
Posts: n/a
So can anyone provide me with a step by step process to convert these samples as i am confused with what i am supposed to do with Sox? Or can i just stick with Sony's Convrt program to batch convert everything to Wav?

Last edited by Hagotae; 20 August 2015 at 13:34.
 
Old 20 August 2015, 15:24   #43
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,645
USe h0ffman's WAV2AMIGA for simpllicity:
http://eab.abime.net/showthread.php?...ghlight=sample
Amiga1992 is online now  
Old 20 August 2015, 21:01   #44
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by Hagotae View Post
So can anyone provide me with a step by step process to convert these samples as i am confused with what i am supposed to do with Sox? Or can i just stick with Sony's Convrt program to batch convert everything to Wav?
For quality SoX but on PC - if highest possible quality is not your goal then you have few alternatives.
pandy71 is offline  
Old 20 August 2015, 21:50   #45
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by pandy71 View Post
It is 14 bits only if both DAC are perfect and no calibration is required (which is usually not the case) IMHO it will be more close to 12 bit which lead me to my point that going to 56kHz and proper noise shaping (aggressive usage of the Gerzon-Craven noise shaping theorem, most of errors pushed above 22kHz) 8 bit will be more efficient and should create significantly better audio than 14 bit currently (albeit 56kHz require or ECS\AGA and higher than PAL\NTSC mode, or Copper Audio or Copper driven OCS to simulate ECS\AGA - reduce scanline length)
Pics or it didn't happen
Thorham is offline  
Old 21 August 2015, 21:21   #46
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by Thorham View Post
Pics or it didn't happen
Try yourself (beware that this is suboptimal as most of the SoX NTF filters is designed for 44100Hz sample rate).

Code:
@SET PATH=%PATH%;disk:\path to\SOX;disk:\path to\FF

@set dynam=95
@set fft=1024
@set /a clut=(%dynam%*4)/20
@set /a soxdft=%fft%+1
@set /a width=2*%fft%

@rem PAL=28375160
@rem NTSC=28636363

@SET PERIOD=63

@SET CLK=28375160
@SET /a AFREQ=((%CLK%+8)/(8*%PERIOD%)) 
@SET /a APREC=((%CLK%+8)/(32*%PERIOD%))

@ECHO Samplerate=%AFREQ%
@ECHO Precompensation=%APREC%

@md Audio
@md 8SVX

@for %%a in ("Audio\*.*") do "ffmpeg.exe" -i "%%a" -vn -af "aformat=sample_fmts=fltp,pan=stereo|FL < FL + 1.414*FC + .707*BL + .707*SL + .177*LFE|FR < FR + 1.414*FC + .707*BR + .707*SR + .177*LFE,dynaudnorm,aresample=resampler=soxr:osr=%AFREQ%:cutoff=0.990:dither_method=0,asetrate=r=48000,aformat=sample_fmts=fltp" -f sox - | "sox.exe" -S -V -D -t sox - -t sox - gain -6.0206 treble 9.0309 %APREC% gain -n -0.034264 dither -f improved-e-weighted -p 8 | "sox.exe" -S -V -D -r %AFREQ% -t sox - "8SVX\%%~na.8svx" stats -b 8 stat spectrogram -z %dynam% -w Dolph -q %clut% -x %width% -y %soxdft% -s -o "8SVX\%%~na.png"

@ECHO Done!!!
@pause
btw this is stereo version and some players are not capable to play stereo 8SVX files (for example foobar2000).

Last edited by pandy71; 21 August 2015 at 21:54. Reason: default settings for dynaudnorm filter
pandy71 is offline  
Old 21 August 2015, 22:13   #47
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by pandy71 View Post
Try yourself
Thanks for the script

Quote:
Originally Posted by pandy71 View Post
beware that this is suboptimal as most of the SoX NTF filters is designed for 44100Hz sample rate
Indeed, and you can hear it, it's still noisy. In softer parts of music 14 bit is much less noisy.

Quote:
Originally Posted by pandy71 View Post
btw this is stereo version and some players are not capable to play stereo 8SVX files (for example foobar2000).
Tested on my A1200 with Hippo Player (double scan screen mode, of course). Seems 56khz is a little bit too high, because you get glitches (or Hippo's fault?).

Anyway, even if it's ultimately going to be better, the problem is you'd have to use double scan modes or the copper, while 28khz 14bit sounds nice already and every Amiga can play that without any issues.
Thorham is offline  
Old 21 August 2015, 23:40   #48
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by Thorham View Post
Indeed, and you can hear it, it's still noisy. In softer parts of music 14 bit is much less noisy.
yes, because NTF is in wrong part of the spectrum - on Amiga you can design or similar NTF but tuned to 56 instead 44.1kHz or go for something simpler but more aggressive above 20kHz - trust me above 20kHz noise will be not perceived. Most of MP3 files usually don't have anything above 16kHz and millions are happy - our ATH maximum is located between 1 and 6kHz.

Quote:
Originally Posted by Thorham View Post
Tested on my A1200 with Hippo Player (double scan screen mode, of course). Seems 56khz is a little bit too high, because you get glitches (or Hippo's fault?).

Anyway, even if it's ultimately going to be better, the problem is you'd have to use double scan modes or the copper, while 28khz 14bit sounds nice already and every Amiga can play that without any issues.
Not sure about glitches - perhaps software issue...

Using 28kHz sampling prevent you to hear anything above 14kHz (where even i perceive up to 16kHz without problems), second part of bitrate is wasted and still problem of DAC calibration exist (and any calibration efficiently reduce amount of bits which are itself theoretical as you can't expect 16 bit resolution from 2 DAC's even if weighting is perfect due PWM).

For 28kHz different approach can be used to improve dynamics - two channels combined (so two audio channels playing same sample but noiseshaping is in one channel with opposite sign (phase) - after adding noiseshaping should be removed) this practically push limit for audio quality to absolute maximum on Amiga.
pandy71 is offline  
Old 22 August 2015, 18:46   #49
systmcrsh
Registered User
 
Join Date: Sep 2010
Location: nyc, usa
Posts: 73
personally i prefer ssrc to sox. i think it's noise shaping is better (higher frequencies than sox's noise shaping): http://shibatch.sourceforge.net/

this is the windows batch i use for dragging and converting a folder of files. it uses sox and ssrc:

Code:
@echo off
cd %~f1
md C:\temp\%~n1
FOR %%A IN (*.wav) DO (
sox "%%A" -D -V C:\temp\temp1.wav silence 1 0.001 -72.24d reverse silence 1 0.001 -72.24d reverse pad 0.5 0.5 remix 1 & ^
ssrc_hp --twopass --bits 8 --dither 2 --pdf 1 1.0 --rate 31392 --normalize C:\temp\temp1.wav C:\temp\temp2.wav & ^
sox C:\temp\temp2.wav -D -V "C:\temp\%~n1\%%~nxA" trim 0.5 reverse trim 0.5 reverse
)
del C:\temp\temp1.wav C:\temp\temp2.wav
PAUSE
the above removes audio below -72.24db (12 x 6.02). i've found that most sound below around -60.2db is more dither noise than audio after converting.

it also pads the sample with .5 sec of silence because ssrc seems to have problems with short samples.

then it uses ssrc to convert to 8 bits, 31392khz... 31388 is B-3 on a pal amiga but ssrc wont convert 44100 to some sample rates. simply adding or subtracting a few khz works.

then it removes the .5 secs of silence.

ssrc has a bunch of dither options, some quieter for certain sounds, but --dither 2 --pdf 1 1.0 is what i use in general.

i made some sound comparisons vs pandy's sox code on page 2 using a tr808 bassdrum, cymbal, and 440k sine wav. you can hear the differences better with headphones:

original: bd5010.wav
sox: bd5010_sox_31388.wav
ssrc: bd5010_ssrc_31392.wav

original: cy5010.wav
sox: cy5010_sox_31388.wav
ssrc: cy5010_ssrc_31392.wav

original: sine.wav
sox: sine_sox_31388.wav
ssrc: sine_ssrc_31392.wav

i'm interested in anything that provides better sounding results...
systmcrsh is offline  
Old 23 August 2015, 13:06   #50
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by systmcrsh View Post
personally i prefer ssrc to sox. i think it's noise shaping is better (higher frequencies than sox's noise shaping): http://shibatch.sourceforge.net/

this is the windows batch i use for dragging and converting a folder of files. it uses sox and ssrc:

Code:
@echo off
cd %~f1
md C:\temp\%~n1
FOR %%A IN (*.wav) DO (
sox "%%A" -D -V C:\temp\temp1.wav silence 1 0.001 -72.24d reverse silence 1 0.001 -72.24d reverse pad 0.5 0.5 remix 1 & ^
ssrc_hp --twopass --bits 8 --dither 2 --pdf 1 1.0 --rate 31392 --normalize C:\temp\temp1.wav C:\temp\temp2.wav & ^
sox C:\temp\temp2.wav -D -V "C:\temp\%~n1\%%~nxA" trim 0.5 reverse trim 0.5 reverse
)
del C:\temp\temp1.wav C:\temp\temp2.wav
PAUSE
the above removes audio below -72.24db (12 x 6.02). i've found that most sound below around -60.2db is more dither noise than audio after converting.

it also pads the sample with .5 sec of silence because ssrc seems to have problems with short samples.

then it uses ssrc to convert to 8 bits, 31392khz... 31388 is B-3 on a pal amiga but ssrc wont convert 44100 to some sample rates. simply adding or subtracting a few khz works.

then it removes the .5 secs of silence.

ssrc has a bunch of dither options, some quieter for certain sounds, but --dither 2 --pdf 1 1.0 is what i use in general.

i made some sound comparisons vs pandy's sox code on page 2 using a tr808 bassdrum, cymbal, and 440k sine wav. you can hear the differences better with headphones:

original: bd5010.wav
sox: bd5010_sox_31388.wav
ssrc: bd5010_ssrc_31392.wav

original: cy5010.wav
sox: cy5010_sox_31388.wav
ssrc: cy5010_ssrc_31392.wav

original: sine.wav
sox: sine_sox_31388.wav
ssrc: sine_ssrc_31392.wav

i'm interested in anything that provides better sounding results...
Try to pipe with forced sample rate (same as i doing in my example), yes, SoX is less limited than SSRC and IMHO provide comparable quality to SSRC.
noise shaping in SoX use also Shibata - check http://sox.sourceforge.net/SoX/NoiseShaping (from my perspective improved e weighted push more noise to high - with sufficiently high sample rate it will be out of human hearing range).
Sample rate conversion can be compared on http://src.infinitewave.ca/ .

Last edited by pandy71; 23 August 2015 at 13:17.
pandy71 is offline  
Old 23 August 2015, 14:04   #51
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
All this noise shaping is very interesting, but I have yet to hear something that sounds less noisy than the Amiga's 14 bit approximation.
Thorham is offline  
Old 24 August 2015, 18:32   #52
systmcrsh
Registered User
 
Join Date: Sep 2010
Location: nyc, usa
Posts: 73
Quote:
Originally Posted by pandy71 View Post
For 28kHz different approach can be used to improve dynamics - two channels combined (so two audio channels playing same sample but noiseshaping is in one channel with opposite sign (phase) - after adding noiseshaping should be removed) this practically push limit for audio quality to absolute maximum on Amiga.
wouldn't that just negate the noiseshaping, leaving you with un-noiseshaped audio?

Quote:
Originally Posted by Thorham View Post
All this noise shaping is very interesting, but I have yet to hear something that sounds less noisy than the Amiga's 14 bit approximation.
my script is just for converting samples for use in trackers using standard screenmodes
systmcrsh is offline  
Old 24 August 2015, 23:18   #53
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by systmcrsh View Post
wouldn't that just negate the noiseshaping, leaving you with un-noiseshaped audio?
Nope - cancellation will be after digital to analogue conversion i.e. purely in analog domain - well known as subtractive dither.
Efficiently you should filter noise shaped quantization errors by low pass filter (if they are located above usable signal).


Quote:
Originally Posted by systmcrsh View Post
my script is just for converting samples for use in trackers using standard screenmodes
ffmpeg have limited amount of the NTF for sub 44.1k sample rates - http://git.videolan.org/?p=ffmpeg.gi...2d46f0;hb=HEAD seem there is even Shibata for 8kHz sample rate - this is extension beyond SoX.

Btw nice tool to play with own NTF http://www.hydrogenaud.io/forums/ind...howtopic=47980

Noise shaping will not work (probably) for samples to be used in trackers especially where volume change is involved (maybe except long loops) - by definition dither should be applied as last processing stage in signal chain.
pandy71 is offline  
Old 24 August 2015, 23:30   #54
systmcrsh
Registered User
 
Join Date: Sep 2010
Location: nyc, usa
Posts: 73
Quote:
Originally Posted by Thorham View Post
... Seems 56khz is a little bit too high, because you get glitches (or Hippo's fault?).
i tried the above ffmpeg script as well, but modified it slightly for mono and 31388 sample rate. i like that the noise is in a higher frequency than the ssrc conversions i use... but playback on amiga is distorted somewhat. you can even see the distortion in the waveform display. whats strange is i couldn't hear the distortion on pc (foobar2000), but could easily hear it on the amiga (real or emulated).
systmcrsh is offline  
Old 25 August 2015, 21:51   #55
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by systmcrsh View Post
i tried the above ffmpeg script as well, but modified it slightly for mono and 31388 sample rate. i like that the noise is in a higher frequency than the ssrc conversions i use... but playback on amiga is distorted somewhat. you can even see the distortion in the waveform display. whats strange is i couldn't hear the distortion on pc (foobar2000), but could easily hear it on the amiga (real or emulated).
Sounds like software issue on Amiga - have no experience with high sampling rates on real Amiga...
pandy71 is offline  
Old 26 August 2015, 23:24   #56
systmcrsh
Registered User
 
Join Date: Sep 2010
Location: nyc, usa
Posts: 73
Quote:
Originally Posted by pandy71 View Post
Noise shaping will not work (probably) for samples to be used in trackers especially where volume change is involved (maybe except long loops) - by definition dither should be applied as last processing stage in signal chain.
yeah you are probably right about that
systmcrsh is offline  
Old 11 January 2020, 15:19   #57
adrdesign
Registered User
 
adrdesign's Avatar
 
Join Date: Nov 2013
Location: Spain
Age: 45
Posts: 314
Sorry to bring this thread up. I did a script for desolation_path, just put wavs in the same folder and they will be converted to IFF 8bit 22050, no proccesing this time.

https://drive.google.com/open?id=1ZH...IY0GbdcJhG0JCb
Attached Files
File Type: zip AMIGA_FIX_SAMPLES.zip (961.8 KB, 189 views)

Last edited by adrdesign; 11 January 2020 at 15:26.
adrdesign is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zero-G Datafile Amiga Music Samples thinlega request.Modules 12 25 September 2023 12:04
Tutorial: Converting samples to Amiga. h0ffman support.Other 15 21 February 2021 13:20
Octamed samples transfer from PC to Amiga trydowave support.Hardware 6 26 February 2013 17:01
Amiga drum beat with speech-samples (1987-88) encore request.Modules 0 25 February 2013 16:17
Best way to get samples onto the amiga... ElectroBlaster Amiga scene 4 21 October 2012 17:13

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16188 seconds with 16 queries