def _render_datagram( self, session, input_file_path, output_file_path, session_file_path, sample_rate=44100, header_format=soundfiletools.HeaderFormat.AIFF, sample_format=soundfiletools.SampleFormat.INT24, **kwargs ): from supriya import new self.transcript.append('Rendering {}.'.format( os.path.relpath(session_file_path))) if os.path.exists(output_file_path): self.transcript.append( ' Skipped {}. Output already exists.'.format( os.path.relpath(session_file_path))) return 0 old_server_options = session._options new_server_options = new(old_server_options, **kwargs) command = self._build_render_command( input_file_path, output_file_path, session_file_path, server_options=new_server_options, sample_rate=sample_rate, header_format=header_format, sample_format=sample_format, ) self.transcript.append(' Command: {}'.format(command)) exit_code = subprocess.call(command, shell=True) self.transcript.append(' Rendered {} with exit code {}.'.format( os.path.relpath(session_file_path), exit_code)) return exit_code
def boot(self, server_options=None, **kwargs): from supriya import new from supriya import supriya_configuration from supriya.tools import servertools if self.is_running: return self scsynth_path = supriya_configuration.scsynth_path self._osc_controller.boot() server_options = server_options or servertools.ServerOptions() assert isinstance(server_options, servertools.ServerOptions) if kwargs: server_options = new(server_options, **kwargs) options_string = server_options.as_options_string(self.port) command = '{} {} -V -1'.format(scsynth_path, options_string) self._server_process = subprocess.Popen(command, shell=True) time.sleep(0.25) self._is_running = True self._server_options = server_options self._setup() self.sync() PubSub.notify('server-booted') return self
def boot(self, server_options=None, **kwargs): from supriya import new from supriya import supriya_configuration from supriya.tools import servertools if self.is_running: return self scsynth_path = supriya_configuration.scsynth_path self._osc_controller.boot() server_options = server_options or servertools.ServerOptions() assert isinstance(server_options, servertools.ServerOptions) if kwargs: server_options = new(server_options, **kwargs) options_string = server_options.as_options_string(self.port) command = "{} {} -V -1".format(scsynth_path, options_string) self._server_process = subprocess.Popen(command, shell=True) time.sleep(0.25) self._is_running = True self._server_options = server_options self._setup() self.sync() PubSub.notify("server-booted") return self