https://github.com/martmists-gh/kaudio-python
Kotlin/Native DSP with CPython wrapper
https://github.com/martmists-gh/kaudio-python
cpython-extensions kotlin kotlin-native python
Last synced: 19 days ago
JSON representation
Kotlin/Native DSP with CPython wrapper
- Host: GitHub
- URL: https://github.com/martmists-gh/kaudio-python
- Owner: Martmists-GH
- License: bsd-3-clause
- Created: 2021-12-13T12:41:12.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-05T20:09:38.000Z (over 3 years ago)
- Last Synced: 2025-04-22T21:57:09.677Z (10 months ago)
- Topics: cpython-extensions, kotlin, kotlin-native, python
- Language: Python
- Homepage:
- Size: 245 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KAudio Python Wrapper
A reimplementation of my kaudio library for Python 3.10+
# Application
An application is bundled by default:
```
$ pip install Qt.py PySide2 # required due to an issue in NodeGraphQt
$ pip install --user .[app] # on zsh: pip install --user .\[app\]
$ python3 -m kaudio.app
```
# Usage
### Installation
```
$ pip install .
```
### Code
```python
import kaudio
input_node = kaudio.InputNode(stereo=False)
output_node = kaudio.OutputNode(stereo=False)
effect_node = kaudio.VolumeNode(stereo=False)
input_node.connect("output", effect_node, "input")
effect_node.connect("output", output_node, "input")
effect_node.gain = 3.0
input_node.buffer = [<1024 floats>]
input_node.process() # Send to effect_node
effect_node.process() # Apply gain and send to output_node
output_node.process() # Write to out buffer
result_buffer = output_node.buffer
```