<commit_before>#!/usr/bin/env bash

input_path=./inputs
output_path=./outputs

function tolower(){
    echo $1 | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
}

os=`tolower $OSTYPE`

# set converter path according to OS:
if [ $os == 'cygwin' ] || [ $os == 'msys' ]
then 
    #Windows ...
    #resampler_path=../x64/Release/ReSampler.exe
    #resampler_path="E:\Temp\ReSampler1.3.6\ReSampler.exe"
    resampler_path=../x64/minGW-W64/ReSampler.exe
else
    resampler_path=../ReSampler
fi

# clear old outputs:
rm $output_path/*.*
rm $output_path/._*

# 32-bit float, double-precision sweeps
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to22k-dp.csv -r 22050 --noPeakChunk --doubleprecision
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to32k-dp.csv -r 32000 --noPeakChunk --doubleprecision --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to44k-dp.csv -r 44100 --noPeakChunk --doubleprecision
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to48k-dp.csv -r 48000 --noPeakChunk --doubleprecision --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to88k-dp.csv -r 88200 --noPeakChunk --doubleprecision
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to96k-dp.csv -r 96000 --noPeakChunk --doubleprecision --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to176k-dp.csv -r 176400 --noPeakChunk --doubleprecision
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to192k-dp.csv -r 192000 --noPeakChunk --doubleprecision --mt

# 32-bit float, double-precision sweeps, steep LPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to22k-dp-steep.csv -r 22050 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to32k-dp-steep.csv -r 32000 --noPeakChunk --doubleprecision --steepLPF --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to44k-dp-steep.csv -r 44100 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to48k-dp-steep.csv -r 48000 --noPeakChunk --doubleprecision --steepLPF --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to88k-dp-steep.csv -r 88200 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to96k-dp-steep.csv -r 96000 --noPeakChunk --doubleprecision --steepLPF --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to176k-dp-steep.csv -r 176400 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to192k-dp-steep.csv -r 192000 --noPeakChunk --doubleprecision --steepLPF --mt

# 32-bit float, double-precision sweeps, relaxed LPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to22k-dp-relaxed.csv -r 22050 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to32k-dp-relaxed.csv -r 32000 --noPeakChunk --doubleprecision --relaxedLPF --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to44k-dp-relaxed.csv -r 44100 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to48k-dp-relaxed.csv -r 48000 --noPeakChunk --doubleprecision --relaxedLPF --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to88k-dp-relaxed.csv -r 88200 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to96k-dp-relaxed.csv -r 96000 --noPeakChunk --doubleprecision --relaxedLPF --mt
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to176k-dp-relaxed.csv -r 176400 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u4i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to192k-dp-relaxed.csv -r 192000 --noPeakChunk --doubleprecision --relaxedLPF --mt<commit_msg>update sweeps-csv.sh to use 8bit unsigned<commit_after>#!/usr/bin/env bash

input_path=./inputs
output_path=./outputs

function tolower(){
    echo $1 | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
}

os=`tolower $OSTYPE`

# set converter path according to OS:
if [ $os == 'cygwin' ] || [ $os == 'msys' ]
then 
    #Windows ...
    #resampler_path=../x64/Release/ReSampler.exe
    #resampler_path="E:\Temp\ReSampler1.3.6\ReSampler.exe"
    resampler_path=../x64/minGW-W64/ReSampler.exe
else
    resampler_path=../ReSampler
fi

# clear old outputs:
rm $output_path/*.*
rm $output_path/._*

# 32-bit float, double-precision sweeps
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to22k-dp.csv -r 22050 --noPeakChunk --doubleprecision
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to32k-dp.csv -r 32000 --noPeakChunk --doubleprecision --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to44k-dp.csv -r 44100 --noPeakChunk --doubleprecision
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to48k-dp.csv -r 48000 --noPeakChunk --doubleprecision --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to88k-dp.csv -r 88200 --noPeakChunk --doubleprecision
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to96k-dp.csv -r 96000 --noPeakChunk --doubleprecision --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to176k-dp.csv -r 176400 --noPeakChunk --doubleprecision
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to192k-dp.csv -r 192000 --noPeakChunk --doubleprecision --mt

# 32-bit float, double-precision sweeps, steep LPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to22k-dp-steep.csv -r 22050 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to32k-dp-steep.csv -r 32000 --noPeakChunk --doubleprecision --steepLPF --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to44k-dp-steep.csv -r 44100 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to48k-dp-steep.csv -r 48000 --noPeakChunk --doubleprecision --steepLPF --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to88k-dp-steep.csv -r 88200 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to96k-dp-steep.csv -r 96000 --noPeakChunk --doubleprecision --steepLPF --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to176k-dp-steep.csv -r 176400 --noPeakChunk --doubleprecision --steepLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to192k-dp-steep.csv -r 192000 --noPeakChunk --doubleprecision --steepLPF --mt

# 32-bit float, double-precision sweeps, relaxed LPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to22k-dp-relaxed.csv -r 22050 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to32k-dp-relaxed.csv -r 32000 --noPeakChunk --doubleprecision --relaxedLPF --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to44k-dp-relaxed.csv -r 44100 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to48k-dp-relaxed.csv -r 48000 --noPeakChunk --doubleprecision --relaxedLPF --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to88k-dp-relaxed.csv -r 88200 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to96k-dp-relaxed.csv -r 96000 --noPeakChunk --doubleprecision --relaxedLPF --mt
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to176k-dp-relaxed.csv -r 176400 --noPeakChunk --doubleprecision --relaxedLPF
$resampler_path -b u8i -i $input_path/96khz_sweep-3dBFS_32f.wav -o $output_path/96khz_sweep-3dBFS_32f-to192k-dp-relaxed.csv -r 192000 --noPeakChunk --doubleprecision --relaxedLPF --mt
{'fraction_non_alphanumeric': 0.13091807328118568, 'fraction_numerical': 0.0947920955125566, 'mean_word_length': 4.410356347438753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1314580', 'n_tokens_mistral': 5261, 'n_tokens_neox': 4489, 'n_words': 696}