{"id":20796398,"url":"https://github.com/jazz-soft/jzz-gui-select","last_synced_at":"2025-05-06T07:53:42.110Z","repository":{"id":57287838,"uuid":"304790493","full_name":"jazz-soft/JZZ-gui-Select","owner":"jazz-soft","description":"MIDI Input/Output pickers","archived":false,"fork":false,"pushed_at":"2025-02-22T02:11:27.000Z","size":38,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T01:02:37.902Z","etag":null,"topics":["gui","midi","select"],"latest_commit_sha":null,"homepage":"https://jazz-soft.net/","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/jazz-soft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jazz-soft","custom":"https://paypal.me/jazzsoft"}},"created_at":"2020-10-17T03:40:20.000Z","updated_at":"2025-02-22T02:11:30.000Z","dependencies_parsed_at":"2024-06-13T06:25:07.961Z","dependency_job_id":"ae6afbad-f261-4e90-826a-de5644073aad","html_url":"https://github.com/jazz-soft/JZZ-gui-Select","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"3574711207eb1b708397b6c9aa1f53cdc8f024cc"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazz-soft%2FJZZ-gui-Select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazz-soft%2FJZZ-gui-Select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazz-soft%2FJZZ-gui-Select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazz-soft%2FJZZ-gui-Select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jazz-soft","download_url":"https://codeload.github.com/jazz-soft/JZZ-gui-Select/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252643487,"owners_count":21781520,"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","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":["gui","midi","select"],"created_at":"2024-11-17T16:27:04.597Z","updated_at":"2025-05-06T07:53:42.061Z","avatar_url":"https://github.com/jazz-soft.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jazz-soft","https://paypal.me/jazzsoft"],"categories":[],"sub_categories":[],"readme":"# JZZ-gui-Select\n\nMIDI Input/Output pickers for HTML projects\n\n![Firefox](https://jazz-soft.github.io/img/firefox.jpg)\n![Chrome](https://jazz-soft.github.io/img/chrome.jpg)\n![Opera](https://jazz-soft.github.io/img/opera.jpg)\n![Safari](https://jazz-soft.github.io/img/safari.jpg)\n![Internet Explorer](https://jazz-soft.github.io/img/msie.jpg)\n![Edge](https://jazz-soft.github.io/img/edgc.jpg)  \n[![npm](https://img.shields.io/npm/v/jzz-gui-select.svg)](https://www.npmjs.com/package/jzz-gui-select)\n[![npm](https://img.shields.io/npm/dt/jzz-gui-select.svg)](https://www.npmjs.com/package/jzz-gui-select)\n[![build](https://github.com/jazz-soft/JZZ-gui-Select/actions/workflows/build.yml/badge.svg)](https://github.com/jazz-soft/JZZ-gui-Select/actions)\n[![Coverage Status](https://coveralls.io/repos/github/jazz-soft/JZZ-gui-Select/badge.svg?branch=main)](https://coveralls.io/github/jazz-soft/JZZ-gui-Select?branch=main)\n\n[![MIDI pickers](https://raw.githubusercontent.com/jazz-soft/JZZ-gui-Select/main/media/jzz-gui-select.png)](https://jazz-soft.github.io/modules/select/index.html)  \nSee the [**demo**](https://jazz-soft.github.io/modules/select/index.html)...\n\n## Install\n\n`npm install jzz-gui-select --save`  \nor `yarn add jzz-gui-select`  \nor get the full development version and minified scripts from [**GitHub**](https://github.com/jazz-soft/JZZ-gui-Select)\n\n## Usage\n\n##### Plain HTML\n\n```html\n\u003cscript src=\"JZZ.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"JZZ.gui.Select.js\"\u003e\u003c/script\u003e\n//...\n```\n\n##### CDN (jsdelivr)\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/jzz\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/jzz-gui-select\"\u003e\u003c/script\u003e\n//...\n```\n\n##### CDN (unpkg)\n\n```html\n\u003cscript src=\"https://unpkg.com/jzz\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/jzz-gui-select\"\u003e\u003c/script\u003e\n//...\n```\n\n##### CommonJS\n\n```js\nvar JZZ = require('jzz');\nrequire('jzz-gui-select')(JZZ);\n//...\n```\n\n##### AMD\n\n```js\nrequire(['JZZ', 'JZZ.gui.Select'], function(JZZ, select) {\n  // ...\n});\n```\n\n## Example\n\n```html\n\u003cselect id=select_midi_in\u003e\u003c/select\u003e\n\u003cselect id=select_midi_out\u003e\u003c/select\u003e\n\n\u003cscript\u003e\nvar midi_in = JZZ.gui.SelectMidiIn({ at: 'select_midi_in' });\nvar midi_out = JZZ.gui.SelectMidiOut({ at: 'select_midi_out' });\n// direct MIDI stream from midi_in to midi_out:\nmidi_in.connect(midi_out);\n\u003c/script\u003e\n```\n\n## API\n\nAll calls are identical for both Input/Output pickers\nexcept of the `In`/`Out` name suffixes where appropriate.\n\n##### constructor\n`JZZ.gui.SelectMidiIn(options)`  \n`JZZ.gui.SelectMidiOut(options)`\n\nCan be used with or without the `new` keyword.  \n`options` is the obect with the following properties:\n- `at:` (required) HTML DOM \u0026lt;SELECT\u0026gt; object to be associated with the picker.  \nEither a DOM obect or its string ID.\n- `none:` text string for the \"no port opened\" option.  \nDefault: `'=== NONE ==='`\n\n##### select\n`midi_in.select(arg)`  \n`midi_out.select(arg)`\n\nProgrammatically select MIDI port.  \n`arg` is an option name or any other argument accepted\nby `JZZ().openMidiIn(arg)` or `JZZ().openMidiOut(arg)`.  \n*e.g.:*  \n```js\n// select the \"no port\" option and close the current port if it was open:\nmidi_in.select('=== NONE ===');\nmidi_out.select(); // open the default MIDI-Out port.\n```\n\n##### standard calls\nMIDI Input/Output pickers are regular JZZ MIDI nodes,\nand therefore, can be used with all [standard calls](https://jazz-soft.net/doc/JZZ/reference.html).  \n*e.g.:*  \n```js\nmidi_in.connect(function(msg) { console.log('MIDI received: ' + msg); });\nmidi_out.noteOn(0, 'C#5', 127).wait(500).noteOff(0, 'C#5');\n// etc...\n```\n\n##### user hooks\n`midi_in.onSelect(name)`  \n`midi_out.onSelect(name)`\n\nCalled when the MIDI port is successfully selected; `name` is the port name.  \n*e.g.:*\n```js\nmidi_in.onSelect = function(name) {\n  console.log('MIDI-In selected:', name);\n};\nmidi_out.onSelect = function() {\n  this.noteOn(0, 'C#5', 127).wait(500).noteOff(0, 'C#5');\n};\n```\n\n## More information\n\nPlease visit [**https://jazz-soft.net**](https://jazz-soft.net) for more information.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazz-soft%2Fjzz-gui-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjazz-soft%2Fjzz-gui-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazz-soft%2Fjzz-gui-select/lists"}