mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-05 00:18:43 +00:00
62 lines
No EOL
1.8 KiB
HTML
62 lines
No EOL
1.8 KiB
HTML
<html>
|
|
<head>
|
|
<title>SIGNAL PROCESSING</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="../style/GUI.css">
|
|
|
|
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
|
|
<script type="text/javascript" src="../src/core/Tone.js"></script>
|
|
<script type="text/javascript" src="../src/signal/Signal.js"></script>
|
|
<script type="text/javascript" src="../src/signal/Scale.js"></script>
|
|
<script type="text/javascript" src="../src/signal/Invert.js"></script>
|
|
<script type="text/javascript" src="../src/signal/Mono.js"></script>
|
|
<script type="text/javascript" src="../src/signal/Oscillator.js"></script>
|
|
<script type="text/javascript" src="../src/component/LFO.js"></script>
|
|
<script type="text/javascript" src="../src/signal/Stereo.js"></script>
|
|
<script type="text/javascript" src="../src/component/DryWet.js"></script>
|
|
<script type="text/javascript" src="../src/component/Panner.js"></script>
|
|
|
|
<script type="text/javascript" src="../src/component/Meter.js"></script>
|
|
<script type="text/javascript" src="../src/effects/Effect.js"></script>
|
|
<script type="text/javascript" src="../src/effects/AutoPanner.js"></script>
|
|
</head>
|
|
<body>
|
|
<style type="text/css">
|
|
|
|
</style>
|
|
<div id='left'>0</div>
|
|
<div id='right'>0</div>
|
|
<script type="text/javascript">
|
|
|
|
//panner
|
|
var pan = new Tone.AutoPanner();
|
|
|
|
//input signals
|
|
var sine = Tone.context.createOscillator();
|
|
sine.start(0);
|
|
|
|
//connect it up
|
|
sine.connect(pan);
|
|
|
|
pan.toMaster();
|
|
|
|
//meters
|
|
var output = new Tone.Meter(2);
|
|
|
|
//meter the outputs
|
|
pan.connect(output);
|
|
pan.start();
|
|
|
|
|
|
var $left = $("#left");
|
|
var $right = $("#right");
|
|
|
|
setInterval(function(){
|
|
$left.html("left: " + output.getDb(0).toFixed(2) + " db");
|
|
$right.html("right: " + output.getDb(1).toFixed(2) + " db");
|
|
}, 100);
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html> |