ipytone.AudioBuffers#
- class ipytone.AudioBuffers(**kwargs: Any)#
Bases:
ToneObjectA collection (dict-like) of audio buffers.
- Parameters:
urls (dict-like) – A mapping of buffer names (str) and buffer file URLs (str) or
AudioBufferobjectsbase_url (str, optional) – Prefix to add before all the URLs.
- __init__(urls, base_url='', **kwargs)#
Public constructor
Methods
add(key, url[, create_node])Add or replace a buffer.
dispose()Dispose and disconnect this node.
Attributes
base_urlReturns a dictionary with all buffers.
Returns True if the node was disposed (i.e., disconnected and web audio node freed for garbage collection).
Return True if all buffers are loaded.
logA trait whose value must be an instance of a specified class.
- add(key, url, create_node=True)#
Add or replace a buffer.
- Parameters:
key (str) – Buffer name.
url (str or
AudioBuffer.) – Buffer file URL (str) orAudioBufferobject.create_node (bool, optional) – Internal use only.
- property buffers#
Returns a dictionary with all buffers.
- dispose()#
Dispose and disconnect this node.
- property disposed#
Returns True if the node was disposed (i.e., disconnected and web audio node freed for garbage collection).
- property loaded#
Return True if all buffers are loaded.