updated method names. fixed LFO

This commit is contained in:
Yotam Mann 2014-04-06 20:12:40 -04:00
parent 95fb4ee491
commit cf86342a45
4 changed files with 40 additions and 3 deletions

View file

@ -38,7 +38,7 @@ define(["Tone/core/Tone", "Tone/source/Oscillator", "Tone/signal/Scale"], functi
//set the params
Tone.LFO.prototype.setRate = function(rate){
Tone.LFO.prototype.setFrequency = function(rate){
this.oscillator.setFrequency(rate);
}

View file

@ -16,7 +16,7 @@ define(["Tone/core/Tone", "Tone/effects/Effect"], function(Tone){
this.chain(this.effectReturn, this.feedback, this.effectSend);
//some initial values
this.setDry(.5);
this.setFeedback(0);
}
Tone.extend(Tone.FeedbackEffect, Tone.Effect);

View file

@ -53,7 +53,7 @@ define(["Tone/core/Tone"], function(Tone){
//@param {number=} rampTime
Tone.Oscillator.prototype.setFrequency = function(val, rampTime){
rampTime = this.defaultArg(rampTime, 0);
this.oscillator.linearRampToValueAtTime(val, rampTime);
this.oscillator.frequency.linearRampToValueAtTime(val, rampTime);
}
//@param {string} type

View file

@ -0,0 +1,37 @@
<html>
<head>
<title>FEEDBACK DELAY</title>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="../deps/require.js"></script>
</head>
<body>
<button>hit</button>
<script type="text/javascript">
require.config({
baseUrl : "../"
});
require(["Tone/core/Tone", "Tone/core/Master", "Tone/source/Player", "Tone/effects/FeedbackDelay"], function(Tone){
var player = new Tone.Player("../audio/505/snare.mp3");
player.load(function(){
$("button").click(function(){
player.start();
})
});
var feedbackDelay = new Tone.FeedbackDelay();
feedbackDelay.setFeedback(.6);
player.connect(feedbackDelay);
player.toMaster();
feedbackDelay.toMaster();
});
</script>
</body>
</html>