Comments (1)
Hi there, a reasonable question.
Musical notes are given note names or letters, and these names repeat each octave. So to differentiate between different octaves, a number can be added to the note name. For example, A4 is an octave above A3.
Musical notes each have a certain pitch or frequency. For example, an A4 has a frequency of 440Hz (i.e. if it was a sine wave, the wave would repeat 440 times per second). Going up an octave represents a doubling of frequency, so an A5 has a frequency of 880Hz.
Floppy drives generate notes by stepping their stepper motor at the desired frequency, but in code this is implemented by taking a step, waiting a certain amount of time, and then taking another step. The amount of time between steps is call the period, and is the inverse of frequency (i.e. 1/frequency
). So the period of an A4 is 1/440
or 0.0022727...
seconds.
Many micro controllers allow you keep track of time in microseconds, so these periods are converted to microseconds and stored in that array to be looked up. Essentially the array allows us to take an incoming note like C3 and determine that the motor should be stepped every 7645 microseconds.
from moppy2.
Related Issues (20)
- Alternative power supply and drive not stepping. HOT 3
- Maintained HOT 21
- Description of the device HOT 2
- DAW Midi Stop
- Pinout for 74HC595 using ESP8266 HOT 2
- ...Android 🙈 HOT 4
- Windows Java Runtime Error HOT 2
- MoppyGUI wont connect to arduino HOT 2
- Floppy drive doesn't play music or startup tone HOT 13
- Compilation error: 'TIMER_RESOLUTION' was not declared in this scope HOT 7
- Nothing happens HOT 1
- code not compilation HOT 4
- Notes per channels HOT 1
- MoppyControlGUI.bat crashes HOT 10
- Default Sub-Address Script is Wrong
- Флоппи HOT 1
- ControlGUI sends mdi data to serial, board serial led indicates data comes but the floppy motor doesn't move HOT 10
- Startup Sound should default to true HOT 1
- ESP32 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moppy2.