XNA Creators Club Online
Page 1 of 1 (13 items)
Sort Posts: Previous Next

Music Game

Last post 3/18/2009 7:50 AM by Big Daddio. 12 replies.
  • 3/12/2009 7:06 PM

    Music Game

    Hi,
    Is there any musical game, like piano game, guitar game which some musical interaction is triggered by song?
    Any reference or source code?
    Is there any method to implement such game that the interaction is triggered with the beat of song?
    Thanks.

    L
  • 3/12/2009 11:03 PM In reply to

    Re: Music Game

    I'm doing this in my game, so yes, it is possible.  At least one game already released for XNA, Groov, does this as well, though in a very different way from how I'm doing it.  There are a number of topics discussing the more technical/coding aspects of this, I'd recommend doing a search of the forums for "music timing" or something like that.
    ~ Adam ~
    Time Flows, But Does Not Return - a game about the feeling that your life is escaping you
    Too Big To Fail - a prototype created for September's Experimental Gameplay Project on the theme of "Failure".
    My Gamasutra blog about game design
  • 3/16/2009 11:17 PM In reply to

    Re: Music Game

    Ya, I have read some about music timing.
    How about if I want to show somethings when a song is being played?
    e.g. At the 5th second, there is a circle at a position on the screen; At 1 minute, there is a square at another position.
    How may I do this timing?
    Any reference? or links? or source code?
    Thanks
  • 3/17/2009 12:04 AM In reply to

    Re: Music Game

    As far as events being triggered by the beat of the song, I don't think this is possible in XNA (well I know it isn't in 2.0, maybe in 3.0?), since you don't have access to the data of the music. You could store timings in a different file and use those to trigger the events. Or you could use a library like FMOD that will give you access to the spectrum so that you can do processing on it at run-time (though this would only work on PC).
  • 3/17/2009 3:27 PM In reply to

    Re: Music Game

    Really thanks.
    I am a novice, so may I ask is there any resource or reference that I may have a look to implement the method "store timings in a different file and use those to trigger the events"?


    Thanks
  • 3/17/2009 4:04 PM In reply to

    Re: Music Game

    Graphics Runner is making it way more complicated than it needs to be.  As long as you know your tempo (i.e. BPM) and time signature, you can have XNA calculate the beats for you.  I know it's possible, because I've got it working in my game.  As I've said, there have been a number of topics about this in the past; a quick search for "music timing" should get you on the right track.
    ~ Adam ~
    Time Flows, But Does Not Return - a game about the feeling that your life is escaping you
    Too Big To Fail - a prototype created for September's Experimental Gameplay Project on the theme of "Failure".
    My Gamasutra blog about game design
  • 3/17/2009 9:27 PM In reply to
    • (0)
    • premium membership
    • Posts 66

    Re: Music Game

    Graphics Runner:
    As far as events being triggered by the beat of the song, I don't think this is possible in XNA (well I know it isn't in 2.0, maybe in 3.0?), since you don't have access to the data of the music. You could store timings in a different file and use those to trigger the events. Or you could use a library like FMOD that will give you access to the spectrum so that you can do processing on it at run-time (though this would only work on PC).


    You can do this in 3.0 using the MediaPlayer.GetVisualizationData method. I would do a search on that. I used that data in the game I am working on ( finally in playtest :) )
    My Game: Bojambo Pop
  • 3/17/2009 11:22 PM In reply to

    Re: Music Game

    Thanks for your suggestion.
    How about if I really want to do it by time?
    If I just want to set some effect by the time of the music, like lyric of a video, what should I do?
    Any reference?
    Thanks.
  • 3/17/2009 11:26 PM In reply to
    • (0)
    • premium membership
    • Posts 66

    Re: Music Game

    I'm not sure I fully understand. What are you going to be basing the timing on? Something you predetermine?
    My Game: Bojambo Pop
  • 3/18/2009 5:21 AM In reply to

    Re: Music Game

    You can actually watch the audio stream data if you like, its in the docs.


    Henry
    My wife says most of my posts should finish with "Get off my lawn"

    smokinskull.com
    My Twitter
  • 3/18/2009 5:26 AM In reply to

    Re: Music Game

    You can watch some data which represents frequencies in the currently playing audio. You cannot see the actual audio.This data is useful for visualizations more than anything but you might be able to get enough information to do what you want.

    See http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.visualizationdata.aspx
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 3/18/2009 7:06 AM In reply to

    Re: Music Game

    Actually,
    I would like to write a music player showing "animated" Lyrics in my game.
    The Lyrics is in the form of circle showing at a position for some period of time.
    I do not know how to watch the time of music, and I do not know whether watching for the time, and the showing the circles will have dome delay.
    I hope that there should be real time response to show the cicles.
    e.g. for 5-7 seconds, there is a circle on the top right hand corner, and then it disappears;
          for 10-12 seconds, there is a circle on the bottom left hand corner, and then it disappers.

    Any reference or suggestions? Thanks.
  • 3/18/2009 7:50 AM In reply to

    Re: Music Game

    You may also be able to place markers in the wav, like you can place loop markers, and watch for the markers. This is something I am not certain about, the XACT thing is really on my nerves lately! : )

    Right now I am wanting to be able to use XACT 3 so I can use the filters...


    Henry
    My wife says most of my posts should finish with "Get off my lawn"

    smokinskull.com
    My Twitter
Page 1 of 1 (13 items) Previous Next