Sign in to follow this  
prodigenius

Guitar Hero - but with Real Instruments

Recommended Posts

So one day I was playing Guitar Hero and I noticed how funny it was that I would play Guitar Hero for literally 4 hours a day and never touch my real guitar. So I wrote a pretty cool game that has the game inspired by Guitar Hero and Rock Band, but it uses your computer's microphone to pick up sound on you play on a real instrument. The URL is http://www.testfrenzy.com/games/musichero/ It's not completely finished yet, but I'd appreciate any comments! This is my first java game, but I promise it doesn't (too badly) look it. I really enjoy playing it and want to know what you think! thanks!

Share this post


Link to post
Share on other sites
Chords are prohibitively difficult to detect, because each instrument generates different harmonics. Even within instruments, say a trumpet, a silver one sounds brighter (different partials) than a brass one. These harmonics are virtually indistinguishable from chords without superb software. In fact, there is only one program that I'm aware of that supports pitch extraction from polyphonic music, and it's very expensive.

The game doesn't recognize the microphone? I'm not very good with Macs, so do you know any way to fix that?

Share this post


Link to post
Share on other sites
Quote:
Original post by prodigenius
The game doesn't recognize the microphone? I'm not very good with Macs, so do you know any way to fix that?
Running in debug mode I see the following:

java.lang.IllegalArgumentException: No line matching interface TargetDataLine supporting format PCM_SIGNED 5000.0 Hz, 8 bit, stereo, 2 bytes/frame,  is supported.
at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:459)
at music.getBackgroundNoise.run(getBackgroundNoise.java:96)
at java.lang.Thread.run(Thread.java:637)

At a guess, the problem is that you are requesting a stereo microphone - don't see many of those outside of the recording studio [smile]

Share this post


Link to post
Share on other sites
It turns out there were 2 problems: one was what you said, that stereo mikes are rather uncommon (turns out all of the laptops I tested it on had them) and some mac distributions only accept 44.1kHz input.

It should be fixed now!

Share this post


Link to post
Share on other sites
Sign in to follow this