baudio-live
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -5,4 +5,4 @@ #!/usr/bin/env node | ||
var path = require('path') | ||
var musicFile = process.argv[2] | ||
var argv = require('minimist')(process.argv.slice(2)) | ||
var musicFile = argv._[0] | ||
var musicFilePath = require.resolve(path.resolve(process.cwd(), musicFile)) | ||
@@ -16,6 +16,9 @@ var input = baudio(require(musicFilePath)) | ||
try { | ||
input._fn = require(musicFilePath) | ||
var load = require(musicFilePath) | ||
load(0) // rough check for errors | ||
input._fn = load | ||
} catch(e) { console.error(e) } | ||
}) | ||
input.play() | ||
input.play() | ||
if('o' in argv) input.record(argv.o) |
{ | ||
"name": "baudio-live", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "CLI for live updating baudio music", | ||
@@ -27,4 +27,5 @@ "bin": { | ||
"dependencies": { | ||
"baudio": "^2.1.2" | ||
"baudio": "^2.1.2", | ||
"minimist": "^1.1.0" | ||
} | ||
} |
@@ -22,2 +22,7 @@ # baudio-live | ||
It will output the music and update it if you are changing that file. | ||
It will output the music and update it if you are changing that file. | ||
You can save the sounds with the `-o` option: | ||
``` | ||
baudio-live music.js -o awesome.wav | ||
``` |
@@ -12,7 +12,6 @@ function sin (t, x) { return Math.sin(2 * Math.PI * t * x) } | ||
var speed = 5 | ||
var speed = 0.5 | ||
module.exports = function (t) { | ||
// return sin(t, 300) + sin(t,309) + sin(t,notes[Math.floor(t*speed) % notes.length]) | ||
return sin(t, 300) + sin(t,309) + sin(t,300) | ||
return sin(t, 300) + sin(t,309) + sin(t,notes[Math.floor(t*speed) % notes.length]) | ||
} |
@@ -5,3 +5,3 @@ /** | ||
var sampleRate= 44100; | ||
var bpm = 200 | ||
var bpm = 148; | ||
var tuning = 440; | ||
@@ -8,0 +8,0 @@ var transpose = 0; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10624
338
27
2
+ Addedminimist@^1.1.0
+ Addedminimist@1.2.8(transitive)