Skip to content

The finest javascript oscillators. Sine, saw, square, triangle.

Notifications You must be signed in to change notification settings

NHQ/oscillators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Oscillators

Oscillators // pass the time // and oh how often

Useful for DSP, and with Audio Javascript modules such as

npm install oscillators

usage

osc.sine

creates sine waves

osc.saw

creates saw waves

osc.square

creates square waves

osc.triangle

creates triangle waves

osc.saw_i

creates inverted saw waves

osc.triangle_s

creates probably something silly

example

var  oz = require('oscillators')
,    frequency = 100000
function sineWave(time){ // given a time domain
  oz.sine(time, frequency)  // returns sinewave at given frequency 
}

talk to aliens

var  oz = require('oscillators');

function sineWave(time){ // given a time domain
  oz.sine(time * os.sine(time, osc.sine(time, 10)), 440 * osc.square(time, 44 * osc.saw(time, 4)))  // no idea
}

About

The finest javascript oscillators. Sine, saw, square, triangle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages