ServerMeters

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.ServerMeters.ServerMeters" [URL="../api/supriya/realtime/ServerMeters.html#supriya.realtime.ServerMeters.ServerMeters", color=black, fontcolor=white, label="Server\nMeters", 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.ServerMeters.ServerMeters"; }

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

A server recorder.

>>> import json, supriya, time
>>> server = supriya.Server().boot(
...     input_bus_channel_count=2,
...     output_bus_channel_count=2,
...     )
>>> meters = server.meters.allocate()
>>> time.sleep(1)
>>> print(json.dumps(meters.to_dict(), indent=4))
{
    "server_meters": {
        "input_meter_levels": [
            {
                "peak": 0...,
                "rms": 0...
            },
            {
                "peak": 0...,
                "rms": 0...
            }
        ],
        "output_meter_levels": [
            {
                "peak": 0.0,
                "rms": 0.0
            },
            {
                "peak": 0.0,
                "rms": 0.0
            }
        ]
    }
}
>>> meters.free()

Attributes Summary

allocate
free
input_count
input_meter_command
input_meter_synthdef
make_meter_synthdef
notify
output_count
output_meter_command
output_meter_synthdef
server
to_dict

Special methods

(SupriyaObject).__repr__()

Return repr(self).


Methods

allocate()[source]
free()[source]
notify(topic, event)[source]
to_dict()[source]

Class & static methods

static make_meter_synthdef(channel_count=1, command_name='/reply', initial_bus=0)[source]

Read-only properties

input_count
input_meter_command
input_meter_synthdef
output_count
output_meter_command
output_meter_synthdef
server