wizgrav / clubber

Application of music theory in audio reactive visualizations
http://wizgrav.github.io/clubber
MIT License
360 stars 26 forks source link

bands doesn't output array of notes #11

Closed karneaud closed 6 years ago

karneaud commented 6 years ago

I'm trying to use your tool by doing the following

const clubber = new Clubber({
          size: 2048,
          mute: false
        });

const bands = {

                low: clubber.band({
                    from: 1, // minimum midi note to take into account
                    to: 59, // maximum midi note, up to 160.
                    smooth: [0.1, 0.1, 0.1, 0.1] // Exponential smoothing factors for each of the four returned values
                }),

                mid: clubber.band({
                    from: 58,
                    to: 95,
                    smooth: [0.1, 0.1, 0.1, 0.1]
                }),

                high: clubber.band({
                    from: 96,
                    to: 128,
                    smooth: [0.1, 0.1, 0.1, 0.1]
                })
            };

then after listening to the audio update time event I do the following

clubber.update()

      console.log(bands["low"](new Array(4)),bands["mid"](new Array(4)),bands["high"](new Array(4)))

but the console log gives me

{from: 1, to: 59, low: 64, high: 128} {from: 58, to: 95, low: 64, high: 128} {from: 96, to: 128, low: 64, high: 128}

Is this what I'm suppose to get? a Rect? rather than array values?