insremot Remote Opcodes insremot insremot An opcode which can be used to implement a remote orchestra. This opcode will send note events from a source machine to one destination. Description With the insremot and insglobal opcodes you are able to perform instruments on remote machines and control them from a master machine. The remote opcodes are implemented using the master/client model. All the machines involved contain the same orchestra but only the master machine contains the information of the score. During the performance the master machine sends the note events to the clients. The insremot opcode will send events from a source machine to one destination if you want to send events to many destinations (broadcast) use the insglobal opcode instead. These two opcodes can be used in combination. Syntax insremot idestination, isource, instrnum [,instrnum...] Initialization idestination -- a string that is the intended client computer (e.g. 192.168.0.100). This is the destination host which receives the events from the given instrument. isource -- a string that is the intended server computer (e.g. 192.168.0.100). This is the source host which generates the events of the given instrument and sends it to the address given by idestination. instrnum -- a list of instrument numbers which will be played on the destination machine Performance If is essential the computers using this opcode have the same byte-order, data size (double or float) and pointer size. One cannot use it with mixed 32 and 64 computers for instance. Internally this opcode makes use of the gethostname and gethostbyname functions to determine the client's and server's IP address for checking which messages are for which machine. If a computer has more than one IP address there is no way to control which IP address is found. The remote operation does not allow the sending of strings at all. Examples Here is an example of the insremot opcode. It uses the files insremot.csd and insremotM.csd. Example of the insremot opcode. The simple example below shows the bilbar example played on a remote machine. The master machine is named "192.168.1.100" and the client "192.168.1.101". Start the client on the machine (it will wait to receive the events from the master machine) and then start the master. Here is the command on linux to start a client (csound -+rtaudio=alsa -odac -dm0 insremot.csd), and the command on the master machine will look like this (csound -+rtaudio=alsa -odac -dm0 insremotM.csd). See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also insglobal, midglobal, midremot, remoteport Credits Author: Simon Schampijer 2006 New in version 5.03