mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2025-01-03 11:35:49 -05:00
comments
This commit is contained in:
parent
2ca88c880e
commit
9b3119c96e
1 changed files with 6 additions and 3 deletions
|
@ -14,11 +14,14 @@ var Soundfont = require('soundfont-player');
|
|||
var ADPCMSoundLoader = require('./ADPCMSoundLoader');
|
||||
|
||||
function AudioEngine () {
|
||||
|
||||
// create the global audio effects
|
||||
this.roboticEffect = new RoboticEffect();
|
||||
this.fuzzEffect = new FuzzEffect();
|
||||
this.echoEffect = new EchoEffect();
|
||||
this.reverbEffect = new ReverbEffect();
|
||||
|
||||
// chain the global effects to the output
|
||||
this.input = new Tone.Gain();
|
||||
this.input.chain (
|
||||
this.roboticEffect, this.fuzzEffect, this.echoEffect, this.reverbEffect,
|
||||
|
@ -43,9 +46,9 @@ function AudioPlayer (audioEngine) {
|
|||
this.pitchEffect = new PitchEffect();
|
||||
this.panEffect = new PanEffect();
|
||||
|
||||
// the effects are chained to an effects node for this player, then to the master output
|
||||
// so audio is sent from each player or instrument, through the effects in order, then out
|
||||
// note that the pitch effect works differently - it sets the playback rate for each player
|
||||
// the effects are chained to an effects node for this player, then to the main audio engine
|
||||
// audio is sent from each soundplayer, through the effects in order, then to the global effects
|
||||
// note that the pitch effect works differently - it sets the playback rate for each soundplayer
|
||||
this.effectsNode = new Tone.Gain();
|
||||
this.effectsNode.chain(this.panEffect, this.audioEngine.input);
|
||||
|
||||
|
|
Loading…
Reference in a new issue