Git Product home page Git Product logo

node-easymidi's People

Contributors

7hemech avatar adamfr33man avatar atomic7122 avatar dependabot[bot] avatar dinchak avatar grebett avatar hrueger avatar julusian avatar marksyzm avatar neocortex97 avatar noeppi-noeppi avatar ossandust avatar pckool avatar ruudboon avatar samhiatt avatar voruti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-easymidi's Issues

Can't read any other streams than 'noteon'

Hi,
so I've been working with your repo to manage a project. Now I wanted to expend it a little further by reading something like the "ply aftertouch". I used your example for that but changed the midi-input-device to my own piano. When I press a key with polyphonic aftertouch I don't get any data on my console as output. I've tried that with the 'noteoff' too and there I don't receive any data too. I only receive 'noteon' messages. Do you have an idea why?

output.send from express

I'm trying to trigger a note event by REST api.
In my nodejs project (in OSX), I have a function that successfully sends a note to an output.
Once I'm trying to execute the function from inside an express route, the note is not send. No error, the device just doesn't receive the note.
Am I missing something?

Error creating OS-X MIDI client object (rtmidi issue)

Fantastic library. Simply amazing. I have the following which raises when calling

easymidi.getInputs();

MidiInCore::initialize: error creating OS-X MIDI client object.
libc++abi.dylib: terminating with uncaught exception of type RtMidiError

Note that getOutputs does not cause this issue.

Setup: MacOS Mojave
environment:

praisethemoon$ node --version
v10.15.1
praisethemoon$ electron --version
v4.1.3
moonpiano praisethemoon$ npm --version
6.4.1

AFAIK this is obviously related to the native module rtmidi and this issue is known and reported here: thestk/rtmidi#155

Even though I know the issue is not from this project per se, but just to let you know.

Can't send mtc messages.

Hello,
I'm trying to send mtc messages, but I don't get it working. I can send messages without errors and the receiving program can see something, but right now I'm just guessing what values correspond to which function (second, minutes, hours, etc.). For example, I found out, if I set the "type" to 1 and "value" to something between 10 and 15 it decreases the seconds by 1. I found this Wikipedia article which would explain the "type", but I can't make any sense of the "value".

.close() doesn't close input on Debian

Hi,
I'm using easymidi and usb-detection together to handle connect and disconnect of midi controllers.
I'm using Debian 10 and at every usb change, I clean devices by using close() function on both input and output of each device before rechecking. But as I verify my inputs, I can see that it doesn't close them, virtual "rtMidi" inputs and outputs stacks up within getInputs()/getOutputs() until ALSA throws an error because it cannot allocate memory anymore.

I'm doing it in Typescript, an interface is set with in and out as easymidi.Input and easymidi.Output type, the function close() is recognized and doesn't throw an error when called but it has no effect on the virtual ports created.

If someone has an idea of what is wrong here, I'm all hears
Thanks for reading

Sysex does not work

Hello,

We are using your library for one of our project.

All the commands work (faders, buttons, etc ...) But not the sysex commands:

Our commands work well with Bome SendSX.

Here's my order:

output.send ('sysex', [240,00,00,66,14,12,00,20,20,43,48,32,20,20,20,20,43,48,32,20,20,20,20,20,20,20,247]);

and in the SendSX software: f0 00 00 66 14 12 00 20 20 43 48 32 20 20 20 20 43 48 32 20 20 20 20 20 20 20

Do you have an explanation for the problem?

Sorry, I'm french

Disconnect/Reconnect events?

Firstly, thanks for making this! Having fun with an 8x8 neotrellis buttom matrix over midi.

If I disconnect the device (after successfully connecting before), everything works perfectly once I reconnect the device.

I was hoping to send midi events to the device after it reconnects (e.g. to reset device state such as brightness, colour, etc per button). Is there a way to detect if a midi device disconnected & reconnected?

I would imagine to emit an event for this, so an implementation like mine can use that as a trigger to re-sync all device states.

Midi Loop

I'm trying to send MIDI messages between two apps.

When I listen on an input channel, then send the messages to the output channel, they come back through the input again in an infinite loop.

Why is this?

const easymidi = require('easymidi');

const virtualInput = new easymidi.Input('Midi Input', true);
const virtualOutput = new easymidi.Output('Midi Output', true);

