Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
launchpad-midi-converter
Advanced tools
Readme
CDN
The easiest way is to link the launchpad-midi-converter library from the jsDelivr CDN. To retrieve the latest version, just add this to your HTML page:
<script src="https://cdn.jsdelivr.net/npm/launchpad-midi-converter"></script>
If you want to target a specific version, you might prefer:
<script src="https://cdn.jsdelivr.net/npm/launchpad-midi-converter@2.0.1"></script>
Manual
You can download the latest release of launchpad-midi-converter, uncompress it, grab the LaunchpadMidi.browser.js file in dist folder and copy it into your project. So you can link it to your HTML page.
NPM or Yarn
Might be the best way if you want to use it with Node
npm install launchpad-midi-converter
or yarn add launchpad-midi-converter
You can link it to your HTML page like this:
<script src="node_modules/launchpad-midi-converter/dist/LaunchpadMidi.browser.js"></script>
const { LaunchpadMidi } = require("launchpad-midi-converter");
LaunchpadMidi.layout("programmer");
<script>
const { LaunchpadMidi } = launchpad_midi_converter;
LaunchpadMidi.layout("live");
</script>
import { LaunchpadMidi } from "launchpad-midi-converter";
LaunchpadMidi.layout("live");
Where mode is the layout we want. (See Modes available...). Returns an array of every notes in the right order.
>>> LaunchpadMidi.layout("programmer")
[
[81, 82, 83, 84, 85, 86, 87, 88],
[71, 72, 73, 74, 75, 76, 77, 78],
[...]
]
Take note that CC notes aren't included in the layouts. Currently working on it...
Where note is the note we want to convert (eg.: 11), from is the layout where the note comes from (eg.: 11 comes from the programmer layout) and to is the final layout (eg.: live layout).
>>> LaunchpadMidi.convert(11, "programmer", "live")
36
Explanations: We take the programmer layout and we search where the note, so 11, is placed in the layout. Now we take the live layout and we read the note where 11 was placed in the programmer layout, so 36 here. (Needs to be explaned well, my english is so bad).
Where velocity is between 0 and 127. It returns the HEX color value of the velocity given. Based on default Novation Launchpad color palette.
HEX was made by extracting the RGB values in the Novation Palette
and convert them to HEX, by using mat1jaczyyy's code
>>> LaunchpadMidi.color(1)
"#1f1f1f"
FAQs
Helper for Launchpad MIDI notes !
The npm package launchpad-midi-converter receives a total of 0 weekly downloads. As such, launchpad-midi-converter popularity was classified as not popular.
We found that launchpad-midi-converter 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.