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

TBBard seems to hate this MIDI #13

Open
Vipes opened this issue Jul 17, 2018 · 8 comments
Open

TBBard seems to hate this MIDI #13

Vipes opened this issue Jul 17, 2018 · 8 comments

Comments

@Vipes
Copy link

Vipes commented Jul 17, 2018

It's missing notes, it's not even playing in the correct key. I personally edited the MIDI so it'd be able to pick it up, but unless I'm doing something wrong, it's having trouble reading it.

Edited MIDI: https://www.dropbox.com/s/39sypbsyuk316pf/little%20lies%20v3.mid_872696_1.mid?dl=0

Original MIDI: https://www.dropbox.com/s/4qv73ckrdqllhv8/Fleetwood_Mac_Sweet_Little_Lies.mid?dl=0

@isalin
Copy link
Owner

isalin commented Jul 17, 2018

In the original file, if you select instrument 6, does it play correctly for the first 15 seconds? And then the continuation of that is encoded as instrument 4?

Based on your edited file (which sounds great btw!), what you want to play seems like it’s encoded as two separate instruments in the original file.

Not long after that they also seem to start playing chords. Unfortunately, chords aren’t something the ffxiv perform system can handle, and so TBbard tries to filter out notes happening on the same timestamp.

@Vipes
Copy link
Author

Vipes commented Jul 17, 2018

Yeah, in the original it misses no notes, even the ones it misses in the edited one. What's odd is it starts in the same key as the original one, C#-1, while it should start C#. Even made sure of it. And I can't find any chords in the edited one, unless I can't see some notes.

@isalin
Copy link
Owner

isalin commented Jul 17, 2018

Oh, I see. I might’ve gotten a bit too focused on the original file.

You’re right that it does miss some notes in the edited one.

It seems to be because the "note off" events and the "note on" events happen on the same timestamp. And the note off event is encoded before the note off event. This results in the note on event being filtered out.

To be honest, I’m kind of surprised I haven't encountered this issue earler. It seems like it should’ve been a much more common problem.

I’ve attempted to implement a fix in the attached files. Would you mind checking if it solves the problem?

TBbard_v1.9a.zip

@Vipes
Copy link
Author

Vipes commented Jul 17, 2018

Alright, I'm testing now. And you might have encountered it before, but just didn't notice it if it was rapid notes, I have one song that does this but you can't really tell it missed a note unless you know the song by heart.

@Vipes
Copy link
Author

Vipes commented Jul 17, 2018

Yeah, that fixed it. It also fixed another issue I had where it just zooms through a midi, even though the tempo is correct. Thank you so much. You have no clue how many songs this allows me to play now.

@isalin
Copy link
Owner

isalin commented Jul 17, 2018

Great!

I ran a couple of test on a few old files, and for the most part everything seems the same. In some songs 1-2 extra notes showed up though. So you’re probably right that I just never noticed it before.

As for the “C#-1, while it should start C#”, have you tried changing the octave target?

@Vipes
Copy link
Author

Vipes commented Jul 17, 2018

Yeah, I have. It just seems odd that the program changes it, when the notes are very well in the range.

@isalin
Copy link
Owner

isalin commented Jul 17, 2018

From what I can tell, the entire song in the edited version takes place across two octaves (4 and 5).

Since ffxiv only has access to 3 octaves, TBbard tries to “round” octaves up/down to fit those 3 octaves. This means that there are only 2 octave targets that will result in "correct playback".

Octave Target 3:

FFXIV MIDI
-1 4
0 5
+1

Octave Target 4:

FFXIV MIDI
-1
0 4
+1 5

Those two should result in the most natural sounding playback.

By default, it just selects the one with the highest quality. If several octave targets result in the same quality (as it does here), it'll just pick the first one on the list.

I'll look into a more natural way of selecting the default octave target in the future!

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

2 participants