mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
updated method names. fixed LFO
This commit is contained in:
parent
95fb4ee491
commit
cf86342a45
4 changed files with 40 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
37
examples/feedbackDelay.html
Normal file
37
examples/feedbackDelay.html
Normal 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>
|
Loading…
Reference in a new issue