https://github.com/samccone/wavesvg
wavesvg
https://github.com/samccone/wavesvg
Last synced: about 1 year ago
JSON representation
wavesvg
- Host: GitHub
- URL: https://github.com/samccone/wavesvg
- Owner: samccone
- Created: 2013-05-06T23:29:31.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-09T17:07:08.000Z (about 13 years ago)
- Last Synced: 2025-06-03T17:36:55.273Z (about 1 year ago)
- Language: CoffeeScript
- Size: 230 KB
- Stars: 6
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
wave svg
----------------
#### wavesvg
```js
new waveSvg({
buffer: Audiobuffer,
maxHeight: 300,
width: 1300, //
pixelsPerSecond: 200, //
appendTo: dom node, //
max: 0.2 //
workerPath: "path to worker" //
downSample: 16 // -- higher num for faster render
});
```
##### interface
```js
instance.updatePixelsPerSecond(n);
instance.updateMaxScalar(n);
instance.updateDownSampleRate(n);
```
#### streamsvg
```js
navigator.webkitGetUserMedia({audio: true}, function(d) {
new streamSvg({
maxHeight: 300,
pixelsPerSecond: 200,
stream: d,
max: 2
});
});
```
##### interface
```js
// you can also not pass a stream and just call
instance.onstream(buffer);
```
#### To Dev
```
cake watch
```
#### To Build From Source
```
cake build
```