there are some examples in preparation but not currently in the tutorials, only if you grab the whole Beads project using SVN (in which case they're in src/beads_examples).
Here are a couple from Biquad Filter...
A simple one...
//BEGIN CODE//
// Create our audio context.
AudioContext ac = new AudioContext();
// Start with some white noise as source material.
Noise n = new Noise(ac);
// Create a 2-channel band-pass filter with constant peak gain.
BiquadFilter bf = new BiquadFilter(ac, 2, BiquadFilter.BP_PEAK);
// Set the filter's frequency and Q-value.
bf.setFrequency(440).setQ(90);
// Add the white noise to the filter's inputs.
bf.addInput(n);
// Send the result to audio out.
ac.out.addInput(bf);
// Don't forget to start the audio running!
ac.start();
//END CODE//
And a less simple one...
//BEGIN CODE//
AudioContext ac = new AudioContext();
// Start with white noise.
Noise n = new Noise(ac);
// Create a 1-channel low-pass filter.
BiquadFilter bf = new BiquadFilter(ac, 2, BiquadFilter.LP);
// Create a "wave" by using a slow sine wave.
WavePlayer sine = new WavePlayer(ac, .3f, Buffer.SINE);
Function freq = new Function(sine) {
public float calculate() {
return x[0] * 600f + 800f;
}
};
// Set the filter parameters.
bf.setFrequency(freq).setQ(1);
// Add the white noise to the filter's inputs.
bf.addInput(n);
// Send the result to audio out.
ac.out.addInput(bf);
// Don't forget to start the audio running!
ac.start();
//END CODE//
The other filters work in similar ways. Please let me know if this is any help, or you can scold me if it's not.
O
PS: My current favourite is square wave through biquad and reverb.
> --
> You received this message because you are subscribed to the Google Groups "beadsproject" group.
> To post to this group, send email to beadsp...@googlegroups.com.
> To unsubscribe from this group, send email to beadsproject...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beadsproject?hl=en.
>