BufferGenerateRequest

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.commands" { graph [label="supriya.commands"]; node [color=2]; "supriya.commands.BufferGenerateRequest.BufferGenerateRequest" [URL="../api/supriya/commands/BufferGenerateRequest.html#supriya.commands.BufferGenerateRequest.BufferGenerateRequest", color=black, fontcolor=white, label="Buffer\nGenerate\nRequest", target=_top]; "supriya.commands.Request.Request" [URL="../api/supriya/commands/Request.html#supriya.commands.Request.Request", label=Request, shape=oval, style=bold, target=_top]; "supriya.commands.Requestable.Requestable" [URL="../api/supriya/commands/Requestable.html#supriya.commands.Requestable.Requestable", label=Requestable, target=_top]; "supriya.commands.Request.Request" -> "supriya.commands.BufferGenerateRequest.BufferGenerateRequest"; "supriya.commands.Requestable.Requestable" -> "supriya.commands.Request.Request"; } subgraph "cluster_supriya.system" { graph [label="supriya.system"]; node [color=3]; "supriya.system.SupriyaObject.SupriyaObject" [URL="../api/supriya/commands/../system/SupriyaObject.html#supriya.system.SupriyaObject.SupriyaObject", label="Supriya\nObject", target=_top]; "supriya.system.SupriyaValueObject.SupriyaValueObject" [URL="../api/supriya/commands/../system/SupriyaValueObject.html#supriya.system.SupriyaValueObject.SupriyaValueObject", label="Supriya\nValue\nObject", target=_top]; "supriya.system.SupriyaObject.SupriyaObject" -> "supriya.system.SupriyaValueObject.SupriyaValueObject"; } "builtins.object" -> "supriya.system.SupriyaObject.SupriyaObject"; "supriya.system.SupriyaValueObject.SupriyaValueObject" -> "supriya.commands.Requestable.Requestable"; }

class supriya.commands.BufferGenerateRequest.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.

>>> import supriya.commands
>>> request = supriya.commands.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
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 == supriya.commands.RequestId.BUFFER_GENERATE
True

Attributes Summary

amplitudes
as_wavetable
buffer_id
chebyshev
command_name
flags
frequencies
phases
request_id
response_patterns
should_clear_first
should_normalize
sine1
sine2
sine3
to_osc

Special methods

(SupriyaValueObject).__copy__(*args)
(SupriyaValueObject).__eq__(expr)

Return self==value.

(SupriyaValueObject).__hash__()

Return hash(self).

(SupriyaObject).__repr__()

Return repr(self).


Methods

(Requestable).communicate(server=None, sync=True, timeout=1.0, apply_local=True)
(Request).to_datagram()
(Request).to_list(with_request_name=False)
to_osc(with_request_name=False)[source]

Class & static methods

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

Read-only properties

amplitudes
as_wavetable
buffer_id
command_name
(Requestable).condition
flags
frequencies
phases
(Request).request_name
(Requestable).response
response_patterns
should_clear_first
should_normalize