Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass different frequncies to each channel? #22

Closed
waynehoover opened this issue Dec 28, 2011 · 1 comment
Closed

Pass different frequncies to each channel? #22

waynehoover opened this issue Dec 28, 2011 · 1 comment

Comments

@waynehoover
Copy link

Is there a way to pass an audiolet.output to each channel? For example in the creation of Binaural Beats two slightly different frequencies are passed to the left and right channel. How is this possible with Audiolet?

@oampo
Copy link
Owner

oampo commented Dec 29, 2011

To get this to work you need something like:

    var audiolet = new Audiolet();
    var sine1 = new Sine(audiolet, frequency1);
    var sine2 = new Sine(audiolet, frequency2);
    var pan1 = new Pan(audiolet, 0);
    var pan2 = new Pan(audiolet, 1);
    sine1.connect(pan1);
    sine2.connect(pan2);
    pan1.connect(audiolet.output);
    pan2.connect(audiolet.output);

What happens is that the pan nodes convert the mono sine outputs to stereo outputs panned to the left and right, which are then summed at audiolet.output.

Hope this helps,
Joe

@oampo oampo closed this as completed Dec 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants