Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by tydygunn · Nov 21, 2012 at 01:40 AM · soundpackagemusic

Parse music files for specific notes (DDR-style game)

Hello all!

I'm making an interactive display for my college in which people walk in front of an Xbox Kinect attached to a projector and play a music sequence one note at a time by hitting the onscreen notes with their hands. The requirement for the project is to have 10 songs to play, and while I could hard code in the note sequence, I wanted to know if there was any package that could parse an .mp3 or a .wav and pull out basic notes. Something that would be useful in making a Dance Dance Revolution or Guitar Hero style game.

This would really help if we wanted to add more songs to the display later, or if we wanted to change the theme of the songs for holidays.

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by DaveA · Nov 21, 2012 at 01:44 AM

Deconstructing music from a music file is hard stuff. Attempts have been made, google it (you would not find it in Unity). Unity does have an audio spectrum analysis API but it would only work for the simplest songs (a single flute playing a melody, MAYBE).

I would suggest looking at MIDI files. They should be easy to find or create. Then you can sync the MIDI performance more easily to what's on screen. If the MIDI file is a very good reproduction of the MP3 or Wav rendition, you could start both at the same time (MIDI would be silent, the other would play out loud) use the MIDI data as the notes you're looking to hit.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tydygunn · Nov 21, 2012 at 04:13 AM 0
Share

I will look into this, thank you!

avatar image
0

Answer by ShawnFeatherly · Jan 12, 2015 at 10:42 PM

I agree MIDI is the way to go. To parse the MIDI file you can either:

  • Do it yourself using the spec: http://faydoc.tripod.com/formats/mid.htm

  • Try to find a library that handles midi file parsing. Here's one, but I haven't tested it: https://github.com/tebjan/Sanford.Multimedia.Midi

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

audio change object size 1 Answer

Is it possible to have mulitple soundtracks on a game? 3 Answers

3D Audio: Selectively Apply the Doppler Effect. 2 Answers

Muting all Sound / Music from options menu 1 Answer

How to mute music independent from other sounds using mixers? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges