enzyme69 / blendersushi

Blender Sushi related scripts. Mostly about Sverchok, Geometry Nodes, Animation Nodes, and related Python scripts.
243 stars 33 forks source link

LIVENODING 777 / #165

Open enzyme69 opened 7 years ago

enzyme69 commented 7 years ago

bge_sonicPi_test_001_2017_10_14_23_17.zip

SONIC PI Ruby Code:

use_osc "192.168.1.2", 9001
t=180
set :tempo,t #use set to store values that will be passed to live_loops
use_bpm t

live_loop :playosc do # this loop plays the received osc data
  use_real_time
  n,d,v,s,tempo= sync "/osc/hello/play" #retrieve data from OSC message

  use_bpm tempo
  use_synth s
  play n, amp: v, sustain: d* 0.9, release: d* 0.1

end
enzyme69 commented 7 years ago

Don't forget you also need Python Sonic or psonic module to send message from BGE to Sonic Pi!

enzyme69 commented 7 years ago

Other reference:

https://blenderartists.org/forum/showthread.php?249757-Prof.-Monster-s-BGE-Guide-to-Python-Coding