-
Notifications
You must be signed in to change notification settings - Fork 190
The analog pins on the Arduino Uno can be used as digital pins numbered 14-19. An Arduino Uno can support up to 9 drives. It is also possible to connect multiple Arduinos on the host machine to use up to 16 drives.
The sort answer is: maybe. The actual interface with the floppy drives needs sub-millisecond timing to get all the pitches correct, so you'll need hardware capable of that connected to the drives. As far as the Java application goes though, that should run fairly well on most Java-capable platforms. Several people have already begun work on various ports, such as:
Insert list of ports as they are found
Moppy has been confirmed to work perfectly on the Raspberry Pi (model tested: 3 B).
Floppy drives work by using a stepper motor to move a read head between different tracks of the floppy disk. This action is easily controlled by the STEP and DIRECTION pins in the floppy drive's interface, which makes it easy to integrate with an Arduino. Scanners and printers also use stepper motors, but control of these motors is handled by more integrated circuitry within the device, so it's a little more difficult to interface with the Arduino. (That said, if you DO manage to find a way to interface the Arduino to the stepper motors, then Moppy would allow you to play music with them).
Harddrives work by using a magnetic coil to control the position of their read arm. Unlike the on-off pulsing used to move a floppy drive's head to different tracks, this is an analog process with different levels of power used to move the head to different positions on the drive platters. Similar to printers or scanners, there's no exposed interface to control this action. With a little hacking you might be able to interface the Arduino with the arm coil, but the Moppy code may not generate the results you're looking for.
However, harddrives' magnetic-coil-in-a-magnetic-field construction is pretty much exactly how speakers work. Many people have had success hooking an audio signal directly to that coil and generating music that way.
There's no way to directly control the volume of the floppy drives, but there are some techniques you can use to fake it:
- Putting a floppy disk in the drive makes it a tiny bit softer.
- Using multiple drives to double the same part in a song will make it easier to hear it over other parts.
- Some floppy drives are just louder than others; you can rearrange the MIDI file to assign parts accordingly.
Surprisingly, very few music compositions had floppy drives in mind when they were created. As a result, it's difficult to get an unedited MIDI file to play in Moppy. Utilizing the Constrain Notes
, Ignore Channel 10
, and Drive-Pooling
options is a quick-fix that might get your unedited file playing. Try starting with Round-Robin Drive-Pooling to pool channels 1-16 into however many drives you have available.
To get the most out of your musical floppy drives though, you'll want to head over the MIDI Software page to learn more about creating your own MIDI files.
MoppySim is intended to be a utility to aid in testing MoppyDesk without needing to have physical floppy drives connected to your computer. It's not a perfect replacement (e.g. doesn't keep track of read-head position), but should be close enough to allow testing to be done to make sure code changes don't break anything. It's less robustly built than MoppyDesk, so you're more likely to encounter errors. To use it, you'll need a virtual serial port app (I'm using com0com) to create two virtual connected ports. Connect MoppySim to one of them, and MoppyDesk to the other.