ServerRecorder

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph cluster_builtins { graph [label=builtins]; node [color=1]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } subgraph "cluster_supriya.realtime" { graph [label="supriya.realtime"]; node [color=2]; "supriya.realtime.ServerRecorder.ServerRecorder" [URL="../api/supriya/realtime/ServerRecorder.html#supriya.realtime.ServerRecorder.ServerRecorder", color=black, fontcolor=white, label="Server\nRecorder", target=_top]; } subgraph "cluster_supriya.system" { graph [label="supriya.system"]; node [color=3]; "supriya.system.SupriyaObject.SupriyaObject" [URL="../api/supriya/realtime/../system/SupriyaObject.html#supriya.system.SupriyaObject.SupriyaObject", label="Supriya\nObject", target=_top]; } "builtins.object" -> "supriya.system.SupriyaObject.SupriyaObject"; "supriya.system.SupriyaObject.SupriyaObject" -> "supriya.realtime.ServerRecorder.ServerRecorder"; }

class supriya.realtime.ServerRecorder.ServerRecorder(server)[source]

A server recorder.

>>> import supriya
>>> import tempfile, time
>>> server = supriya.Server().boot()
>>> with tempfile.TemporaryDirectory() as tempdir:
...     server.recorder.start(
...         file_path=os.path.join(tempdir, 'example.aiff'),
...         channel_count=2,
...         header_format='AIFF',
...         )
...     time.sleep(1)
...     server.recorder.stop()
...

Attributes Summary

channel_count
current_channel_count
current_file_path
current_header_format
current_sample_format
header_format
is_recording
pause
prepare
record_buffer
record_node
record_synthdef
sample_format
server
start
stop
unpause

Special methods

(SupriyaObject).__repr__()

Return repr(self).


Methods

pause()[source]
prepare(file_path=None, channel_count=None, header_format=None, sample_format=None)[source]
start(file_path=None, channel_count=None, header_format=None, sample_format=None)[source]
stop()[source]
unpause()[source]

Read/write properties

channel_count
header_format
sample_format

Read-only properties

current_channel_count
current_file_path
current_header_format
current_sample_format
is_recording
record_buffer
record_node
record_synthdef
server