Kineme Audio Input - Waveform output

Lango's picture

G'Day everyone

I've just started on audio analysis in quartz composer.

Using the Kineme Audio Input patch from the Audio Tools plugin, i've noticed that the waveform output has a lot of data (waveformlets?), 512 it seems.

My questions is; what is the best way to simplify this down to just 3 values, high mid, low. Suppose I could also break them into 9 or 27 values. But 512, just seems a little overkill for what I need.

Is there a best way to do this? Any gotcha's I need to worry about? Would a few Javascript patchs do?

Is the accuracy of each of the frequencies equal, I remember reading a while back that the lower and higher values are not really accurate or usable. Although that could of been about another patch.

Also, what is the Frequency Mode? I change it but nothing seems to happen. I'm pretty new to audio, so i'm probably asking really basic questions but we all have to start somewhere :)

Thanks for the patch though, I'm already making use of the volume peaks.

Cheers

Lango

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: Kineme Audio Input - Waveform output

Waveform output to Structure Index Member to Audio Processor perhaps - and 0 JS required. :-)

cybero's picture
Re: Kineme Audio Input - Waveform output

see the audio-frequency example for how the frequency spread of 16 members can be fed into a spectrum structure. it's giving you a two channel spread of 16 members each.

smokris's picture
Re: Kineme Audio Input - Waveform output

Lango wrote:
the waveform output has a lot of data (waveformlets?), 512 it seems.

The Waveform output provides the raw waveform data --- e.g., each number in the structure represents the ideal position of the speaker (amplitude) at a given point in time.

Waveform provides time-domain sample data, the same number of values as specified in the Sample Buffer input.

However, you seem to be interested in frequency-domain data --- so you should use the values provided by the Frequency output instead.

Lango wrote:
Is the accuracy of each of the frequencies equal, I remember reading a while back that the lower and higher values are not really accurate or usable. Although that could of been about another patch.

Accuracy of the frequency-domain data will depend on the sample buffer size. A larger sample buffer provides more accurate low-frequency data (since more samples are required to represent lower frequencies), but time-averages high-frequency data. A smaller sample buffer provides more temporally-accurate data, at the expense of the low end of the spectrum.

Lango wrote:
Also, what is the Frequency Mode? I change it but nothing seems to happen.

Frequency Mode only affects the Frequency output.

When set to Linear, the patch provides a value for all computed frequency bands, distributed linearly across the spectrum. This provides a ton of data.

For your application, I would suggest using Quadratic Average or Logarithmic Average. Instead of providing data for all frequency bands, bands are clumped together. This describes the frequency spectrum in a way more useful when analyzing music, since pitch is nonlinear with respect to frequency.

As cybero mentioned, check out the audio-frequency.qtz example.

Lango's picture
Re: Kineme Audio Input - Waveform output

Ahh Thanks Smokris.

The frequency with Logarithmic is exactly what I wanted.

Thanks for taking the time to explain it all, it was a great help.

Lango's picture
Re: Kineme Audio Input - Waveform output

Hi Cybero

The audio-frequency example doesn't work for me, i load it up, it plays the sound of someone speaking "Nothing Rhymes" but not visualisation occurs.

Although i can see from the patches mostly what is happening.

One question though, the multiplexers you have there, is that because each channel is the left and right ear and the multiplexer then averages them together?

smokris's picture
Re: Kineme Audio Input - Waveform output

Try stopping and restarting the composition --- audio-frequency.qtz plays and analyzed a relatively short waveform, which might be over by the time rendering has stabilized.

There's a published input called "Live Input" --- turn this on, and you'll get a live frequency analyzer. You may also need to adjust the "Device UID" on the Kineme Audio Input patch; setting this to empty will select the default audio input device.

The three multiplexers in the root-level macro are used to toggle between analysis of live input vs. file input.