From 1edeb89876c88cd8218e0a400162412e7daa5ad7 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Thu, 7 Nov 2024 12:48:40 +0000 Subject: [PATCH 1/2] Update examples --- examples/audio-through-example.py | 7 ++++++- examples/granulation-example.py | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/audio-through-example.py b/examples/audio-through-example.py index 4b9b9626..7721d2ae 100755 --- a/examples/audio-through-example.py +++ b/examples/audio-through-example.py @@ -9,6 +9,9 @@ def main(): + print("Audio playthrough: Plays the microphone input through the default output") + print("Listen through headphones to avoid feedback") + graph = AudioGraph() #-------------------------------------------------------------------------------- @@ -18,12 +21,14 @@ def main(): # [audio] # input_device_name = "My Device" #-------------------------------------------------------------------------------- - audio_in = AudioIn(1) + audio_in = AudioIn() + audio_in = audio_in[0] #-------------------------------------------------------------------------------- # Add some delay, and play #-------------------------------------------------------------------------------- output = audio_in + output = output + CombDelay(output, 0.1, feedback=0.8) stereo = StereoPanner(output) graph.play(stereo) diff --git a/examples/granulation-example.py b/examples/granulation-example.py index 2583ff52..4cf2d038 100755 --- a/examples/granulation-example.py +++ b/examples/granulation-example.py @@ -16,9 +16,10 @@ def main(): #------------------------------------------------------------------------ # Load an audio buffer. #------------------------------------------------------------------------ - audio_path = os.path.join(os.path.dirname(__file__), "audio", "gliss.aif") + audio_path = os.path.join(os.path.dirname(__file__), "audio", "stereo-count.wav") buf = Buffer(audio_path) - clock = RandomImpulse(50) + grain_frequency = WhiteNoise(frequency=2, min=1, max=50) + clock = RandomImpulse(grain_frequency) granulator = Granulator(buffer=buf, clock=clock, pan=RandomUniform(-1, 1, clock=clock), @@ -35,4 +36,4 @@ def main(): graph.wait() if __name__ == "__main__": - main() \ No newline at end of file + main() From c87f298e851e30594b0f8a528cae3f61b5fbe76e Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Thu, 7 Nov 2024 12:51:14 +0000 Subject: [PATCH 2/2] Add patchelf etc --- auxiliary/cibuildwheel/make-raspberry-pi-aarch64.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/auxiliary/cibuildwheel/make-raspberry-pi-aarch64.sh b/auxiliary/cibuildwheel/make-raspberry-pi-aarch64.sh index 853a955e..f1da408e 100755 --- a/auxiliary/cibuildwheel/make-raspberry-pi-aarch64.sh +++ b/auxiliary/cibuildwheel/make-raspberry-pi-aarch64.sh @@ -2,6 +2,7 @@ #-------------------------------------------------------------------------------- # Build script for Raspberry Pi, which creates Linux/arm builds. +# Tested on Raspberry Pi 4 running Raspberry Pi OS circa October 2024 # Requires pyenv, which requires libffi-dev to build Python with ctypes support. # # May be ultimately better to switch to this arm runner action: @@ -14,6 +15,10 @@ set -e # Install dependencies to build a fully-fledged Python install sudo apt-get install build-essential libffi-dev libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev +# Dependencies for auditwheel, required to make manylinux build +sudo apt install patchelf +pip install auditwheel + VERSIONS="3.8.20 3.9.20 3.10.15 3.11.10 3.12.7 3.13.0" pyenv install --skip-existing $VERSIONS @@ -25,3 +30,7 @@ do pip3 install build python3 -m build --wheel done + +cd dist +mkdir -p fixed +auditwheel repair *.whl -w fixed --plat manylinux_2_34_aarch64