Babies just want to have fun
- Publish Date
- Authors
- Ali Ibrahim
- Location
- Virtual and Denver, CO, USA
Transcript
It’s never been easier to listen to music! With an internet connection and your favorite streaming service, you’re only a couple of taps away from enjoying almost any song ever recorded. Well, assuming you have a phone or a computer … and you know how to read and spell. So if you’re an 18-month-old like my son, you might think it’s never been harder to listen to music!
Join me on my journey to make music more accessible for my young son. From prototypes to kinda-finished products, we’ll put together a music player that gives my son the ability to enjoy music like the rest of us.
This talk was presented as a whimsy session at RubyConf 2021.
Links to things from the talk:
- A magic mirror aka The Mirror of the Future
- Raspberry Pi GPIO music box tutorial
- Adafruit Audio FX Sound Board
- 00:00
- (upbeat music plays)
- 00:04
- - Hi everybody.
- 00:05
- This whimsy session
- 00:06
- is heavily inspired by my son.
- 00:08
- He's about a year and a half.
- 00:10
- Well, closer to two
- 00:11
- by the time y'all watch this video.
- 00:13
- And he's really into music.
- 00:16
- You know, actually, he's really into Daft Punk.
- 00:19
- (Daft Punk's "Harder, Better, Faster, Stronger" plays)
- 00:29
- - No, seriously, he's really into Daft Punk.
- 00:32
- ♪ Makes sense ♪
- 00:37
- ♪ Harder, Better, Faster, Stronger ♪
- 00:41
- (Daft Punk's "Harder, Better, Faster, Stronger" plays)
- 00:42
- - So you can't tell from that video clip there
- 00:44
- but my son is listening to Daft Punk on a vinyl record.
- 00:47
- And my son's amazing.
- 00:49
- He can do a lot of things.
- 00:51
- But he doesn't quite have the skills yet
- 00:52
- to turn on the stereo, put a record on,
- 00:55
- and then, you know, hang out and listen to it.
- 00:58
- So you can imagine when he wants to listen to Daft Punk
- 01:00
- it can be a pretty frustrating experience.
- 01:03
- (child whines)
- 01:10
- - Okay. Well, we don't have to listen
- 01:12
- to Daft Punk on a vinyl record.
- 01:13
- There are other options.
- 01:15
- For example, we all walk around every day
- 01:17
- with these pocket computers
- 01:19
- that have Spotify, or Google Music, or Apple Music,
- 01:23
- or whatever streaming service you want to subscribe to.
- 01:26
- And after a couple of clicks,
- 01:27
- Daft Punk's playing, no problem.
- 01:30
- But again, this is another situation
- 01:32
- where my son doesn't have a lot of control
- 01:34
- over the experience.
- 01:36
- So, like any good engineer, I came up
- 01:38
- with a really complicated solution to this problem.
- 01:41
- (upbeat music plays)
- 01:48
- - So, the basic criteria for what I was looking for
- 01:51
- was to have something that had the look
- 01:53
- and feel of a toy.
- 01:54
- So it might be something that my son's familiar with.
- 01:57
- You could imagine that I might have something
- 01:58
- that's the size of this little kid's shoebox.
- 02:03
- And the box might have a speaker and three buttons.
- 02:09
- And as you click on each of the buttons
- 02:12
- a different song plays.
- 02:15
- When I first embarked on this mission
- 02:18
- to make this music box for my son,
- 02:20
- the first thing that came into my mind was a Raspberry Pi.
- 02:24
- Raspberry Pis are these special little computers
- 02:27
- to let us do anything, really,
- 02:29
- like make a magic mirror.
- 02:33
- So Raspberry Pi, I've used them before.
- 02:36
- I don't really know the electrical wiring stuff too well
- 02:39
- but I figured, like, I can do stuff with the Pi,
- 02:43
- I'm halfway there.
- 02:44
- So I've done a little research and I found a tutorial
- 02:46
- on RaspberryPi.org on how to make a music box
- 02:50
- with a Pi and a little Python script.
- 02:53
- So, now I'm all in.
- 02:55
- I can definitely do this.
- 02:56
- I can buy a Pi,
- 02:58
- I can follow a tutorial.
- 02:59
- Let's go!
- 03:01
- There was only one thing I was missing,
- 03:03
- and that was time.
- 03:05
- Despite living through this pandemic
- 03:07
- where we're not going places,
- 03:09
- leaving the house, you know, a lot of time at home,
- 03:12
- I didn't really have a done of free time
- 03:13
- because it turns out when you have little kids,
- 03:19
- there is not much free time.
- 03:21
- So where was I going to find this time
- 03:22
- to work on this project?
- 03:24
- Fortunately, at the beginning of the year at work
- 03:27
- we were having a hackathon
- 03:29
- at work.
- 03:30
- (sparkling music plays)
- 03:31
- So this was a perfect opportunity for me
- 03:34
- to work on this project and see,
- 03:37
- could I actually make something here?
- 03:39
- So, when the hackathon came around,
- 03:41
- I pulled up the tutorial and started getting to work.
- 03:44
- The first thing I had to do was write the Python script
- 03:47
- that was going to power the interactions
- 03:50
- with the Raspberry Pi and the buttons.
- 03:52
- It was, fortunately, not too hard to rock.
- 03:55
- I haven't done a ton of Python ever.
- 03:57
- (Ali laughs)
- 03:58
- - Before this project.
- 03:59
- But it wasn't too hard to, like, follow the instructions,
- 04:01
- pull in the library, and things kind of work.
- 04:04
- I didn't have the music files yet
- 04:05
- but I could pull some free sounds online to make it work.
- 04:10
- And things were going well, things were working.
- 04:13
- I had two buns wired up playing sounds
- 04:15
- but there was one that just was not working
- 04:18
- and I could not figure out what was going on.
- 04:20
- I turned to a tool that's helped me get unstuck a lot
- 04:23
- in the past and that's pairing.
- 04:26
- So, I reached out to a few coworkers and said,
- 04:29
- "Hey, can y'all look at this with me?"
- 04:30
- "Maybe you can figure this out."
- 04:32
- The first thing we looked at was the Python script.
- 04:35
- Nothing, there wasn't that much to it,
- 04:37
- it seemed to be working fine.
- 04:39
- So we immediately rolled out the software.
- 04:41
- The next thing we wanted to look at was the board
- 04:43
- and see, like, was there something not wired correctly?
- 04:47
- So we tried to do this over Zoom.
- 04:49
- I had my phone overhead trying to look at the board.
- 04:53
- Everything's shaking,
- 04:55
- not a good experience for anyone
- 04:56
- to pair and look at a board that way.
- 04:59
- And finally, my coworker Joe had a good idea of,
- 05:01
- "Just take a picture."
- 05:02
- "Take a picture of your board,"
- 05:04
- "send it to us, and we'll see if we can see"
- 05:06
- "what's going on."
- 05:07
- And after a few minutes, fortunately, somebody saw it.
- 05:10
- So here's my board that I had,
- 05:12
- and here's all this stuff wired up.
- 05:14
- And it's a really subtle thing.
- 05:16
- If you have done electrical wiring before
- 05:18
- with a breadboard, it'll stand out to you immediately.
- 05:21
- It did not to me.
- 05:22
- But, you can see here, there's this little gap
- 05:25
- between the different parts of the board.
- 05:27
- A lot of boards, typically, this ground line will run
- 05:31
- all the way up and down.
- 05:31
- Mine was split in half.
- 05:33
- I didn't realize that,
- 05:34
- so I thought I had a ground connection when I didn't.
- 05:37
- (children exclaim in understanding)
- 05:37
- - Fortunately, pairing helped me fix
- 05:40
- this problem really quickly.
- 05:41
- (clapping sounds play)
- 05:43
- - And I was able to keep moving,
- 05:44
- keep moving with the project.
- 05:45
- And here it worked.
- 05:48
- Everything is going extremely well.
- 05:51
- - All right, so now I have a thing that
- 05:53
- might one day become a music box that my son could use
- 05:57
- to listen to music on.
- 05:59
- But after, you know, putting this together,
- 06:02
- working through the hackathon, I wasn't totally satisfied
- 06:05
- with the solution that I'd come up with.
- 06:08
- Like I said before,
- 06:09
- Raspberry Pis are these amazing computers
- 06:11
- that let us do so many things.
- 06:13
- And I felt like it was kind of a disadvantage
- 06:16
- for this project.
- 06:18
- Raspberry Pis have a bunch of software on them,
- 06:20
- they have internet connections
- 06:21
- and all kinds of other stuff that I did not need
- 06:24
- and honestly could be a liability down the road.
- 06:27
- So I went back to the internet, did more research,
- 06:30
- and I came across this board from Adafruit.
- 06:33
- And this board was exactly what I was looking for,
- 06:36
- exactly what I had in mind.
- 06:37
- It's a board that's pre-programmed
- 06:39
- to listen to inputs at different points.
- 06:42
- And, once it receives input,
- 06:44
- it'll play a file associated with that input.
- 06:47
- But now I was presented with a new challenge
- 06:50
- because with Raspberry Pis
- 06:52
- it was something I was a little bit familiar with.
- 06:53
- I hadn't done a lot of Python before, but still familiar,
- 06:57
- I could figure out my way through that.
- 06:59
- But with this Adafruit board,
- 07:01
- I was going into new territory.
- 07:02
- I hadn't done a ton of electrical wiring
- 07:05
- and the board was pretty bare bones.
- 07:07
- If I wanted to wire up some connections,
- 07:09
- I'd have to solder them together.
- 07:11
- So I did more and more research,
- 07:13
- trying to see, well, this is a good idea,
- 07:15
- was this something I'm going to be able to do by myself?
- 07:18
- And I really just wanted
- 07:19
- to have someone I could just talk through it,
- 07:20
- talk through this idea and see,
- 07:22
- "Hey, is this going to work?"
- 07:24
- Fortunately, my coworker Jason,
- 07:27
- he does a lot of electrical wiring
- 07:29
- between building amps and speakers and guitar stuff.
- 07:33
- So I figured it was going to be right up his alley.
- 07:35
- So I pinged him and said,
- 07:37
- "Hey, can you just spend like a few minutes"
- 07:38
- "with me, talking through this thing?"
- 07:41
- - Hey, thanks for jumping on this call with me!
- 07:43
- (music beeps)
- 08:02
- - Yeah!
- 08:03
- Any other questions about the upcoming project there?
- 08:06
- It sounds like a cool one.
- 08:08
- - Yeah, yeah. No questions.
- 08:10
- Yeah, I'm excited to get working on it.
- 08:14
- - All right.
- 08:14
- Now that I have some questions answered,
- 08:17
- it's time to make the thing.
- 08:19
- (synth music plays)
- 09:23
- - And now it's time to see
- 09:26
- if this thing works.
- 09:28
- - Okay, Momento.
- 09:29
- Wait, wait, wait, wait, wait!
- 09:30
- Así no. Mire. Peligroso.
- 09:32
- - Okay.
- 09:33
- Okay, okay, okay, mire.
- 09:34
- Okay, Faro.
- 09:35
- Aquí tenemos.
- 09:36
- - Okay.
- 09:36
- Empuje el rojo.
- 09:37
- - Okay.
- 09:38
- Mire aquí. El rojo empuje.
- 09:41
- - Okay?
- 09:42
- Te ayudo aquí rojo.
- 09:44
- (button clicks and upbeat music plays)
- 09:48
- (woman giggles)
- 09:52
- (upbeat music plays)
- 09:56
- (upbeat music plays)
- 10:04
- (upbeat music plays)
Ali Ibrahim
- Code Name
- Agent 0022
- Location
- Baltimore, MD