BufferGenerateRequest

class supriya.tools.requesttools.BufferGenerateRequest(amplitudes=None, as_wavetable=None, buffer_id=None, command_name=None, frequencies=None, phases=None, should_clear_first=None, should_normalize=None)[source]

A /b_gen request.

This requests models the ‘cheby’, ‘sine1’, ‘sine2’ and ‘sine3’ /b_gen commands.

Use BufferCopyRequest for /b_gen copy and BufferNormalizeRequest for /b_gen normalize and /b_gen wnormalize.

>>> from supriya.tools import requesttools
>>> request = requesttools.BufferGenerateRequest(
...     amplitudes=(1., 0.5, 0.25),
...     as_wavetable=True,
...     buffer_id=23,
...     command_name='sine3',
...     frequencies=(1, 2, 3),
...     phases=(0, 0.5, 0),
...     should_clear_first=True,
...     should_normalize=True,
...     )
>>> print(request)
BufferGenerateRequest(
    amplitudes=(1.0, 0.5, 0.25),
    as_wavetable=True,
    buffer_id=23,
    command_name='sine3',
    frequencies=(1.0, 2.0, 3.0),
    phases=(0.0, 0.5, 0.0),
    should_clear_first=True,
    should_normalize=True
    )
>>> message = request.to_osc_message()
>>> message
OscMessage(38, 23, 'sine3', 7, 1.0, 1.0, 0.0, 0.5, 2.0, 0.5, 0.25, 3.0, 0.0)
>>> message.address == requesttools.RequestId.BUFFER_GENERATE
True

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_requesttools { graph [label=requesttools]; "supriya.tools.requesttools.BufferGenerateRequest.BufferGenerateRequest" [color=black, fontcolor=white, group=1, label=<<B>BufferGenerateRequest</B>>, shape=box, style="filled, rounded"]; "supriya.tools.requesttools.Request.Request" [color=2, group=1, label=Request, shape=oval, style=bold]; "supriya.tools.requesttools.Request.Request" -> "supriya.tools.requesttools.BufferGenerateRequest.BufferGenerateRequest"; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject" [color=3, group=2, label=SupriyaValueObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject" -> "supriya.tools.requesttools.Request.Request"; }

Attribute summary

amplitudes
as_wavetable
buffer_id
chebyshev([amplitudes, as_wavetable, ...])
command_name
communicate([message, server, sync, timeout])
condition
flags
frequencies
phases
request_command
request_id
response
response_callback
response_specification
should_clear_first
should_normalize
sine1([amplitudes, as_wavetable, buffer_id, ...])
sine2([amplitudes, as_wavetable, buffer_id, ...])
sine3([amplitudes, as_wavetable, buffer_id, ...])
to_list([with_textual_osc_command])
to_osc_message([with_textual_osc_command])
__copy__(*args)
__eq__(expr)
__format__([format_specification]) Formats Supriya object.
__hash__()
__repr__() Gets interpreter representation of Supriya object.

Read-only properties

BufferGenerateRequest.amplitudes
BufferGenerateRequest.as_wavetable
BufferGenerateRequest.buffer_id
BufferGenerateRequest.command_name
(Request).condition
BufferGenerateRequest.flags
BufferGenerateRequest.frequencies
BufferGenerateRequest.phases
(Request).request_command
BufferGenerateRequest.request_id
(Request).response_callback
BufferGenerateRequest.response_specification
BufferGenerateRequest.should_clear_first
BufferGenerateRequest.should_normalize

Read/write properties

(Request).response

Methods

(Request).communicate(message=None, server=None, sync=True, timeout=1.0)
(Request).to_list(with_textual_osc_command=False)
BufferGenerateRequest.to_osc_message(with_textual_osc_command=False)[source]

Class & static methods

classmethod BufferGenerateRequest.chebyshev(amplitudes=None, as_wavetable=True, buffer_id=None, should_normalize=True, should_clear_first=True)[source]
classmethod BufferGenerateRequest.sine1(amplitudes=None, as_wavetable=True, buffer_id=None, should_normalize=True, should_clear_first=True)[source]
classmethod BufferGenerateRequest.sine2(amplitudes=None, as_wavetable=True, buffer_id=None, frequencies=None, should_normalize=True, should_clear_first=True)[source]
classmethod BufferGenerateRequest.sine3(amplitudes=None, as_wavetable=True, buffer_id=None, frequencies=None, phases=None, should_normalize=True, should_clear_first=True)[source]

Special methods

(SupriyaValueObject).__copy__(*args)
(SupriyaValueObject).__eq__(expr)
(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(SupriyaValueObject).__hash__()
(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.