Git Product home page Git Product logo

datanoisetv / picoadk-firmware-template Goto Github PK

View Code? Open in Web Editor NEW
133.0 10.0 13.0 8.92 MB

๐ŸŽต ๐ŸŽน Firmware boilerplate for the RP2040 powered PicoADK Audio Development Board. Build your own stand alone synthesizers! Includes all nuts and bolts (FreeRTOS, USB MIDI, Vult DSP, Hardware Plumbing, DMA, ..). https://github.com/DatanoiseTV/PicoADK-Hardware

License: MIT License

CMake 8.05% C 56.64% C++ 35.18% Shell 0.13%
audio audio-library audio-processing cortex-m0 cortex-m0plus dsp sound synthesis synthesizer vult

picoadk-firmware-template's Introduction

PicoADK - Audio Development Kit Firmware

PicoADK_Top

Photos courtesy of Paul D. Pape - derwellenreiter for schneidersladen, Berlin, Germany.

This boilerplate template allows you to create standalone synthesizers, noise boxes, sample players, ..

Template example code notes

The example code is a simple monophonic synthesizer which can be controlled via USB MIDI or can play a randomly generated melody. It requires you to solder 4 Potentiometers to the ADC0-ADC3 pins, which control wavefolding, envelope amount, filter frequency and resonance.

Repository structure

  • C code is located in the src folder and contains all the low-level funtionality for the firmware incl. USB MIDI handling and dealing with the Audio DAC.
  • Includes for the C code are located in the include folder.
  • The Vult DSP code is located in the vultsrc folder.
  • The includes for Vult are located in lib/vult/examples. These provide some oscillator, filter and envelope implementation along others.

Compiling using PicoADK Docker Image (easy)

Using the script

Just execute ./build-firmware-docker.sh in the project folder.

Manually

  1. git clone --recursive https://github.com/DatanoiseTV/PicoADK-Firmware-Template.git
  2. cd PicoADK-Firmware-Template
  3. Enter the following command in your project directory:
docker run --rm -u $(id -u):$(id -g)  -v $PWD:/project -w /project datanoisetv/picoadk-dev:latest build-firmware.sh

Prerequisites (manual)

  1. Install the Pico-SDK. You can find a guide at https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
  2. Install the Vult compiler: sudo npm install vult -g
  3. (Optional) Install Ninja - apt install ninja

Compiling the firmware (manual)

git clone --recursive https://github.com/DatanoiseTV/PicoADK-FreeRTOS-Template picoadk-template
cd picoadk-template
export PICO_SDK_FETCH_FROM_GIT=1
mkdir build && cd build
cmake .. (optionally add -GNinja)
make (or ninja when you have used -GNinja)

Now you can find a main.uf2 in the build folder, which is your firmware.

Copying the Firmware to the PicoADK

Plug in the PicoADK USB Type-C while holding the BOOT button or hold BOOT and press the reset button quickly. After that, a RPI-RP2 disk volume will appear. Simply drag and drop the UF2 file to this drive and the PicoADK will reboot after a moment, the drive will disappear and your firmware will be running.

More information

Please check the Pico Getting Started Guide on how to install the toolchain and required libraries for your OS.

Development

The pipeline will trigger a full build on Push or Pull Request.

Releasing

The pipeline will trigger a new release build on following tagging scheme:

git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0

Hardware

The way-to-go hardware option is the PicoADK

Getting RAM and flash usage statistics

image

Your statically allocated memory and flash usage will be reported upon linking.

Community

You can find the PicoADK at Discord right here and a community discussion board on GitHub Discussions

picoadk-firmware-template's People

Contributors

datanoisetv avatar handzsujt avatar modlfo avatar roryjamesallen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

picoadk-firmware-template's Issues

Vultc not found...

Describe the bug
Vultc in /project/tools/vultc cannot be found although it is there.

To Reproduce
Steps to reproduce the behavior:
,/build_firmware_setup.sh
...
[7/91] Transcompiling Vult DSP Code to C++.
/bin/sh: /project/tools/vultc: not found
ninja: job failed: cd /project/build && /project/tools/vultc /project/vultsrc/dsp.vult -i /project/lib/vult/examples/osc -i /project/lib/vult/examples/util -i /project/lib/vult/examples/filters -i /project/lib/vult/examples/env -i /project/lib/vult/examples/midi -i /project/lib/vult/examples/effects -i /project/lib/vult/examples/units -ccode -real fixed -samplerate 44140 -o vult
ninja: subcommand failed

./vultc
vult v0.4.14 - https://github.com/modlfo/vult
no input files

How to activate the vult example dsp.vult instead the example in main.cpp

I've seen the example video from Floyd Steinberg where he claims that the dsp.vult can be replaced
with any other example (noise, sine). This might work for software simulation of vult.
But when compiling for the picoadk firmware I get the following errors:

[ 41%] Building CXX object CMakeFiles/main.dir/src/main.cpp.obj
/home/sven/development/PicoADK-Firmware-Template/src/main.cpp: In function 'void i2s_callback_func()':
/home/sven/development/PicoADK-Firmware-Template/src/main.cpp:230:32: error: 'Dsp_process_ret_0' was not declared in this scope; did you mean 'Dsp_process_type'?
230 | fix16_t left_out = Dsp_process_ret_0(ctx);
| ^~~~~~~~~~~~~~~~~
| Dsp_process_type
/home/sven/development/PicoADK-Firmware-Template/src/main.cpp:231:33: error: 'Dsp_process_ret_1' was not declared in this scope; did you mean 'Dsp_process_type'?
231 | fix16_t right_out = Dsp_process_ret_1(ctx);
| ^~~~~~~~~~~~~~~~~
| Dsp_process_type
make[2]: *** [CMakeFiles/main.dir/build.make:97: CMakeFiles/main.dir/src/main.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1915: CMakeFiles/main.dir/all] Error 2

(I ommited the simple error of too few parameters in Dsp_Process) as I could solve this one for myself.

I've also seen that the header file in question vult.h must be generated from vultin.h and vultin.cpp, But I could
not find the original functions for this two functions inside.

To Reproduce
Steps to reproduce the behavior:
copy the example noise.vult (or sine.vult) over dsp.vult
export PICO_SDK_FETCH_FROM_GIT=1
mkdir build && cd build
cmake ..
make

Expected behavior
invoking the noise.vult (or sine.vult) example given in dsp.vult

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Debian 12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.