Giter Site home page Giter Site logo

bevy_audioviz's Introduction

Bevy Audioviz

Description

This project is a real-time audio visualizer implemented in Rust using the Bevy game engine and the CPAL library for audio processing. It captures audio data, performs frequency analysis using the spectrum-analyzer crate, and then visualizes this data on a 2D canvas in a Bevy application using shaders.

screenshot bar screenshot string screenshot circle split

New Features

  • GUI Integration: Press G to toggle the new graphical user interface that allows you to adjust various visualization parameters including:
    • Colors
    • Monochrome effect
    • Frequency range (max and min)
    • Interpolation factor
    • Smoothing
    • Smoothing size
  • Multiple Visualizers: Choose between three distinct visualizers:
    • Bar Visualizer
    • String Visualizer
    • Circle Visualizer

Features

  • Real-time audio capture from configurable input or output device.
  • Extreme low latency: Less than 0.5ms per frame with vsync disabled.
  • Spectrum analysis visualizer with a focus on perceived accuracy.
  • Symmetric circle visualizer with separated channels.
  • Configurable smooth decay and interpolation of visualized data for aesthetic effect.
  • Automatic scaling of visualization to window resizing events.

Building From Source:

To set up the project, follow these steps:

  1. Clone the repository to your local machine.
  2. Navigate into the project directory.
  3. Run cargo build to compile the project.

Usage

To run the audio visualizer:

  1. Execute cargo run from the terminal in the project directory.
  2. Ensure that your audio input device is connected and recognized by the system.
  3. Play some audio.
  4. Observe the visualized audio data in the application window.
  5. Press G to toggle the GUI and adjust visualization settings.

Keybindings:

Key Action
Space Switch Visualization
V Toggle VSync
G Toggle GUI

Custom Shaders

The project includes custom shaders written in WGSL for rendering the audio visualization. Ensure the shader files are correctly placed in the assets/shaders directory.

Contributing

Contributions to this project are welcome. Submit a pull request for review.

License

This project is released under the MIT license, see LICENSE for more details.

Credits

I took a great deal of inspiration from Audioviz, created by BrunoWallner.

bevy_audioviz's People

Contributors

lowband21 avatar martinlindhe 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

Watchers

 avatar  avatar

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.