2015-06-07 16:10:19 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>LFO Effects</title>
|
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../build/Tone.js"></script>
|
2015-06-26 05:23:05 +00:00
|
|
|
<script type="text/javascript" src="./scripts/jquery.min.js"></script>
|
2015-06-07 16:10:19 +00:00
|
|
|
<script type="text/javascript" src="../../Notone.js/build/Notone.GUI.js"></script>
|
|
|
|
<script type="text/javascript" src="./scripts/Interface.js"></script>
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="./style/examples.css">
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
// jshint ignore: start
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="Content">
|
2015-06-26 05:23:05 +00:00
|
|
|
<div id="Title">LFO Effects</div>
|
2015-06-07 16:10:19 +00:00
|
|
|
<div id="Explanation">
|
2015-06-26 05:23:05 +00:00
|
|
|
These effects use an LFO (Low Frequency Oscillator) to modulate the effect. Click and drag the dot to change the frequency and depth of the effect.
|
2015-06-07 16:10:19 +00:00
|
|
|
</div>
|
|
|
|
<div id="DragContainer">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script id="JSCode" type="text/javascript">
|
|
|
|
//AutoPanner - a penning modulation effect
|
|
|
|
var panner = new Tone.AutoPanner({
|
|
|
|
"frequency" : 4,
|
|
|
|
"depth" : 1
|
|
|
|
}).toMaster().start();
|
|
|
|
|
|
|
|
//AutoFilter - a filter modulation effect
|
|
|
|
var filter = new Tone.AutoFilter({
|
|
|
|
"frequency" : 2,
|
|
|
|
"depth" : 0.6
|
|
|
|
}).toMaster().start();
|
|
|
|
|
|
|
|
//Tremolo - an amplitude modulation effect
|
|
|
|
var tremolo = new Tone.Tremolo({
|
|
|
|
"frequency" : 0.6,
|
|
|
|
"depth" : 0.7
|
|
|
|
}).toMaster().start();
|
|
|
|
|
|
|
|
//the input oscillators
|
|
|
|
var osc0 = new Tone.Oscillator({
|
2015-06-26 05:23:05 +00:00
|
|
|
"volume" : -Infinity,
|
|
|
|
"type" : "square6",
|
2015-06-07 16:10:19 +00:00
|
|
|
"frequency" : "C4"
|
|
|
|
}).connect(panner).start();
|
|
|
|
|
|
|
|
var osc1 = new Tone.Oscillator({
|
2015-06-26 05:23:05 +00:00
|
|
|
"volume" : -Infinity,
|
|
|
|
"type" : "square6",
|
2015-06-07 16:10:19 +00:00
|
|
|
"frequency" : "E4"
|
|
|
|
}).connect(filter).start();
|
|
|
|
|
|
|
|
var osc2 = new Tone.Oscillator({
|
2015-06-26 05:23:05 +00:00
|
|
|
"volume" : -Infinity,
|
|
|
|
"type" : "square6",
|
2015-06-07 16:10:19 +00:00
|
|
|
"frequency" : "A4"
|
|
|
|
}).connect(tremolo).start();
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<script id="gui" type="text/javascript">
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
Notone.config({
|
|
|
|
"search" : false,
|
|
|
|
"expandInDrawer" : true,
|
|
|
|
"hideDrawer" : Interface.isMobile,
|
|
|
|
"drawer" : true,
|
|
|
|
"container" : "body"
|
|
|
|
});
|
|
|
|
|
|
|
|
var pannerGUI = Notone.add(panner, "AutoPanner");
|
|
|
|
|
|
|
|
var tremoloGUI = Notone.add(tremolo, "Tremolo");
|
2015-06-08 14:41:45 +00:00
|
|
|
|
|
|
|
var filterGUI = Notone.add(filter, "AutoFilter");
|
2015-06-07 16:10:19 +00:00
|
|
|
|
2015-06-26 05:23:05 +00:00
|
|
|
new Interface.Dragger({
|
|
|
|
gui : pannerGUI,
|
2015-06-07 16:10:19 +00:00
|
|
|
x : {
|
|
|
|
param : "frequency",
|
|
|
|
min : 0.1,
|
|
|
|
max : 8
|
|
|
|
},
|
|
|
|
y : {
|
|
|
|
param : "depth",
|
|
|
|
min : 0.5,
|
|
|
|
max : 1
|
|
|
|
},
|
|
|
|
start : function(){
|
|
|
|
osc0.volume.rampTo(0, 0.1);
|
|
|
|
},
|
|
|
|
end : function(){
|
|
|
|
osc0.volume.rampTo(-Infinity, 0.1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-06-26 05:23:05 +00:00
|
|
|
new Interface.Dragger({
|
|
|
|
gui : filterGUI,
|
2015-06-07 16:10:19 +00:00
|
|
|
x : {
|
|
|
|
param : "frequency",
|
|
|
|
min : 0.1,
|
|
|
|
max : 8
|
|
|
|
},
|
|
|
|
y : {
|
|
|
|
param : "depth",
|
|
|
|
min : 0.5,
|
|
|
|
max : 1
|
|
|
|
},
|
|
|
|
start : function(){
|
|
|
|
osc1.volume.rampTo(0, 0.1);
|
|
|
|
},
|
|
|
|
end : function(){
|
|
|
|
osc1.volume.rampTo(-Infinity, 0.1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-06-26 05:23:05 +00:00
|
|
|
new Interface.Dragger({
|
|
|
|
gui : tremoloGUI,
|
2015-06-07 16:10:19 +00:00
|
|
|
x : {
|
|
|
|
param : "frequency",
|
|
|
|
min : 0.1,
|
|
|
|
max : 8
|
|
|
|
},
|
|
|
|
y : {
|
|
|
|
param : "depth",
|
|
|
|
min : 0.5,
|
|
|
|
max : 1
|
|
|
|
},
|
|
|
|
start : function(){
|
|
|
|
osc2.volume.rampTo(0, 0.1);
|
|
|
|
},
|
|
|
|
end : function(){
|
|
|
|
osc2.volume.rampTo(-Infinity, 0.1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|