Commit b1dd0414 authored by mzed's avatar mzed
Browse files

some maxi examples

parent be5bdb6a
# Created by https://www.gitignore.io/api/emacs
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# End of https://www.gitignore.io/api/emacs
\ No newline at end of file
<!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">
// create audio handler
var maxiLib = window.MaxiLib();
var audio = new maxiLib.maxiAudio();
// initialise audio
audio.init();
// create oscillator
var mySine = new maxiLib.maxiOsc();
audio.play = function(){
// direct value to output
this.output = mySine.sinewave(440);
}
</script>
</head>
<body>
<h1> Test Tone </h1>
<p id="funcs"></p>
<p>
A simple 440Hz sinewave.
</p>
<pre class="prettyprint lang-js linenums:true" id="quine" style="border:4px solid #88c" >
// create audio handler
var audio = new maxiLib.maxiAudio();
// initialise audio
audio.init();
// create oscillator
var mySine = new maximJs.maxiOsc();
audio.play = function(){
// direct value to output
this.output = mySine.sinewave(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();
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(445);
}
</script>
</head>
<body>
<h1> Two Tones </h1>
<p>
These sines are taking a beating...
</p>
<pre class="prettyprint lang-js linenums:true" id="quine" style="border:4px solid #88c" >
var maxiLib = window.MaxiLib();
var audio = new maxiLib.maxiAudio();
audio.init();
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(445);
}
</pre>
</body></html>
This diff is collapsed.
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