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

Remove all audio effects except pitch and pan #46

Merged
merged 1 commit into from
Jun 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions src/effects/EchoEffect.js

This file was deleted.

45 changes: 0 additions & 45 deletions src/effects/FuzzEffect.js

This file was deleted.

46 changes: 0 additions & 46 deletions src/effects/ReverbEffect.js

This file was deleted.

66 changes: 0 additions & 66 deletions src/effects/RoboticEffect.js

This file was deleted.

60 changes: 0 additions & 60 deletions src/effects/WobbleEffect.js

This file was deleted.

40 changes: 2 additions & 38 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ const Tone = require('tone');
const PitchEffect = require('./effects/PitchEffect');
const PanEffect = require('./effects/PanEffect');

const RoboticEffect = require('./effects/RoboticEffect');
const FuzzEffect = require('./effects/FuzzEffect');
const EchoEffect = require('./effects/EchoEffect');
const ReverbEffect = require('./effects/ReverbEffect');

const SoundPlayer = require('./SoundPlayer');
const ADPCMSoundDecoder = require('./ADPCMSoundDecoder');
const InstrumentPlayer = require('./InstrumentPlayer');
Expand Down Expand Up @@ -126,18 +121,6 @@ class AudioPlayer {
case this.audioEngine.EFFECT_NAMES.pan:
this.panEffect.set(value);
break;
case this.audioEngine.EFFECT_NAMES.echo:
this.audioEngine.echoEffect.set(value);
break;
case this.audioEngine.EFFECT_NAMES.reverb:
this.audioEngine.reverbEffect.set(value);
break;
case this.audioEngine.EFFECT_NAMES.fuzz:
this.audioEngine.fuzzEffect.set(value);
break;
case this.audioEngine.EFFECT_NAMES.robot:
this.audioEngine.roboticEffect.set(value);
break;
}
}

Expand All @@ -148,11 +131,6 @@ class AudioPlayer {
this.panEffect.set(0);
this.pitchEffect.set(0, this.activeSoundPlayers);
this.effectsNode.gain.value = 1;

this.audioEngine.echoEffect.set(0);
this.audioEngine.reverbEffect.set(0);
this.audioEngine.fuzzEffect.set(0);
this.audioEngine.roboticEffect.set(0);
}

/**
Expand All @@ -172,18 +150,8 @@ class AudioPlayer {
*/
class AudioEngine {
constructor () {
// 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,
Tone.Master
);
this.input.connect(Tone.Master);

// global tempo in bpm (beats per minute)
this.currentTempo = 60;
Expand Down Expand Up @@ -211,11 +179,7 @@ class AudioEngine {
get EFFECT_NAMES () {
return {
pitch: 'pitch',
pan: 'pan',
echo: 'echo',
reverb: 'reverb',
fuzz: 'fuzz',
robot: 'robot'
pan: 'pan'
};
}

Expand Down