Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDI generation #26

Closed
mbektimirov opened this issue Aug 6, 2012 · 3 comments
Closed

MIDI generation #26

mbektimirov opened this issue Aug 6, 2012 · 3 comments

Comments

@mbektimirov
Copy link

Hi Daniel!

I am trying to generate MIDI with alphatab and already implemented some core classes from the TuxGuitar: MidiFileWriter, MidiEvent, MidiMessage, MidiSequence, MidiTrack and rewrited MidiSequenceHandler. I didn't touch MidiSequenceParser. The problem is with strange big size of outputed MIDI. I made a test conversion with clean TuxGuitar code and with my current implementation. You could see tracks data below. The size of a alphaTab converted MIDI array is larger than TuxGuitar converted array (~ 36000 - 41000).

Did you do any significant changes in alphaTab that could make this happen?
It would be great if we could have a Skype chat to discuss other questions and problems.
Thanks for your attention!

P. S.
I've tried to remove makeMixChange() method from MidiSequenceParser, but problem hasn't gone.

Human Abstract - Patterns gp5
-------------------------------------------------------------
Java:

Track size: 68
    Event data length sum: 202

Track size: 2257
    Event data length sum: 6766

Track size: 2257
    Event data length sum: 6766

Track size: 989
    Event data length sum: 2962

Track size: 1520
    Event data length sum: 4555

Track size: 763
    Event data length sum: 2284

-----------------------------------------------------------------
Haxe: 

trackSize: 68
sumDataLength: 202
, 
trackSize: 2281
sumDataLength: 6838
, 
trackSize: 2281
sumDataLength: 6838
, 
trackSize: 1003
sumDataLength: 3004
, 
trackSize: 1534
sumDataLength: 4595
, 
trackSize: 2071
sumDataLength: 6208

@ben-ng
Copy link

ben-ng commented Aug 6, 2012

Why don't you use MidiDataProvider.getSongMidiFile(song:Song, factory:SongFactory):MidiFile?

@mbektimirov
Copy link
Author

Seems like I missed this feature in commits. Thank you!

@mbektimirov
Copy link
Author

I am reopening this issue because MidiDataProvider generates wrong midi file. I've found two problems for now: some tracks are muted by default or a single track could be muted unexpectedly while playing. If you've got any suggestion about the problem I can help to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants