Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 524843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:36:36+00:00 2026-05-13T08:36:36+00:00

Just as a toy, I’m using the iTunes SDK and XNA to make my

  • 0

Just as a toy, I’m using the iTunes SDK and XNA to make my own quasi-GuitarHero game. The actual libraries aren’t important, so I didn’t tag them. This question is about a data structure.

Basically I want to start playing a song, and allow the user to play guitar to the song, recording in memory the Red/Yellow/Green/Blue/Orange key presses, as well as the strum, to play back later.

I’ve tried several different techniques, the most accurate being a bitwise int[] array where each element represents a 10ms time slot (and each bit of each int represents a physical key) once as an offset from the song start. This seems inefficient however, as I have to pigeonhole keypresses into these 10ms slots, not to mention a huge array size for a several minute song.

Any suggestions for a better way to implement this? My goal is to then serialize this data structure to disk for retrieval later. The overall goal of this project is to use this data to control LEDs in some fashion to a song, FWIW.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:36:36+00:00Added an answer on May 13, 2026 at 8:36 am

    I would store the key up and key down events in a log format with a timestamp (relative to the start of the file) at the appropriate precision. You could use a List together with a custom class for storing details of the event type (which key, and up or down) and the timestamp.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using Python for a long time and I've just started to toy
Just recently I've installed the Qt libraries on my computer, and as a complete
Just a simple question, but can't get an answer on my own. In memory
I'm writing a toy car-navigation app for Android, mostly to learn the Android SDK.
I am working on an interpreter for a toy language, just to learn about
For learning purposes I created a toy project using grails. In this project I
So, I'm starting to write some logic for a simple program (toy game on
I'm just playing around with GCD and I've written a toy CoinFlipper app. Here's
I just started using ParseKit to explore language creation and perhaps build a small
Background: I am writing a toy Lisp interperter/compiler in Haskell for my own amusement/edification.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.