Dear folks,
Hi. I'm helping my student with their Music Maker shield project. I used one of these about five years ago, but want to verify a couple things I couldn't find in the tutorial.
1. Is one able to pause and resume playback of an audio file? (I assume no, but they would love to do this & so I'm asking just in case.)
2. Is there a limit to how many files the Music Maker can address? I know of other brands' shields that limit the user to 32 soundfiles. My guess is that whatever limit there is would be huge, but thought I'd ask. I think the student would need fewer than one hundred sound files.
Thanks much for any help & advice,
Doug
Music Maker: Pause? # files limit?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Music Maker: Pause? # files limit?
Yes, you can pause and resume playback with the Music Maker. It is based on using the uart serial control and sending a 'p'.
No limited to the number of files, but you do have to adhere to the 8.3 naming convention.
Code: Select all
// if we get an 'p' on the serial console, pause/unpause!
if (c == 'p') {
if (! musicPlayer.paused()) {
Serial.println("Paused");
musicPlayer.pausePlaying(true);
} else {
Serial.println("Resumed");
musicPlayer.pausePlaying(false);
}
}
}
Please be positive and constructive with your questions and comments.