web-midi | Web MIDI API for browsers | Audio Utils library

 by   jazz-soft JavaScript Version: v1.0.2.6 License: No License

kandi X-RAY | web-midi Summary

kandi X-RAY | web-midi Summary

web-midi is a JavaScript library typically used in Audio, Audio Utils applications. web-midi has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Web MIDI API for browsers
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              web-midi has a low active ecosystem.
              It has 30 star(s) with 3 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of web-midi is v1.0.2.6

            kandi-Quality Quality

              web-midi has 0 bugs and 0 code smells.

            kandi-Security Security

              web-midi has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              web-midi code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              web-midi does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              web-midi releases are not available. You will need to build from source code and install.
              web-midi saves you 5 person hours of effort in developing the same functionality from scratch.
              It has 16 lines of code, 0 functions and 11 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of web-midi
            Get all kandi verified functions for this library.

            web-midi Key Features

            No Key Features are available at this moment for web-midi.

            web-midi Examples and Code Snippets

            No Code Snippets are available at this moment for web-midi.

            Community Discussions

            QUESTION

            The Web MIDI API is not supported by your browser - Google Chrome on Mac - when code is run locally
            Asked 2020-Jan-12 at 02:41

            Folks,

            I am trying work on a simple Web MIDI app.

            I already looked up and found out that Google Chrome is the only browser that supports this. So, I installed this but I still get this.

            WebMidi could not be enabled Error: The Web MIDI API is not supported by your browser. at WebMidi.enable (webmidi.min.js:30) at script.js:430 (anonymous) @ script.js:432 WebMidi.enable @ webmidi.min.js:30 (anonymous) @ script.js:430 Promise.then (async) (anonymous) @ script.js:154

            Mac - 10.15.2 Chrome - 79.0.3945.117

            According to this link - https://www.midi.org/17-the-mma/99-web-midi , Chrome definitely has the support.

            Important Note - If I were run the code directly on codepen, it works just fine. So the browser is working. But when I try to run locally, I get the error.

            https://codepen.io/teropa/pen/JLjXGK

            ...

            ANSWER

            Answered 2020-Jan-12 at 02:41

            I've used web-midi with Chromium and Opera on 10.12.6, so I wouldn't say that Chrome is the only browser that has web-midi.

            With Opera I think I had to enable experimental features:

            Source https://stackoverflow.com/questions/59676881

            QUESTION

            Using AudioContext in unit tests
            Asked 2019-Dec-14 at 18:49

            I am developing a JavaScript library (https://github.com/yvesgurcan/web-midi-player) to enable MIDI playback in a web application. The library relies on the Web Audio API to create a way to play these MIDI files (https://github.com/yvesgurcan/web-midi-player/blob/test/src/MidiPlayer.js#L50). However, I am having trouble creating meaningful unit tests with Jest (https://github.com/yvesgurcan/web-midi-player/blob/test/tests/midiPlayer.js) because these tests don't have access to the window object and more particularly to window.AudioContext. As a consequence, running my application code which relies on AudioContext throws errors related to the fact that this object does not exist and I can't actually test very much things in the library.

            I've tried the following packages to solve my problem: jsdom, jsdom-global, and also web-audio-test-api but none of these seem to inject AudioContext in the environment.

            I am thinking that the solution here would be to stub/mock AudioContext but that does not sound like a good solution for solid unit tests.

            What do you folks suggest to test the Web Audio API? Is stubbing the only viable solution here?

            ...

            ANSWER

            Answered 2019-Dec-14 at 18:49

            I think it depends a bit on what you want to test. Since you're using Jest I imagine you're just interested in testing the correctness of your own code. In that case I would recommend to fully mock the Web Audio API. It's not part of your responsibility and you can assume it works the way it should. The only thing you have to test is if your code is making the expected calls.

            Mocking globally available variables like the AudioContext constructor is always a bit tricky but you could allow an AudioContext to be passed into your MidiPlayer class as an optional argument. It would make testing a little easier and it would also allow users of your library to bring their own AudioContext.

            I think of something like this:

            Source https://stackoverflow.com/questions/59337679

            QUESTION

            How to specify Web MIDI channel?
            Asked 2018-Dec-17 at 15:57

            How can I specify which channel to send a midi message on, with the MIDI Web API?

            This example from the official docs shows how to send a message on channel 1. But in the code snippet, I don't find any reference to that.

            ...

            ANSWER

            Answered 2018-Dec-17 at 15:57

            The midi protocol uses hexadecimal representation for its "messages".

            First half is dedicated to the command while the second part is used to specify the channel. They are 16 possible channels (MIDI channels are 0-indexed, as specified in documentation).

            Example:
            0x90 means Note on (0x90) on Chan 1 (0x90)

            So, if you want to send the same message en channel 2, you have to change it like this:

            Source https://stackoverflow.com/questions/53507238

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install web-midi

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jazz-soft/web-midi.git

          • CLI

            gh repo clone jazz-soft/web-midi

          • sshUrl

            git@github.com:jazz-soft/web-midi.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Audio Utils Libraries

            howler.js

            by goldfire

            fingerprintjs

            by fingerprintjs

            Tone.js

            by Tonejs

            AudioKit

            by AudioKit

            sonic-pi

            by sonic-pi-net

            Try Top Libraries by jazz-soft

            JZZ

            by jazz-softJavaScript

            JZZ-midi-SMF

            by jazz-softJavaScript

            jazz-midi-electron

            by jazz-softJavaScript

            char-lcd

            by jazz-softJavaScript

            JZZ-synth-Tiny

            by jazz-softJavaScript