Commit 19397a7e authored by mzed's avatar mzed
Browse files

more examples

parent b1dd0414
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>
Javascript Audio Processing
</title>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=js&amp;skin=sunburst"></script>
<!-- show all line numbers-->
<style type="text/css">.prettyprint ol.linenums > li { list-style-type: decimal }</style>
<script src="maxiLib.js"></script>
<!-- Our javascript code -->
<script type="text/javascript">
var maxiLib = window.MaxiLib();
var audio = new maxiLib.maxiAudio();
audio.init();
//This shows how to use maximilian to do basic amplitude modulation
var mySine = new maxiLib.maxiOsc();
var myOtherSine = new maxiLib.maxiOsc();
audio.play = function(){
// these two sines will beat together. They're now a bit too loud though..
this.output = mySine.sinewave(440)*myOtherSine.sinewave(5);
}
</script>
</head>
<body>
<h1>Amplitude Modulation</h1>
<p>
Basic amplitude modulation
</p>
<pre class="prettyprint lang-js linenums:true" id="quine" style="border:4px solid #88c" >
var audio = new maxiLib.maxiAudio();
audio.init();
//This shows how to use maximilian to do basic amplitude modulation
var mySine = new maxiLib.maxiOsc();
var myOtherSine = new maxiLib.maxiOsc();
audio.play = function(){
// these two sines will beat together. They're now a bit too loud though..
this.output = mySine.sinewave(440)*myOtherSine.sinewave(5);
}
</pre>
</body></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>
Javascript Audio Processing
</title>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=js&amp;skin=sunburst"></script>
<!-- show all line numbers-->
<style type="text/css">.prettyprint ol.linenums > li { list-style-type: decimal }</style>
<script src="maxiLib.js"></script>
<!-- Our javascript code -->
<script type="text/javascript">
var maxiLib = window.MaxiLib();
var audio = new maxiLib.maxiAudio();
audio.init();
//This shows how to use maximilian to do basic amplitude modulation
var mySine = new maxiLib.maxiOsc();
var myOtherSine = new maxiLib.maxiOsc();
var myPhasor = new maxiLib.maxiOsc();
audio.play = function(){
// these two sines will beat together. They're now a bit too loud though..
this.output = mySine.sinewave(440)*myOtherSine.sinewave(myPhasor.phasor(0.1,0,440));
}
</script>
</head>
<body>
<h1> AM2 </h1>
<p>
More amplitude modulation
</p>
<pre class="prettyprint lang-js linenums:true" id="quine" style="border:4px solid #88c" >
var maxiLib = window.MaxiLib();
var audio = new maxiLibs.maxiAudio();
audio.init();
//This shows how to use maximilian to do basic amplitude modulation
var mySine = new maxiLib.maxiOsc();
var myOtherSine = new maxiLib.maxiOsc();
var myPhasor = new maxiLib.maxiOsc();
audio.play = function(){
// these two sines will beat together. They're now a bit too loud though..
this.output = mySine.sinewave(440)*myOtherSine.sinewave(myPhasor.phasor(0.1,0,440));
}
</pre>
</body></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>
Javascript Audio Processing
</title>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=js&amp;skin=sunburst"></script>
<!-- show all line numbers-->
<style type="text/css">.prettyprint ol.linenums > li { list-style-type: decimal }</style>
<script src="maxiLib.js"></script>
<!-- Our javascript code -->
<script type="text/javascript">
var maxiLib = window.MaxiLib();
var audio = new maxiLib.maxiAudio();
audio.init();
//This shows how to use maximilian to do basic frequency modulation
var mySine = new maxiLib.maxiOsc();
var myOtherSine = new maxiLib.maxiOsc();
audio.play = function(){
this.output = mySine.sinewave(440+(myOtherSine.sinewave(220)*100));
}
</script>
</head>
<body>
<h1>FM </h1>
<p>
Basic frequency modulation
</p>
<pre class="prettyprint lang-js linenums:true" id="quine" style="border:4px solid #88c" >
var maxiLib = new window.MaxiLib();
var audio = new maxiLib.maxiAudio();
audio.init();
//This shows how to use maximilian to do basic frequency modulation
var mySine = new maxiLib.maxiOsc();
var myOtherSine = new maxiLib.maxiOsc();
audio.play = function(){
this.output = mySine.sinewave(440+(myOtherSine.sinewave(220)*100));
}
</pre>
</body></html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment