From ff65236f2caf4e70856a781d1bcf4dc9c9f43dd5 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 24 Mar 2022 14:36:38 +0100 Subject: [PATCH] Additions for compressor. --- README.md | 25 +++++++++++++++---------- Synth_Dexed | 2 +- src/Synth_Dexed.mk | 8 ++++++-- src/dexedadapter.h | 2 ++ 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 51cba86..23f1818 100644 --- a/README.md +++ b/README.md @@ -88,27 +88,29 @@ __CAUTION:__ All GPIO numbers are [chip numbers](https://pinout.xyz/), not heade E.g., to build for Raspberry Pi 4 on a Ubuntu 20.04 build system, you can use the following example. See [`build.yml`](../../tree/main/.github/workflows/build.yml) for complete build steps that create versions for Raspberry Pi 1, 2, 3,and 4 in 32-bit and 64-bit as required. ``` +# Choose your RPi +export RPI=4 + git clone https://github.com/probonopd/MiniDexed cd MiniDexed +mkdir -p kernels sdcard # Recursively pull git submodules git submodule update --init --recursive -# Choose your RPi -export RPI=4 - # Install toolchain if [ "${RPI}" -gt 2 ] then - wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz + wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz else - wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz + wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz fi -tar xf gcc-arm-*-*.tar.xz +tar xvf gcc-arm-*-*.tar.xz export PATH=$(readlink -f ./gcc-*/bin/):$PATH # Build dependencies and MiniDexed ./build.sh +cp ./src/kernel*.img ./kernels/ # Get Raspberry Pi boot files cd ./circle-stdlib/libs/circle/boot @@ -120,14 +122,17 @@ fi cd - # Make zip that contains Raspberry Pi 4 boot files. The contents can be copied to a FAT32 formatted partition on a microSD card -mkdir -p sdcard cd sdcard ../getsysex.sh cd .. cp -r ./circle-stdlib/libs/circle/boot/* sdcard rm -rf sdcard/config*.txt sdcard/README sdcard/Makefile sdcard/armstub sdcard/COPYING.linux -cp ./src/config.txt ./src/minidexed.ini ./src/*img sdcard/ -zip -r MiniDexed_Raspberry_Pi_${RPI}.zip sdcard/* +cp ./src/config.txt ./src/minidexed.ini ./src/*img ./src/performance.ini sdcard/ +echo "usbspeed=full" > sdcard/cmdline.txt +cd sdcard +cp ../kernels/* . || true +zip -r ../MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d).zip * +cd - # Optionally, create a RPi image. This can be written to a microSD card using tools like Etcher or dd sudo apt install --yes mount parted @@ -145,7 +150,7 @@ sudo losetup -d "${DEV}" rm -r boot # Write to SD card -sudo dd if="${IMG}" of=/dev/mmcblk0 bs=128k status=progress +sudo dd if="${IMG}" of=/dev/mmcblk0 bs=512k status=progress ``` ## Acknowledgements diff --git a/Synth_Dexed b/Synth_Dexed index 5bceb75..19cb794 160000 --- a/Synth_Dexed +++ b/Synth_Dexed @@ -1 +1 @@ -Subproject commit 5bceb75ce5b8a7620cdd469ca7bacb7d0afcd5e1 +Subproject commit 19cb794fc392776bcdf0fcecd5d27d6d2ae33a22 diff --git a/src/Synth_Dexed.mk b/src/Synth_Dexed.mk index 7953394..b411b0b 100644 --- a/src/Synth_Dexed.mk +++ b/src/Synth_Dexed.mk @@ -20,7 +20,11 @@ OBJS += \ $(SYNTH_DEXED_DIR)/pitchenv.o \ $(SYNTH_DEXED_DIR)/porta.o \ $(SYNTH_DEXED_DIR)/sin.o \ - $(CMSIS_DSP_SOURCE_DIR)/SupportFunctions/SupportFunctions.o + $(CMSIS_DSP_SOURCE_DIR)/SupportFunctions/SupportFunctions.o \ + $(CMSIS_DSP_SOURCE_DIR)/BasicMathFunctions/BasicMathFunctions.o \ + $(CMSIS_DSP_SOURCE_DIR)/FastMathFunctions/FastMathFunctions.o \ + $(CMSIS_DSP_SOURCE_DIR)/FilteringFunctions/FilteringFunctions.o \ + $(CMSIS_DSP_SOURCE_DIR)/CommonTables/CommonTables.o INCLUDE += -I $(SYNTH_DEXED_DIR) INCLUDE += -I $(CMSIS_CORE_INCLUDE_DIR) @@ -28,4 +32,4 @@ INCLUDE += -I $(CMSIS_DSP_INCLUDE_DIR) INCLUDE += -I $(CMSIS_DSP_PRIVATE_INCLUDE_DIR) CXXFLAGS += -DARM_MATH_NEON -EXTRACLEAN = $(SYNTH_DEXED_DIR)/*.[od] $(CMSIS_DSP_SOURCE_DIR)/SupportFunctions/*.[od] +EXTRACLEAN = $(SYNTH_DEXED_DIR)/*.[od] $(CMSIS_DSP_SOURCE_DIR)/SupportFunctions/*.[od] $(CMSIS_DSP_SOURCE_DIR)/SupportFunctions/*.[od] $(CMSIS_DSP_SOURCE_DIR)/BasicMathFunctions/*.[od] $(CMSIS_DSP_SOURCE_DIR)/FastMathFunctions/*.[od] $(CMSIS_DSP_SOURCE_DIR)/FilteringFunctions/*.[od] $(CMSIS_DSP_SOURCE_DIR)/CommonTables/*.[od] diff --git a/src/dexedadapter.h b/src/dexedadapter.h index 7f2badc..e0664f7 100644 --- a/src/dexedadapter.h +++ b/src/dexedadapter.h @@ -33,6 +33,8 @@ public: CDexedAdapter (uint8_t maxnotes, int rate) : Dexed (maxnotes, rate) { + Dexed::setCompressor(true); + printf("Dexed-Compressor: %d",Dexed::compressorEnabled()); } void loadVoiceParameters (uint8_t* data)