2

I'm writing a very simple computer program to play music, and I need to know how long notes should actually be played for.

The answer is not exactly 100% of the time, because then there would be no gap, and you would not notice when one note ends and the next one starts.

So there must be a tiny bit of rest at the end of each note.

Second question, which is related: should this bit of rest be an exact amount (like a 32nd or something), or should it be a percentage of the note duration (like 97%)

I think the answer might be "It depends on how staccato you want to play", but I still want to hear your answers.

Thanks!

5
  • 4
    It depends. You can tell when another note starts even when there’s overlap because it’s usually a different pitch! Unfortunately there’s not one answer to how long notes should be held. Even with different articulations, if you want it to sound as intended or as a human would play you’d have to account for hundreds of different situations. Commented Nov 25, 2020 at 0:32
  • In the way you're asking, this would be purely a matter of opinion, so not a good fit for the site. In terms of coding, you could just pick an amount (I'd go with percentage) that sounds good to your ear. In terms of music, it would depend on many factors like phrasing, the instrument involved, and personal taste, among many others.
    – Aaron
    Commented Nov 25, 2020 at 0:33
  • What is the purpose of your program? What notes do you want to play? What kind of sounds are you using? I don't understand what kind of problem you're solving. Consider: you can sing the same note twice without gap in between and make it still clear these are two notes, not a single long one. Commented Nov 25, 2020 at 20:52
  • The purpose of the program is to take video of a constant pitch, such as a car driving down the road, and speed it up in slices, so that the hum of the engine plays a song when the slices are put together.
    – Magmatic
    Commented Nov 25, 2020 at 21:04
  • Besides caring about duration you should look up the concept of envelopes: en.wikipedia.org/wiki/Envelope_(music) Commented Nov 25, 2020 at 23:37

2 Answers 2

0

A played duration of about 7/8 (87.5%) of the written duration will often sound about right.

If the note is staccato, the played duration will be about 50% of the written.
If the note is legato or in a slur, it should be about 100%.


Obviously there are lots of other consideration such as the particular type of instrument that is being played:
For example when a glockenspiel (metal bars) is struck loudly with rubber mallets, the notes will ring out for a really long time. Whereas when a xylophone (wooden bars) is struck, the notes decay incredibly quickly. Both glockenspiel and xylophone could read and play a melody of crotchets and they would sound very differently due to the difference in the decay times.
Plucked string instruments will sound longer when played a greater dynamic level. But wind instruments will sound shorter with a greater dynamic level (because more in-breathe time between notes will be required).
A piano is a very versatile instrument that can play staccato, legato and everything in-between without much difficulty.
If there is no explicit instruction then the performer will have to apply interpretation, some of which is to suit the mood of the piece, and some is just for practicality.

3
  • 1
    Those numbers are arbitrary. In particular about staccato and legato they are simply wrong. The staccato is open to interpretation. And the legato? Can you imagine a legato vocal phrase where the singer actually stopped singer for little fractions between notes?!? No. It will be an constant sounding until the end of the phrase. Commented Nov 25, 2020 at 17:57
  • Thanks, Elements in Space! That's exactly what I was looking for! Keep up the good work!
    – Magmatic
    Commented Nov 25, 2020 at 19:00
  • @Magmatic this answer may be what you're looking for, but the information is offered without any authority, and as Michael Curtis has explained, it's basically incorrect. You will not be able to find an answer to this question that produces pleasing music in all circumstances. But you will probably learn a lot by trying.
    – phoog
    Commented Nov 27, 2020 at 3:54
0

The answer is not exactly 100% of the time, because then there would be no gap, and you would not notice when one note ends and the next one starts.

You're not completely explaining the program, but I think what you mean is: if the pitch and volume do not change, then you won't be able to hear when one note starts and the next ends.

Now we have a better way to start the real discussion. A melodic line will have pitch, duration, and volume - or articulation - elements.

It should be obvious that while duration is 100% of rhythm values changing pitch will distinguish notes. You don't need to cut off durations in that case.

When the pitch stays the same articulation is the important way to distinguish notes. Think about acoustic instruments and it should be clear. Even sustaining instruments like bowed strings, flute, or pipe organ - compared to percussion - will have a audible difference in volume and tone at the initial production of a note. There will be an "attack." Envelope is the technical term with stages: attack, decay, sustain, and release.

Consider a single quarter note. The beginning won't sound the same as the middle and end. When a series of repeated notes is played, for example four quarter notes of C4, the player then must make some kind of decision about how to articulate them. On a bowed instrument the basic articulation is to change bow direction. Certainly there will be some decrease in volume of sound when the bow direction is changed, but it will be very brief and the instrument will still be resonating. The big difference in sound will be the articulation, how the bow "digs" back into the string. If you analyzed the sound, I expect both timbre (different overtones) and volume/envelope changes would be seen.

What to do in your program depends on how the thing actually produces sound. If the sound generator does not have articulations, if the program is just pitch and duration, then I think you should at least have a function to check whether the next note is a repeated pitch, and only put in a brief space for a simple articulation in those cases. If pitches change, don't add spaces. In a series of changing pitches only add space if there is some kind of notated rest. If volume it an element in the program, you could try envelope modeling of volume over the length of notes. But that could get fairly complex if it looks ahead for pitch changes, rests, or some element to indicate the end of phrases.

It depends on how staccato you want to play

That potentially brings in a different topic: how to interpret a staccato mark. But I image your program's input won't really be dealing with articulation marks. So this shouldn't be a concern.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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