Skip to content

Commit

Permalink
120 notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlinkyStitt committed Apr 22, 2024
1 parent cb97b82 commit e1987e2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions musical-leptos/src/components/dancing_lights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use js_sys::Float64Array;
use leptos::*;
use musical_lights_core::{
audio::{
AggregatedAmplitudesBuilder, AudioBuffer, BarkScaleBuilder, FlatWeighting, Samples, FFT,
AggregatedAmplitudesBuilder, AudioBuffer, ExponentialScaleBuilder, FlatWeighting, Samples,
FFT,
},
lights::Gradient,
logging::{info, trace},
Expand All @@ -18,7 +19,7 @@ const MIC_SAMPLES: usize = 128;
const FFT_INPUTS: usize = 2048;
/// TODO: i don't like this name
/// 24 to match the Bark Scale
const NUM_CHANNELS: usize = 24;
const NUM_CHANNELS: usize = 120;

// const AUDIO_Y: usize = 9;

Expand Down Expand Up @@ -100,12 +101,12 @@ pub fn DancingLights() -> impl IntoView {
_,
>(weighting);

// let scale_builder = ExponentialScaleBuilder::<FFT_OUTPUTS, NUM_CHANNELS>::new(
// 0.0,
// 20_000.0,
// new_sample_rate,
// );
let scale_builder = BarkScaleBuilder::new(new_sample_rate);
let scale_builder = ExponentialScaleBuilder::<FFT_OUTPUTS, NUM_CHANNELS>::new(
0.0,
20_000.0,
new_sample_rate,
);
// let scale_builder = BarkScaleBuilder::new(new_sample_rate);

// let mut dancing_lights =
// DancingLights::<AUDIO_Y, NUM_CHANNELS, { AUDIO_Y * NUM_CHANNELS }>::new(
Expand Down

0 comments on commit e1987e2

Please sign in to comment.