Storing/Calling Audio and More

I'm working on a pretty ambitious project at the moment and I keep coming up to this same point and then getting overwhelmed and moving to other parts of the project. The eventual idea is to have a person be able to record a variable number of messages, to be played back at specific times in the code. I was thinking about getting this https://www.adafruit.com/products/1788 to play back the audio.

Here are the problems I'm facing right now:

  1. How could I make a group of audio files, while having the capability to change the size of the group to add or subtract from the size of the group through an interface? -- I was first thinking of a variable sized array, but then if I delete the information in, say, block 2 of 4, that block is empty. I was looking for a way to shift the values so that there are only as many spaces in the grouping as there are audio files. I looked a bit at lists, but I'm not familiar with them, though I'm still reading up to see if a list would do what I want.
  2. Is there a better way to make a menu interface on Arduino than with a bunch of screenName1 variables and nested if statements? -- This approach to menus makes my brain bleed. Having to put the draw statement at the end of the last if so that the loop doesn't continuously redraw the screen, plus the miles of if statements and curly brackets just seems terribly inefficient.
  3. Recording the audio. I've seen a few modules that would give the capability of recording audio, but the code to begin and end recording, plus saving that to a file, naming that file, storing it's location to be accessible to the grouping from (1), all while managing a visual user interface seems like it might be a tad far-reaching for the Arduino Mega2560, from what I've read. The code alone to record audio that I've read has me totally baffled. (See: http://www.instructables.com/id/Arduino-Audio-Input/?ALLSTEPS). -- Any tips here at all would be appreciated. This is the first time I've working with audio on Arduino and it has me on the ropes.

Am I being too far-reaching with this idea? I essentially just want to make one of those recordable greeting cards, but with more messages and the ability to record, rerecord, add, and subtract messages as the user sees fit.

The shield you linked to already allows you to record and play audio. Adafruit also provides an Arduino library to simplify the usage of the hardware on the shield.

  1. A dynamically sized array would fit your bill, if you delete an entry move all the entries until the end of the array one step down (or up depending on how you look at the array).

  2. Does you project include a display? If yes, please provide information about what type you're planning to use.

  3. See above. You're hardware already includes that possibility and it even allows you to store the audio in a highly compressed format (OGG). What else do you need?

I guess I should read through their audio library first then. Doh!

  1. That's what I was thinking. I guess, to move all of the entries over the deleted entry, I would have to write a for loop that began at the selected deletion, then shifted every one ahead of that, up to the maximum. I'm looking it up now, but in case someone answers the question before I find thee answer, in a dynamically sized array, moving all of the values down one step, would that still leave an empty value at the end? If so, I could write that after the for loop it erases the last entry, but I just wanted to be sure not to erase a "filled" section.

  2. It will definitely have a display. I want a display that is large, but wide, instead of nearly square like most are. At the moment I'm using http://imall.iteadstudio.com/im120417021.html but I don't think I'm going to use the touch functionality on this project, so I'm looking at other screens. This https://www.adafruit.com/products/1680 screen seems really nice, but it's a little taller than I want, and it, combined with the RA8875 Driver board adds a lot of money to the project, so I'm definitely still shopping around for that.

  3. I didn't even realize that the Adafruit board had the ability to encode. I chose it several months back, but it wasn't compatible with the mega then. When I saw that it was compatible with the Mega now I didn't even bother to reread the specifications of the device. Sorry about that. When I looked up tutorials and found that Instructable, I read through the code and it seemed so far out of my league that it just made me give up on that aspect for the moment. I guess I should pay more attention to the hardware I've already chosen.