virtualInput.on('noteon', function (msg) {
  const {_type: type, channel, note, velocity} = msg;
  console.log({type, channel, note, velocity});
  virtualOutput.send(type, {channel, note, velocity});
});

virtualInput.on('noteoff', function (msg) {
	const {_type: type, channel, note, velocity} = msg;
	console.log({type, channel, note, velocity});
	virtualOutput.send(type, {channel, note, velocity});
});

Using setInterval to make a drum pattern, eventually loses beat

Is there a more precise way to keep on time, other than using one setTimeout with a bunch of seIntervals inside? As is, I am making a seperate setInterval for each element (bass, snare, hihat) and just giving each their own timing, but it loses beat.

Error on windows for virutal midi port

I am getting the following error message:
MidiOutWinMM::openPort: error creating Windows MM MIDI output port.

Any ideas how to make the virtual midi port work?

midi over usb

I play notes on my midi keyboard, console.log(input.on), nothing on the screen.
I am using a novation mininova to a focusrite via usb. How do you configure such hardware?

New to MIDI, attempting to use my Launchpad Pro, and it can't find it

Launchpad is on, plugged into my laptop, I ran the Node.js code, and I get this:

Error: No MIDI output found with name: Launchpad Pro

My code:

let midi = require('easymidi');
let input = new midi.Input('Launchpad Pro');
let output = new midi.Output('Launchpad Pro');

input.on('noteon',msg => {
  console.log(msg);
});

don't get pitch messages from Xtouch

Hey,
Thanks for creating this awesome library!
I am currently encountering an issue where I don't get pitch messages when using my touch.
Any pointers on how to resolve it?
i checked in node-midi and I am getting 231,124,127 for the message but nothing in easy-midi

Error handeling

Hey!
I can't find any way to do error handling.
If you create an output. Then lose connection to the midi console. how can I get an error?
I only get a console message error when trying to send a message on the disconnected output. but is not able to catch it anywhere.
Do you have a solution?

Context awareness

Hi, when trying to run this module in Electron in a window I get the error that this module is not context aware and therefore cannot run. I have done some digging and found that this is an issue with the "node-midi" module that easy-midi depends on.

@dinchak, if you have the time and knowledge would you please be able to make a fork of the "node-midi" package and make it context aware? I have tried myself but I am simply not experienced enough and the 2 pull requests on "node-midi" did not work (plus the author of "node-midi" seems to be inactive).

I understand if you are unable to do this but regardless of that I want to thank you in advance.

Best regards,
D3vision

Virtual inputs & outputs switched?

While I was testing some very boilerplate code from the readme I noticed that after initializing virtual inputs and outputs the virtual devices appear in the opposite device list as expected. Is this incorrect, or do I have my concept of the ins and outs crossed?

image

Example code to reproduce:

const easymidi = require('easymidi');

const virtualInput = new easymidi.Input('Virtual input name', true);
const virtualOutput = new easymidi.Output('Virtual output name', true);

const inputs = easymidi.getInputs();
const outputs = easymidi.getOutputs();

console.log('inputs:', inputs);
console.log('outputs:', outputs);

Bad midi device name

Old format - "midi device name #' new format 'midi device name'
My friend upgrade nodejs from 14.x to 16.x and sothig wrong happend ...
System display names with 2-

Somthing like this
'2- BCF2000'

HOW TOO RESOLVE ?

Clock messages?

I see an example for receiving clock messages, but no data appears to be included with these, and clock type messages appear to be ignored in the code?

The module "midi" is supposedly non-context-aware, despite being updated to support Electron.

Forgive me if I'm making some sort of mistake, but I am trying to load easymidi into my Electron app. Upon requiring the package, I get the following error:

Uncaught Error: Loading non-context-aware native module in renderer: '\\?\C:\Users\my_user\Documents\Midi-App\midi-electron\node_modules\midi\build\Release\midi.node'. See https://github.com/electron/electron/issues/18397.

Upon further research, I see that midi was in fact updated to be context aware, and your wrapper does use the latest version, so what gives?

To reproduce the error, simply add const easymidi = require('easymidi'); to your main.js file before running npm start.

more midi devices

The code doesn't assign numbers to devices if two or more identical ones are connected, making it impossible to refer to them individually.

In previous versions, devices were numbered, but it also caused issues.

It would be nice if each identical device had a number assigned:

midi_dev
midi_dev 1 ...

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.