
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
github.com/jazz-soft/jzz-gui-select
MIDI Input/Output pickers for HTML projects
See the demo...
npm install jzz-gui-select --save
or yarn add jzz-gui-select
or get the full development version and minified scripts from GitHub
<script src="JZZ.js"></script>
<script src="JZZ.gui.Select.js"></script>
//...
<script src="https://cdn.jsdelivr.net/npm/jzz"></script>
<script src="https://cdn.jsdelivr.net/npm/jzz-gui-select"></script>
//...
<script src="https://unpkg.com/jzz"></script>
<script src="https://unpkg.com/jzz-gui-select"></script>
//...
var JZZ = require('jzz');
require('jzz-gui-select')(JZZ);
//...
require(['JZZ', 'JZZ.gui.Select'], function(JZZ, select) {
// ...
});
<select id=select_midi_in></select>
<select id=select_midi_out></select>
<script>
var midi_in = JZZ.gui.SelectMidiIn({ at: 'select_midi_in' });
var midi_out = JZZ.gui.SelectMidiOut({ at: 'select_midi_out' });
// direct MIDI stream from midi_in to midi_out:
midi_in.connect(midi_out);
</script>
All calls are identical for both Input/Output pickers
except of the In
/Out
name suffixes where appropriate.
JZZ.gui.SelectMidiIn(options)
JZZ.gui.SelectMidiOut(options)
Can be used with or without the new
keyword.
options
is the obect with the following properties:
at:
(required) HTML DOM <SELECT> object to be associated with the picker.none:
text string for the "no port opened" option.'=== NONE ==='
midi_in.select(arg)
midi_out.select(arg)
Programmatically select MIDI port.
arg
is an option name or any other argument accepted
by JZZ().openMidiIn(arg)
or JZZ().openMidiOut(arg)
.
e.g.:
// select the "no port" option and close the current port if it was open:
midi_in.select('=== NONE ===');
midi_out.select(); // open the default MIDI-Out port.
MIDI Input/Output pickers are regular JZZ MIDI nodes,
and therefore, can be used with all standard calls.
e.g.:
midi_in.connect(function(msg) { console.log('MIDI received: ' + msg); });
midi_out.noteOn(0, 'C#5', 127).wait(500).noteOff(0, 'C#5');
// etc...
midi_in.onSelect(name)
midi_out.onSelect(name)
Called when the MIDI port is successfully selected; name
is the port name.
e.g.:
midi_in.onSelect = function(name) {
console.log('MIDI-In selected:', name);
};
midi_out.onSelect = function() {
this.noteOn(0, 'C#5', 127).wait(500).noteOff(0, 'C#5');
};
Please visit https://jazz-soft.net for more information.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.