Collaborative Live Coding with Chat?


#1

Hi all,

I’d like to use Sonic Pi in an introductory music and computers course this summer. I’m interested in having the students live code together. Is there any way to network multiple computers together with a chat function, where students could read and write comments to each other in real time? The best solution I can think of is via OSC messages printed to the console.

Any insights from your own experiences or ideas appreciated!

Thanks,

Ryan


#2

Are your students in the same room or at their own places?

@robin.newman synced multiple devices together:


I think this could be adapted for live coding on multiple devices.


#3

Yes something like that would work. Here is specimen code for 2 machines. Add further functions for others.

add message you want to send at the bottom and press run. YOu see messages addressed to your machine in the log window.

define :m1 do |msg|
  use_osc "192.168.1.128",4559 #m1 IP
  osc "/msg",msg
  live_loop :receive do
    b= sync "/osc/msg"
    puts b[0]
  end
end

define :m2 do |msg|
  use_osc "192.168.1.34",4559 #m2 IP
  osc "/msg",msg
  live_loop :receive do
    b= sync "/osc/msg"
    puts b[0]
  end
end

m1 "Mesage sent to machine m1"
m2 "Message sent to machine m2"

#4

Another possibility would be to use the secure lan messenger program beebeep. The latest version 4.0 runs on Mac, Linux (ubuntu) Raspberry Pi and Windows and it is free. (You need to install some libraries to use with it on the Pi ). See http://beebeep.sourceforge.net/download.php It lets local users on the same network to chat to each other and send files.


#5

Wow these are all great suggestions! Another possibility I found was using Atom along with the sb-atom-sonic plug-in to allow networked computers to edit a file in real time on a host computer running sonic pi. I think that a combination of the solutions posted above is better though, because you could synchronize multiple machines running Sonic Pi in parallel and each student could have control of their own contribution, while being able to chat and share information as needed during performance.

Thanks again everyone! Very excited to teach with Sonic Pi in a few weeks. I formerly have always used Pure Data, but for an introduction, I like that Sonic Pi is much easier to get sounding like the music the incoming studens already like from the very early stages.