{"_id":"touchtone","_rev":"10-e4ff0fdde93be2b60c81f5eab563981b","name":"touchtone","description":"generate DTMF tones like a touchtone phone","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"touchtone","version":"1.0.0","description":"generate DTMF tones like a touchtone phone","main":"index.js","dependencies":{"baudio":"^2.1.2","defined":"~0.0.0","inherits":"^2.0.1","isarray":"~0.0.1","minimist":"~0.2.0"},"repository":{"type":"git","url":"git://github.com/substack/touchtone.git"},"homepage":"https://github.com/substack/touchtone","keywords":["dtmf","phone","telephony","telephone","keypad","baudio","sound","audio"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"283efab274d65994f0494ea7c312aba9e7d20c08","bugs":{"url":"https://github.com/substack/touchtone/issues"},"_id":"touchtone@1.0.0","scripts":{},"_shasum":"0a05bd8608d232bd680592525a50a564d9bd4741","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"0a05bd8608d232bd680592525a50a564d9bd4741","tarball":"https://registry.npmjs.org/touchtone/-/touchtone-1.0.0.tgz","integrity":"sha512-GpX2Yo6K2K1bb3csVHuHYztG396NhqUygP+Q6h86pz6h2AOg/T4qURu20DUA5yx4zqE7yvhOpeOVNTIP3s5vqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiLOzzl/JzyPft6M/BPnwJjlIIJat6Rn1FX1OKrbJyCQIga9XLh6GbClm76ou7Il8FHhv07uE7sa6ckb5qIckZAJY="}]},"directories":{}},"1.0.1":{"name":"touchtone","version":"1.0.1","description":"generate DTMF tones like a touchtone phone","main":"index.js","bin":{"touchtone":"bin/cmd.js"},"dependencies":{"baudio":"^2.1.2","defined":"~0.0.0","inherits":"^2.0.1","isarray":"~0.0.1","minimist":"~0.2.0"},"repository":{"type":"git","url":"git://github.com/substack/touchtone.git"},"homepage":"https://github.com/substack/touchtone","keywords":["dtmf","phone","telephony","telephone","keypad","baudio","sound","audio"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"22e65fd4109985bbe9b68991e422a40baadd16df","bugs":{"url":"https://github.com/substack/touchtone/issues"},"_id":"touchtone@1.0.1","scripts":{},"_shasum":"f6a3285603c088351fe244db8f2df26f860839d1","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"f6a3285603c088351fe244db8f2df26f860839d1","tarball":"https://registry.npmjs.org/touchtone/-/touchtone-1.0.1.tgz","integrity":"sha512-S5LrPE86LUCN+/1XGNL7LJw+kz7Ijh0kjRfNCTKgDbmCkiUAP6LNe2WBy7FsGH2srFNP7v8o9dJ9aqCTbvbe7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHyFDJQJj1N/NyVgGvrjSK0+FDRJHHIQwQRWfE2LwVUgIgBroUk9rM0LWNj7pyv2sURs8H9kz6KMWW17Ikag/3E0w="}]},"directories":{}},"1.0.2":{"name":"touchtone","version":"1.0.2","description":"generate DTMF tones like a touchtone phone","main":"index.js","bin":{"touchtone":"bin/cmd.js"},"dependencies":{"baudio":"^2.1.2","defined":"~0.0.0","inherits":"^2.0.1","isarray":"~0.0.1","minimist":"~0.2.0"},"repository":{"type":"git","url":"git://github.com/substack/touchtone.git"},"homepage":"https://github.com/substack/touchtone","keywords":["dtmf","phone","telephony","telephone","keypad","baudio","sound","audio"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"9b3fd40dbaa27c3cdddb65c53f188ce90b3a367f","bugs":{"url":"https://github.com/substack/touchtone/issues"},"_id":"touchtone@1.0.2","scripts":{},"_shasum":"24bc1aecc330b0b44531942d8c110b1e435e914c","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"24bc1aecc330b0b44531942d8c110b1e435e914c","tarball":"https://registry.npmjs.org/touchtone/-/touchtone-1.0.2.tgz","integrity":"sha512-j2d8sm/TWh3hYxI+artJhpjmXKKJroozWp0EizAsuvpkEgUNScKxWGPF5VfNNJrDfKcmd+Tc+J8UCFhk/Cvbew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAaTJFM7PcDEKSksqoJulQtMM/FIEBmjGuKkTMxsV2SmAiAQt1LxkkM60sHJuDodRuV1FfZjGqHkog4mtD/x8/D1yw=="}]},"directories":{}}},"readme":"# touchtone\n\ngenerate\n[DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling)\ntones like a touchtone phone\n\n# example\n\n## server example with baudio\n\nUsing [baudio](https://npmjs.org/package/baudio), we can make a tone script that\nruns on the server.\n\n``` js\nvar tone = require('touchtone')();\ntone.dial('18005551212');\n\nvar baudio = require('baudio');\nbaudio(tone.play()).play();\n```\n\nMake sure you have [sox](http://sox.sourceforge.net)\ninstalled to use baudio.\n\n## browser example with webaudio\n\nWe can play tones in the browser using\n[webaudio](https://npmjs.org/package/webaudio):\n\n``` js\nvar tone = require('touchtone')();\nvar baudio = require('webaudio');\n\nvar form = document.querySelector('form');\nform.addEventListener('submit', function (ev) {\n    ev.preventDefault();\n    var number = form.elements.number.value;\n    tone.dial(number);\n});\n\nbaudio(tone.play()).play();\n```\n\n# usage\n\nThere is also a `touchtone` command that ships with this package.\n\n```\nUSAGE\n\n  touchtone {OPTIONS} NUMBER\n\nINFO\n\n  Play the DTMF tones for NUMBER on the system audio device.\n\nOPTIONS\n\n  -d --duration  Time in seconds to play each tone.\n\n  -p --pause     Time in seconds to pause between tones.\n\n  -v --volume    Volume: higher than 1: louder, lower than 1: softer.\n\n  -h --help      Show this message.\n\nEXAMPLE\n  \n  touchtone 18005551212\n  touchtone '*69'\n\n```\n\n# methods\n\n``` js\nvar touchtone = require('touchtone')\n```\n\n## var tone = touchtone(opts)\n\nCreate a new `tone` instance with `opts`:\n\n* `opts.duration` - time in seconds to play each tone\n* `opts.pause` - time in seconds between each tone\n* `opts.volume` - higher than 1: louder, lower than 1: quieter\n\n# tone.press(key)\n\nGenerate a single tone for a string character `key`.\n\n# tone.dial(number)\n\nGenerate a sequence of numbers from a string `number`.\n\n# tone.play()\n\nReturn a `function (t) {}` that itself returns an amplitude between -1 and 1,\ninclusive. This function can be fed into\n[baudio](https://npmjs.org/package/baudio) or \n[webaudio](https://npmjs.org/package/webaudio) to generate sounds.\n\n# events\n\n## tone.on('ready', function () {})\n\nWhen the queued-up tones are finished playing, this event fires.\n\n# DTMF keys\n\nAll 16 DTMF keys are supported:\n\n```\n HZ  1209 1336 1477 1633\n697    1    2    3    A\n770    4    5    6    B\n852    7    8    9    C\n941    *    0    #    D\n```\n\nRefer to each key by its symbol name as a string.\n\n# install\n\nFirst install [sox](http://sox.sourceforge.net) unless you only want to use this\nmodule in a browser.\n\nIf you want the command-line client, do:\n\n```\nnpm install -g touchtone\n```\n\nIf you want the library, do:\n\n```\nnpm install touchtone\n```\n\n# license\n\nMIT\n","maintainers":[{"email":"nopersonsmodules@gmail.com","name":"nopersonsmodules"}],"time":{"modified":"2022-11-08T10:41:22.793Z","created":"2014-07-21T23:49:00.072Z","1.0.0":"2014-07-21T23:49:00.072Z","1.0.1":"2014-07-21T23:49:38.170Z","1.0.2":"2014-07-22T06:26:21.094Z"},"homepage":"https://github.com/substack/touchtone","keywords":["dtmf","phone","telephony","telephone","keypad","baudio","sound","audio"],"repository":{"type":"git","url":"git://github.com/substack/touchtone.git"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"bugs":{"url":"https://github.com/substack/touchtone/issues"},"license":"MIT","readmeFilename":"readme.markdown"}