controls#
Reusable audio-stream controls and their extension-point discovery.
- spectacoular.apps.controls.create_phantom_rotation_data(sample_freq=25600.0, rotational_speed=1.0, mics=None, seed=100)#
Return one full rotation of deterministic Acoular-generated phantom data.
- class spectacoular.apps.controls.BaseAudioStreamControl(doc, logger=None)#
Bases:
objectProvide an audio source and consistently styled configuration UI.
- create_source()#
Create and return the Acoular-compatible stream source.
- initialize_source()#
Create the source after the control widget renders.
- source_initialized()#
Finish UI setup after the source is created.
- build_loading_widget()#
Return a widget displayed while this control’s source initializes.
- loading_finished()#
Hide the source-initialization widget.
- widget_panel(*widgets)#
Return a labelled, bounded panel shared by every audio control.
- get_widgets()#
Return one Bokeh layout containing backend-specific settings.
- on_source_changed(callback)#
Register a no-argument callback invoked after
sourcechanges.
- source_changed()#
Notify the app that this stopped control replaced its source.
- start()#
Start backend acquisition. Default controls need no action.
- stop()#
Stop backend acquisition. Default controls need no action.
- close()#
Release backend resources. Default controls need no action.
- set_config_enabled(enabled)#
Enable or disable source-changing configuration widgets.
- class spectacoular.apps.controls.PhantomControl(doc, logger=None)#
Bases:
BaseAudioStreamControlProvide a generated repeating phantom audio stream.
- create_source()#
Create a repeating one-rotation phantom source in memory.
- get_widgets()#
Return phantom-source information.
- build_loading_widget()#
Return a widget displayed while this control’s source initializes.
- close()#
Release backend resources. Default controls need no action.
- initialize_source()#
Create the source after the control widget renders.
- loading_finished()#
Hide the source-initialization widget.
- on_source_changed(callback)#
Register a no-argument callback invoked after
sourcechanges.
- set_config_enabled(enabled)#
Enable or disable source-changing configuration widgets.
- source_changed()#
Notify the app that this stopped control replaced its source.
- source_initialized()#
Finish UI setup after the source is created.
- start()#
Start backend acquisition. Default controls need no action.
- stop()#
Stop backend acquisition. Default controls need no action.
- widget_panel(*widgets)#
Return a labelled, bounded panel shared by every audio control.
- class spectacoular.apps.controls.SoundDeviceControl(doc, logger=None)#
Bases:
BaseAudioStreamControlConfigure a live sounddevice input source.
- initialize_source()#
Discover an input device and create its source.
- source_initialized()#
Build the device settings widgets on Bokeh’s event loop.
- create_source()#
Create the live sounddevice source.
- get_widgets()#
Return live-device settings once the source is ready.
- set_config_enabled(enabled)#
Enable or disable live-device selection.
- build_loading_widget()#
Return a widget displayed while this control’s source initializes.
- close()#
Release backend resources. Default controls need no action.
- loading_finished()#
Hide the source-initialization widget.
- on_source_changed(callback)#
Register a no-argument callback invoked after
sourcechanges.
- source_changed()#
Notify the app that this stopped control replaced its source.
- start()#
Start backend acquisition. Default controls need no action.
- stop()#
Stop backend acquisition. Default controls need no action.
- widget_panel(*widgets)#
Return a labelled, bounded panel shared by every audio control.
- spectacoular.apps.controls.discover_controls(builtins, eps=None)#
Return builtins extended by valid, non-conflicting control entry points.