Skip to content

Instantly share code, notes, and snippets.

@gcr
Created December 24, 2021 14:07
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 gcr/d76acbe93dc51360e14a2f485fc52c7d to your computer and use it in GitHub Desktop.
Save gcr/d76acbe93dc51360e14a2f485fc52c7d to your computer and use it in GitHub Desktop.
# 🌟 #
jq\
-rn '"ggEDC
grrggEDCarraaFEDbrrr
GGFDErrrEEErEEErEGCDE"|gsub
("\\s";"")|explode|.[]as$note
|"rg.a.bC
.D.EF.G.A.BC"|gsub
("\\s";"")|explode|index
($note)-6|if.==-6then 0else 440.0
*pow(1.05946
;.)end|range(0;0.3;1/44100.
)as$t|.*$t*6.28|sin*(1-$t)|128*.+
128|floor|def hex:[if.<10then 48+. else 55+.
end]|implode;"\(./16
|floor|hex)\(.%16|hex)"'| xxd -r \
-p | play -t raw -b 8 -e unsigned -r 44k -
###
###
#### merry christmas to all, from kimmy ####
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment