{"_id":"@arghotuning/arghotun-js","_rev":"4-eb42f9d8da05b214cd547a9c5953acaa","name":"@arghotuning/arghotun-js","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@arghotuning/arghotun-js","version":"0.1.0","description":"JavaScript (TypeScript) Parsing & Serialization for ArghoTuning (*.arghotun.xml) Files","author":{"name":"Arghonoon Project Authors"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/arghotuning/arghotun-js.git"},"bugs":{"url":"https://github.com/arghotuning/arghotun-js/issues"},"homepage":"https://github.com/arghotuning/arghotun-js#readme","main":"out/lib/index.js","types":"out/lib/index.d.ts","scripts":{"check":"gts check","compile-test":"tsc","compile-lib":"tsc --project tsconfig.lib.json","fix":"gts fix","prepare":"npm.cmd run compile-lib","pretest":"npm.cmd run compile-test","posttest":"npm.cmd run check","test":"karma start"},"devDependencies":{"@types/jasmine":"^3.5.10","@types/node":"^14.0.1","gts":"^2.0.2","jasmine-ts":"^0.3.0","karma":"^5.0.5","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^3.1.1","karma-typescript":"^5.0.2","karma-typescript-es6-transform":"^5.0.2","typescript":"^3.9.2"},"engines":{"node":">=12"},"gitHead":"a9fcfaeaad5400bf25f613497e1b11fc7b31acae","_id":"@arghotuning/arghotun-js@0.1.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.5","dist":{"integrity":"sha512-lTNZHwehB+lXyFpBPObrB5MKrTEwUe7djfsiBJWKJmPxjrhg/4SDRNfRMKzHcOWxpzEZsT5rlgsS5lzfCFdgkQ==","shasum":"5dc8fdb402da608ffc9cd3edc4434aa1296723bc","tarball":"https://registry.npmjs.org/@arghotuning/arghotun-js/-/arghotun-js-0.1.0.tgz","fileCount":150,"unpackedSize":244260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewF5YCRA9TVsSAnZWagAA1McP/0lgQSxS8+TwwR0vJJwy\nUpT/AS3XVfOJldqGLdDCoODM4YK79R+gf0nlLyrXmqYbCKGt0pYFWK2h1WnO\nWwxW2GTowVGg5koDFyhtSWVQXQwp6ruTqH3kbxKFHqznWa3N7cnF6icKpcya\n3lcum4/4BagPGL3Jm+AE6YHUPkTPAjZf6e5NjHh6MpRf5v5nE8UiORCaZ4Bh\nMYOxyvfZEx71fIKDbmABa5k/1iY7spz4OUq7Bwg1M3/zMK+AcL6qWyTbQ9Z6\nucX4kqyogNL5jnCgL96V8IoPJu9CaUL2WKRp6LQSh8j75jDwivV6b2L7ZaVb\ncUzip8mQLb5nGaJ9XdZLQHTMh3C0U6dsMTQZF5J1j1FT7efJW0WGGqTe/0jZ\nC2Be23cx1HMOt+K1w6GBPy+TNqg8AkzNzH+YStN+dcNQ1jT28PQeSqeOebpN\njsp4AViQM2RO2tghOM7aKSLMjZosZOwuT+0r703fCwHbubwf83z4eJwdAOm9\n3fG1uP9DgrEBKY4YbiNwWEQU9fdQoG6ZcOZRd0iGP4L9G5NDozo2uJmLMTQm\nlOnOINw31psfLUjlnoU71CKX9YYsLG5BhVS/4ssrDFJU7LIZSKQEzgowZ8oy\n6YgjGcqjXvUciXBxAvMWctScFFqMlRe4Ocg7S9cIlrGqKBCszx20Rbsv0Mf+\nJWBD\r\n=SvKA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0pPLhIFNlgnNH3dz1IYIKfxVavCvjfOqtBD1iyTPrQwIhAMY5ipfpbljOaass85IZgjks+953qjfhUJXXSZIUh3x7"}]},"maintainers":[{"name":"lindurion","email":"eric@EricWBarndollar.com"}],"_npmUser":{"name":"lindurion","email":"eric@EricWBarndollar.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/arghotun-js_0.1.0_1589665367735_0.6611483237374838"},"_hasShrinkwrap":false,"deprecated":"Changing package name to @arghotuning/arghotun"},"0.1.1":{"name":"@arghotuning/arghotun-js","version":"0.1.1","description":"JavaScript (TypeScript) Parsing & Serialization for ArghoTuning (*.arghotun.xml) Files","author":{"name":"Arghonoon Project Authors"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/arghotuning/arghotun-js.git"},"bugs":{"url":"https://github.com/arghotuning/arghotun-js/issues"},"homepage":"https://github.com/arghotuning/arghotun-js#readme","main":"out/lib/index.js","types":"out/lib/index.d.ts","scripts":{"check":"gts check","compile-test":"tsc","compile-lib":"tsc --project tsconfig.lib.json","fix":"gts fix","prepare":"npm.cmd run compile-lib","pretest":"npm.cmd run compile-test","posttest":"npm.cmd run check","test":"karma start"},"devDependencies":{"@types/jasmine":"^3.5.10","@types/node":"^14.0.1","gts":"^2.0.2","jasmine-ts":"^0.3.0","karma":"^5.0.5","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^3.1.1","karma-typescript":"^5.0.2","karma-typescript-es6-transform":"^5.0.2","typescript":"^3.9.2"},"engines":{"node":">=12"},"gitHead":"6a9f1f9153a9422421e1e8f993bf44c25b374a16","_id":"@arghotuning/arghotun-js@0.1.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.5","dist":{"integrity":"sha512-dpaGPYxSynUJW+h3XgYiMJ3S1PsP/0/eWNAnyb1JTI/oEzI8ESL46SXNQxV4lbgxQ9hzU4IpGDR3tQpDXHtXEQ==","shasum":"308bfa842bf59949c61d0b52aa7d842d92e5d588","tarball":"https://registry.npmjs.org/@arghotuning/arghotun-js/-/arghotun-js-0.1.1.tgz","fileCount":150,"unpackedSize":244512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewGEiCRA9TVsSAnZWagAAxVUP/3JKkWfFLGDERi65y0QN\naZ/UQ5QqysRL4aXA/R1r1Ud8iUq97FyhlxdaLHfB4V9Z1lbxUKqifX+qKI0N\n67uczwMDMupJKQKb2v/0KFbYWh0iDJyqZ8w068bawfyTvIV4H0fDnIm/OGLK\n6Rca7Fy2iRz7FE9bc1ApUK010pc7vWr5SXkgJXru4OQVOkC4QhBVbR+WiXRc\nPNlwzgFgwFb7d/cZ9ZQ3ST9S/FqSjnuWkNvn3Oz0VqUIFoLGuikh0+TEjr+k\nAgahNhfsEzyvGM2QSdjmGBkN2MqvCotUzjgd2Qg/cFkIrvJsXekhRGBgG0lL\nal5R7sGlH6bJhGa/0QCDEfrgoYzKQoR9SjJEZU0wG8vA1vFkJ6wrfBbb7S/5\nMvbXfJZ+kUKnRhECaCm7uc9MW3M2ME4JlE272ImVEgy3zU/l3oSwVVllbjG+\nYaz5D2glJRAoU+j1XJhWZ7PiawPM7zotoIAaNQyIrEHPyeJ5/vck9bQSmyE5\nd/ybV7iAUs4fPkJBw3CUZNmOlqh/YzDUok1VYygJO7eEW85VvO7qMIECuICh\nRwQOarDwXtuiX8fGweOsXwnz34zOCr5Yq1ytseE6x2YxBcmv0bhFhjf4H5kw\nSND3brl716LoW7Zd12BI4VEQ4yXiUpsetau6xKhqLGLwASN+8ceMjEEBN+sk\n/MJ8\r\n=mSt2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTl3u48G6bbMF9yT7gnM6XlNid6M518Y3XDDh6L/7CgAiBE/VQSKxLGzAdL9qkwpBtNfUfUSJYbo804jse1XUpRsQ=="}]},"maintainers":[{"name":"lindurion","email":"eric@EricWBarndollar.com"}],"_npmUser":{"name":"lindurion","email":"eric@EricWBarndollar.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/arghotun-js_0.1.1_1589666081649_0.7601979950525712"},"_hasShrinkwrap":false,"deprecated":"Changing package name to @arghotuning/arghotun"},"0.1.2":{"name":"@arghotuning/arghotun-js","version":"0.1.2","description":"JavaScript (TypeScript) Parsing & Serialization for ArghoTuning (*.arghotun.xml) Files","author":{"name":"Arghonoon Project Authors"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/arghotuning/arghotun-js.git"},"bugs":{"url":"https://github.com/arghotuning/arghotun-js/issues"},"homepage":"https://github.com/arghotuning/arghotun-js#readme","main":"out/lib/index.js","types":"out/lib/index.d.ts","scripts":{"check":"gts check","compile-test":"tsc","compile-lib":"tsc --project tsconfig.lib.json","fix":"gts fix","prepare":"npm.cmd run compile-lib","pretest":"npm.cmd run compile-test","posttest":"npm.cmd run check","test":"karma start"},"dependencies":{"simple-tr8n":"^1.0.0"},"devDependencies":{"@types/jasmine":"^3.5.10","@types/node":"^14.0.1","gts":"^2.0.2","jasmine-ts":"^0.3.0","karma":"^5.0.5","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^3.1.1","karma-typescript":"^5.0.2","karma-typescript-es6-transform":"^5.0.2","typescript":"^3.9.2"},"engines":{"node":">=12"},"gitHead":"57178e0efcf0922d80952f446e8565507f2b2a72","_id":"@arghotuning/arghotun-js@0.1.2","_nodeVersion":"12.16.3","_npmVersion":"6.14.5","dist":{"integrity":"sha512-8TuZqzXbfiOunx79/nnesjfXNR7JsBB57KXgvspP5kWFda6HD02MJgKjWgRM5GJPH7y8i+1zKUSURYDqaBYekA==","shasum":"551a4e05705bd9222569643ba3c71febb00b550a","tarball":"https://registry.npmjs.org/@arghotuning/arghotun-js/-/arghotun-js-0.1.2.tgz","fileCount":150,"unpackedSize":243737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewKarCRA9TVsSAnZWagAAMIIP/1GZtkZbSZrFnebMVDUM\ng91N+rJTYyJLvIJ0z5dRWPa5PH4QpmB4LPhjujDVribAsgvQXzP6IBUilPcx\ngfWjqA6SWDnn1DV+/DZF9XQYq+cJ7HYkmY9JgWvyDKKRKB8EXZ84NJADtPc5\nPwmkHK9rcJpR3ZqlvDrID+nSP/Pqw1isiHUFagBvY9bDK5mYiYLZyzovo5eL\neI0QJYh4bO3oFkUCi/wSF52VTnOMdJY+psIEOJuoMuRZrIAZT4vnmOyC8Pc6\nYLpoMGs9T/vca4PVTsTBfbrrh3QjskPj6k6PCm7fssMc/H1xvkhWQ35yiLUe\ngTWL5mIDqrVuMcW3Inv8/eylvqcnoQy0oFk5f6A1EDBAw2zkjsY28ECvWyd0\nqMaCuT2/XKjSXUwFHmXnEg5sJi4D481mZxKB4qDyBWjDOzXTSi8fBAutqvPy\nCdGo+yp4Wqe21aEmf8gVN1czIS0EiCetQI890o6PulGL6AM58p5SfO7Oi2Qv\nnnyiN8l+nqtBACXLLEwnMEHk249ET5LLwFNix9+t5lhfqbJEeYck8fpQHwrJ\nVsssznCcD/Ab/6mFA7nZxx+0U2zap+NUzx7R8hda0ByT4rRI1cWLfe50Va6r\nuYeTWbKjLY5OlChmOuzAa3JFnUUMy2YD9MZQrgV5af2I0+AFUxb2NwJCsCcl\nF8Ae\r\n=uLn2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMZSEZCuR5/iOfLQJUY2TWfuDduNKg7geZbUfL1EodbgIgFS2mSHg1ezDFGJuBXDj7aN3q34IXS1/qWH3+PPQI8wg="}]},"maintainers":[{"name":"lindurion","email":"eric@EricWBarndollar.com"}],"_npmUser":{"name":"lindurion","email":"eric@EricWBarndollar.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/arghotun-js_0.1.2_1589683882935_0.2435703207565878"},"_hasShrinkwrap":false,"deprecated":"Changing package name to @arghotuning/arghotun"}},"time":{"created":"2020-05-16T21:42:47.488Z","0.1.0":"2020-05-16T21:42:47.887Z","modified":"2022-04-04T15:24:24.598Z","0.1.1":"2020-05-16T21:54:41.787Z","0.1.2":"2020-05-17T02:51:23.159Z"},"maintainers":[{"name":"lindurion","email":"eric@EricWBarndollar.com"}],"description":"JavaScript (TypeScript) Parsing & Serialization for ArghoTuning (*.arghotun.xml) Files","homepage":"https://github.com/arghotuning/arghotun-js#readme","repository":{"type":"git","url":"git+https://github.com/arghotuning/arghotun-js.git"},"author":{"name":"Arghonoon Project Authors"},"bugs":{"url":"https://github.com/arghotuning/arghotun-js/issues"},"license":"Apache-2.0","readme":"# arghotun-js\n\n**IMPORTANT**: This is a pre-release version of an upcoming open source library\nfor working with musical tuning systems. It is NOT yet ready for external usage,\nand many of the linked websites and projects are not yet publicly available.\n\nThis is the canonical JavaScript (TypeScript) implementation for parsing &amp;\nserializing **ArghoTuning** files (`*.arghotun.xml`). See the\n[Argho Tuning](https://arghotuning.org) website or\n[official spec](https://github.com/arghotuning/arghotun-spec) for more background.\n\nIt is published as the\n[**@arghotuning/arghotun-js** NPM package](https://www.npmjs.com/package/@arghotuning/arghotun-js)\nincluding TypeScript type definition files, so it can be used by both TypeScript\nand plain JavaScript projects.\n\nThis library is designed only for use within a web browser; it does NOT\ncurrently support [Node.js](https://nodejs.org) server/tool environments.\n\n## Usage\n\nAdd this dependency to your project, using your package manager. With\n[NPM](https://www.npmjs.com/):\n\n```bash\nnpm install @arghotuning/arghotun-js\n```\n\nTo parse an **ArghoTuning** file from a string:\n\n```javascript\nimport {\n  ArghoTuningContext,\n  ArghoTuningParser,\n  defaultArghotunTranslations,\n} from 'arghotun-js';\n\nconst arghoContext = new ArghoTuningContext({\n  translator: defaultArghotunTranslations(),\n});\nconst parser = new ArghoTuningParser(arghoContext);\n\ntry {\n  const parseResult = parser.parseXmlString(inputXmlString);\n  if (parseResult.warnings.length >= 1) {\n    // Some file content wasn't understood. Display warnings[] to user that\n    // this tuning may not have been interpreted fully.\n  }\n  const tuning = parseResult.tuning;\n} catch (err) {\n  // Input file was invalid; show err.message to user...\n}\n```\n\nTo output a human-readable **ArghoTuning** file to a string:\n\n```javascript\nimport { ArghoTuningXmlSerializer } from 'arghotun-js';\n\nconst serializer = new ArghoTuningSerializer(arghoContext);\nconst outputXmlString = serializer.serializeToString(tuning);\n```\n\n## ArghoTuning Object Format\n\nThe provided types and methods correspond fairly closely to the elements and\nattributes of the XML format.\n\n### `ArghoTuning`\n\nInitialize a new default N-tone equal temperament tuning, with root pitch of\nmiddle C (MIDI note 60), a master tune of A<sub>4</sub> = 440.0 Hz, and a 1:1\nkey mapping:\n\n```javascript\nconst quarterToneTuning =\n    ArghoTuning.defaultNTET(arghoContext, 'My 24-TET Tuning', 24);\nconst defaultTuning =\n    ArghoTuning.default12TET(arghoContext, 'My 12-TET Tuning');\n```\n\nAccess or update tuning-level metadata:\n\n```javascript\nconst name = tuning.getName();\ntuning.setName('Updated Tuning Name');\n\nconst description = tuning.getDescription();  // Empty string ('') if none.\ntuning.setDescription('Description of the tuning');\n\nconst accidentalPref = tuning.getDisplayAccidentalsAs();\nif (accidentalPref === AccidentalDisplayPref.SHARPS) {\n  // Display any pitch names that require accidentals using sharps...\n} else {\n  // Display any pitch names that require accidentals using flats...\n}\ntuning.setDisplayAccidentalsAs(AccidentalDisplayPref.FLATS);\n```\n\nGet the `ArghoScale` and `ArghoKeyMapping` (both are mutable):\n\n```javascript\nconst scale = tuning.getScale();\nconst mapping = tuning.getMapping();\n```\n\nChange the # of scale degrees or reset the scale and mapping. Note that *add*\nand *remove* are two separately named operations to emphasize their very\ndifferent semantics:\n\n```javascript\n// Add 3 additional degrees; each defaults to a 1:1 ratio (unison) measured from\n// the root, without affecting any existing scale degrees. Newly added degrees\n// are NOT mapped.\nscale.addDegreesToEnd(3);\n\n// Remove the last (by scale degree index) 3 degrees from the end of the scale.\n// Any remaining scale degrees that were measured from the removed degrees will\n// be updated to \"skip over\" the removed degrees, while preserving their\n// existing tunings. Any input keys that were mapping to removed scale degrees\n// are set to unmapped, leaving keySpan unchanged.\nscale.removeDegreesFromEnd(3);\n\n// Reset scale and mapping back to a 24-tone equal temperament scale and 1:1 key\n// mapping, keeping the currently configured scale root and mapping root MIDI\n// pitch. Also does not change other existing metadata (e.g. name, description).\nscale.resetToDefaultNTET(24);\n```\n\n### `ArghoScale`\n\nAccess metadata (note that changing the # of degrees must be performed on the\nparent `ArghoTuning` object):\n\n```javascript\nconst numDegrees = scale.getNumDegrees();\nconst octavesSpanned = scale.getOctavesSpanned();  // See spec for details.\n```\n\nAccess or update the (sounding) scale root:\n\n```javascript\nconst root = scale.getRoot();  // Immutable.\nscale.setRoot(updatedRoot);  // Replaces old value.\n```\n\nAccess or update an upper scale degree tuning or how it is measured. Remember\nthat indexes are 0-based (but should be displayed to the user as 1-based).\nChanging `measureFromIndex` preserves the sounding tuning:\n\n```javascript\nconst deg3 = scale.getUpperDegree(2);  // Immutable.\nconst index = deg3.scaleDegreeIndex;  // 2.\nconst measureFromIndex = deg3.measureFromIndex;\nconst interval = deg3.tunedInterval;\n\nscale.setUpperDegreeTuning(2, updatedTunedInterval);  // Replaces old value.\nscale.setMeasureFromIndex(2, 5);  // Measure 3rd scale degree from 6th degree.\n```\n\nMeasure the interval between any two scale degrees (either can also be `0` for\nthe root):\n\n```javascript\nconst intervalFromDeg3ToRoot = scale.getIntervalFromSourceToDest(2, 0);\n```\n\n#### `TunedInterval`\n\nImmutable value that measures an interval from a source pitch to a destination\npitch, specified either in cents or as a frequency ratio. A negative cents value\nor a ratio less than 1 represents a downward interval.\n\nCreate a new immutable interval value:\n\n```javascript\nconst up123Dot45Cents = TunedInterval.fromCents(arghoContext, 123.45);\nconst downPure5th = TunedInterval.fromRatio(arghoContext, 2, 3);\n```\n\nAccess cents or frequency ratio tuning:\n\n```javascript\nif (interval.getSpecType() === TunedIntervalSpecType.CENTS) {\n  // User specified interval in cents...\n} else {\n  // User specified interval as a frequency ratio...\n}\n\n// Regardless of how it was specified, all of these accessors will always\n// yield values:\nconst cents = interval.getCents();\nconst numerator = interval.getRatioNumerator();\nconst denominator = interval.getDenominator();  // Defaults to 1.\n```\n\nInvert or add intervals:\n\n```javascript\nconst upPure5th = downPure5th.inverse();  // Returns new immutable value.\nconst upPure9th = upPure5th.plus(upPure5th);  // (Ditto).\n```\n\n#### `RootScaleDegree`\n\nCreate default sounding root pitch (12-TET middle C, with master tune\nA<sub>4</sub> = 440.0 Hz):\n\n```javascript\nconst defaultMiddleCRoot = RootScaleDegree.default(arghoContext);\n```\n\nCreate custom souding root pitch, specified either by exact sounding frequency\nor relative to the closest 12-tone equal temperament tuned pitch. In either\ncase, frequencies are still considered relative to the given master tuning (so\nif the master tuning is later changed, this sounding root pitch should be\nadjusted by the same amount):\n\n```javascript\nconst tuningA4Hz = 442.0;\nconst root234Dot5Hz = RootScaleDegree.exact(arghoContext, tuningA4Hz, 234.5);\nconst root12Dot3CentsBelowMiddleC =\n    RootScaleDegree.relative(arghoContext, tuningA4Hz, 60, -12.3);\n```\n\nAccess values (all immutable):\n\n```javascript\nconst masterTuneA4Hz = root.getMasterTuneA4Hz();\nif (root.getSpecType() === RootScaleDegreeSpecType.EXACT_FREQ) {\n  // User specified root as an exact sounding frequency in Hz...\n} else {\n  // User specified root as a cents +/- offset relative to a 12-TET pitch...\n}\n\n// Regardless of how it was specified, all of these accessors will always\n// yield values:\nconst rootFreqHz = root.getFreqHz();\nconst nearestMidiPitch = root.getNearestMidiPitch();\nconst centsFromNearestMidiPitch = root.getCentsFrom12TET();\n```\n\n### `ArghoKeyMapping`\n\nAccess or update the # of keys in the mapping:\n\n```javascript\nconst keySpan = mapping.getKeySpan();\nmapping.setKeySpan(24);  // Any new keys start out unmapped.\n```\n\nAccess or update mapped root MIDI pitch (which will sound the configured scale's\nroot degree).\n\n```javascript\nconst mappingRootMidiPitch = mapping.getRootMidiPitch();\nmapping.setRootMidiPitch(62);  // Set to D above middle C. Doesn't affect scale.\n```\n\nAccess or update mapped scale degrees:\n\n```javascript\nconst mappedDegreeIndex = mapping.getMappedScaleDegreeIndexOrNull(5);\nif (mappedDegreeIndex == null) {\n  // Key isn't mapped to anything (don't produce any sound)...\n} else {\n  // Mapped to a scale degree...\n}\n\n// When 6th key is played, play 3rd scale degree.\nmapping.setMappedScaleDegreeIndex(5, 2);\n\n// When 4th key is played, play the scale root.\nmapping.setMappedScaleDegreeIndex(3, 0);\n\n// When 3rd key is played, don't play any scale degree (unmap).\nmapping.setMappedScaleDegree(2, null);\n```\n\n## Translations and Internationalization (i18n)\n\nSince the main user-visible strings this library produces are warnings and error\nmessages, it is up to each client application project whether these need to be\ntranslated into languages other than English or not.\n\nCurrently, only English translations are included, but the library is set up to\nallow for simple translations to be provided for other locales.\n\nSince client application projects likely will use different i18n frameworks,\nthis library does not choose a specific framework to adopt; instead, it uses\nthe lightweight interface from the\n[simple-tr8n-js library](https://github.com/Lindurion/simple-tr8n-js), which\ncan be used directly or easily adapted to work with any existing i18n\nframework.\n\nSee [default-translations.ts](src/default-translations.ts) for the default\nEnglish strings.\n\n## License\n\nAll software released by the Arghonoon Project is available for use free of\ncharge by open source and commercial projects alike, as per the\n[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/).\n\nRECOMMENDED: Please also contribute any fixes or improvements you make back to\nthese official projects, thanks!\n\n## Related Projects\n\nCanonical implementations are available in many programming languages (including\nTypeScript/JavaScript, C++, Lua/KSP) for parsing &amp; serialization, applying\nthese tunings once loaded (`Argho Engine` projects), common UI components, and\nmore. See the **list of official projects**.\n\n**TODO**: Update link once it exists.\n","readmeFilename":"README.md"}