{"_id":"@andaleeb/waveform-playlist","_rev":"3-8fc75470c0f6391002005fdfa5f2955c","name":"@andaleeb/waveform-playlist","dist-tags":{"latest":"3.0.6"},"versions":{"3.0.4":{"name":"@andaleeb/waveform-playlist","description":"Multiple track web audio editor and player with waveform preview","version":"3.0.4","main":"lib/app.js","author":{"name":"Naomi Aro"},"license":"MIT","website":"http://naomiaro.github.io","babel":{"presets":["es2015","stage-0"]},"devDependencies":{"@mohayonao/web-audio-api-shim":"^0.3.0","babel-cli":"^6.6.5","babel-core":"^6.2.1","babel-loader":"^6.2.4","babel-polyfill":"^6.20.0","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.3.13","chai":"^3.4.1","chai-as-promised":"^5.1.0","coveralls":"^2.11.4","eslint":"^3.12.2","eslint-config-airbnb-base":"^11.0.0","eslint-plugin-import":"^2.2.0","gh-pages":"^0.11.0","istanbul":"^0.4.1","karma":"^0.13.15","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chrome-launcher":"^0.2.1","karma-coverage":"^0.5.3","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.1","karma-nyan-reporter":"^0.2.2","karma-requirejs":"^0.2.2","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^1.7.0","mocha":"^2.3.4","requirejs":"^2.1.22","webpack":"^1.13.0","webpack-dev-server":"^1.14.0"},"directories":{"lib":"lib","css":"styles"},"dependencies":{"event-emitter":"^0.3.4","fade-curves":"^1.0.2","fade-maker":"^1.0.3","inline-worker":"^1.1.0","lodash.assign":"^4.0.0","lodash.defaults":"^4.0.0","lodash.forown":"^4.0.0","mkdirp":"^0.5.1","mucss":"^1.1.5","uuid":"^2.0.1","virtual-dom":"^2.1.1","webaudio-peaks":"^0.0.6"},"scripts":{"clean":"rm -Rf dist && rm -Rf lib && rm -Rf styles","styles":"mkdirp styles && cp ghpages/_sass/_playlist.scss styles/playlist.scss","compile":"babel src --out-dir lib","jekyll":"jekyll build -s ghpages -d dist/waveform-playlist","jekyll:dev":"jekyll build -s ghpages -d dist/waveform-playlist --watch &","ghpages":"gh-pages --repo https://$GH_TOKEN@github.com/naomiaro/waveform-playlist.git -d dist/waveform-playlist","build":"npm run clean && npm run jekyll && webpack","preversion":"npm run clean","version":"npm run build && git add -A dist","postversion":"git push && git push --tags","prepublish":"npm run compile && npm run styles","webpack:server":"node_modules/webpack-dev-server/bin/webpack-dev-server.js --content-base dist/ --colors --host 0.0.0.0 --inline","start":"npm run webpack:server","dev":"npm run jekyll:dev && npm run webpack:server","test":"node_modules/karma/bin/karma start --browsers Firefox --single-run","eslint":"eslint src"},"repository":{"type":"git","url":"git+https://github.com/naomiaro/waveform-playlist.git"},"keywords":["waveform","audio","audacity","stem","tracks","multitrack","playlist","music","editor","record","recording","player","webaudio"],"bugs":{"url":"https://github.com/naomiaro/waveform-playlist/issues"},"homepage":"http://naomiaro.github.io/waveform-playlist","gitHead":"0b34c18d8a6925efc4bb5956403372602b331f39","_id":"@andaleeb/waveform-playlist@3.0.4","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"andaleeb","email":"andaleebcse@gmail.com"},"dist":{"integrity":"sha512-U5Eg7RMj4S6VMxGDSzagcLRJaLG2Mrdgl5Y0O+GpN1OSKigGizMB9RQrk1Dr/OwM1oSegF0eAxYC4gE3XyZ+hA==","shasum":"9ebdab09b6350d44030e470d24c627d65d59893f","tarball":"https://registry.npmjs.org/@andaleeb/waveform-playlist/-/waveform-playlist-3.0.4.tgz","fileCount":36,"unpackedSize":147281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKB1UCRA9TVsSAnZWagAAvx0P/jfFo/1CPnkmpd+xYXAj\n9EN5cTUbDd9jE+2RnqE1pDbGUHStwV+8Gp/IDF3wTAKGEv++VlaGUtYGdsb4\nrQZkUmO1kos60XRnjbSHesGN7o0BwF3aSGzX8QOcpDaxY3deaJG9xKqqsvvI\nmGFAotDo5cAjZe+8ElngmNnvgTQ8OOCQX3VcaUaOvfZHkD6isgFVRcgt9aK6\nz/ucku7tlgVwqPUT+3epT3UjDdooABgaMAX6zljM8XBy3/pbZG4yrwSDKuWe\nzmrkA1Rk5tX4nOD2dQqjfus2jCGgJWHxPL2RPYhWZzddDfl3Y57L4258e24R\n90JknpQjstalfKgqLKAuzqIi+4y2z7NxHXRRhyawuqZkNX/FT6pNfgos1Wrf\ntgo3D4wdlioYzlHvhGPqv5jYyrdW9YYfgMmj2mzTDv4WuLMKeOHRthjxdvXt\noGmdCwjtUx0FTJ1A4BH+PHMyoCnkhgj0F99WO8RcQ+NLTfBKGtGi0ka5a+fR\nPdGRevA4rIkVXrSezxooxjZI4eY2c5XPp3ETuCbOih7f6KMiDsRu9pnGUxO8\nP2GwHoOvinmBUt0OhyoL75mJ5GKy5+o9hp9YnC3GdtLVn7fZXdLwQwgC5We/\nHldZ5GLPCkCbqYecC4IBxQxjh3YkUPr9n88zoHuh02+mGyXCt5aLZH/l/Qvi\ngx2z\r\n=V9hJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZX5CgyijMa8kp+1tUK5fWPJwk/FCuS+K79PhZOvRlJAiBlT3nzPqzle4ldcBVoAQ2BtE0xcfl0O+Ogv/FTQ8rIVw=="}]},"maintainers":[{"name":"andaleeb","email":"andaleebcse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waveform-playlist_3.0.4_1562910035876_0.9634418800767983"},"_hasShrinkwrap":false},"3.0.5":{"name":"@andaleeb/waveform-playlist","description":"Multiple track web audio editor and player with waveform preview","version":"3.0.5","main":"lib/app.js","author":{"name":"Naomi Aro"},"license":"MIT","website":"http://naomiaro.github.io","babel":{"presets":["es2015","stage-0"]},"devDependencies":{"@mohayonao/web-audio-api-shim":"^0.3.0","babel-cli":"^6.6.5","babel-core":"^6.2.1","babel-loader":"^6.2.4","babel-polyfill":"^6.20.0","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.3.13","chai":"^3.4.1","chai-as-promised":"^5.1.0","coveralls":"^2.11.4","eslint":"^3.12.2","eslint-config-airbnb-base":"^11.0.0","eslint-plugin-import":"^2.2.0","gh-pages":"^0.11.0","istanbul":"^0.4.1","karma":"^0.13.15","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chrome-launcher":"^0.2.1","karma-coverage":"^0.5.3","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.1","karma-nyan-reporter":"^0.2.2","karma-requirejs":"^0.2.2","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^1.7.0","mocha":"^2.3.4","requirejs":"^2.1.22","webpack":"^1.13.0","webpack-dev-server":"^1.14.0"},"directories":{"lib":"lib","css":"styles"},"dependencies":{"event-emitter":"^0.3.4","fade-curves":"^1.0.2","fade-maker":"^1.0.3","inline-worker":"^1.1.0","lodash.assign":"^4.0.0","lodash.defaults":"^4.0.0","lodash.forown":"^4.0.0","mkdirp":"^0.5.1","mucss":"^1.1.5","uuid":"^2.0.1","virtual-dom":"^2.1.1","webaudio-peaks":"^0.0.6"},"scripts":{"clean":"rm -Rf dist && rm -Rf lib && rm -Rf styles","styles":"mkdirp styles && cp ghpages/_sass/_playlist.scss styles/playlist.scss","compile":"babel src --out-dir lib","jekyll":"jekyll build -s ghpages -d dist/waveform-playlist","jekyll:dev":"jekyll build -s ghpages -d dist/waveform-playlist --watch &","ghpages":"gh-pages --repo https://$GH_TOKEN@github.com/naomiaro/waveform-playlist.git -d dist/waveform-playlist","build":"npm run clean && npm run jekyll && webpack","preversion":"npm run clean","version":"npm run build && git add -A dist","postversion":"git push && git push --tags","prepublish":"npm run compile && npm run styles","webpack:server":"node_modules/webpack-dev-server/bin/webpack-dev-server.js --content-base dist/ --colors --host 0.0.0.0 --inline","start":"npm run webpack:server","dev":"npm run jekyll:dev && npm run webpack:server","test":"node_modules/karma/bin/karma start --browsers Firefox --single-run","eslint":"eslint src"},"repository":{"type":"git","url":"git+https://github.com/naomiaro/waveform-playlist.git"},"keywords":["waveform","audio","audacity","stem","tracks","multitrack","playlist","music","editor","record","recording","player","webaudio"],"bugs":{"url":"https://github.com/naomiaro/waveform-playlist/issues"},"homepage":"http://naomiaro.github.io/waveform-playlist","gitHead":"8ccf76a16d8ab2414820d27cada30ae0071070f0","_id":"@andaleeb/waveform-playlist@3.0.5","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"andaleeb","email":"andaleebcse@gmail.com"},"dist":{"integrity":"sha512-vRGX3FIy/HmC89NPPy8bwo5xnpgfncwLBhSwxjfSknD5SHG/34Tr+iAsThe2wY7a71axibC5kNpVnma/1tm4PQ==","shasum":"dc40fec12eb5dc8fdeb4b3799bf406661903f93d","tarball":"https://registry.npmjs.org/@andaleeb/waveform-playlist/-/waveform-playlist-3.0.5.tgz","fileCount":37,"unpackedSize":337835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLb+5CRA9TVsSAnZWagAAtPgP/j8H27lHlnHaEfOGkhil\nQQkiHu6RnSkobnx7bNKiNPjTbiLNnBaO8XbxD/mTMZ8ybCzBycfGxm6DokZK\nVISbjPo51fk04pNt2/33/2Td3xp/2LQPhRpP3Pl3xPPzwD/kpcv8Lx3l9QBr\nmvc7zWn2zvrf9Dkk0t2y5v1JHaQinyjb+laoqq/E9Z8xheWjUdU05l70SPod\nPfEBXfEnoYQn1jFzcpWEx3kYy5gchnB5IzM1v4s8Zn3gwazDzHZTrOujOxmY\nRgoxI/xk2ET3mdjwYsf9HpNzmYcY3U1Ccc5wfpsSDsQ5oyKDZ1AsyRDv7Cfq\n08rwPAW9uzCP1OhXi/9CuMxmEdRTZlW5EhP54vEyTO6CVvldXVnwF6lu/NLY\nr9d1zcsVpRHzVBfsPfhBFeUCwnDQttQai14hCHwqG9viq39JQe+DkCN2x9Fc\nPBedPNtXtu4liewiMs6QuUbUmGlgtOguiIdZfNWFBWRSbuYlOpSBW19otZVk\n3GZwuYzt0yjzrvE0qvhQIuAfXMdrj8a/WYD38y54WkU3BMATd7JFMvhsiuOO\nOrNSP/uHudq7Gz65LQaQvUPBpx5ZSGho8iSzJ+/xlLzamKTQBkDoK8iJKu7K\nplmrLE6BWVl9kX+c92VpsSiYbKbd0snxmysXUMWbDBfb7Ql0DkEhANaBWGVb\ng0XP\r\n=iFVy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgdlwaHjHf7xH4bGQwJsGHV69OQfR7cRrygA1svvfvXAIgJe8v9ca3C9ERNuSXAhRfs6C7MJbtUODpOF0ix9Vu9aY="}]},"maintainers":[{"name":"andaleeb","email":"andaleebcse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waveform-playlist_3.0.5_1563279288982_0.3672105083454724"},"_hasShrinkwrap":false},"3.0.6":{"name":"@andaleeb/waveform-playlist","description":"Multiple track web audio editor and player with waveform preview","version":"3.0.6","main":"lib/app.js","author":{"name":"Naomi Aro"},"license":"MIT","website":"http://naomiaro.github.io","babel":{"presets":["es2015","stage-0"]},"devDependencies":{"@mohayonao/web-audio-api-shim":"^0.3.0","babel-cli":"^6.6.5","babel-core":"^6.2.1","babel-loader":"^6.2.4","babel-polyfill":"^6.20.0","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.3.13","chai":"^3.4.1","chai-as-promised":"^5.1.0","coveralls":"^2.11.4","eslint":"^3.12.2","eslint-config-airbnb-base":"^11.0.0","eslint-plugin-import":"^2.2.0","gh-pages":"^0.11.0","istanbul":"^0.4.1","karma":"^0.13.15","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chrome-launcher":"^0.2.1","karma-coverage":"^0.5.3","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.1","karma-nyan-reporter":"^0.2.2","karma-requirejs":"^0.2.2","karma-sourcemap-loader":"^0.3.6","karma-webpack":"^1.7.0","mocha":"^2.3.4","requirejs":"^2.1.22","webpack":"^1.13.0","webpack-dev-server":"^1.14.0"},"directories":{"lib":"lib","css":"styles"},"dependencies":{"event-emitter":"^0.3.4","fade-curves":"^1.0.2","fade-maker":"^1.0.3","inline-worker":"^1.1.0","lodash.assign":"^4.0.0","lodash.defaults":"^4.0.0","lodash.forown":"^4.0.0","mkdirp":"^0.5.1","mucss":"^1.1.5","uuid":"^2.0.1","virtual-dom":"^2.1.1","webaudio-peaks":"^0.0.6"},"scripts":{"clean":"rm -Rf dist && rm -Rf lib && rm -Rf styles","styles":"mkdirp styles && cp ghpages/_sass/_playlist.scss styles/playlist.scss","compile":"babel src --out-dir lib","jekyll":"jekyll build -s ghpages -d dist/waveform-playlist","jekyll:dev":"jekyll build -s ghpages -d dist/waveform-playlist --watch &","ghpages":"gh-pages --repo https://$GH_TOKEN@github.com/naomiaro/waveform-playlist.git -d dist/waveform-playlist","build":"npm run clean && npm run jekyll && webpack","preversion":"npm run clean","version":"npm run build && git add -A dist","postversion":"git push && git push --tags","prepublish":"npm run compile && npm run styles","webpack:server":"node_modules/webpack-dev-server/bin/webpack-dev-server.js --content-base dist/ --colors --host 0.0.0.0 --inline","start":"npm run webpack:server","dev":"npm run jekyll:dev && npm run webpack:server","test":"node_modules/karma/bin/karma start --browsers Firefox --single-run","eslint":"eslint src"},"repository":{"type":"git","url":"git+https://github.com/naomiaro/waveform-playlist.git"},"keywords":["waveform","audio","audacity","stem","tracks","multitrack","playlist","music","editor","record","recording","player","webaudio"],"bugs":{"url":"https://github.com/naomiaro/waveform-playlist/issues"},"homepage":"http://naomiaro.github.io/waveform-playlist","gitHead":"8ccf76a16d8ab2414820d27cada30ae0071070f0","_id":"@andaleeb/waveform-playlist@3.0.6","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"andaleeb","email":"andaleebcse@gmail.com"},"dist":{"integrity":"sha512-1DstF0U2oK1R1bpR+TZkNmTK0CK+ASyVrgfuy7U/qgm1eyXPYBSIKDk7RxoSSQYVBUHuauVzUufMSfAA5MJfDA==","shasum":"467b19fa53a1ceaa96ca257b155012cd9a2b85ab","tarball":"https://registry.npmjs.org/@andaleeb/waveform-playlist/-/waveform-playlist-3.0.6.tgz","fileCount":36,"unpackedSize":148090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLcD6CRA9TVsSAnZWagAAfnsQAIBQyYBRlRyKkqMIYV50\nSOmHy2O3iDtvMqIcuHchuQ3G0HyAWtESApI/BGcEQlDoqXdsAYdjk1U70l96\nf1mVArNg1sIgQ2CoTDxPlZsCmrB6Ydqok73BiZbrrlQhoCMotVem+LBzh92A\n5QoN5556GGezoQJUwPLWEbRVUOAeXtNDRvwNDH1JUHF+vFaooBgMVXog32s2\nXe7ZPAUCYRz0MgTOC69lHHEw1g3lKS+ybMzGsLCGaqmBF8UaW8Zv6XH1bdPV\nN1QGVkXr4QdsL219Q6cyvlgj35WArNqZTnY5gqoOSsi92typNtnUTIytfXk9\nvNzrr/oZeImokYfJAsmnUXiFmgshUUlKqZefWaCR+9Yo5UClrDTGvZHRFl4e\nT38YAGavIMHg8oMZdeAPeJFO37GPjsckJjuwgAaJQyEnhPrfKkTBPWgc7Vu/\nQd9L2fOI2GDS8q6bdplEyPb7dePGKlyZGpj+gbUKR93MGEm1Vk8IQSoA7TSd\nU677QPsYKhHS5byEdxcFLWg2+E16CgfY25XAYMHByuTrVXCZOJlJu/Hyme9h\nkyvp0d1XI3OkR41+SIkXAmbi2vCYdOK6CKJ12pidNBYVzp1CogQfbm8zFcH+\n+d+ZLQ7hOw/GBDPB4eZWvjYdRTPWkfNjaLGUCz+1cm355zhha4lBcTf92Ofr\nkBRg\r\n=MsXj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiJW1GZEFYd6ynBX1j4f8a6rg6SFC8PsqQ0ChTq1SjDAiEA6luoOSDtQNp0eAWeq07Xni1BIKn1oKp4RDB4KaH+x9g="}]},"maintainers":[{"name":"andaleeb","email":"andaleebcse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waveform-playlist_3.0.6_1563279610163_0.1403276607129993"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-12T05:40:35.662Z","3.0.4":"2019-07-12T05:40:36.104Z","modified":"2022-04-04T13:57:22.042Z","3.0.5":"2019-07-16T12:14:49.142Z","3.0.6":"2019-07-16T12:20:10.289Z"},"maintainers":[{"name":"andaleeb","email":"andaleebcse@gmail.com"}],"description":"Multiple track web audio editor and player with waveform preview","homepage":"http://naomiaro.github.io/waveform-playlist","keywords":["waveform","audio","audacity","stem","tracks","multitrack","playlist","music","editor","record","recording","player","webaudio"],"repository":{"type":"git","url":"git+https://github.com/naomiaro/waveform-playlist.git"},"author":{"name":"Naomi Aro"},"bugs":{"url":"https://github.com/naomiaro/waveform-playlist/issues"},"license":"MIT","readme":"Waveform Playlist\n=================\n\nInspired by [Audacity](http://audacity.sourceforge.net/), this project is a multiple track playlist editor written in ES2015 using the [Web Audio API](http://webaudio.github.io/web-audio-api/).\n\n[![npm](https://img.shields.io/npm/dm/waveform-playlist.svg)](https://www.npmjs.com/package/waveform-playlist)\n[![Build Status](https://travis-ci.org/naomiaro/waveform-playlist.svg)](https://travis-ci.org/naomiaro/waveform-playlist)\n[![Coverage Status](https://coveralls.io/repos/naomiaro/waveform-playlist/badge.svg?branch=master&service=github)](https://coveralls.io/github/naomiaro/waveform-playlist?branch=master)\n\n\n[NOW ON PATREON!](https://www.patreon.com/naomiaro) If you are looking for additional support or features, please consider pledging to help the work!\n\n\nLoad tracks and set cues (track cue in, cue out), fades (track fade in, fade out) and track start/end times within the playlist.\nI've written up some demos on github for the different [audio fade types](https://github.com/naomiaro/Web-Audio-Fades) in the project.\n\n- [See examples in action](http://naomiaro.github.io/waveform-playlist)\n- [Try out the waveform editor!](http://naomiaro.github.io/waveform-playlist/web-audio-editor.html)\n\n![Screenshot](img/stemtracks.png?raw=true \"stem tracks mute solo volume control\")\n(code for picture shown can be found in ghpages/_examples/04stemtracks.html)\n\n![Screenshot](img/annotations.png?raw=true \"Aeneas annotations adjust alignment json export\")\n(code for picture shown can be found in ghpages/_examples/13annotations.html)\n\n\n## Browser Support\n\nWaveform Playlist requires webaudio in the browser to function correctly: [Can I Use?](http://caniuse.com/#search=webaudio)\n\n\n## Installation\n\n`npm install waveform-playlist`\n\n\n* If you want to download and run the already compiled website, navigate to folder `/dist` and run `python -m SimpleHTTPServer 8000`. The website will be available at `localhost:8000/waveform-playlist`.\n\n\n## Basic Usage\n\nStarter styles can be found in the npm package download at `waveform-playlist/styles/playlist.scss`\n\n```javascript\nvar WaveformPlaylist = require('waveform-playlist');\n\nvar playlist = WaveformPlaylist.init({\n  samplesPerPixel: 3000,\n  mono: true,\n  waveHeight: 70,\n  container: document.getElementById('playlist'),\n  state: 'cursor',\n  colors: {\n    waveOutlineColor: '#E0EFF1',\n    timeColor: 'grey',\n    fadeColor: 'black'\n  },\n  controls: {\n    show: true,\n    width: 200\n  },\n  zoomLevels: [500, 1000, 3000, 5000]\n});\n\nplaylist.load([\n  {\n    src: 'media/audio/Vocals30.mp3',\n    name: 'Vocals',\n    gain: 0.5,\n  },\n  {\n    src: 'media/audio/BassDrums30.mp3',\n    name: 'Drums',\n    start: 8.5,\n    fadeIn: {\n      duration: 0.5,\n    },\n    fadeOut: {\n      shape: 'logarithmic',\n      duration: 0.5,\n    },\n  },\n  {\n    src: 'media/audio/Guitar30.mp3',\n    name: 'Guitar',\n    start: 23.5,\n    fadeOut: {\n      shape: 'linear',\n      duration: 0.5,\n    },\n    cuein: 15,\n  }\n]).then(function() {\n  // can do stuff with the playlist.\n});\n```\n\n### Playlist Options\n\n```javascript\nvar options = {\n\n  // webaudio api AudioContext\n  ac: new (window.AudioContext || window.webkitAudioContext),\n\n  // DOM container element REQUIRED\n  container: document.getElementById('playlist'),\n\n  // sample rate of the project. (used for correct peaks rendering)\n  sampleRate: new (window.AudioContext || window.webkitAudioContext).sampleRate,\n\n  // number of audio samples per waveform peak.\n  // must be an entry in option: zoomLevels.\n  samplesPerPixel: 4096,\n\n  // whether to draw multiple channels or combine them.\n  mono: true,\n\n  // enables \"exclusive solo\" where solo switches between tracks\n  exclSolo: false,\n\n  // default fade curve type.\n  fadeType: 'logarithmic', // (logarithmic | linear | sCurve | exponential)\n\n  // whether or not to include the time measure.\n  timescale: false,\n\n  // control panel on left side of waveform\n  controls: {\n    // whether or not to include the track controls\n    show: false,\n\n    // width of controls in pixels\n    width: 150,\n  },\n\n  colors: {\n    // color of the wave background\n    waveOutlineColor: 'white',\n\n    // color of the time ticks on the canvas\n    timeColor: 'grey',\n\n    // color of the fade drawn on canvas\n    fadeColor: 'black',\n  },\n\n  // height in pixels of each canvas element a waveform is on.\n  waveHeight: 128,\n\n  // interaction state of the playlist\n  // (cursor | select | fadein | fadeout | shift)\n  state: 'cursor',\n\n  // (line | fill)\n  seekStyle : 'line',\n\n  // Array of zoom levels in samples per pixel.\n  // Smaller numbers have a greater zoom in.\n  zoomLevels: [512, 1024, 2048, 4096],\n\n  // Whether to automatically scroll the waveform while playing\n  isAutomaticScroll: false,\n\n  // configuration object for the annotations add on.\n  annotationList: {\n\n    // Array of annotations in [Aeneas](https://github.com/readbeyond/aeneas) JSON format\n    annotations: [],\n\n    // Whether the annotation texts will be in updateable contenteditable html elements\n    editable: false,\n\n    // User defined functions which can manipulate the loaded annotations\n    controls: [{\n      // class names for generated <i> tag separated by '.'\n      class: 'fa.fa-minus',\n\n      // title attribute for the generated <i> tag\n      title: 'Reduce annotation end by 0.010s',\n\n      // function which acts on the given annotation row\n      // when the corresponding <i> is clicked.\n      action: (annotation, i, annotations, opts) => {\n\n        // @param Object annotation - current annotation\n        // @param Number i - index of annotation\n        // @param Array annotations - array of annotations in the playlist\n        // @param Object opts - configuration options available\n        //      - opts.linkEndpoints\n\n      }\n    }],\n\n    // If false when clicking an annotation id segment\n    // playback will stop after segment completion.\n    isContinuousPlay: false,\n\n    // If true annotation endpoints will remain linked when dragged\n    // if they were the same value before dragging started.\n    linkEndpoints: false,\n  }\n};\n```\n\n### Track Options\n\n```javascript\n{\n  // a media path for XHR or a File object.\n  src: 'media/audio/BassDrums30.mp3',\n\n  // name that will display in the playlist control panel.\n  name: 'Drums',\n\n  // volume level of the track between [0-1]\n  gain: 1,\n\n  // whether the track should initially be muted.\n  muted: false,\n\n  // whether the track should initially be soloed.\n  soloed: false,\n\n  // time in seconds relative to the playlist\n  // ex (track will start after 8.5 seconds)\n  // DEFAULT 0 - track starts at beginning of playlist\n  start: 8.5,\n\n  // track fade in details\n  fadeIn: {\n    // fade curve shape\n    // (logarithmic | linear | sCurve | exponential)\n    shape: 'logarithmic',\n\n    // length of fade starting from the beginning of this track, in seconds.\n    duration: 0.5,\n  },\n\n  // track fade out details\n  fadeOut: {\n    // fade curve shape\n    // (logarithmic | linear | sCurve | exponential)\n    shape: 'logarithmic',\n\n    //length of fade which reaches the end of this track, in seconds.\n    duration: 0.5,\n  }\n\n  // where the waveform for this track should begin from\n  // ex (Waveform will begin 15 seconds into this track)\n  // DEFAULT start at the beginning - 0 seconds\n  cuein: 15,\n\n  // where the waveform for this track should end\n  // ex (Waveform will end at 30 second into this track)\n  // DEFAULT duration of the track\n  cueout: 30,\n\n  // custom class for unique track styling\n  customClass: 'vocals',\n\n  // custom background-color for the canvas-drawn waveform\n  waveOutlineColor: '#f3f3f3',\n\n  // interaction states allowed on this track.\n  // DEFAULT - all true\n  states: {\n    cursor: true,\n    fadein: true,\n    fadeout: true,\n    select: true,\n    shift: true,\n  },\n\n  // pre-selected section on track.\n  // ONLY ONE selection is permitted in a list of tracks, will take most recently set if multiple passed.\n  // This track is marked as 'active'\n  selected: {\n    // start time of selection in seconds, relative to the playlist\n    start: 5,\n\n    // end time of selection in seconds, relative to the playlist\n    end: 15,\n  },\n}\n```\n\n### Playlist Events\n\nWaveform Playlist uses an instance of [event-emitter](https://www.npmjs.com/package/event-emitter) to send & receive messages from the playlist.\n\n```javascript\nvar EventEmitter = require('event-emitter');\nvar WaveformPlaylist = require('waveform-playlist');\n\nvar playlist = WaveformPlaylist.init(\n  {\n    container: document.getElementById('playlist'),\n  },\n\n  // you can pass your own event emitter\n  EventEmitter(),\n);\n\n// retrieves the event emitter the playlist is using.\nvar ee = playlist.getEventEmitter();\n```\n\nAn example of using the event emitter to control the playlist can be found in [/dist/js/examples/emitter.js](https://github.com/naomiaro/waveform-playlist/blob/master/dist/js/examples/emitter.js)\n\n#### Events to Invoke\n\n| event | arguments | description |\n| --- | --- | --- |\n| `play` | `start:optional, end:optional` | Starts playout of the playlist. Takes optional Number parameters in seconds `start` and `end` to play just an audio segment. `start` can be passed without an `end` to play to the end of the track. |\n| `pause` | _none_ | Pauses playout of the playlist. |\n| `stop` | _none_ | Stops playout of the playlist. |\n| `rewind` | _none_ | Stops playout if playlist is playing, resets cursor to the beginning of the playlist. |\n| `fastforward` | _none_ | Stops playout if playlist is playing, resets cursor to the end of the playlist. |\n| `clear` | _none_ | Stops playout if playlist is playing, removes all tracks from the playlist. |\n| `record` | _none_ | Starts recording an audio track. Begins playout of other tracks in playlist if there are any. |\n| `zoomin` | _none_ | Changes zoom level to the next smallest entry (if one exists) from the array `zoomLevels`. |\n| `zoomout` | _none_ | Changes zoom level to the next largest entry (if one exists) from the array `zoomLevels`. |\n| `trim` | _none_ | Trims currently active track to the cursor selection. |\n| `statechange` | `cursor` / `select` / `fadein` / `fadeout` / `shift` | Changes interaction state to the state given. |\n| `fadetype` | `logarithmic` / `linear` / `sCurve` / `exponential` | Changes playlist default fade type. |\n| `newtrack` | `File` | Loads `File` object into the playlist. |\n| `volumechange` | `volume, track` | Set volume of `track` to `volume` (0-100) |\n| `mastervolumechange` | `volume` | Set a new master volume `volume` (0-100) |\n| `select` | `start, end, track:optional` | Seek to the start time or start/end selection optionally with active track `track`. |\n| `startaudiorendering` | `wav` / `buffer` | Request for a downloadable file or web Audio buffer that represent the current work |\n| `automaticscroll` | `true`/`false` | Change property `isAutomaticScroll`. |\n| `continuousplay` | `true`/`false` | Change property `isContinuousPlay`.|\n| `linkendpoints` | `true`/`false` | Change property `linkEndpoints`.|\n| `annotationsrequest` | _none_ | Requests to download the annotations to a json file. |\n\n\n#### Events to Listen to\n\n| event | arguments | description |\n| --- | --- | --- |\n| `select` | `start, end, track` | Cursor selection has occurred from `start` to `end` with active Track `track`. |\n| `timeupdate` | `playbackPosition` | Sends current position of playout `playbackPosition` in seconds. |\n| `scroll` | `scrollLeft` | Sends current position of scroll `scrollLeft` in seconds. |\n| `statechange` | `state` | Sends current interaction state `state`. |\n| `shift` | `deltaTime, track` | Sends `deltaTime` in seconds change for Track `track` |\n| `mute` | `track` | Mute button has been pressed for `track` |\n| `solo` | `track` | Solo button has been pressed for `track` |\n| `volumechange` | `volume, track` | Volume of `track` has changed to `volume` (0-100) |\n| `mastervolumechange` | `volume` | Master volume of the playlist has changed to `volume` (0-100) |\n| `audiorequeststatechange` | `state, src` | Loading audio `src` (`string` or `File`) is now in state [`state`](https://github.com/naomiaro/waveform-playlist/wiki/Track-Loading-States) (Number) |\n| `loadprogress` | `percent, src` | Loading audio `src` has loaded percent `percent` (0-100) |\n| `audiosourcesloaded` | _none_ | Audio decoding has finished for all tracks |\n| `audiosourcesrendered` | _none_ | Tracks are rendered to the playlist |\n| `finished` | _none_ | Event fired when cursor ( while playing ) reaches the end (maximum duration) |\n| `audiorenderingfinished` | `type, data` | Return the result of the rendering in the desired format. `type` can be `buffer` or `wav` and can be used to dertermine the  `data` type. When `type` is `wav`, data is a `blob` object that represent the wav file. |\n\n## Tests\n\n  `npm test`\n\n## Development without example changes\n\n  `npm install && npm start`\n\n  This will install dependencies and start the webpack server.\n\n\n## Development with example changes\n\n  `gem install jekyll`\n\n  Jekyll is needed if changes to the example pages will be done.\n\n  `npm install && npm run dev`\n\n  This will build and watch the jekyll site and startup the webpack dev server.\n\n\n## Credits\n\nOriginally created for the [Airtime](https://www.sourcefabric.org/en/airtime/) project at [Sourcefabric](https://www.sourcefabric.org/)\n\n\nThe annotation plugin has been sponsored by a fond Italian TED volunteer transcriber, hoping to make easier and more fun the transcription process of TEDx talks.\n\n## Patreon\n\nWanting to see a particular feature or blog post? [Consider supporting Waveform Playlist!](https://www.patreon.com/naomiaro)\n\n## License\n\n[MIT License](http://doge.mit-license.org)\n","readmeFilename":"README.md"}