Sample Me

Batch convert audio files using SoX (Sound eXchange)

You need 8 bit mono 6khz super tiny audio files, without a single bit of silence at the beginning, to transfer via MIDI Sample Dump Standard to your brand new Commodore 64 sampler, the MSSIAH Wave-Player.

Quick solution. Fire up the terminal and go to sample folder. One line:

for f in ./*.wav; do sox "$f" -r 6k -b 8 "$(basename "$f" .wav)_8b6k.wav" remix - silence 1 0.1 1%; done

TRIVIA
  1. SoX on OS X
  2. Bonus. More automation. Make a bash script.
    Arbitrary suffix version:
    
     #!/bin/bash
     clear
     for f in ./*.wav
     do sox "$f" -r 6k -b 8 "$(basename "$f" .wav)_8b6k.wav" remix - silence 1 0.1 1%
     done
    
    Folder version (with show progress):
    
     #!/bin/bash
     clear
     mkdir 8b6k
     for f in ./*.wav
     do sox -S "$f" -r 6k -b 8 "8b6k/$(basename "$f" .wav).wav" remix - silence 1 0.1 1%
     done
  3. Even more automation. Make the script global. Put your saved script in usr/local/bin and make sure it is executable (chmod +x my_script).
  4. Before:
    
    
    
    After:
    
    
    
    It's LoFi baby.
  5. The SoX of silence
  •  
  •  

Next Post

Previous Post

© 2019 Sample Me

Theme by Anders Norén