Musical Floppy Drives - Computerphile
Skills:
ML Maths Basics60%
Key Takeaways
This video showcases a project where floppy disk drives are used to play music, with the help of an Arduino board and a Java program, demonstrating the principles of stepper motors, frequency control, and MIDI file playback.
Full Transcript
as with all these things I saw a video on YouTube of something similar and decided I'd like to do it myself just for just see if I could do it I'm Alex I'm a PhD student in computer science here at notingham and we're looking at my musical floppy drives about 18 months ago I came across a video on YouTube of something similar [Music] some guy had taken a load of floppy drives and made them play music and I thought I could do that in each of the floppy drives there's a stepper motor which drives the the read right heads up and down so in the 3 and a half inch floppy drives these ones the SE Motors these little round things here and that rotates and it moves the read right head in and [Music] out each of these stepper Motors the small ones here and on the 5 and a/4 in drive it's well there we go it's a very big motor the disc for the 3 and 1 half in floppy discs is divided into 80 tracks radially from the center and on the 5 and a/ qu in disc originally there I think they had 40 tracks there are high density ones that can have 80 tracks so in fact this drive has got a switch on the front so you can switch between 40 tracks or 80 tracks the read head can move up one step at a time up to 80 steps what we're doing is pulsing the motor you pulse it at the rate of the note you want to play so um every musical note has a certain frequency so you just pulse the the motor at that frequency when you had a floppy disc in your computer you hear it making noises um you get a similar effect with inkjet printers as they go up and down in this case we're explicitly controlling the speed at which it's running so normally it doesn't really matter as long as it does the right amount of steps and it does everything in the right order um in this case we want it to go exactly at the right frequency so it makes exactly the right note on an ID hard drive like this it looks fairly similar to a floppy Drive connector there's a few more pins I guess but on this the controller is on the hard dis itself so it's somewhere on one of these chips now what that means is when this is plugged into a motherboard the motherboard just says read me this bit of data from from this position and the hard driver will know how to do that it goes off and Spins the right place and sends you the data back on a floppy drive like this the controller is on the motherboard so there's nothing very clever on the floppy Drive what that means is it's a lot easier for us to tell the floppy Drive what to do in terms of making the motor move directly on each of these floppy drives you will see there are uh two connectors going in there's the power connector which is this these ones so that's just a power the drive the other cable you'll see is a ribbon connector the cables coming out of these ribbon cables see there's two blacks a green and a blue the blacks are just ground the green and the blue one is Step um one is Direction okay so if the direction pin uh is held low it will move in One Direction and when it's held high so probably at 5 volts it will move in the other direction and the step pin whenever you pulse that it will move one step in the direction of the direction pin all these cables they plug into this Arduino here an Arduino is it's almost like a small computer on the board it's not quite that but it's a small programmable board it's got all sorts of input and output pins a lot of hobbyists use it in little projects to make robots work or there's a whole community of people out there that use arduinos to do things the Arduino has got a little program running on it which is talked to by another program on the computer down this USB cable so on my computer uh it's a Java program and that sends messages down the USB to the uino it sends one message per drive and it tells it when to start a drive going and what frequency to make it run and when to stop it there'll be thousands of messages being sent down the USB cable per second each of the floppy drives the readr head can only be in one of 80 places okay and the Java program doesn't really know that so it doesn't know when to flip the direction pin what the Arduino does that keeps track of the position of the drive so you just tell it to make this drive run at this frequency and the Arduino will know exactly which position each Drive head's in and nowh to reverse it if you didn't do that it would get to the end and it would just go um you know it would just sort of jam up against the end I guess the Arduino has it's kind of abstracted away the complexity of the floppy drive so the pro program on the computer doesn't need to know anything about the floppy drives it just says play this note for this long the software itself reads MIDI files it's literally just a sequence of notes and a mid you can have lots of different channels each separate channel can have a separate instrument so you know track zero could be a piano track one could be a trumpet something like that unfortunately with the floppy drives they all sound the same and we can't really do anything about that in a midi file you can control the volume of each node as well whereas again the floppy drives you can't really do that they play at one volume I didn't write this code um the guy who uploaded the original video I saw um had uploaded some code um both the uino and um and around the computer in Java so I I've edited bits of it rather than having to edit the MIDI files I can just drag some sliders around this is the program here so I can load flight the Bumblebee this is a bit ey added one of the drives is particularly loud what this allows us to do is to change drive two to play channel uh one so if he wants to now I think fly to the Bumblebee uses Channel One and two predominantly so I'll just swap these around a bit okay and also what we've got here um we've got two sliders this one lets us transpose the notes so that means to put them up or down in Pitch if you like I can fiddle with it while it's playing and you'll be able to hear it I put the slider down to the bottom so it's playing Five V CU lower than it should be so the first thing I'll notice is the drive is moving very slowly and making a very well very nice noise so the drives aren't very good at playing low notes we found that out I guess so I can put it back up a few octaves the driv start moving faster and if I put it up even further I think this is the point where we start to break the stepper Motors and I've seem to have done something horrible to it oh no it's finished right okay so um yeah sometimes it does that right I'll just pull the power out there we go hopefully that'll reset itself now there certainly are some limitations the original program would only play a certain subset of notes but I decided why not put them all in um I think we've discovered why why not [Music] now well that's supposed to have stopped but um something's got lost somewhere oh well there we go fixed
Original Description
Floppy disk drives make sweet music, well, tuneful noises anyway. You might have seen them on YouTube before, but how do they work? Now you can find out!
Featuring Alex Pinkney from the University of Nottingham's Department of Computer Science. http://bit.ly/nottscomputer
Alex originally saw these videos:
http://www.youtube.com/user/Sammy1Am
http://www.youtube.com/user/MrSolidSnake745
The code, written by Sammy1Am is available online here:
http://github.com/SammyIAm/Moppy/
Follow Computerphile...
http://www.facebook.com/computerphile
https://twitter.com/computer_phile
Video by Sean Riley.
Computerphile is a sister project to Brady Haran's Numberphile. See the full list of Brady's video projects at: http://periodicvideos.blogspot.co.uk/2012/06/here-are-my-channels.html
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Computerphile · Computerphile · 3 of 60
1
2
▶
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Follow the Cookie Trail - Computerphile
Computerphile
EXTRA BITS - Follow the Cookie Trail - Computerphile
Computerphile
Musical Floppy Drives - Computerphile
Computerphile
The Hair Algorithm - Computerphile
Computerphile
Getting Sorted & Big O Notation - Computerphile
Computerphile
Quick Sort - Computerphile
Computerphile
Hyper History and Cyber War - Computerphile
Computerphile
Entropy in Compression - Computerphile
Computerphile
Original Elite on the BBC B - Computerphile
Computerphile
IP Addresses and the Internet - Computerphile
Computerphile
A Career in Video Games - Computerphile
Computerphile
Error Detection and Flipping the Bits - Computerphile
Computerphile
Programming BASIC and Sorting - Computerphile
Computerphile
Birthplace of the World Wide Web - Computerphile
Computerphile
Punch Card Programming - Computerphile
Computerphile
Programming Paradigms - Computerphile
Computerphile
CERN Computing Centre (and mouse farm) - Computerphile
Computerphile
Error Correction - Computerphile
Computerphile
Home-Made Code - Computerphile
Computerphile
Security of Data on Disk - Computerphile
Computerphile
Gesture Controls - Computerphile
Computerphile
How Intelligent is Artificial Intelligence? - Computerphile
Computerphile
Encryption and Security Agencies - Computerphile
Computerphile
Virtual Machines Power the Cloud - Computerphile
Computerphile
Hacking Websites with SQL Injection - Computerphile
Computerphile
How Huffman Trees Work - Computerphile
Computerphile
Cracking Websites with Cross Site Scripting - Computerphile
Computerphile
Cloud Computing (Cloudy with a Chance of Pizza) - Computerphile
Computerphile
Texting Cabbage with a Recorder - Computerphile
Computerphile
Hashing Algorithms and Security - Computerphile
Computerphile
How YouTube Works - Computerphile
Computerphile
How NOT to Store Passwords! - Computerphile
Computerphile
A New Golden Age of Video Games - Computerphile
Computerphile
A Universe of Triangles - Computerphile
Computerphile
Cross Site Request Forgery - Computerphile
Computerphile
The True Power of the Matrix (Transformations in Graphics) - Computerphile
Computerphile
The Great 202 Jailbreak - Computerphile
Computerphile
EXTRA BITS - Printing and Typesetting History - Computerphile
Computerphile
Triangles to Pixels - Computerphile
Computerphile
The Problem with Time & Timezones - Computerphile
Computerphile
The Visibility Problem - Computerphile
Computerphile
Lights and Shadows in Graphics - Computerphile
Computerphile
The Penguin Barcode - Computerphile
Computerphile
Typesetters in the '80s - Computerphile
Computerphile
The Font Magicians - Computerphile
Computerphile
The Little Mac with the Big Bite - Computerphile
Computerphile
EXTRA BITS - More on the Original Mac at 30 - Computerphile
Computerphile
XP to Ubuntu with an 8yr old Hacktop - Computerphile
Computerphile
EXTRA BITS - Hacktop Real-Time Boot Comparison - Computerphile
Computerphile
EXTRA BITS - Making a Bootable USB in Linux - Computerphile
Computerphile
EXTRA BITS - Installing Ubuntu Permanently - Computerphile
Computerphile
The Dawn of Desktop Publishing - Computerphile
Computerphile
What is Bootstrapping? - Computerphile
Computerphile
Reverse Polish Notation and The Stack - Computerphile
Computerphile
Home-Made Z80 Retro Computer - Computerphile
Computerphile
Should Everybody Learn to Code? - Computerphile
Computerphile
Programming in PostScript - Computerphile
Computerphile
Heartbleed, Running the Code - Computerphile
Computerphile
YouTube's Secret Algorithm - Computerphile
Computerphile
YouTube Search & Discovery - Computerphile
Computerphile
More on: ML Maths Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Next.js vs Remix vs SvelteKit: Which Framework Should You Learn?
Dev.to · Etrit Neziri
Had my Frontend Developer interview with Capgemini (Application Developer) today, and I wanted to…
Medium · JavaScript
10 Frontend Developer Tools to Boost Productivity in 2026
Medium · Programming
10 Frontend Developer Tools to Boost Productivity in 2026
Medium · JavaScript
🎓
Tutor Explanation
DeepCamp AI