def start(exedir='', port=57110, inputs=21, outputs=2, samplerate=44100, verbose=0, spew=0, startscsynth=0, firstAutoID=1000): """ starts scsynth process. interfaces scsynth module. Inits the OSC communication and classes that handle it exe='', exedir='', port=57110, inputs=2, outputs=2, samplerate=44100, verbose=0, spew=0 """ global server, sndLoader # because they are init in this func exe = 'scsynth' # if none is set take workingdir as exedir on mac and windows if sys.platform == 'win32': exe += '.exe' # add extension if exedir == '': exedir = 'C:\Archivos de Programa\SuperCollider' elif os.uname()[0] == 'Linux': if exedir == '': exedir = '/usr/bin' if not os.path.isfile(os.path.join( exedir, exe)): # in case it is in /usr/bin/local print 'Error : /usr/bin/scsynth does not exist. Trying to find scsnth in /usr/local/bin...' exedir = '/usr/local/bin' elif sys.platform == 'darwin': if exedir == '': exedir = '/Applications/SuperCollider' server = scsynth.start( #exe = exe, #exedir = exedir, port=port, #inputs = inputs, #outputs = outputs, #samplerate = samplerate, verbose=verbose, spew=spew, firstAutoID=firstAutoID) if startscsynth: # starts scsynth server process print "trying to run %s from %s" % (exe, exedir) global synthon synthon = 1 server.instance = scsynth.startServer( exe=exe, exedir=exedir, port=port, inputs=inputs, outputs=outputs, samplerate=samplerate, verbose=verbose, #spew = spew, ) time.sleep(1) # wait to start up sndLoader = scsynth.Loader(server) # manages sound files
def start( exedir='', port=57110, inputs=2, outputs=2, samplerate=44100, verbose=0, spew=0, startscsynth=1 ) : """ starts scsynth process. interfaces scsynth module. Inits the OSC communication and classes that handle it exe='', exedir='', port=57110, inputs=2, outputs=2, samplerate=44100, verbose=0, spew=0 """ global server, sndLoader # because they are init in this func # if none is set take workingdir as exedir on mac and windows if sys.platform == 'win32' : exe = 'scsynth.exe' if exedir == '' : exedir = 'C:\Program Files\PsyCollider' elif os.uname()[0] == 'Linux' : exe = 'scsynth' if exedir == '' : exedir = '/usr/bin' full = os.path.join(exedir, exe) if not os.path.isfile(full) : exedir = '/usr/local/bin' full = os.path.join(exedir, exe) if not os.path.isfile(full) : print "ERROR : scsynth not found in your system, please install or compile supercollider" elif sys.platform == 'darwin': exe = 'scsynth' if exedir == '' : exedir = '/Applications/SuperCollider' server = scsynth.start( #exe = exe, #exedir = exedir, port = port, #inputs = inputs, #outputs = outputs, #samplerate = samplerate, verbose = verbose, spew = spew, ) if startscsynth : global synthon synthon = 1 server.instance = scsynth.startServer( exe = exe, exedir = exedir, port = port, inputs = inputs, outputs = outputs, samplerate = samplerate, verbose = verbose, #spew = spew, ) time.sleep(1) # wait to start up sndLoader = scsynth.Loader(server) # manages sound files
def start( exedir='', port=57110, inputs=21, outputs=2, samplerate=44100, verbose=0, spew=0, startscsynth=0, firstAutoID=1000) : """ starts scsynth process. interfaces scsynth module. Inits the OSC communication and classes that handle it exe='', exedir='', port=57110, inputs=2, outputs=2, samplerate=44100, verbose=0, spew=0 """ global server, sndLoader # because they are init in this func exe = 'scsynth' # if none is set take workingdir as exedir on mac and windows if sys.platform == 'win32' : exe += '.exe' # add extension if exedir == '' : exedir = 'C:\Archivos de Programa\SuperCollider' elif os.uname()[0] == 'Linux' : if exedir == '' : exedir = '/usr/bin' if not os.path.isfile(os.path.join(exedir, exe)): # in case it is in /usr/bin/local print 'Error : /usr/bin/scsynth does not exist. Trying to find scsnth in /usr/local/bin...' exedir = '/usr/local/bin' elif sys.platform == 'darwin': if exedir == '' : exedir = '/Applications/SuperCollider' server = scsynth.start( #exe = exe, #exedir = exedir, port = port, #inputs = inputs, #outputs = outputs, #samplerate = samplerate, verbose = verbose, spew = spew, firstAutoID=firstAutoID ) if startscsynth : # starts scsynth server process print "trying to run %s from %s" % (exe, exedir) global synthon synthon = 1 server.instance = scsynth.startServer( exe = exe, exedir = exedir, port = port, inputs = inputs, outputs = outputs, samplerate = samplerate, verbose = verbose, #spew = spew, ) time.sleep(1) # wait to start up sndLoader = scsynth.Loader(server) # manages sound files