Skip to content

Instantly share code, notes, and snippets.

@cisoun
Created February 15, 2019 14:59
Show Gist options
  • Save cisoun/b9cd5d8f256c906c5e082999af942b49 to your computer and use it in GitHub Desktop.
Save cisoun/b9cd5d8f256c906c5e082999af942b49 to your computer and use it in GitHub Desktop.
Short song in bash shell using SoX
#!/bin/bash
while :
do
play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-0 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-0 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-0 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-0 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-4 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-6 sin %-9 sin %+5 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-4 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-6 sin %-9 sin %+5 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-3 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %+3 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %-3 sin %-2 fade h 0.1 0.25 0.1
play -n -c1 synth sin %-12 sin %-9 sin %+3 sin %-2 fade h 0.1 0.25 0.1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment