Skip to content

Instantly share code, notes, and snippets.

@datramt
Created June 14, 2019 16:19
Show Gist options
  • Save datramt/ce72c97512cc59b4d6be399708765aeb to your computer and use it in GitHub Desktop.
Save datramt/ce72c97512cc59b4d6be399708765aeb to your computer and use it in GitHub Desktop.
datramt's ring chain extensions for sonic pi
class SonicPi::Core::RingVector
#datramt's Ring Chains
def shuffle_times(x)
res = self
x.times do
res = self.shuffle
end
return res
end
def invert(n)
self.map {|e| n-e + self.min}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment