maia-hash
v0.0.30
Published
Hashing and fingerprinting functions supporting various applications by Music Artificial Intelligence Algorithms, Inc.
Downloads
39
Readme
==============
Hashing and fingerprinting functions supporting various applications by Music Artificial Intelligence Algorithms, Inc.
Local Installation
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.
User
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
"dependencies": {
...
"maia-hash": "^a.b.c",
...
}
where "a.b.c" is the semantic version, and run
npm install
from command line to obtain it. Then they would be able to write
const mh = require("maia-hash")
let h = new mh.OntimePitchHasher()
where...
console.log("sthg")
Client-side use. Copy the file maia-hash.js to some directory where you need it, and add something like
<script src="./maia-hash.js"></script>
Developer
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:
- Additions or changes to the code should be made in the es6 folder;
- When documenting, follow the JSDoc format used therein;
- Write unit tests below each method/function;
- Edit es6 -> index.js so that any new classes are included in the compile;
- Update package.json -> version field;
- 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); - Do the usual
git add .
,git commit -m "Short meaningful message"
,git tag v0.0.??
,git push origin v0.0.9
, andgit push
, and we'll see it on the other side as a pull request; npm publish
- There should not be any need for you to edit the version in package.json;
- Please keep any data files out of the repository by editing the .gitignore file.
Hello-world examples
TBD
Tests
TBD
Contributing
TBD
Release History
- 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