Hashing and fingerprinting functions supporting various applications by Music Artificial Intelligence Algorithms, Inc.
npm install maia-hash==============
Hashing and fingerprinting functions supporting various applications by Music Artificial Intelligence Algorithms, Inc.
Set yourself up with an installation of Node.js. Then open up a terminal window and navigate to a directory where you want to experiment with MAIA Hash.
Server-side use/command-line use. See here for example usage. Apologies you have to scroll past the big Composition object to get to the interesting stuff at lines 462-476.
At the moment this package is not published on npm. If the package is published on npm, a user would add it to the package.json file of their own repo, under dependencies, something like this
``javascript`
"dependencies": {
...
"maia-hash": "^a.b.c",
...
}`
where "a.b.c" is the semantic version, and runbash`
npm install`
from command line to obtain it. Then they would be able to writejavascript`
const mh = require("maia-hash")
let h = new mh.OntimePitchHasher()`
where...javascript`
console.log("sthg")
Client-side use. Copy the file maia-hash.js to some directory where you need it, and add something like
`html`
With Node.js set up, clone the MAIA Hash repository from here and run npm install to acquire the dependencies. Some packages, such as Rollup, might need a general install.
Please follow these steps when making additions or changes:
1. Additions or changes to the code should be made in the es6 folder;
2. When documenting, follow the JSDoc format used therein;
3. Write unit tests below each method/function;
4. Edit es6 -> index.js so that any new classes are included in the compile;
5. Update package.json -> version field;
6. Execute npm run compile to convert the various components in the es6 into the corresponding components in the dist folder, and to combine them into an IIFE (called maia-hash.js, in the root of the repository);git add .
7. Do the usual , git commit -m "Short meaningful message", git tag v0.0.??, git push origin v0.0.9, and git push, and we'll see it on the other side as a pull request;npm publish`
8.
9. There should not be any need for you to edit the version in package.json;
10. Please keep any data files out of the repository by editing the .gitignore file.
TBD
TBD
TBD
* 0.0.25-? Calculating similarity with pre-computed hashes.
* 0.0.24 Fix rounding errors.
* 0.0.22-0.0.23 Add a new function match_query_lookup_piece() to build hashes for the input lookup piece and store the hashes in memory. Then, counting how many unique hashes in the query match that in the lookup table.
* 0.0.21 Split match_hash_entries() into three cases: "duples", "triples", and "tripleIdx".
* 0.0.19-0.0.20 Modifications for visualising triples of points that give rise to matching hashes.
* 0.0.8-18 Implemented a version without concatenation.
* 0.0.4-7 Renamed an outdated histogram operation to get_piece_names().
* 0.0.0-3 Initial release and bug fixes