More frame_size->block_size and some pyaudio->portaudio renaming.

looper
Ben Niemann 6 years ago
parent 298e92a7dd
commit 2691c7a47a

@ -1,13 +1,15 @@
# -*- org-tags-column: -98 -*-
* VM-based pipeline engine :FR:
- rename sprintf to something less ambiguous
- playback becomes slower over time...
- Better handling of partial blocks in player
- reenable player_integration_test
- control/sample tracks should always produce complete blocks, padded with zeros
- currently produces a short buffer at end of playback (triggering an assert in the VM)
- rename sprintf to something less ambiguous
- playback becomes slower over time...
- capture fluidsynth logs
- capture csound logs
- use per instance callback
- Properly handle stopped backend
- Put a lockfree queue between C++ logging and Python logging
- only need that in the performance thread...
@ -49,8 +51,6 @@
- use protos for PipelineMutations instead of pickled objects.
- better test coverage
- base class for node unittests
- create FrameData wrapper class with pythonic API
- move atom sequence mixing into atom.pyx
- what about parameters?
- handle as single float buffers
- vm keeps map of parameter values
@ -74,6 +74,9 @@
- create TestProject class
- has dummy node_db (with builtin stuff and selected other stuff)
* Capture per-node logs :FR:
- csound, lv2 log extensions, ...
- logs tab in node IU
* Improve noisicaa.core.stats_test :CLEANUP:
The module's code changed a lot, but the unittest wasn't updated.

@ -80,7 +80,7 @@ class AudioPlaygroundApp(QtWidgets.QApplication):
await client.setup()
try:
await client.connect(audioproc.server.address)
await client.set_backend('pyaudio')
await client.set_backend('portaudio')
window.set_node_types(await client.list_node_types())

@ -373,8 +373,8 @@ class EditorApp(BaseEditorApp):
self.audioproc_process, {'perf_data'})
await self.audioproc_client.set_backend(
self.settings.value('audio/backend', 'pyaudio'),
frame_size=2 ** int(self.settings.value('audio/frame_size', 10)))
self.settings.value('audio/backend', 'portaudio'),
block_size=2 ** int(self.settings.value('audio/block_size', 10)))
def onPipelineStatus(self, status):
if 'perf_data' in status:

@ -111,7 +111,7 @@ class AppearancePage(Page):
self.app.settings.setValue('appearance/qtStyle', style_name)
class QFrameSizeSpinBox(QtWidgets.QSpinBox):
class QBlockSizeSpinBox(QtWidgets.QSpinBox):
def __init__(self):
super().__init__()
@ -127,7 +127,7 @@ class QFrameSizeSpinBox(QtWidgets.QSpinBox):
class AudioPage(Page):
def __init__(self, app):
self.title = "Audio"
self._backends = ['pyaudio', 'null']
self._backends = ['portaudio', 'null']
super().__init__(app)
def getIcon(self):
@ -138,21 +138,21 @@ class AudioPage(Page):
backend_widget = QtWidgets.QComboBox()
#backend_layout.addWidget(combo, stretch=1)
current = self.app.settings.value('audio/backend', 'pyaudio')
current = self.app.settings.value('audio/backend', 'portaudio')
for index, backend in enumerate(self._backends):
backend_widget.addItem(backend)
if backend == current:
backend_widget.setCurrentIndex(index)
backend_widget.currentIndexChanged.connect(self.backendChanged)
frame_size_widget = QFrameSizeSpinBox()
frame_size_widget.setValue(int(
self.app.settings.value('audio/frame_size', 10)))
frame_size_widget.valueChanged.connect(self.frameSizeChanged)
block_size_widget = QBlockSizeSpinBox()
block_size_widget.setValue(int(
self.app.settings.value('audio/block_size', 10)))
block_size_widget.valueChanged.connect(self.blockSizeChanged)
main_layout = QtWidgets.QFormLayout()
main_layout.addRow("Backend:", backend_widget)
main_layout.addRow("Block size:", frame_size_widget)
main_layout.addRow("Block size:", block_size_widget)
layout.addLayout(main_layout)
@ -173,22 +173,22 @@ class AudioPage(Page):
self.call_async(
self.app.audioproc_client.set_backend(
backend,
frame_size=2 ** int(self.app.settings.value('audio/frame_size', 10))),
block_size=2 ** int(self.app.settings.value('audio/block_size', 10))),
callback=functools.partial(
self._set_backend_done, backend=backend))
def _set_backend_done(self, result, backend):
self.app.settings.setValue('audio/backend', backend)
def frameSizeChanged(self, frame_size):
def blockSizeChanged(self, block_size):
self.call_async(
self.app.audioproc_client.set_backend_parameters(
frame_size=2 ** frame_size),
block_size=2 ** block_size),
callback=functools.partial(
self._set_frame_size_done, frame_size=frame_size))
self._set_block_size_done, block_size=block_size))
def _set_frame_size_done(self, result, frame_size):
self.app.settings.setValue('audio/frame_size', frame_size)
def _set_block_size_done(self, result, block_size):
self.app.settings.setValue('audio/block_size', block_size)
def testBackend(self):
self.call_async(self._testBackendAsync())

Loading…
Cancel
Save