FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Vocal MIDI to Sheet Music conversion and vice versa

 
Post new topic   Reply to topic    ScoreHero Forum Index -> Software
View previous topic :: View next topic  
Author Message
TigerHawk310  





Joined: 29 Mar 2006
Posts: 254

PostPosted: Wed Feb 27, 2008 2:31 pm    Post subject: Vocal MIDI to Sheet Music conversion and vice versa Reply with quote

A lot of singers and IRL instrumentalists might be interested in converting the note tubes in Rock Band to sheet music or standard notes, for 2 major reasons:

1. IRL musicians know what a C sounds like, but not so much what a notetube slightly below the second line sounds like..

2. IRL instrumentalists can play a pitched instrument into the microphone for a cool way of playing the vocal part. For example, if I could convert vocal parts to sheet music in Finale, then just use autotranspose to move it into a part for a Bb instrument, I could pull out my tenor sax and play the part in the game.

Also, for custom folks, this should help you put vocals into your custom manually from the sheet music; it's easy to find vocal sheet music for most songs, and this can let you code your vocal part more or less mechanically.

I haven't been able to figure out how to rip the parts from my disc, so I started with the sample vocal part for "Say It Ain't So" at the top of this thread:

http://rockband.scorehero.com/forum/viewtopic.php?t=1711

Pitch matching by ear was easiest for the part starting at "Somebody's". I was able to match a 58 to an F#; the octave doesn't matter for gaming purposes but I'd have to work to figure out what octave it's supposed to be in. Putting an interval of 1 equal to a half-step works correctly and sounds right when I manually enter it into Finale--so the "Somebody's" is all on an F#, the "Hei-" is on a G#, and the "ne'" is on a G.

Next, timing. The phrase "Somebody's Heine'" should be, with the quarter=78 speed used in the game, a sequence of 3 eighth notes then 2 quarter notes, but that's obviously not how the game works. A better way of figuring out note lengths is to use the measure length and divide appropriately. Measure 11 starts right on "Some", Measure 12 starts right on "crowd-". "Some" has a noteon at 19200, "crowd-" at 21127, for a difference of 1927. For the 4/4 time Say It Ain't So, this would make a quarter note ~ 480 and an eighth note ~ 240. This matches up somewhat well with the note durations encoded in the game:

"Some-" = eighth = 228
"bod-" = eighth = 212
'y's" = eighth = 117
"Hei-" = quarter = 449
"ne'" = quarter = 156

The notes that are held nearly full come out right, but the "-y's" and "-ne'" syllables are actually cut off early. If you were actually writing out the sheet music nearly exactly to the Rock Band notechart, the "-y's" would be a 16th note followed by a 16th rest, and the "-ne'" would be a dotted eighth note followed by a 16th rest. You can do it that way, or you can make life a little easier for yourself by ignoring rests and using noteon to noteon intervals to set timing. In this case:

19200 4 lyric Some-
19200 4 noteon 58 75
19428 4 noteoff 58 0
19460 4 lyric bod-
19460 4 noteon 58 96
19672 4 noteoff 58 0
19688 4 noteon 58 79
19688 4 lyric y's
19805 4 noteoff 58 0
19914 4 noteon 60 80
19914 4 lyric Hei-
20363 4 noteoff 60 0
20379 4 noteon 59 75
20379 4 lyric ne'
20535 4 noteoff 59 0
21034 4 lyric is
21034 4 noteon 58 100

"Some" = 19460-19200 = 260 = eighth note
"bod-" = 19688-19460 = 228 = eighth note
"y's" = 19914-19688 = 226 = eighth note
"Hei-" = 20379-19914 = 465 = quarter note
"ne'" = 21034-20379 = 655 = 480+175 = quarter + dotted sixteenth note

Also messy, but more like how the ear hears the notes. Because the timing is inexact, it may not be feasible to transpose either way automatically, but a program could list recommended note length which the user could override--sometimes you'll want the rest, sometimes you won't.

I'd like to check that the pitch correspondence is the same between songs, but haven't been able to figure out how to rip the disc (X360) based on the other files...how do I get at the vocal midi parts? I don't actually care about any of the other parts for modding purposes.
Back to top
View user's profile Send private message
ajanata  





Joined: 07 Jul 2007
Posts: 1167
Location: South Bay Area, CA

PostPosted: Wed Feb 27, 2008 4:19 pm    Post subject: Reply with quote

Quarter notes should always be 480 MIDI pulses (the times for noteon/noteoff events are given in MIDI pulses), but even if it isn't this is provided in the MIDI's header.

I believe I saw somewhere (I forget exactly where) that the pitches are the same on every song. It would not make sense for them to have it different on every song. I would not be surprised if the canonical pitch of each of the MIDI notes is the actual pitch that the game wants, but I don't know enough about MIDI files to say that for certain. Also, there's no guarantee that they actually mapped them to the proper octaves.

As for ripping the content from the disc, there's a thread about a program that can detect MIDI files in a larger archive file... Being able to read the archive file from the 360 disc is left as an exercise to the reader.
_________________
Back to top
View user's profile Wiki User Page Send private message Visit poster's website MSN Messenger XBL Gamertag: ajanata
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Sat Mar 01, 2008 1:09 pm    Post subject: Reply with quote

The pitches in the RB MIDI files are the normal MIDI pitches - if you take the vocal channel of an RB MIDI file in a normal MIDI editor like Anvil and eliminate the extremely high and low notes (their meaning is described here http://rockband.scorehero.com/forum/viewtopic.php?t=1711 ) you basically have the exact sheet music the game is expecting you to sing! It doesn't do the diagonal notetubes correctly, so playing the MIDI with a normal program synced to the game doesn't always get you 100% (beats my own score in the likes of Gimme Shelter though!). It's easy to get these MIDI files from a PS2 disc (see other threads), not so easy from a 360 or PS3 disc (usually needs special hardware I believe).

I was considering writing a program that automatically processed the MIDI files in various ways from the PS2 disc, eg outputs a file with just the "sheet music" in, perfect robot singing, tells you the range to advise octave changes, maybe even calculates optimal OD paths (not just for vocals) etc. but I gave up quickly when Java's builtin MIDI library throws exceptions on the RB MIDI files. Might try again soon.
Back to top
View user's profile Send private message
ajanata  





Joined: 07 Jul 2007
Posts: 1167
Location: South Bay Area, CA

PostPosted: Sat Mar 01, 2008 2:36 pm    Post subject: Reply with quote

Yeah, I was originally going to use Java for my chart generations/path optimization program until I found out that it doesn't like RB .mids for some reason. I ended up using PHP and a nice library to parse the MIDI files. You could use this library to parse to a text file and then do the rest in Java if you so choose, but for the time being I'm doing it all in PHP.
_________________
Back to top
View user's profile Wiki User Page Send private message Visit poster's website MSN Messenger XBL Gamertag: ajanata
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Sun Mar 02, 2008 12:40 pm    Post subject: Reply with quote

Thanks, might give that a go. Although I was too lazy to get this far so I don't know what I'll actually do!
Back to top
View user's profile Send private message
Kawigi  





Joined: 27 Feb 2008
Posts: 2879
Location: Redmond, WA

PostPosted: Mon Mar 10, 2008 9:47 pm    Post subject: Reply with quote

GuestWednesday wrote:
The pitches in the RB MIDI files are the normal MIDI pitches - if you take the vocal channel of an RB MIDI file in a normal MIDI editor like Anvil and eliminate the extremely high and low notes (their meaning is described here http://rockband.scorehero.com/forum/viewtopic.php?t=1711 ) you basically have the exact sheet music the game is expecting you to sing! It doesn't do the diagonal notetubes correctly, so playing the MIDI with a normal program synced to the game doesn't always get you 100% (beats my own score in the likes of Gimme Shelter though!). It's easy to get these MIDI files from a PS2 disc (see other threads), not so easy from a 360 or PS3 disc (usually needs special hardware I believe).

I was considering writing a program that automatically processed the MIDI files in various ways from the PS2 disc, eg outputs a file with just the "sheet music" in, perfect robot singing, tells you the range to advise octave changes, maybe even calculates optimal OD paths (not just for vocals) etc. but I gave up quickly when Java's builtin MIDI library throws exceptions on the RB MIDI files. Might try again soon.


I'm in the middle of creating a custom midi parser for Java which successfully reads RB midis, let me know if you're interested in what I come up with in the next couple days.
Back to top
View user's profile Wiki User Page Send private message MSN Messenger XBL Gamertag: Kawigi
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Tue Mar 25, 2008 4:45 pm    Post subject: Reply with quote

I always forget to read this forum. Still didn't get round to doing much outside some very basic php scripts but I'd like to see any java stuff you've come up with.

Going to try some simple sheet music generation programs now.
Back to top
View user's profile Send private message
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Wed Mar 26, 2008 6:50 pm    Post subject: Reply with quote

I have an ugly PHP script which takes the game MIDI files and strips out everything except the vocal track notes and lyrics. This can then be used directly in the MIDI/notation software of your choice. I don't think I should upload these MIDI files for the forums because they directly contain too much information straight from the game.

I only have Anvil really and the free version won't print/export the sheet music from a MIDI anyway (you can screenshot a couple of bars). I tried GNU lilypond, but the included scripts to convert the MIDI to its own format don't work perfectly and miss out important things like rests. Lilypond should be fine for rendering if it can be given an appropriate input though. Plus it's command line so I can run it 58 times quite easily. Anyone have any other suggestions that produce sheet music from MIDI or MusicXML or similar, are free and can be run as a batch?

The MIDI probably needs processing to somehow show the diagonal parts of the note tubes. Haven't quite figured out how they work yet - you don't hear them in a MIDI player. Guess they should be shown as glissando but it could get very messy, but sheet music autogenerated from a recording someone playing (seems to be what these MIDI files are) is rarely going to be perfect.

I'll release the scripts and/or sheet music (not the MIDI files) when they're a bit more polished.
Back to top
View user's profile Send private message
ajanata  





Joined: 07 Jul 2007
Posts: 1167
Location: South Bay Area, CA

PostPosted: Wed Mar 26, 2008 7:33 pm    Post subject: Reply with quote

Diagonal tubes are indicated by the lyric being only a + -- the diagonal extends from the stop time of the previous note to the start time of the current note.
_________________
Back to top
View user's profile Wiki User Page Send private message Visit poster's website MSN Messenger XBL Gamertag: ajanata
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Wed Mar 26, 2008 10:07 pm    Post subject: Reply with quote

ajanata wrote:
Diagonal tubes are indicated by the lyric being only a + -- the diagonal extends from the stop time of the previous note to the start time of the current note.


Knew it would be something obvious, thanks :)

Guess that can't go in a standard MIDI file anyway (except as pitch bend, ugh) so I'll try generating some MusicXML or LilyPond myself.
Back to top
View user's profile Send private message
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Thu Apr 03, 2008 1:31 pm    Post subject: Reply with quote

GuestWednesday wrote:
Guess that can't go in a standard MIDI file anyway (except as pitch bend, ugh) so I'll try generating some MusicXML or LilyPond myself.


Gave up, far too hard to make it look half decent. Sticking with MIDI for now.

My PHP script is working quite well at writing standard MIDI files for the vocals and I've added support for glissandos (playing every note in between) in the diagonal note tubes.

Portamento (smooth transition between two pitches) either directly (it's in the MIDI spec, don't know how much playback/notation support there is or if I'm even doing it right) or through pitch bend are other possibilities.

It also generates a text file with the lyrics under the note names or "talky type" (modifier symbol describing unpitched parts). These are really simple and don't have any rhythm information but quite handy to find out how a bit of a song goes. I don't think there's much in a graphical note chart that can't be included in plain text and I prefer these to search through and check for quick reference.
Code:
#     #  #     #   #   
Mick? al-right fel-las

*     *   
Let's go!

G# F#   F#   F#  F#   F# G# C#   
Oh it's been get-ting so +  hard


If I continue much further I'll probably rewrite it in a sensible language (and in a more sensible way perhaps!), with my own MIDI file parsing unless anyone wants to release stuff they've done, through in a GUI, etc.

Give it a go if you like. You need PHP with CLI support installed (easy windows installer: http://www.php.net/get/php-5.2.5-win32-installer.msi/from/a/mirror make sure you choose CLI, web server stuff isn't needed). Download this PHP MIDI library http://staff.dasdeck.de/valentin/midi/ and my script http://www.friendsnippets.com/snippet/230/ . Put the classes directory and my script in the same directory, then run it from the command line like
Code:
php rockvocals.php
If you don't understand these instructions you'll probably need to wait for me or someone to write a different program, sorry.

Probably nobody will bother running this version, but I'd like to hear comments, feature requests etc. even if you don't run it.

I'm mainly writing this for programming practice and it will probably be made obsolete by the graphical note chart generators being written but I do think the text file outputs are fairly useful and I may continue working on other areas. I'll probably post the text file results from the on-disc songs in the vocals forum when I'm happy with the output format.
Back to top
View user's profile Send private message
FortisVenaliter  





Joined: 02 Aug 2007
Posts: 44
Location: Orlando, FL

PostPosted: Tue Apr 08, 2008 12:01 pm    Post subject: Reply with quote

What do you think about expanding the program? Maybe, take a dB chart file, take the syncing from it, convert it to the sheet music format, allow changes, and then supporting conversion to MIDI/chart (once TurkeyMan implements vocals)...
_________________
Louis Ingenthron
Fortis Venaliter

Developer of Unsigned
Unsigned Forums

[X] Get Unsigned up
[_] Get Unsigned online
[_] Get Unsigned Vocals working
[_] Sleep
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger XBL Gamertag: FortisVenater
GuestWednesday  





Joined: 01 Jan 2008
Posts: 314
Location: UK

PostPosted: Tue Apr 08, 2008 11:59 pm    Post subject: Reply with quote

FortisVenaliter wrote:
What do you think about expanding the program? Maybe, take a dB chart file, take the syncing from it, convert it to the sheet music format, allow changes, and then supporting conversion to MIDI/chart (once TurkeyMan implements vocals)...


I wasn't even thinking much about customs when I started (thought that's what everyone was already working on), more analysis of existing songs. All this script currently does for "sheet music" is output a MIDI with most non-vocal stuff stripped away (and some things modified/added for better playback/notation).

If I understand, people currently use dB for guitar/bass/drums and krmaker for vocals. I should be able to pretty easily make a program that takes a valid RB/GH MIDI (from dB or wherever), prepares it for importing into krmaker (I've read about people messing around in anvil to do this) and then merges it all together at the end. Is that what's needed?

I've only really skimmed this subforum about customs and never looked into GH stuff much so I might have missed the point. If I've got the right idea I can try and do that, otherwise I'll probably need some background reading links (feedback and db are bad google search terms).

edit: What I described isn't really time intensive to do by hand in anvil or whatever. Found dB on the other side of SH, and foudn chart2mid2chart, probably makes more sense if this sort of stuff went straight in them? The point of this was working on lots of existing songs in bulk. Happy to write a MIDI sort of utility of some sort if it's useful to people though.

edit2: Here's the Vocals Technique thread with all the text files, if anyone can help generating them for DLC then PM me or just post the text files.

If anyone wants me to program anything useful for analysing in-game songs or making customs or something, also PM me or post!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ScoreHero Forum Index -> Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum





Copyright © 2006-2024 ScoreHero, LLC
Terms of Use | Privacy Policy


Powered by phpBB