Last active
July 25, 2017 02:16
-
-
Save kn1kn1/03b6735a43c115c02adc92bd00a017ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Petal bangs osc message at the start of every cycle. #Sonic Pi 2.11.1 | |
load "~/petal/petal.rb" | |
d1 "bd" | |
client = SonicPi::OSC::UDPClient.new("127.0.0.1", 7770, use_encoder_cache: true) | |
i = 0 | |
live_loop :bang do | |
sync :d0 | |
address = "/bang" | |
message = "message" + i.to_s | |
client.send(address, message) # send message to the osc server(127.0.0.1:7770). | |
i = i + 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment