Comments (13)
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.
I downloaded it today, so I think it is latest one.
Here is my scenario
- Integrate (install) midi-writer-js.js file in MIDIPlayer example
- 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()"
- Try different tempo parameter
Result : It plays with same tempo even after different tempo inputs
from midiwriterjs.
Hi @shivrajsa,
This could be an issue with MIDI.js. Have you tried testing it in another MIDI player?
-Garrett
from midiwriterjs.
Could you please suggest a good & stable MIDI player, I will try.
It should take DataUri() output as input as per scenario.
from midiwriterjs.
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.
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.
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.
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.
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.
I believe if the tempo event doesn't exist then MIDI players will default to 120 bpm.
-Garrett
from midiwriterjs.
this could be closed in favor of #13
from midiwriterjs.
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.
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)
- How to change tempo throughout track HOT 1
- Midi arrangement help HOT 3
- Files do not import in DAW HOT 2
- Browser: "Maximum call stack size exceeded error" when creating base64 with many events
- Browser example HOT 3
- How to create a midi file HOT 6
- Deprecation warning from tonaljs
- New Tag HOT 2
- Mysterious crash when merging tracks; I don't know what's going on
- Track names cause merging to break
- Midi Reader Implementation HOT 2
- No way to change HEADER_CHUNK_DIVISION HOT 1
- Unable to set track tempo HOT 3
- Insert Text Event at Specific Tick Position
- How to write out drum tracks HOT 2
- Seems to hang on using the writer HOT 5
- Way to change timebase (ppq) instead of 128 HOT 1
- Two tracks with different instruments at the same time HOT 8
- MIDI imported in FL Studio turns out to be one octave higher HOT 1
- Why does a slower tempo create a little rest between NoteEvents? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midiwriterjs.