PERSPECTIVES ON COLLABORATIVE MUSIC Hello. In this video, I'll be circling back to the concept of network music in order to do a connection exercise between SuperCollider and Pure Data. If you didn't see the video on network communication in course three, you can go back to it in order to understand how to make this connection. The difference is that in this video I'll be connecting two computers. Furthermore, we'll expand SuperCollider's and Pure Data's codes to modify frequencies and amplitudes in each program using OSC messages. Let's start this exercise. This example will show how to connect two computers using OSC messages with which we can modify another computer's parameters. Remember that an OSC message has a tag and a value addressed to another computer through a specific IP address and port. Additionally, each computer has an instrument. One in SuperCollider, and the other in Pure Data. The parameters that we'll control with the OSC messages will be frequency and amplitude. To construct the computer network, we'll first connect them to a modem or a router with an Ethernet cable. We can also connect them wirelessly, although we prefer cable connections, as they're more stable. After connecting them, we'll find each computer's IP address. In GNU Linux or Mac, you can write the "ifconfig" command in the Terminal. In Windows, you can use "ipconfig" in the Command Prompt. In either case, you'll find a four number address divided by periods, like this: 192.168.1.90. Now, let's get back to the code that we wrote in the second half of the video on network connections. First we'll open the code in SuperCollider and go to the line that has the "NetAddr" object, which is used for sending messages. We'll replace the local IP address, 127.0.0.1, with the IP address that we found for the computer running Pure Data, and we'll leave port 3000 as it is. To send frequency and amplitude messages, we'll modify the line of code that says "m.sendMsg("/chat", rrand(8, 100))". First, we'll change the "/chat" tag for "/frec", and set the values between 200.0 and 1000.0, and with this we can send the OSC messages corresponding to frequency. Then we can copy that line, substitute the "/frec" tag for "/amp", and set the values to 0.0 and 1.0 to repeat the process for amplitude. To receive the messages in Pure Data, we'll go to the part in charge of receiving. We'll substitute the "chat" tag in the "route" object for "frec" and "amp". We'll call a Number box and connect it to the route object's second outlet. We'll click the "listen 3000" message. Next, back in SuperCollider's code, we can write "m = NetAddr" with the IP and the port, and then click the "sndMsg" with the "frec" and "amp" tags repeatedly. As we can see the first box in Pure Data's patch prints out the frequency values, and the second box, the amplitude values. Next, let's send OSC messages from Pure Data to SuperCollider. First, we'll go to the computer with Pure Data's patch. Find the "connect localhost 57120" message, and change the "localhost" argument to the IP address that we found in the computer running SuperCollider. Port "57120" doesn't need to change. To send messages, we'll go to the "oscformat" object, and change the "chat" tag to "frec". Click the Number box connected to its inlet, and limit the minimum and maximum values to 200 and 1000. Then, we'll copy the oscformat object and the Number box, and switch the "frec" tag for "amp". We'll open the Number box's properties, and limit its values to 0 and 1. Let's go to the computer with SuperCollider's code, and substitute the "\receive" name in the OSCdef for "\frequency", and the "chat" tag for "frec". We'll copy the OSCdef that we just edited, and change its name to "\amplitude", and its tag to "amp". We'll declare each OSCdef, go to the patch in Pure Data, and activate the connect message. We'll verify that the Toggle connected to "netsend" is active, and then slide the Number boxes to make sure that the values reach SuperCollider. Remember that by pressing the Shift key and moving the amplitude's Number box, you'll send floating values between 0 and 1. If everything works properly, we're ready to start playing with two computers connected to a local network. We'll demonstrate how it works by performing a small improvisation with instruments designed in each program. To use the values sent from Pure Data, we can just connect or direct the Number boxes to the instrument parameters that we want to control. In SuperCollider, we need to edit the code of each OSCdef to accept the incoming values. To do this, we'll boot the server with the "s.boot" command. Then, we'll declare our SynthDef, and activate it by writing and declaring the "a = Synth(\red)" line. Next, in the "frequency" OSCdef, we'll substitute the part that says "msg.postln" for "a.set", and in parentheses we'll write "\frec, msg" plus the number one in brackets. And for the "amplitude" OSCDef, we'll substitute it for "a.set", and in parenthesis add "\amp, msg" plus the number one in brackets. We'll declare both OSCdefs, turn them on, and in Pure Data move the Number boxes connected to the oscformat object to begin improvising. This video has shown the potential to connect two computers in a network, in this case, locally. Of course there's also the possibility to connect through the internet to make distance connections, as well as to synchronize the computers to make rhythmic music. One of the available platforms and classes for making online and synchronized music is Estuary. This platform allows multiple participants to connect through the internet to write code in one of the many languages that the program supports. To synchronize locally, we can use BenoitLib, a library made with SuperCollider by live coding band <i>Benoît and the Mandelbrots</i>. Some network music groups or bands that we can mention are <i>LiveCodeNet Ensamble</i>, <i>Republic</i>, <i>OFFAL</i>, and <i>Cybernetic Orchestra</i>. We hope that this video inspires you to dive into network collaborative music. See you later.