Difference between revisions of "JSXGraph and sound"

From JSXGraph Wiki
Jump to navigationJump to search
Line 5: Line 5:
 
<jsxgraph width="600" height="400">
 
<jsxgraph width="600" height="400">
 
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,100,-10], axis:true});
 
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,100,-10], axis:true});
 +
 +
var slide = board.create('slider', [[10, 5], [60, 5], [100, 440, 1000]]);
 +
var sinewave = new Gibberish.Sine( 440, .25 ).connect();
 +
board.on('update', function() {
 +
    console.log(si.frequency);
 +
    si.frequency = slide.Value();
 +
});
 +
 +
 
</jsxgraph>
 
</jsxgraph>
  
 
[[Category:Examples]]
 
[[Category:Examples]]
 
[[Category:Curves]]
 
[[Category:Curves]]

Revision as of 17:37, 6 February 2014

JSXGraph and sound