Giter Club home page Giter Club logo

Comments (13)

lplume avatar lplume commented on June 15, 2024 1

setTempo parameters has been changed recently; it depends if you install/download MidiWriterJS after or before the change.
Checkout #11
Feel free to ask more, or provide some sample code to debug

from midiwriterjs.

shivrajsa avatar shivrajsa commented on June 15, 2024

I downloaded it today, so I think it is latest one.
Here is my scenario

  1. Integrate (install) midi-writer-js.js file in MIDIPlayer example
  2. Change line "player.loadFile(song[songid++ % song.length], player.start);" to "player.loadFile(userFunctionDataUri(), player.start);", here "userFunctionDataUri()" is a user function returning MIDI String of melody created by MidiWriterJS function "dataUri()"
  3. Try different tempo parameter
    Result : It plays with same tempo even after different tempo inputs

from midiwriterjs.

grimmdude avatar grimmdude commented on June 15, 2024

Hi @shivrajsa,

This could be an issue with MIDI.js. Have you tried testing it in another MIDI player?

-Garrett

from midiwriterjs.

shivrajsa avatar shivrajsa commented on June 15, 2024

Could you please suggest a good & stable MIDI player, I will try.
It should take DataUri() output as input as per scenario.

from midiwriterjs.

grimmdude avatar grimmdude commented on June 15, 2024

When I'm working on this library this I typically use GarageBand for MIDI playback since it has good visualization of notes and meta events. For online playback I've had some trouble finding a bug free MIDI player (and actually considered writing one of my own). I did find, however, this one to work pretty well:

https://github.com/chenx/MidiPlayer

It's the same one I'm using on the example page for this repo. You'll have to check to see if it accepts Uint8 array as an input, I know it takes a dataURI though.

-G

from midiwriterjs.

lplume avatar lplume commented on June 15, 2024

Hi @shivrajsa, for my midi test and work i usually rely on MuseScore. You said you started from the chopin example (btw @grimmdude examples should be updated to new setTempo parameters) is it right? Just want to understand if there is some ¨bug¨ in MidiWriterJS or not.

Also @shivrajsa i took some time to introduce myself about indian music and let me say it´s very awesome (well.. actually VERY awesome.... considering i come from western music studies); now I understand your request about giving note times in seconds. I thought of few ways to do so with MidiWriterJS, but it´s still a forced way to do things... Do you know of any software specific to work with indian music (MIDI related)?

@grimmdude I used to compare MIDI files generated from this library and the same partiture composed in other software with hex editors; it´s a good meter of comparsion.

Thanks to both =)

-M

from midiwriterjs.

shivrajsa avatar shivrajsa commented on June 15, 2024

Hi @lplume, In my app there is an option to export melody as MIDI file, you can check this option above each melody (table) at this link. Instead of "Devnagari" you can select option "Western" to see notations of melody in western format.

Just drag drop exported MIDI file at this link, an app mentioned as 'Color Piano' in MIDI.js demos. It works well even in Windows Media Player.

I generate MIDI using library jsmidi where it is possible to manipulate delay in seconds.

Some month back I tried to generate string using jsmidi & given it as input to MIDI.js player & it did not work well.

You can check MIDI generated using my app for further analysis.

Also here is one more app to check http://ragapedia.com/, I did not try it but there is option to export MIDI file.

from midiwriterjs.

lplume avatar lplume commented on June 15, 2024

Hi @shivrajsa,

I took some time to try midi generated by this library with both MuseScore and color piano you mentioned and everything is fine (setting diffrents tempo).

I also try to take a look to an exported of yours at vishwamohini music notation and cannot find the midi meta event to set tempo (FF 51), so I think the player try a guess.

from midiwriterjs.

lplume avatar lplume commented on June 15, 2024

Edit: and I think the guess is based on the delta time for each events and the total songs duration.
I'm still searching on the topic MIDI-Indian like music. I'm gonna ask to some music schools and alike, you could try to do the same in the meantime

-M

from midiwriterjs.

grimmdude avatar grimmdude commented on June 15, 2024

I believe if the tempo event doesn't exist then MIDI players will default to 120 bpm.

-Garrett

from midiwriterjs.

lplume avatar lplume commented on June 15, 2024

this could be closed in favor of #13

from midiwriterjs.

shivrajsa avatar shivrajsa commented on June 15, 2024

Hi @lplume @grimmdude, as said by @grimmdude it could be issue of MIDI.js, could you please also check this issue with MIDI.js because exported MIDI works well with MIDI.js player but datauri does not work well with MIDI.js player.

Using MIDI.js to play MIDI files generated by this library will be very useful because we can use soundfont in MIDI.js, take a look at my app where I am playing Tabla (Indian classical percussion instrument) using this library. Also we can easily set animations

from midiwriterjs.

grimmdude avatar grimmdude commented on June 15, 2024

Hi @shivrajsa ,

Could you download a fresh copy of this library and see if you still have the same issues with MIDI.js? Just put in a small fix on the tempo setup.

-Garrett

from midiwriterjs.

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.