Git Product home page Git Product logo

Comments (4)

mk-pmb avatar mk-pmb commented on August 18, 2024

Thanks for notifying us! Unfortunately I have no idea how to implement it, so I hope someone else will.

from midifile.

page200 avatar page200 commented on August 18, 2024

This is achieved by three to four consecutive MIDI control messages. In hexadecimal, they look like this:

B06500
B06400
B00602
B02604

The "0" after the "B" is the MIDI channel (for example zeroth channel that plays a guitar) for which the pitch-bend range is being set.
The "02" in the end of the third message is the number of semitones by which the pitch can bend.
The "04" in the end of the fourth message is the number of cents to be added to the semitones.
The last message is optional, i.e. if there is no message of the form /B.26../ (like "B02604" in the example) then the number of cents is zero.

Here is an example MIDI file where this happens around the 65th MIDI message in the file.

from midifile.

page200 avatar page200 commented on August 18, 2024

Here's my fix of this issue in a "fork" of MIDIFile.js:
Commit: surikov/webaudiofont@master...page200:webaudiofont:master
Pull request: surikov/webaudiofont@64ffca5

I haven't checked whether such a fix belongs into https://github.com/nfroidure/midifile or https://github.com/nfroidure/midievents. Anyway, probably these two repos should be updated to the aforementioned "fork" because that "fork" has things like slides (pitch bend) and parseSong(), which https://github.com/nfroidure/midifile doesn't seem to have yet.

from midifile.

nfroidure avatar nfroidure commented on August 18, 2024

@page200 this repository is meant to be used per other libraries and is just providing a midi file reader. Best practices is not to copy/paste the code but use the library and provide pull requests to the repository in order to allow all users to benefit from the changes for their various needs (see dependent packages)..

Feel free to report those changes via a pull request if you think it will be interesting for other users.

from midifile.

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.