{"_id":"@ablaise/yamaha-eseq-converter","_rev":"3-82ee43a271453c959a72a7a4d35c1806","name":"@ablaise/yamaha-eseq-converter","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@ablaise/yamaha-eseq-converter","version":"1.0.0","description":"Yamaha E-Seq Converter is a ES6 JavaScript tool that helps to convert a midi file into the Yamaha's standard E-Seq format","license":"MIT","author":{"name":"Alexis Blaise","email":"blaise.alexis@gmail.com"},"keywords":["yamaha","eseq","smartpianist","piano","clavinova","midi"],"repository":{"type":"git","url":"git+https://github.com/ablaise/yamaha-eseq-converter.git"},"scripts":{"test":"jest"},"devDependencies":{"@babel/preset-env":"^7.17.10","babel-jest":"^28.1.0","jest":"^28.1.0"},"gitHead":"4db42f8ca2cbc855ac15a5889c2e9120f34194e0","bugs":{"url":"https://github.com/ablaise/yamaha-eseq-converter/issues"},"homepage":"https://github.com/ablaise/yamaha-eseq-converter#readme","_id":"@ablaise/yamaha-eseq-converter@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-OZwGtD+u8Ul5zXhPzOPIEBme6cqWNWdr4S4VsZuO12e1edocH0V0s3MAOQiAzoJzxHb0fHoEKqodsGyVuvCkMA==","shasum":"df7b30eca528cbc3fd298ab8e24801515c8f7744","tarball":"https://registry.npmjs.org/@ablaise/yamaha-eseq-converter/-/yamaha-eseq-converter-1.0.0.tgz","fileCount":23,"unpackedSize":469576,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqvMT4ZJPdXDMG3cuQCZ2bRXe5LpARFWRihJZZg9F9TAIgEHqOzhNV4PB2SEk/xEatFYXAPND1FA4qPP/2QYg+N+E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifThsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEVg//RZO6H84BABDNsNpcj9nD28PRGsMBFesqitp44mX6gZtHI6Qd\r\nXh0QgekdB94dS0bQC8ypPBkZOu+3f/T2qsv8KN8G+zW0sGSjaiagpEgiNlPv\r\nEKjHZv6m/LHUveQ1RlKEEqzhkj8JzlaqUHbPnElv8qUGi0wR4LV7DSPPBsnn\r\n52CkPdvr2dxctAdreHJyHejZ+G9JzaO9KMh0Y0jNLU7S3cFNI/k7P3rnh4MG\r\nlvtaikpV0YJ9/qPBjXyLOlzPUlmESxFFWlkhynme1w3zH4aJ/JnQ+1L/CsEz\r\nVF9fquPXx8NUZA+MwNyAeucgUbXLZ83Z5v5zhkz7ODp/souA2LnIoByE8RDd\r\n8dioug34iB3hYhanXc9J5DQ4lgv2tTsVSvNmthiPORUCKftRzy7ieUgWIzX5\r\nafFI4xdSdvGvC6Rc5XWIaPThVIDcyk0E+TrG8Ag4rsyLe1w5Rj3MAki8Vc3Z\r\nyMm72xLdvSm5vI9QqhHKpz5/Z7fYna4rBvLmGnIjHScPi2Tp9NaIAbwmFJlx\r\n8I7YJ8aHRKiC0Cgmm8XApZfsgEOZ8B31UgM5YbdB+ptf0dBxZPG6gIrIPHxl\r\nr6zaZVRcEwkI6rycLkCUcoXeGllk1Y5wW97VWD0F+zEQyZrFO5/5T6lXmAIs\r\n4j+3Si2+8sxJNSxv0HvCWzwdCX0z/Mxz4mk=\r\n=UQsN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ablaise","email":"blaise.alexis@gmail.com"},"directories":{},"maintainers":[{"name":"ablaise","email":"blaise.alexis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yamaha-eseq-converter_1.0.0_1652373612169_0.20268014671957246"},"_hasShrinkwrap":false},"1.0.1":{"name":"@ablaise/yamaha-eseq-converter","version":"1.0.1","description":"Yamaha E-Seq Converter is a ES6 JavaScript tool that helps to convert a midi file into the Yamaha's standard E-Seq format","license":"MIT","author":{"name":"Alexis Blaise","email":"blaise.alexis@gmail.com"},"keywords":["yamaha","eseq","smartpianist","piano","clavinova","midi"],"repository":{"type":"git","url":"git+https://github.com/ablaise/yamaha-eseq-converter.git"},"scripts":{"test":"jest"},"devDependencies":{"@babel/core":"^7.17.10","@babel/preset-env":"^7.17.10","babel-jest":"^28.1.0","jest":"^28.1.0"},"gitHead":"ccdf750ee162f1bda841eb0770dd4ac44a425d38","bugs":{"url":"https://github.com/ablaise/yamaha-eseq-converter/issues"},"homepage":"https://github.com/ablaise/yamaha-eseq-converter#readme","_id":"@ablaise/yamaha-eseq-converter@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-zXZnGcZgD8LyZGEBsv7iawoC4towiHWiBLJlqgACrvqI2VLOznlsx0vDpilZaYq0sIKepxc96sQWt0AT8Lcv7Q==","shasum":"459b893d23628dd562d121ce29fb8dd005608a23","tarball":"https://registry.npmjs.org/@ablaise/yamaha-eseq-converter/-/yamaha-eseq-converter-1.0.1.tgz","fileCount":23,"unpackedSize":470005,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv+9tE7ytivAhqgTWRV+Bli/omALp0mxRtMnb85sS8HwIgCAR6V3dmfGjM1w9E/aCl0ddGGKkAM1uCfGUkItM9CsU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigThUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGaxAAhaypIDx9udWKu863GwdUlix5u0616BqaNZbi9c36mwdPuuxE\r\nT5M11WV+N4iBGza4si1GIX3YbBjjsRqF3JyCRGeezb5RL3Iiqbd4LNTniRpn\r\nThpsVy8Lt1gxKdz9LKpvrBRDzaHqZzKZS9OIgdIwhq5huQ2vyeL+S3nYsXOv\r\nEfjRgwp66PgDPrm1J5sAUSI5VRwbgRp12Qn2or2zhQWtVKdQ2wuQILPY6CuB\r\nB5xhXDHOqLHQrcg6E3rxNwg5ExXdz/W6FWLH4ZUBHgdwemmOop6J7s1ivF8g\r\nhwlWZGQ/kDhbafXlUXxP7n2zvQoLkuTW7zqwHMqNSUwlrQfHbeMrt+9SWjNV\r\nXOlLkQd33KxMtte6FfM3aC4qjpLXwgl/3U3/qQCmKD/dYgukOtsaecRxwT4/\r\n5EvvH5lYoBLG8uGF79G++BHVO6us8O33L9rHP+XJ0zIoAHd7Vc+8nbOegb3/\r\nq175uKkRZtGODnaxLr9SIIHQDLJABXiPQ8+yCCMgBSTOqWk9C1iEb9Wuz+Cs\r\nW+2WHKrEOxjn+v/tYMevA94NwWMEMmksTsFAN8T7xC1oZHl6Za/E80uby/yg\r\nMInW8eqJ2RHtZ+kfZCV8Ou8Fo+bEqcUKVEwv0l4zT1VUEa1bOFbLU6VgFDEV\r\n+PrztjJ+b4pZcbgf12O0ayf0uetVA7kMqlU=\r\n=sbJE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ablaise","email":"blaise.alexis@gmail.com"},"directories":{},"maintainers":[{"name":"ablaise","email":"blaise.alexis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yamaha-eseq-converter_1.0.1_1652635731864_0.7570921850616739"},"_hasShrinkwrap":false},"1.0.2":{"name":"@ablaise/yamaha-eseq-converter","version":"1.0.2","description":"Yamaha E-Seq Converter is a ES6 JavaScript tool that helps to convert a midi file into the Yamaha's standard E-Seq format","license":"MIT","author":{"name":"Alexis Blaise","email":"blaise.alexis@gmail.com"},"keywords":["yamaha","eseq","smartpianist","piano","clavinova","midi"],"repository":{"type":"git","url":"git+https://github.com/ablaise/yamaha-eseq-converter.git"},"scripts":{"test":"jest"},"devDependencies":{"@babel/core":"^7.17.10","@babel/preset-env":"^7.17.10","babel-jest":"^28.1.0","jest":"^28.1.0"},"gitHead":"f8e2639168b0375f0a79b09f0a89834dda435fa7","bugs":{"url":"https://github.com/ablaise/yamaha-eseq-converter/issues"},"homepage":"https://github.com/ablaise/yamaha-eseq-converter#readme","_id":"@ablaise/yamaha-eseq-converter@1.0.2","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-zCiXCTLCpoz5HvHZ8/XCad37a0cs1oOKbP3vIGHIUW3d+gJoC4BGDsOWt8pXlzfv1LH/0f8aRDFLYLsO4yYX/Q==","shasum":"99ad05d2e144e497b5a932daf57423b23fa221f8","tarball":"https://registry.npmjs.org/@ablaise/yamaha-eseq-converter/-/yamaha-eseq-converter-1.0.2.tgz","fileCount":23,"unpackedSize":470788,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzByd3Zmiae0oM/0oiaHhFFMiSE6FZIJqW3IQphRa7XAiEAvVDPzxEpNXKEPnyqKnTw0SWmRQA0Xh5benKNm+9iQNU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigjgUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxEBAAoSHOKel8FpjnJzlKdSVWW6TRvejPnLuyr8rb+dPTmYoTSMnQ\r\ntKhRozNxbgeWJi57SEARybMJGqw5sHuv/9x5box5rPQQZPsS2ZAgsNg5r4YL\r\nkRr4ArTkEXLLer4UxPucqR66H2alGFaJpm0pFHT3qW5V/vLW3ojj5dbZ97CU\r\nXkPCY+0AT95gm4MP6CNn9HLnidIz2K6mb6W71lBXoymrUHyLnZ9YPXOhP/vL\r\n5OnISNsahOiEd23YqajDwrbNMeOf9fOGgiLn3vXu/WW7ciZQgFsGKmPFYZOF\r\nyo+xcdZhbMtZubq1QLDRdjcSfZpIwgoLryZOB4ipePmEgv+xYcMOs9g+7n8g\r\nD10wL+SP31D/sekytGCXalah2r4pau/z2RN5GG/ngnPBZ3beCW5euTSc9EDv\r\nHiBFu/Pji3Y2GCzN+avhBKE9zIO9K44r1oEkJ76H6eoH1W3MDLPrj0t25adO\r\nWMc2RqddR69QTNVGNN4WpZz38OxOmSh7SBgW00tfdBwAhlZSNDABfwThO0wv\r\nuh8L/0dH3R4PFS5gYiW5lTS/EzuxnBPnDLjaILGXSJSW4nXGDwtHCj8KVVpK\r\n3gi0Wim57CIzgFJfEUpPSFJPKS8prhZdU3Pie4BjzJUmlsbkGfI/3L497pwG\r\n8Pk1HA1S4cLAslJQioI+WFSkhVqoPOjFGtw=\r\n=UCod\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ablaise","email":"blaise.alexis@gmail.com"},"directories":{},"maintainers":[{"name":"ablaise","email":"blaise.alexis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yamaha-eseq-converter_1.0.2_1652701204418_0.20118970902263555"},"_hasShrinkwrap":false},"1.1.0":{"name":"@ablaise/yamaha-eseq-converter","version":"1.1.0","description":"Yamaha E-Seq Converter is a ES6 JavaScript tool that helps to convert a midi file into the Yamaha's standard E-Seq format","license":"MIT","author":{"name":"Alexis Blaise","email":"blaise.alexis@gmail.com"},"keywords":["yamaha","eseq","smartpianist","piano","clavinova","midi"],"repository":{"type":"git","url":"git+https://github.com/ablaise/yamaha-eseq-converter.git"},"scripts":{"test":"jest"},"devDependencies":{"@babel/core":"^7.17.10","@babel/preset-env":"^7.17.10","babel-jest":"^28.1.0","jest":"^28.1.0"},"gitHead":"8b9b699dc419c4c08f680d74178f3db52b532a0f","bugs":{"url":"https://github.com/ablaise/yamaha-eseq-converter/issues"},"homepage":"https://github.com/ablaise/yamaha-eseq-converter#readme","_id":"@ablaise/yamaha-eseq-converter@1.1.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-T3yH0YB7RWXbLabuJOOw2BoV4g3ie7aVY//Ok52VEdDk67O9gElgYnFWht4OvhRNliF5v+PKBJkLWgilso13nQ==","shasum":"7e82465e091e458361f27be3c00fd121a90a3eb3","tarball":"https://registry.npmjs.org/@ablaise/yamaha-eseq-converter/-/yamaha-eseq-converter-1.1.0.tgz","fileCount":50,"unpackedSize":479402,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF1RF62jt6o31026Yy/ikUm4KO94MODObQJtJtWEA2BzAiBla6rbD+jL68cBAvy3r9ik7F/JMdUD7oH5beHm6EXxSg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiimE1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHRw//WPKCA2he1jxHJMKOASgdS46cmyJ7xJ1MX/ItTVRLU5XsraWV\r\nDiYhP7qtdfah3WGd7Kter643+pd9dywAKvC2jZDV+0Wo7C4nj5te9uf7w1RV\r\nj0w4ulp2SDekDB4A+N88yrNIVITSlNkqpjaZLXLfj9uk+BWTKTSB+raExfF0\r\nWKYZYgMSWI5goLaqMlfyt9VrQAX+VJbkFFKtIWLKXjXknVNhIkJ43v8Gogpr\r\nFTNf0bP4g4m1GK5+QFe1/6+Ox8+ukqusplEoYK+n6paGT5nU53x4g+FhY4gI\r\n9EMYa+THId2WXfp1BIQ+a8xg/oaw1HExq5IaPdlFH60pN78FJ/JcfYlM12wl\r\n684d1rVOREPeDOBU9GYoor1ppy+s0DNi9u3UCpSiNx9MGvpqK2bUUlhOY974\r\nD8tA6psr6JPuIRC6VY5BfmHP3eJpH49MeS2oR4BD8aeGAKIp3nkTanw/9EIR\r\nTprn9jtQmnhU5icSkkczIO5MrT9nbZHXeEOm6w75iXO3lPGSDk1prTR2uDaM\r\nBgHbnDEvQniAyN8ATTYxzkd+NlSUjw6ZwU3wPz61gfFS7nEHbJZ1IlbxRwDX\r\nasmGDzjiQYtcTK3dhVVh5B3Mer+1bgRKdkU/gHyFpnOGObQEtKGLk/OkaahC\r\niIclcjR7Hm73m06/DVQx8FHPb7M10Agv+ZY=\r\n=lEog\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ablaise","email":"blaise.alexis@gmail.com"},"directories":{},"maintainers":[{"name":"ablaise","email":"blaise.alexis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yamaha-eseq-converter_1.1.0_1653236020764_0.104762618333476"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-12T16:40:12.113Z","1.0.0":"2022-05-12T16:40:12.389Z","modified":"2022-05-22T16:13:41.056Z","1.0.1":"2022-05-15T17:28:52.087Z","1.0.2":"2022-05-16T11:40:04.550Z","1.1.0":"2022-05-22T16:13:40.985Z"},"maintainers":[{"name":"ablaise","email":"blaise.alexis@gmail.com"}],"description":"Yamaha E-Seq Converter is a ES6 JavaScript tool that helps to convert a midi file into the Yamaha's standard E-Seq format","homepage":"https://github.com/ablaise/yamaha-eseq-converter#readme","keywords":["yamaha","eseq","smartpianist","piano","clavinova","midi"],"repository":{"type":"git","url":"git+https://github.com/ablaise/yamaha-eseq-converter.git"},"author":{"name":"Alexis Blaise","email":"blaise.alexis@gmail.com"},"bugs":{"url":"https://github.com/ablaise/yamaha-eseq-converter/issues"},"license":"MIT","readme":"# Yamaha E-Seq Converter\n\nYamaha E-Seq Converter is a ES6 JavaScript tool that helps to convert a midi file into the [Yamaha's standard E-Seq format](https://usa.yamaha.com/support/faq/pianos/1636.html).\n\n## Focus\n\nBecause most midi files only use one channel, the primary goal of this library is to correctly assign notes to the left and right hands. As a result, the features of software like [Smart Pianist](https://usa.yamaha.com/products/musical_instruments/pianos/apps/smart_pianist/index.html) can work properly.\n\n|                   Before                    |                   After                   |\n|:-------------------------------------------:|:-----------------------------------------:|\n| ![Before editing](./docs/images/before.jpg) | ![After editing](./docs/images/after.jpg) |\n\n## Getting started\n\nProvided midi files should not be in format `0` and should ideally have 2 tracks. If not, you will have to assign the tracks manually using the `Midi` class.\n\nIf a piano midi file has more than two tracks, the last two are usually the right and left hands.\n\n### Installation\n\n```\nnpm install @ablaise/yamaha-eseq-converter\n```\n\n### Events\n\nEvents are available and described on the table below.\n\n|     Name      |                  Description                  |\n|:-------------:|:---------------------------------------------:|\n| `EVENT_READY` |    Triggered when the midi file is loaded.    |\n|  `EVENT_ID`   | Triggered when a message event is being read. |\n\n### Convert a piano midi file\n\nHere is how you can use the library to convert your midi files. Change the code according to your needs.\n\n```javascript\nimport Midi from \"@ablaise/yamaha-eseq-converter/lib/Midi\";\nimport Utils from \"@ablaise/yamaha-eseq-converter/lib/Utils\";\n\nconst midi = new Midi({\n    autorun: true,\n    path: './path/to/file.mid',\n    //buffer: new ArrayBuffer(...) // or \"buffer\" option if you prefer to work with ArrayBuffer\n});\n\n/**\n * Here is how you can handle a two-tracks midi file for piano.\n */\nwindow.addEventListener(Midi.EVENT_ID, (event) => {\n    const data = event.data;\n    if (Utils.isChannelAssignable(data.id)) {\n        let track = 0\n        switch (data.index) {\n            case 0:\n                track = Midi.TRACKS.PIANO_LEFT_HAND;\n                break;\n            case 1:\n                track = Midi.TRACKS.PIANO_RIGHT_HAND;\n                break;\n            default:\n                console.warn('Unhandled channel.')\n                break;\n        }\n\n        // update the byte ID with the expected channel\n        data.dv.setUint8(data.offset, Utils.setChannel(data.id, track));\n    }\n});\n\n/**\n * Downloads the output midi file.\n */\nwindow.addEventListener(Midi.EVENT_READY, (event) => {\n    const data = event.data;\n    const header = data.context.getHeader();\n    if (0 === header.getType()) {\n        throw 'Invalid midi type.';\n    }\n\n    midi.download();\n});\n```\n\nYou can also use a callback instead of the `EVENT_READY` event.\n\n```javascript\nimport Midi from \"@ablaise/yamaha-eseq-converter/lib/Midi\";\nimport Utils from \"@ablaise/yamaha-eseq-converter/lib/Utils\";\n\nconst midi = new Midi({\n    autorun: true,\n    path: './path/to/file.mid',\n    //buffer: new ArrayBuffer(...) // or \"buffer\" option if you prefer to work with ArrayBuffer\n}, (data) => {\n    const context = data.context;\n    const header = context.getHeader();\n    if (0 === header.getType()) {\n        throw 'Invalid midi type.';\n    }\n\n    // ...\n});\n```\n\n## Running tests\n\nYamaha E-Seq Converter uses the [Jest Javascript testing framework](https://jestjs.io). You can run them using the following command.\n\n```\nnpm run test\n```\n\n## Final note\n\n:construction: This tool is still experimental and was created to solve a specific problem. The midi file parser is not a hundred percent complete and may be incorrect in some cases, use it with caution.\n\n### What's next?\n\n- A demo website for batch conversion\n- Improving the midi parser and fixes\n- More events are coming soon\n- More tests are coming soon\n\n### Useful resources\n\nHere are resources that helped me to understand the midi format.\n\n- https://moddingwiki.shikadi.net/wiki/MID_Format\n- http://midi.teragonaudio.com\n- http://www.ccarh.org/courses/253/handout/smf/\n- http://www.cs.uccs.edu/~cs525/midi/midi.html\n","readmeFilename":"README.md"}