Skip to content

Instantly share code, notes, and snippets.

@jpcima
Last active May 8, 2021 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpcima/0867755a20867cf06e85bf5b9195dad1 to your computer and use it in GitHub Desktop.
Save jpcima/0867755a20867cf06e85bf5b9195dad1 to your computer and use it in GitHub Desktop.
## convert audio to data points
## > sox file.wav file.dat
set term svg size 1200,400 ## output to SVG with given size
set output "file.svg" ## set output file
set multiplot layout 2,1 ## set a layout in 2 rows
unset xtics ## removes the X-axis
unset ytics ## removes the Y-axis
unset key ## removes the legend
set grid ## enables grid (of enabled axis)
#set xrange [0.0:+3.0] ## (optional) set time range
#set yrange [-0.5:+0.5] ## (optional) set amplitude range
plot "file.dat" u 1:2 w lines t "Left" lc 1
plot "file.dat" u 1:3 w lines t "Right" lc 2
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment