Sign in to follow this  
Barrow Boy

Making a personal guitar hero

Recommended Posts

Barrow Boy    138
I've decided that a project I'd like to work towards, after becoming proficient with DirectX programming, is making a sort of mini guitar hero for myself, with songs I'd personally like to play. That goal is far off right now, but I'd like to know a few things now anyway. First of all, how would you go about separating the guitar part of a song from the rest of it (singing, bass, etc)? Are there fancy programs that can do this for you? Could you manage it with a simple equalizer? Secondly, once you've got the guitar part by itself, how to store it? It seems to me like it would be rather inefficient to store every single note in a separate file of its own, but I haven't thought of a better way to do it. Finally, am I getting ahead of myself? I am just starting to learn the basics of Direct3D right now, and I know very little about sound in general, let alone DirectSound. (Are there any good resources to learn about sound?) Keep in mind, all I want to do right now is work on the musical part, not the coding. Thanks in advance for any help.

Share this post


Link to post
Share on other sites
hstubbs3    172
there's filters you can try and pull out the guitar part.. otherwise, maybe if you just used MIDI of the songs??

as for the note storage... why not MP3, with a file containing the offsets for each note, so the prog knows how long to cut out the song if you screw up.

Share this post


Link to post
Share on other sites
Barrow Boy    138
Actually, I don't really understand MIDI at all. What do you mean by using the MIDI of the songs?

You're talking about one big mp3 file, right? Not a bunch of little ones? And what do you mean by the offsets of the notes? (I'm sorry if I'm asking stupid questions, but I'm new to this.)

Share this post


Link to post
Share on other sites
Hodgman    51222
Guitar Hero / Rock Band used the original "master" recordings, which means they have the separate layers of each instrument in separate files (obtained from the recording studio) before being mixed into one file.

Trying to do this backwards (cut a single file back into multiple layers) is near impossible... unless you're in CSI-land.

Quote:
Actually, I don't really understand MIDI at all. What do you mean by using the MIDI of the songs?
The MIDI file format doesn't store sound waves (like a WAV or MP3 does), it stores the actual musical notes and instructions on how to reproduce the sounds using virtual instruments. If you based your game off MIDIs then it would be much easier to cut out individual notes, etc...
However, MIDIs generally don't sound as good as MP3s, and they can't store the vocals or any other 'non-instrument' sound.
Quote:
You're talking about one big mp3 file, right? Not a bunch of little ones? And what do you mean by the offsets of the notes?
You could have a data file that accompanies the MP3 file, which contains information on when the notes happen.
E.g. Note #42 lasts from 36 seconds to 37.4 seconds. (The 'offset' just means a time value measured from the start of the file, etc...)
Then using this information you could silence the MP3 for that time period if the player misses the note.

Share this post


Link to post
Share on other sites
Majorlag    100
A MIDI file, unlike an mp3, contains notes that are played by simulated instruments. Thus, the data you need is inherent to the format. It does tend to sound like ass though.

My suggestion would be to just not bother with the wrong-note noises or separating the tracks. Or, if you really feel you must, then simply play the wrong-note sound over the music without altering it because it will convey the same information to the player anyway, and when the player misses a note either play the wrong-note noise or just mute the song for an instant. It ain't perfect, but it will be a lot less work and almost the same.

Share this post


Link to post
Share on other sites
Barrow Boy    138
Quote:
Quote:
Actually, I don't really understand MIDI at all. What do you mean by using the MIDI of the songs?
The MIDI file format doesn't store sound waves (like a WAV or MP3 does), it stores the actual musical notes and instructions on how to reproduce the sounds using virtual instruments. If you based your programs off MIDI's then it would be much easier to cut out individual notes, etc...


So, would basing them off MIDIs be like personally rewriting the entire song? I take it there aren't ways to convert files to MIDI?

Quote:
My suggestion would be to just not bother with the wrong-note noises or separating the tracks. Or, if you really feel you must, then simply play the wrong-note sound over the music without altering it because it will convey the same information to the player anyway, and when the player misses a note either play the wrong-note noise or just mute the song for an instant. It ain't perfect, but it will be a lot less work and almost the same.


That's a good idea; one I was planning on resorting to if there wasn't a good way to do an alternative.

Share this post


Link to post
Share on other sites
Hodgman    51222
Quote:
Original post by Barrow Boy
So, would basing them off MIDIs be like personally rewriting the entire song? I take it there aren't ways to convert files to MIDI?
I have seen tools to convert waveforms to MIDI's... but they don't really work.

However, I just typed "pop music midi" into Google and a lot of pages came up - other people have likely done the conversion for you ;) (keep in mind that downloading these songs *is* copyright infringement, even though they are of inferior quality)


Majorlag's suggestion of just playing the "incorrect" noise over the top is a far simpler solution to your problem though.

Share this post


Link to post
Share on other sites
Barrow Boy    138
Quote:
Original post by Daaark
Barrow, look up a project called Frets On Fire


That's neat. I noticed they were still able to separate the guitar. Were those songs MIDI files that the game's creator had written?

I didn't try out importing my own songs, so I'm not sure how that works out, but that's the general idea of what I was hoping to make. Different songs, which is, or course, why I want to make my own. And different graphics (I found it hard to quickly tell which notes needed to be strummed or not, for example).

I was also wondering whether it would be conceivable to use an actual guitar hero/rock band controller (one with a usb plugin) to play the game. I don't know anything about input, but how tough would it actually be to use one of those guitar controllers in your own game?

Share this post


Link to post
Share on other sites
Daaark    3553
Quote:
Original post by Barrow Boy
I was also wondering whether it would be conceivable to use an actual guitar hero/rock band controller (one with a usb plugin) to play the game. I don't know anything about input, but how tough would it actually be to use one of those guitar controllers in your own game?
I believe XNA / XInput can use the 360 version, since it's just a standard 360 controller with a different shape.

Share this post


Link to post
Share on other sites
Kylotan    9854
Trying to separate out the vocals, guitars, bass, and drums from a single audio file is like trying to separate out the flour, eggs, and sugar from a cake. It's not going to happen, unfortunately.

I think that where the original Guitar Hero didn't have access to the original masters, they'd get session musicians to re-record the song, so they had the separate tracks ready.

XNA uses the C# programming language, yes.

Share this post


Link to post
Share on other sites
Barrow Boy    138
How much different is C# from C++? Is it a big step to learn if I already know the basics of C++? (I know most of the theory of things like inheritance, polymorphism, OOP, etc, but I haven't practiced with them very much.)

Share this post


Link to post
Share on other sites
Sneftel    1788
Quote:
Original post by Kylotan
Trying to separate out the vocals, guitars, bass, and drums from a single audio file is like trying to separate out the flour, eggs, and sugar from a cake. It's not going to happen, unfortunately.

Unfortunately!? Cake is delicious, you cad!

It actually is sometimes possible to pull individual tracks out of audio, in a rather hamfisted manner. Basically, you take a stereo recording and subtract L-R. Anything that's stereo center gets canceled out, leaving everything else. It doesn't work with music that has had any sort of lossy compression, and what gets pulled out is sort of pot luck; generally vocals will disappear, but lead guitar might be center for a primarily instrumental song. Give it a try... it probably won't fit your needs, but it might, and your options are limited.

Share this post


Link to post
Share on other sites
Barrow Boy    138
How do I go about doing that subtraction? I've got the stereo recording set up in my little wave editor program, what's next?

[Edited by - Barrow Boy on August 14, 2008 2:47:11 PM]

Share this post


Link to post
Share on other sites
A dam    130
If you notice while playing guitar hero, The tracks are displayed like so
Iron Man
As Made Famous By: Black Sabbath

they re recorded every song (mostly with studio musicians, and in some cases the original musicians, I know the sex pistols did their own)
You can really notice in the vocals, and sometimes in the guitar tones in the recordings.

I have thought about taking on a project like this as well, and simply planned on recreating the songs myself with myself or friends playing the instruments through the recording gear that we already have.

I'd say that you're two most viable options would be
midi (lower quality but can be done yourself if you have a bit of music experience)
or just looking around town for some local musicians to record the tracks individually.



This is not a project I would take on if you do not have any musical experience, as even writing the player tracks is going to be very similar to translating the actual songs to midi

I would say whatever direction you go (except writing your own midis) is really going to add up.

cost of recording yourself in a studio (A lot)
cost of paying other musicians to record it for you in a studio (even more)
cost of purchasing your own recording equipment and recording it yourself (varies, but for quality your looking at over 5k)
cost of purchasing your own recording equipment and paying someone else to play while you record (too much to be realistic)

Also, due to copyrights being a pain in the ass, distribution of the project with commercial music (yes even re-recorded by different musicians) could pose issues

[Edited by - A dam on August 14, 2008 8:37:42 PM]

Share this post


Link to post
Share on other sites
Kylotan    9854
Quote:
Original post by smcameron
These guys are doing some pretty impressive things with audio: http://www.celemony.com/cms/ Watch the videos.

I was considering posting about Melodyne myself. However, it's worth bearing in mind that almost all of their examples work with single tracks of one instrument, where it's a lot easier to isolate individual notes. They also tend to work with non-distorted instruments which have fewer harmonics. A single low note played on a guitar which typically has overdrive, distortion, chorus, and reverb on it is going to have significant frequency components across the board from 100Hz up to 22KHz, and not just at the predictable intervals but all over the place. It becomes next to impossible to isolate one such note like that when mixed in with everything else.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this