Giter Club home page Giter Club logo

noise-generator-rust-on-pi-pico's Introduction

Brown Noise Generator for Pimoroni Pico Audio on Pi Pico in Rust

Acknowledgements

  • A great deal of the Rust in this repo is thanks to ramenspazz's Pico_I2S project for this same hardware set (Pimoroni Pico Audio shield on the Pi Pico) - in Rust.
  • This project uses the pio I2S assembly provided by raspberrypi/pico-extras.

Building and Flashing

You'll need to install Rust Embedded toolchains, see the Rust Embedded book for details there.

cargo run --release

Will flash a Pi Pico that is in USB boot mode.

Filter Design

Butterworth first order filter

  • center_frequency = 146 # Center frequency in Hz
  • sample_rate = 44100 # Sample rate in Hz
  • bandwidth = 0.2 # Bandwidth as a percentage

Butterworth Filter Coefficients for DSP Implementation:

  • Numerator (b): [ 0.00414308 0. -0.00414308]
  • Denominator (a): [ 1. -1.99130017 0.99171384]

y[n]=b[0]×x[n]+b[1]×x[n−1]+⋯+a[1]×y[n−1]+…

  • where x[n] is your input signal, and y[n] is your filtered output signal.

Host Testing

I've authored a test binary to generate WAV file outputs for debug iteration in the host environment.

cargo test --test main --target x86_64-unknown-linux-gnu

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.