
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
prestissimo
Advanced tools
Making MIDI interfacing with NodeJS even easier. Quick, quicker... prestissimo!
Depends on node-midi - excellent for the low-level interface, but not particularly easy to use. Also inspired by easymidi which works well but lacks TypeScript support and some other conveniences.
This module currently only supports input/output for the following types of MIDI messages:
It does not (yet) support
npm install prestissimo
Import into Node Javascript:
const { findInput, findOutput } = require('prestissimo');
Or in your Typescript application:
import { findInput, findOutput } from 'prestissimo'
Either way, if you're using an editor that understands Typescript definitions (e.g. VS Code), you will get handy hints for function parameters and return types. Nice!
Connect a keyboard, controller, pedal or some other MIDI device and identify it either by name or port number. For example:
const { findInput } = require('prestissimo');
const input = findInput({ name: "Samson Graphite M25" });
This will check the list of available MIDI input devices on your system, and pick the one that (at least partially) matches the name "Samson Graphite M25".
Now register an event handler for "ready", i.e. the device has been found and the port has been opened:
input.on("ready", match => {
console.log('device identified by', match, 'connected');
// Do stuff now...
});
You can register events for specific messages, nicely parsed:
input.on("noteOn", payload => {
const { channel, note, velocity } = payload;
// do something with the data...
});
input.on("noteOff", payload => {
const { channel, note, velocity } = payload;
// do something with the data...
});
input.on("controlChange", payload => {
const { channel, controller, value } = payload;
// do something with the data...
})
Or listen for "rawMessage" events, which are fired whether prestissimo could parse the message or not:
input.on("rawMessage", message => {
const { deviceName, deltaTime, bytes } = message;
// Parse the raw bytes yourself?
});
Get a valid output MIDI device by name or port number:
const { findOutput } = require('prestissimo');
const output = findOutput({name: "myMidiOutput"})
Send messages to the device:
output.send("noteOn", {
note: 60,
velocity: 127,
channel: 0
});
If you need to create virtual (software-only) MIDI devices on your system, simply use createVirtualInput
instead of findInput
and createVirtualOutput
instead of findOutput
. All other functionality is identical.
If you have prestissimo installed as a local or global dependency, you should be able to run
midi-list
... to get a list of available input and output MIDI devices available on your system, with full names and port numbers.
or
midi-listen
... to listen on all available MIDI Input channels and print out some useful info on any incoming notes, CC values, etc.
or
midi-simulate
... to send a bunch of Control Change values, useful for training or MIDI Mapping. Append --help
to see the command-line options
FAQs
Ergonomic wrapper for node-midi, powered by TypeScript
The npm package prestissimo receives a total of 13 weekly downloads. As such, prestissimo popularity was classified as not popular.
We found that prestissimo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.