{"id":18645162,"url":"https://github.com/danigb/scorejs","last_synced_at":"2025-10-06T01:43:37.856Z","repository":{"id":31138620,"uuid":"34698400","full_name":"danigb/scorejs","owner":"danigb","description":"Create musical scores with javascript","archived":false,"fork":false,"pushed_at":"2016-06-17T08:03:07.000Z","size":278,"stargazers_count":35,"open_issues_count":1,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-09T15:43:55.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danigb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-28T00:18:48.000Z","updated_at":"2023-05-08T13:30:08.000Z","dependencies_parsed_at":"2022-07-08T11:44:29.145Z","dependency_job_id":null,"html_url":"https://github.com/danigb/scorejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danigb/scorejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fscorejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fscorejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fscorejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fscorejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danigb","download_url":"https://codeload.github.com/danigb/scorejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fscorejs/sbom","scorecard":{"id":320690,"data":{"date":"2025-08-11","repo":{"name":"github.com/danigb/scorejs","commit":"fc95215d7efef72aeaa22cf375b7839091ba35ff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T01:17:19.564Z","repository_id":31138620,"created_at":"2025-08-18T01:17:19.564Z","updated_at":"2025-08-18T01:17:19.564Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547873,"owners_count":26004773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:14:54.178Z","updated_at":"2025-10-06T01:43:37.840Z","avatar_url":"https://github.com/danigb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScoreJS\n\n[![Build Status](https://travis-ci.org/danigb/scorejs.svg?branch=master)](https://travis-ci.org/danigb/scorejs)\n[![CodeClimate](https://codeclimate.com/github/danigb/scorejs/badges/gpa.svg)](https://codeclimate.com/github/danigb/scorejs)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\n__Work in progress__\n\nCreate and manipulate musical scores with javascript. The aim of this project\nis to provide a common interface and a high level toolkit that make easy\nbuild useful tools for musicians.\n\nThis library is oriented to composition, music learning, score analysis or algorithmic composition. Even you can play music with it, it's not a sequencer or DAW type software.\n\nThis code is largely based in two papers:\n\n- Lisp as a second language, composing programs and music: http://www.mcg.uva.nl/papers/lisp2nd/functional.pdf\n- Haskell School of Music: http://www.cs.yale.edu/homes/hudak/Papers/HSoM.pdf\n\n## Example\n\n```js\n// require the library\nvar score = require('scorejs')\n\n// create the score\nvar song = score(\n  ['melody', '4/4', 'c2 d2 e2 (f2 g2) | a2 b2 | c3'],\n  ['harmony', '4/4', 'Cmaj7 | Dm7 G7 | Cmaj7']\n)\n\n// play the score:\n// create an audio context\nvar ac = new AudioContext()\n// require the player module\nvar player = require('scorejs/ext/player')\nplayer.play(ac, player.synth, score.tempo(120, song))\n\n// show the score in a piano roll\n// given a canvas...\nvar ctx = canvas.getContext('2d')\n// require the pianoroll module\nvar pianoRoll = require('scorejs/ext/pianoroll')\npianoRoll.draw(ctx, song)\n```\n\n## Installation\n\nVia npm package: `npm i --save scorejs` and require it:\n`var score = require('scorejs')`\n\nFor browsers use the file in the `dist` folder:\n\n__Important:__\n\nIt uses `Object.assign` so if your environment doesn't have it you need a polyfill, for example: https://github.com/sindresorhus/object-assign\n\n## Usage\n\n`scorejs` models scores as collection of notes (objects with `duration` and `pitch` properties), that can be arranged sequentially o simultaneously:\n\n```js\n// a melody\nvar seq = score.seq(score.note(1, 'C'), score.note(1, 'D'), score.note(1, 'E'))\n// a chord\nvar chord = score.sim(score.note(3, 'C'), score.note(3, 'E'), score.note(3, 'G'))\n```\n\nThe `phrase` and `chord` functions are helpers to write the above more concisely:\n\n```js\nvar seq = score.phrase('C D E', 1)\nvar chord = score.chord('C E G', 3)\n```\n\nYou can combine elements freely:\n\n```js\n// the melody and the chord simultaneously\nvar song = score.sim(\n  score.phrase('C D E', 1),\n  score.chord('C E G', 3)\n)\n```\n\nFinally, you can use a valid JSON data to define scores:\n\n```js\nvar song = score(\n  ['phrase', 'C D E', 1],\n  ['chord', 'C E G', 3]\n)\n```\n\n## Play\n\nThere's a built-in scheduler and player based on Web Audio API.\n\n\n## Tests and examples\n\nClone this repo and install dependencies: `npm install`\n\nTests are executed with `npm test`\n\nExamples can be running with beefy: `npm -g install beefy` and then: `beefy examples/pianoroll-example`\n\n## License\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Fscorejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanigb%2Fscorejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Fscorejs/lists"}