Skip to content

About

Minimal visualizer: MIDI controlled, audio reactive, realtime processing of FFT. Configurable though toml files

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

201 Commits

Folders and files

Repository files navigation

rust-visual-art


Running the app

You can run in either release mode ( slow build but fast performance )

cargo run --release

or debug mode ( fast build but not quite as fast performance )

cargo run

hot-reloading

To set up the hot-reloading - run this command in a separate shell to watch the changes to lib/*.rs which are the "plugin" functions that control the visuals

NOTE: requires cargo watch - install with cargo install cargo-watch

sh watch.sh

for best results run in release mode

cargo run --release

Dependencies

midi

For now, in order to build and run this project; you'll need to install the portmidi library through your package manager.

I built this on arch linux so it would be like so:

sudo pacman --sync portmidi

keyboard

The visual patches can be changed also via the number keys

The names of the patches with their numbers respectively. Which match up to the dynamically loaded libs by the file names prefixed with the number. This makes sure that the libs are loaded in the same order each time they are hot reloaded if the library code changes during runtime.

  • Spiral - 1,
  • V2 - 2,
  • Waves - 3,
  • Audio - 4,
  • Solid - 5

And the effect parameters currently setup can be changed with the arrow keys

  • current_intensity modifier - (arrow)KeyUp(positive direction),(arrow)KeyDown(negative direction)
  • time_dialation modifier - (arrow)KeyLeft(negative direction),(arrow)KeyRight(positive direction)

audio

The audio mechanism used in this project utilizes nannou_audio and took inspiration from this example which Josh Batty kindly updated recently on the bevy-refactor branch of nannou.

As well as inspiration from Lokuas lattice project which makes use of audio reactivity here

nannou_audio essentially which wraps around cpal under the hood which interestingly will use the "default" device of the user's system.

Which on my arch setup, the default device, is pipewire. But in order for the rest of my system to work normally I needed to adjust my setup slightly.

Since removing pulseaudio - I needed to install pipewire-pulse for other software that depended on pulseaudio before to continue to work properly with pipewire instead.

And then to adjust any settings within pwvucontrol (yes that is spelled right) the pipewire equivalent of pavucontrol. I needed to also install wireplumber.

Once that was all installed I needed to make sure everything was running properly on my system so that means configuring my system on startup to run pipewire pipewire-pulse and wireplumber.

rust-visual-art will then start up and become a recording source appearing inside pwvucontrol and will receive input from whichever input device is set by the user as default. This is IMO much better than hard coding the device name into a code change. That way the user has control which device is sending input into the application.


About

Minimal visualizer: MIDI controlled, audio reactive, realtime processing of FFT. Configurable though toml files

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages