{"id":13768032,"url":"https://github.com/dingram/jsmidgen","last_synced_at":"2026-02-19T07:33:11.533Z","repository":{"id":3113759,"uuid":"4140345","full_name":"dingram/jsmidgen","owner":"dingram","description":"A pure-JavaScript MIDI generator","archived":false,"fork":false,"pushed_at":"2025-11-16T11:48:25.000Z","size":95,"stargazers_count":234,"open_issues_count":22,"forks_count":34,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-01-12T18:53:35.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dingram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-25T19:12:22.000Z","updated_at":"2025-11-16T11:48:29.000Z","dependencies_parsed_at":"2022-08-29T16:40:17.606Z","dependency_job_id":null,"html_url":"https://github.com/dingram/jsmidgen","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dingram/jsmidgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingram%2Fjsmidgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingram%2Fjsmidgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingram%2Fjsmidgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingram%2Fjsmidgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dingram","download_url":"https://codeload.github.com/dingram/jsmidgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dingram%2Fjsmidgen/sbom","scorecard":{"id":343710,"data":{"date":"2025-08-11","repo":{"name":"github.com/dingram/jsmidgen","commit":"97c1270a4af6350d1bf278571a273a4a5fac617c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/16 approved changesets -- score normalized to 3","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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T06:35:37.536Z","repository_id":3113759,"created_at":"2025-08-18T06:35:37.536Z","updated_at":"2025-08-18T06:35:37.536Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29606927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-08-03T16:01:15.689Z","updated_at":"2026-02-19T07:33:11.517Z","avatar_url":"https://github.com/dingram.png","language":"JavaScript","funding_links":[],"categories":["Libraries: Web MIDI API","Open Source Libraries"],"sub_categories":["Web MIDI API"],"readme":"# jsmidgen, a pure-JavaScript MIDI file library\n\n## Introduction\n\njsmidgen (pronounced jay-smidgen or jer-smidgen) is a library that can be used\nto generate MIDI files in JavaScript. It currently provides output as a string,\nbut there are plans to provide multiple output formats, including base64 and\ndata URI.\n\n## Example Usage\n\nThe MIDI file structure is made up of one or more tracks, which contain one or\nmore events. These events can be note on/off events, instrument changes, tempo\nchanges, or more exotic things. A basic example is shown below:\n\n    var fs = require('fs');\n    var Midi = require('jsmidgen');\n\n    var file = new Midi.File();\n    var track = new Midi.Track();\n    file.addTrack(track);\n\n    track.addNote(0, 'c4', 64);\n    track.addNote(0, 'd4', 64);\n    track.addNote(0, 'e4', 64);\n    track.addNote(0, 'f4', 64);\n    track.addNote(0, 'g4', 64);\n    track.addNote(0, 'a4', 64);\n    track.addNote(0, 'b4', 64);\n    track.addNote(0, 'c5', 64);\n\n    fs.writeFileSync('test.mid', file.toBytes(), 'binary');\n\nThis example will create a MIDI file that will play an ascending C major scale,\nstarting at middle C.\n\n## Fluid API\n\nThis library also has rudimentary support for a fluid (chained) style:\n\n    file = new Midi.File();\n    file\n      .addTrack()\n\n        .note(0, 'c4', 32)\n        .note(0, 'd4', 32)\n        .note(0, 'e4', 32)\n        .note(0, 'f4', 32)\n        .note(0, 'g4', 32)\n        .note(0, 'a4', 32)\n        .note(0, 'b4', 32)\n        .note(0, 'c5', 32)\n\n        // church organ\n        .instrument(0, 0x13)\n\n        // by skipping the third arguments, we create a chord (C major)\n        .noteOn(0, 'c4', 64)\n        .noteOn(0, 'e4')\n        .noteOn(0, 'g4')\n\n        // by skipping the third arguments again, we stop all notes at once\n        .noteOff(0, 'c4', 47)\n        .noteOff(0, 'e4')\n        .noteOff(0, 'g4')\n\n        //alternatively, a chord may be created with the addChord function\n        .addChord(0, ['c4', 'e4', 'g4'], 64)\n\n        .noteOn(0, 'c4', 1)\n        .noteOn(0, 'e4')\n        .noteOn(0, 'g4')\n        .noteOff(0, 'c4', 384)\n        .noteOff(0, 'e4')\n        .noteOff(0, 'g4')\n        ;\n\n    fs.writeFileSync('test2.mid', file.toBytes(), 'binary');\n\nNote the use of `setInstrument()` to change to a church organ midway through,\nand the use of `addNoteOn()`/`addNoteOff()` to produce chords.\n\n## Reference\n\n### Midi.File\n\n - `addTrack()` - Add a new Track object to the file and return the new track\n - `addTrack(track)` - Add the given Track object to the file and return the file\n\n### Midi.Track\n\nTime and duration are specified in \"ticks\", and there is a hardcoded\nvalue of 128 ticks per beat. This means that a quarter note has a duration of 128.\n\nPitch can be specified by note name with octave (`a#4`) or by note number (`60`).\nMiddle C is represented as `c4` or `60`.\n\n - `addNote(channel, pitch, duration[, time[, velocity]])`\n\n   **Add a new note with the given channel, pitch, and duration**\n   - If `time` is given, delay that many ticks before starting the note\n   - If `velocity` is given, strike the note with that velocity\n - `addNoteOn(channel, pitch[, time[, velocity]])`\n\n   **Start a new note with the given channel and pitch**\n   - If `time` is given, delay that many ticks before starting the note\n   - If `velocity` is given, strike the note with that velocity\n - `addNoteOff(channel, pitch[, time[, velocity]])`\n\n   **End a note with the given channel and pitch**\n   - If `time` is given, delay that many ticks before ending the note\n   - If `velocity` is given, strike the note with that velocity\n - `addChord(channel, chord[, velocity])`\n\n   **Add a chord with the given channel and pitches**\n   - Accepts an array of pitches to play as a chord\n   - If `velocity` is given, strike the chord with that velocity\n - `setInstrument(channel, instrument[, time])`\n\n   **Change the given channel to the given instrument**\n   - If `time` is given, delay that many ticks before making the change\n - `setTempo(bpm[, time])`\n\n   **Set the tempo to `bpm` beats per minute**\n   - If `time` is given, delay that many ticks before making the change\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdingram%2Fjsmidgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdingram%2Fjsmidgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdingram%2Fjsmidgen/lists"}