Code Monkey home page Code Monkey logo

Comments (10)

vfxturjo avatar vfxturjo commented on June 10, 2024

I found a way to recreate the situation:

  1. install -> https://hautetechnique.com/midi/midiview
  2. open MidiView software
  3. go to -> https://jazz-soft.net/demo/SelectMidi.html
  4. select midi out device = MidiView,
    midi in device = HTML keyboard
  5. play random for few seconds and monitor if it is connected
    image
  6. close MidiView window (this will close "MidiView" ports)
  7. see that the port is still connected
    image
  8. play random notes again (u may see BSOD... else continue)
  9. after that, open MidiView software. (it will open the ports again)
  10. see that in the browser, the "MidiView" port is still connected but pressing the keyboard keys doesn't send midi to MidiView software
  11. so, try to reconnect the port by selecting "Midi Out" dropdown and selecting "MidiView" port again.
  12. BSOD happens

from jzz.

vfxturjo avatar vfxturjo commented on June 10, 2024

in the app that i am trying to make, i am facing this problem again and again. i faced BSOD around 10 times (never faced BSOD in this laptop before, and currently BSOD happening only if trying to send midi message to closed Midi Port).

i also tried to see if the midi send code returns error after MidiView is closed.

try {
      outPort
        .note(0, 'C5', 127, 1000)
        .or(() => alert('cant send bro'))            // <---- here
        .and(() => {
          alert('sent!');
        });
    } catch (TypeError) {
      alert('Midi device not ready');
    }

but it showed me "sent!", even after MidiView is closed. then after 1-2 seconds, i faced BSOD.

I need to monitor the device changes. onChange() method can see the "MidiView" port when i open the MidiView software, but it is not triggering when i close MidiView software (not working for "port removed/disconnected")
please help...

from jzz.

vfxturjo avatar vfxturjo commented on June 10, 2024

sorry to bother you with lots of comments. i am just trying to give you contexts so it will be easier to fix,

i think this is related:

#49 (comment)

Node.js exits with a "segmentation fault: 11"-Error when closing a midi-application whose (virtual) midi-ports where already recognized by JZZ's watcher.
This happens when JZZ.js runs within my node application, then I open e.g. the DLS-Midi Synth App on Mac and the port 'DLS-MIDI-Synth Virtual In' shows up in JZZ's list of available ports. Now, when I close the DLS-Midi Synth App, my node application exits with the segmentation fault.

i think this problem is similar. In Node.js, it is showing "segmentation fault", but in my case (working in MS Edge) it is resulting as BSOD...?

from jzz.

jazz-soft avatar jazz-soft commented on June 10, 2024

Can you try doing the same thing with a real MIDI instrument, i.e. plugging and unplugging it?
Will it also result in BSOD or is it MidiView specific?

from jzz.

vfxturjo avatar vfxturjo commented on June 10, 2024

🤔 didn't try that one. as i don't have any real Midi instrument, i will try to somehow use my android phone as as a midi port.
lets see if the problem still happens...

from jzz.

vfxturjo avatar vfxturjo commented on June 10, 2024

i just did that. used android phone as midi receiver.
used "FluidSynth MIDI" app to react to the midi signal received.

it detects when device connected/disconnected. refreshes the selection list when device is added/removed.
nothing happens when trying to send midi signal to a closed port.

i'm sorry to waste your time. it is not the problem of JZZ.js
your code is clean and amazing <3

from jzz.

jazz-soft avatar jazz-soft commented on June 10, 2024

Thanks for flattering :)
You may want to contact the MidiView developers to inform them about the problem.
For testing with virtual MIDI devices you can try
https://github.com/jazz-soft/midi-test (Mac and Linux only) or
https://github.com/jazz-soft/web-midi-test (may be a little trickier to setup your test)

from jzz.

vfxturjo avatar vfxturjo commented on June 10, 2024

thanks! i will inform the MidiView devs cz BSOD is dangerous.

although out of topic, i want to ask a question:
how to create a midi port?

currently i am using LoopMidi to create virtual midi ports. but, is there a way to create midi ports with browser so that my DAW can see the port directly without using LoopMidi?
it will be very useful if my app itself shows up as a midi device in the DAW and i can just listen to it from the DAW, as if i connected a real midi device into my laptop...

i'm on windows...

from jzz.

jazz-soft avatar jazz-soft commented on June 10, 2024

Creating MIDI port is difficult in Windows.
On Mac and Linux - you can see the source code in the midi-test I mentioned before (or you can just use it).

from jzz.

vfxturjo avatar vfxturjo commented on June 10, 2024

bad luck for me then... anyway, thank u for your time. i will create new issue when i face new problems. stay well 🥰

from jzz.

Related Issues (20)

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.