{"_id":"tune","_rev":"29-08354018d9d994042b933480a438457e","name":"tune","description":"Tune up baudio","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"tune","description":"Tune up baudio","version":"0.1.0","homepage":"https://github.com/shama/tune","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/tune.git"},"bugs":{"url":"https://github.com/shama/tune/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/tune/blob/master/LICENSE-MIT"}],"main":"lib/tune","engines":{"node":">= 0.8.0"},"scripts":{"test":"tap ./test"},"dependencies":{"plucky":"~0.1.1"},"devDependencies":{"baudio":"*","tap":"~0.3.3"},"keywords":["baudio","audio","music"],"_id":"tune@0.1.0","dist":{"shasum":"95cc12e952767c1c5ab87a26422d7bd1c59014cb","tarball":"https://registry.npmjs.org/tune/-/tune-0.1.0.tgz","integrity":"sha512-HQ9qMYVcXDOVLkdZf+xhTENglNSPLYA6FGswck6UX0xx4oaGsVaNGRE313ogi1eypM12SYun5zVJvPyVXMGa4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEaHpt6N80l5gaDSyTZhaI1E1ULumcZ6p68/R+9YN54xAiAbaQ10pG9MHCZfRMBtNjRnBv6JHo00BmLZv+GyqFPuDA=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":"kyle@dontkry.com"}],"directories":{}},"0.1.1":{"name":"tune","description":"Tune up baudio","version":"0.1.1","homepage":"https://github.com/shama/tune","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/tune.git"},"bugs":{"url":"https://github.com/shama/tune/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/tune/blob/master/LICENSE-MIT"}],"main":"lib/tune","engines":{"node":">= 0.8.0"},"scripts":{"test":"tap ./test"},"dependencies":{"plucky":"~0.1.1"},"devDependencies":{"baudio":"*","tap":"~0.3.3"},"keywords":["baudio","audio","music"],"_id":"tune@0.1.1","dist":{"shasum":"ed904f5728b4681b2c753fc12a813814f1146156","tarball":"https://registry.npmjs.org/tune/-/tune-0.1.1.tgz","integrity":"sha512-sA1HoSfJ7zXO36smLQtiSVP0bFxjAOegfm7H+4f+DAWEabMA3nmlzU1C5gYsqs7MwroJSPLxmpwIVlra7dcgYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCfaYRdleiTYO6xBm8Xx2VunTki9nAVz+SiW4Mw9g4zAIgChdKgNgcaj5oQU9RRdk3FzQxxSFpcNbxiBkIearhYRU="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":"kyle@dontkry.com"}],"directories":{}},"0.1.2":{"name":"tune","description":"Tune up baudio","version":"0.1.2","homepage":"https://github.com/shama/tune","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/tune.git"},"bugs":{"url":"https://github.com/shama/tune/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/tune/blob/master/LICENSE-MIT"}],"main":"lib/tune","engines":{"node":">= 0.8.0"},"scripts":{"test":"tap ./test"},"dependencies":{"plucky":"~0.1.1"},"devDependencies":{"baudio":"*","tap":"~0.3.3"},"keywords":["baudio","audio","music"],"_id":"tune@0.1.2","dist":{"shasum":"66da4f5fdcd2a759aa56d633f397d2d6d33ef1a5","tarball":"https://registry.npmjs.org/tune/-/tune-0.1.2.tgz","integrity":"sha512-Ge2KeaGik53ETB8h5DzJTZBH9bmpd7OS0iaDjhze4Fo9wRKX47yQC/qCkf/ON/IfO0dFq4MQ9wewR1SXLpdb9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5/ZUndRfAPL2ry6AggAS59XymfY2KF3po5Ff6XAos4AIhAKk5SWpLkAq9reM2z/s6ovwfqLRsDAidTncQdgLQHOgS"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":"kyle@dontkry.com"}],"directories":{}},"0.2.0":{"name":"tune","description":"Tune up baudio","version":"0.2.0","homepage":"https://github.com/shama/tune","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/tune.git"},"bugs":{"url":"https://github.com/shama/tune/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/tune/blob/master/LICENSE-MIT"}],"main":"lib/tune","engines":{"node":">= 0.8.0"},"scripts":{"test":"tap ./test"},"dependencies":{},"devDependencies":{"baudio":"*","tap":"~0.3.3"},"keywords":["baudio","audio","music"],"_id":"tune@0.2.0","dist":{"shasum":"2fcd219a4c7f752b0a5387cbcd78f3203e7676c2","tarball":"https://registry.npmjs.org/tune/-/tune-0.2.0.tgz","integrity":"sha512-/x1QA/Id8lC0eSllMyVSgDt+VeMtJxAa+h0SnUibREmeFJK36Qj4c2hj7RUMsPldY1bm0JQSChBS0MxIYK3DFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFBEdSoCowj+aBHy8aP88ttgFQZa/TCE8IbxJzwDkdfMAiA+sfo9WFxlx4NE9wVGfG/g0aYGOpLxGJvBZJH7oEulgw=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":"kyle@dontkry.com"}]},"0.2.1":{"name":"tune","description":"Tune up baudio","version":"0.2.1","homepage":"https://github.com/shama/tune","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/tune.git"},"bugs":{"url":"https://github.com/shama/tune/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/tune/blob/master/LICENSE-MIT"}],"main":"lib/tune","engines":{"node":">= 0.8.0"},"scripts":{"test":"tap ./test"},"dependencies":{},"devDependencies":{"baudio":"*","tap":"~0.4.11"},"keywords":["baudio","audio","music"],"_id":"tune@0.2.1","dist":{"shasum":"dafd688f357d6ee5f2bc7185525a451c4d260a1a","tarball":"https://registry.npmjs.org/tune/-/tune-0.2.1.tgz","integrity":"sha512-SPD/SE7J37p4BRk4bJyhrOmfQWvhmz1MHmkf8Omal+BijlPWDH8LQgmVAw0C8vZFhVcKnnMQ0S5amtMP87yHPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6ZeoKmKzu2S/VAn7G8ltzjtqBIJQOkEvDUwmCgsBKIAIhAPJ9xgUzvCs6iierGgMJCZ9QVuzo57I1RtuF3q6P1Iv6"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"shama","email":"kyle@dontkry.com"}]}},"readme":"# tune\nTune up [baudio](https://github.com/substack/baudio).\n\n![tune](http://dontkry.com/images/repos/tune.png)\n\n## install\nInstall tune and baudio: `npm install tune baudio`\n\nYou also need to install SoX:\n[http://sox.sourceforge.net/](http://sox.sourceforge.net/)\n\n## examples\n\n## Just a single note\n\n```js\nvar baudio = require('baudio'), tune = require('tune');\n\nvar a = tune('A');\n\nvar b = baudio(function(t) { return a(t); });\nb.play();\n```\n\n## Hungarian Dance no5\n\n```js\nvar baudio = require('baudio'), tune = require('tune');\n\nvar hungarian = tune(String(\n  'A5 . . . . D5 . F5 . . . . D5 . C#5 . . . . D5 E5 D5 . . . . ' +\n  'Bb5 . . . . C5 . D5 . A5 . . . . G4 F4 E4 . . A5 D4 . . .'\n).split(' '), {tempo: 8});\n\nvar b = baudio(function(t) { return hungarian(t); });\nb.play();\n```\n\n## Soundgarden - Black Hole Sun\n\n```js\nvar baudio = require('baudio'), tune = require('tune');\n\nvar blackholesun = tune(String(\n  'A4 E4 A5 D5 A5 E4 A4 C4 E4 A5 D5 . . . ' +\n  'G3 D4 G4 D5 G4 D4 E3 F#3 C#4 F#4 C#5 . . . ' +\n  'E3 F3 C4 F4 A#5 F4 C4 F3 E3 D4 E4 B5 . . .'\n).split(' '));\n\nvar b = baudio(function(t) {\n  // black hole sun + some fx\n  return blackholesun(t) + Math.sin(2 * Math.PI * t);\n});\nb.play();\n```\n\n## Final Fantasy Arpeggios\n\n```js\nvar baudio = require('baudio'), tune = require('tune');\n\nvar ff = [];\n[\n  'C D E G',\n  'A B C E',\n  'C D E G',\n  'A B C E',\n  'A C F G',\n  'A B D G',\n  'Ab C Eb G',\n  'A Bb D F',\n].forEach(function(chord) {\n  chord = chord.split(' ');\n  var oct = 3, arp = [];\n  for (var i = 0; i < (chord.length - 1) * 4; i++) {\n    if (i % 4 === 0) oct++;\n    arp.push(chord[i % 4] + oct);\n  }\n  ff = ff.concat(arp.concat(arp.slice(0, -1).reverse()));\n});\nff = tune(ff);\n\nvar b = baudio(function(t) { return ff(t); });\nb.play();\n```\n\n# methods\n\n``` js\nvar tune = require('tune');\n```\n\n## var t = tune(notes)\nReturns a function: `function(time[, options])` that will return a value based\non `time` between -1 and 1 to formulate a wave. Then you return the value within\nyour [baudio](http://github.com/substack/baudio) function.\n\n`notes` can be a single note string: `'A#5'` or an array of notes:\n`['C4', 'D5', 'E4', 'Gb7']`. Mark notes with sharps `#` and flats `b`. Then\nending number refers to the octave. In a sequence if the octave isn't specified,\nit will use the last set octave or `4`. Use `.` for muted notes.\n\n`options` are an object literal `{}`:\n* `tempo` [`4`] - how fast to transition through the notes\n* `volume` [`1.0`] - volume to play the tune: `0.0 - 1.0`\n\n## Release History\n* 0.2.1 - Readme update.\n* 0.2.0 - `tune` just returns a function now.\n* 0.1.2 - Add mute notes.\n* 0.1.1 - Better API interface. Add volume option.\n* 0.1.0 - initial release\n\n## License\nCopyright (c) 2014 Kyle Robinson Young  \nLicensed under the MIT license.\n","maintainers":[{"name":"shama","email":"kyle@dontkry.com"}],"time":{"modified":"2022-06-27T23:18:28.142Z","created":"2012-12-19T08:48:48.220Z","0.1.0":"2012-12-19T08:48:49.246Z","0.1.1":"2012-12-20T00:10:13.624Z","0.1.2":"2012-12-20T08:48:10.663Z","0.2.0":"2012-12-20T12:58:46.074Z","0.2.1":"2014-07-02T15:30:24.283Z"},"author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/tune.git"},"homepage":"https://github.com/shama/tune","keywords":["baudio","audio","music"],"bugs":{"url":"https://github.com/shama/tune/issues"},"readmeFilename":"README.md"}