Skip to content

Instantly share code, notes, and snippets.

@njgheorghita
Created December 10, 2019 14:53
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 njgheorghita/951f52247c4df1d1010f1f580c2889d1 to your computer and use it in GitHub Desktop.
Save njgheorghita/951f52247c4df1d1010f1f580c2889d1 to your computer and use it in GitHub Desktop.

To record audio from mic in terminal

  • sox -d xxx.wav

Set the cycles per second

  • setcps (140/60/4) (140 BPM w/ 4 beats/cycle)
  • setcps 0.6

Degrade

  • randomly removes events from a pattern, 50% (0.5) of the time
  • d1 $ degrade $ s ...
  • d1 $ degradeBy 0.5 $

Slow down or speed up the playback of a pattern

  • d1 $ slow 4 $ sound "bd*2": makes it a quarter of the speed

  • d1 $ fast 4 $ sound "bd*2": makes it play 4 times faster

  • $ jux () - splits effect in () across l/r audio output

Cool Rhythms

  • d1 $ sound "bd(5,8)"
(2,5) : A thirteenth century Persian rhythm called Khafif-e-ramal.
(3,4) : The archetypal pattern of the Cumbia from Colombia, as well as a Calypso rhythm from Trinidad.
(3,5,2) : Another thirteenth century Persian rhythm by the name of Khafif-e-ramal, as well as a Rumanian folk-dance rhythm.
(3,7) : A Ruchenitza rhythm used in a Bulgarian folk-dance.
(3,8) : The Cuban tresillo pattern.
(4,7) : Another Ruchenitza Bulgarian folk-dance rhythm.
(4,9) : The Aksak rhythm of Turkey.
(4,11) : The metric pattern used by Frank Zappa in his piece titled Outside Now.
(5,6) : Yields the York-Samai pattern, a popular Arab rhythm.
(5,7) : The Nawakhat pattern, another popular Arab rhythm.
(5,8) : The Cuban cinquillo pattern.
(5,9) : A popular Arab rhythm called Agsag-Samai.
(5,11) : The metric pattern used by Moussorgsky in Pictures at an Exhibition.
(5,12) : The Venda clapping pattern of a South African children’s song.
(5,16) : The Bossa-Nova rhythm necklace of Brazil.
(7,8) : A typical rhythm played on the Bendir (frame drum).
(7,12) : A common West African bell pattern.
(7,16,14) : A Samba rhythm necklace from Brazil.
(9,16) : A rhythm necklace used in the Central African Republic.
(11,24,14) : A rhythm necklace of the Aka Pygmies of Central Africa.
(13,24,5) : Another rhythm necklace of the Aka Pygmies of the upper Sangha.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment