• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

How to create periodic PCM test tones with high inter-sample peaks

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
981
Likes
1,523
With one caveat: the bigger inter-sample peak you want, the closer to the nyquist you need to get, but the closer you get, the more it will be attenuated by the anti-imaging filter, so the peak becomes only theoretical. For example, generate -12 dBFS, 23.5 kHz square wave at 48 kHz sampling rate:
Code:
sox -r48k -n "square.48.flac" synth 60 sq 23.5k norm -12
Resample it to 96 kHz using steep filter (99% bandwidth) and you get -1.15 dBFS peak:
Code:
sox "square.48.flac" "square.96_steep.flac" rate -s 96k stats
...
Pk lev dB      -1.15
But use normal filter (95% bandwidth) and the peak is only -5.28 dBFS:
Code:
sox "square.48.flac" "square.96_normal.flac" rate  96k stats
...
Pk lev dB      -5.28
 
Top Bottom