Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can node-midi become "Context Aware" ? #164

Open
ossandust opened this issue Apr 22, 2020 · 8 comments · May be fixed by #213
Open

can node-midi become "Context Aware" ? #164

ossandust opened this issue Apr 22, 2020 · 8 comments · May be fixed by #213
Labels

Comments

@ossandust
Copy link

I intend to use node-midi in an Electron app. I bumped upon following Electron discussion :
electron/electron#18397
and I wonder what will happen when Electron 9 is released. Will node-midi require changes to make it context aware? If so are there plans to do so?
Thanks.

@wookayin wookayin linked a pull request Nov 10, 2021 that will close this issue
@wookayin
Copy link

I have submitted a PR #213. @justinlatimer Can you please review, test, and publish at your earliest convenience? Thanks!

@1pxone
Copy link

1pxone commented Nov 12, 2021

@wookayin Ha:) Sorry, it seems like we made quite the same thing. Did you test your implementation? My first attempts with NAN_MODULE_WORKER_ENABLED was failed. Also, there is a necessity to support the previous version of node.js so you need to add conditional init of the module I guess.

Anyway, here is my request #214

@justinlatimer now it's your turn :)

@Mister-SOSA
Copy link

Definitely need this one. I'd like to use the library in Electron. A bunch of other packages are also restricted on the basis that they use this one.

@D3visionNL
Copy link

D3visionNL commented May 3, 2022

Can this please be merged? Having the same problem as @Mister-SOSA :(

EDIT:
I've tried to use some of the forks listed here and none have worked so far. Does anyone know why? (running Electron 16)

@bdotsamir
Copy link

Any movement on this? Looks like the lib author @justinlatimer has been inactive on this repo for just about a year now, with his recent commits while he was active looking closer to maintenance than working on new features such as this

@hrueger
Copy link

hrueger commented Aug 8, 2022

I'd really like to contribute and help here. I also need to run midi in a worker thread.
The PR #213 as well as #214 fixes the initial loading for me, however once I close and recreate the worker thread, Node crashes completely. Either, I get no stack trace or something like

FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal field out of bounds
 1: 00007FF73F3E401F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+112511
 2: 00007FF73F373146 DSA_meth_get_flags+65542
 3: 00007FF73F373FFD node::OnFatalError+301
 4: 00007FF73FC9B0E4 v8::ObjectTemplate::InternalFieldCount+212
 5: 00007FF73FCA84E3 v8::Object::SetAlignedPointerInInternalField+35
 6: 00007FF73F1F0B16 v8::internal::RegExpMacroAssemblerX64::stack_limit_slack+5126
 7: 00007FF73F37CF25 node::OnFatalError+36949
 8: 00007FF73F3E280C v8::internal::CodeObjectRegistry::~CodeObjectRegistry+106348
 9: 00007FF73F40F1E0 node::FreeEnvironment+112
10: 00007FF73F2AC2D5 v8::internal::wasm::SignatureMap::Freeze+35861
11: 00007FF73F2A78D8 v8::internal::wasm::SignatureMap::Freeze+16920
12: 00007FF73F43324D uv_poll_stop+557
13: 00007FF740244D60 v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+146416
14: 00007FFB73A27034 BaseThreadInitThunk+20
15: 00007FFB74B22651 RtlUserThreadStart+33
npm ERR! Lifecycle script `start` failed with error: 
npm ERR! Error: command failed
npm ERR!   in workspace: [email protected]
npm ERR!   at location: A:\_Source\GLUE\packages\Glue

any idea?

@bdotsamir
Copy link

for those that are using this in electron, you should know that the web already has a midi API. https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API.

@Julusian
Copy link

Julusian commented Oct 1, 2022

I have opened a PR to do an overhaul of this library which includes solving this (#228)
As it doesn't look like there are any maintainers around to merge it, I shall be maintaining a fork which is 100% api compatible https://www.npmjs.com/package/@julusian/midi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants