headphonejames / acrn

Implementation of acoustic coordinated reset neuromodulation tinnitus treatment protocol in javascript.
http://www.generalfuzz.net/acrn/
GNU General Public License v2.0
139 stars 25 forks source link

Ability to Pan Output to L / R Channel via audiolet.js api #9

Closed KeeonTabrizi closed 8 years ago

KeeonTabrizi commented 8 years ago

It may be useful to be able to pan the output of the audio to Left / Right (L/R) Channels. One could then have two tabs open each configured for L / R. *

In looking through API docs for audiolet.js I came across this section in the main audiolet.js file: (via https://www.jhtrnr.com/Audiolet/api.html)

var Pan = function(audiolet, pan) {
    AudioletNode.call(this, audiolet, 2, 1);
    // Hardcode two output channels
    this.setNumberOfOutputChannels(0, 2);
    if (pan == null) {
        var pan = 0.5;
    }
    this.pan = new AudioletParameter(this, 1, pan);
};
extend(Pan, AudioletNode);

Parameters pan The pan position. Values between 0 (hard-left) and 1 (hard-right). Linked to input 1.

Any ideas how to configure this parameter?

*Note: This idea is not based on any thing I've read in ACRN related literature. Just a hypothetical idea.