0

I am not a musician but I am making a piano playing machine for a simple project. I need to trigger linear actuators which push the piano keys. I can use midi interface to trigger the actuators but I can't do that for some reason so I need to manually program the timing at which the actuators fires. So, I need to know the tempo of the song which will tell me the delay I need to put in between each note. For, example

Here's a song

As you can see there are four notes being pressed by the right hand in the first iteration. i.e F Bb C F then G Bb C F and so on. I need to know the timing between each note. I tried FL studio, imported the audio and got a BPM of 68.5. BPM is also an entirely new concept for me and I don't trust a software. So, does anybody know how I can calculate microseconds between the notes?

1

Using your example piece, it sounds like it is in four beats per measure, and playing 16th notes, four notes per beat. The counting could be expressed as 1 e and uh, 2 e and uh, 3 e and uh, 4 e and uh, sixteen sub beats total.

To simplify the math, if you set the tempo to 60 beats per minute you get one beat per second, subdivided into four sub beats, so one quarter of a second per note played, or .25 of a second.

Looking at some of the sheet music versions it looks like the piece is set to 68 bpm.

1

Audacity (or similar) sound / waveform editor can accurately measure time-interval (presuming you have a PC). Load a recording, highlight two fastest-played notes (audio shown as waveform), then 'zoom to selection' until two notes almost fill display. Drag to highlight (select) from start of first note to start of second note. Watching the the status bar at screen bottom as you do so, you will notice a figure change seconds & milliseconds as selected. Invert (1/s) to obtain frequency (or repetition) in Hz (notes per second). 60xHz gives you NpMin. I specify Notes per Minute as 'Beats' per minute (BPM) depends on factors such as sub-beats etc as outlined by (answer 1) above. Technically, you should not attempt to measure relative silence / pauses BETWEEN notes as first note may havea long sustain or decay, offsetting the note-note tempo calculation. Friendly footnote advice: A microsecond uS is 1/(10^6)s. A very fast tempo, say 10 notes per second, would be 0.1s or 100/(10^3) or 100 milliseconds (mS). Hope this helps.

  • Good idea. Considering that there will be some fluctuation between the performer's key hits, would be good to get an average of time between notes. Fl Studio, and if I remember, Audacity can record a click track set to bpm, so after getting a reading, making a click at that rate would be easier to measure. – Alphonso Balvenie Mar 5 '17 at 2:21
1

BPM is easy. You just need to know what is defined as the beat, and treat all other notes as a multiple of it. If the beat is a quarter note then a whole note is 4 beats, and 8th note is 1/2 a beat, etc.

So for 68.5 BPM where the beat is a quarter note, a series of 8th notes would each last:
(1/2)*(60/68.5)(106) = ~437956 microseconds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.