11

When playing on synthesizers, usually when playing a second time the same note, even if the release phase is very long or the sustain pedal is pressed, the first note is shut down. Put in another way, sending:

NoteOn(1,40,100)
NoteOn(1,40,10)

usually results (for the synth point of view) in:

NoteOn(1,40,100)
NoteOff(1,40)
NoteOn(1,40,10)

Is there a reason for that? I mean, I understand that for a piano, the same strings cannot be played twice, but it is possible on some instruments to get the same note twice (on different strings on a guitar for instance). Moreover, on the piano, all the sympathy sound from surrounding strings is not shut down when the sustain pedal is pressed, even if the same note is replayed…

  • 1
    I must admit that this isn't my experience - with modern S+S synths with lots of polyphony available, I think I'm used to the earlier note continuing to sustain. I can imagine that a synth with very limited polyphony might shut off an earlier sounding of the same note as part of its 'note-stealing' algorithm. For monosynths, of course, the answer to your question is obvious, but I suspect you aren't asking about those! – topo Reinstate Monica Jun 17 at 17:23
  • 1
    @topoReinstateMonica Yes, this does not apply to monophonic synths. Actually, I think I remember playing with synths that were continuing the sustain note, but that was not the majority… And was the case even with software synth with respectful (16) polyphony… If the full polyphony is not used, why stealing? – Tom Jun 17 at 17:30
  • 3
    It's entirely within the voice structure of the particular device. Mono synths, of course, will have to re-trigger from the start of the ADSR, polys will have a coded or electro-mechanical ruleset. This behaviour is far more likely in older synths. – Tetsujin Jun 17 at 17:59
  • Are most of the synths you're talking about analogue-style synths? I suspect some of those may not assign a second oscillator to the same note, but keep the same one assigned (with the option to re-trigger the envelope, or not). Perhaps you have some particular synths in mind? – topo Reinstate Monica Jun 17 at 18:01
  • @topoReinstateMonica Well, when talking about poly synth, I was thinking for instance about AMsynth (on GNU/Linux). My question was more about: how can this behavior be privileged over allowing to retrigger the same note over the previous one. But maybe that is the choice of the designer each time… – Tom Jun 17 at 18:19
15

The MIDI specification says:

If an instrument receives two or more Note On messages with the same key number and MIDI channel, it must make a determination of how to handle the additional Note Ons. It is up to the receiver as to whether the same voice or another voice will be sounded, or if the messages will be ignored. The transmitter, however, must send a corresponding Note Off message for every Note On sent. If the transmitter were to send only one Note Off message, and if the receiver in fact assigned the two Note On messages to different voices, then one note would linger. Since there is no harm or negative side effect in sending redundant Note Off messages this is the recommended practice.

So synthesizers can do whatever they want.

Reasons to release the first note:

  • There will be exactly one voice to be handled by the Note Off message. If multiple notes were allowed, the synthesizer would have to remember some information to be able to determine which of the two active notes is the earlier one. This is possible to do, but increases complexity and risk of getting it wrong.
  • A Note Off message might have got lost. Releasing the first note will recover from this.
| improve this answer | |
  • 8
    Even if the synthesizer kept track of which note was earlier, it would have no way of knowing whether the note-off command was intended for the earlier or later note. – supercat Jun 18 at 22:40
  • As the NoteOff order can have a non 0 velocity, this can be used to shut down the correct note, or at least, one which is sounding the same. – Tom Jun 20 at 8:10
10

This is too long for a comment, so I'll make it an answer. Let's say you have a round-robin sample program that plays a different speech sample every time. You play this:

NoteOn(1,40,100)   // "one"
NoteOn(1,40,100)   // "two"
NoteOn(1,40,100)   // "three"
NoteOn(1,40,100)   // "four"
NoteOn(1,40,100)   // "five"
NoteOff(1,40)

Which of the notes should the note-off end - "one" or "five" or one of the others? All of them? Is that self-evidently clear, and any musician would reasonably expect that behavior? Myself, I don't really know what should happen. If you want to have multiple instances of the same MIDI note, use different MIDI channels.

For example in Ableton Live, you can't even have a MIDI clip with simultaneous overlapping notes. The editor won't allow this, it will remove or cut one of the notes to make it clear and unambiguous what's happening. Every note has to have its own exclusive place in the pitch/time space. I guess this restriction is there because allowing overlapping notes would make the user interface unnecessarily complicated, and there's no actual sensible use-case for overlapping notes.

| improve this answer | |
  • 1
    Ableton Live would not allow it, but a MIDI file would if I am not wrong… I understand the "cleanness" of having non-overlapping notes, but I find it a bit restrictive… If the sound is the same for each event, it does not matter much which one is shut down. I actually did not think of round-robin! I had more "drones" in mind… – Tom Jun 17 at 19:10
  • 1
    @Tom_C It's possible to create streams of low-level MIDI messages that perform something on a target device, but without a clear unambiguous higher-level musical meaning. Many music applications try to provide a bridge between these levels - capable of talking to devices, but so that musicians understand what they're doing. – piiperi Reinstate Monica Jun 17 at 19:25
  • Yes, I see, maybe I am overthinking it a little but you have a good point! – Tom Jun 17 at 19:32
  • It isn't possible to represent the concept "play a middle C dotted half note starting on beat 1, and a middle C quarter note starting on beat 2". It would be capable of representing note-on note-on note-off note-off on four consecutive beats, but those wouldn't represent the aforementioned dotted-half and quarter notes any more than they'd represent two half notes that start a beat apart. – supercat Jun 18 at 22:56
5

Despite my comment, this answer does agree with you that the 'implicit note off' is common!

The bottom line is that this is a question of instrument design - there isn't a clear standard or spec to follow as to what should happen when the same note is triggered twice without a note off in between. it is plausible that the synth could decide to assign another oscillator to the second note-on, or to finish the first note and then starting the second. I've also encountered synths that can do something halfway between, reusing the same oscillator but retriggering the envelope's attack phase from the point that the decay had reached, if that makes sense.

To be honest, it's this kind of fiddly detail that made me move away from MIDI as a way of doing electronic music. In particular, the whole 'note on' / 'note off' paradigm seems to be rather oriented around the way something like the piano works; even simulating something as commonplace as the guitar (with its separate 'note selection' and 'note triggering' mechanisms) is a bit awkward with MIDI.

| improve this answer | |
  • I agree, with EWI for instance, MIDI is not really adapted, but can manage with some tweaks. I guess the conclusion is that it is "the dev choice"… – Tom Jun 17 at 20:44
3

This is not an answer to your why question, but I can't leave this unmentioned. The, perhaps obvious, workaround for this limitation of MIDI is to use the same voice on more than one channel. I vaguely remember having done that in the past just for this very reason. It's far from ideal, however, and sometimes not even possible, especially with synths. Let's hope MIDI 2.0 deals with this better.

By the way, your remark about playing the same note on the piano multiple times at once is not true when the sustain pedal is used. If the pedal is depressed, then the vibrating strings are not immediately damped as the key is released. So when the hammer strikes them again, it adds another impulse to the already existing vibration, effectively superposing them. You can test this yourself if you have a piano. Use the sustain pedal and hit a single key multiple times. You should hear the timbre change with each strike of the hammer. This is because the phase shift between the superposed tones varies, and that causes constructive/destructive interference in the harmonics, amplifying some, attenuating others. So you can totally play the same note on the piano at the same time as many times as you want (ignoring the exponential envelope decay and nonlinearity). When you release the pedal, all those NoteOns are then effectively NoteOffed.

| improve this answer | |
  • That is an interesting comment, and is the kind of effect I was speaking about. I used the sympathy as an example as, no owning a piano, could not test that… I was thinking the hammer was first coming to stop the strings on the first part of the press, but this is wrong, thanks! – Tom Jun 19 at 9:49
2

There can't be a single answer.

A traditional 1960s analog synth was monophonic : with only one oscillator, the second note must re-use it, therefore cutting the first note off - whether the second note had the same pitch or any other pitch.

Polyphonic music using these instruments used multi-tracking on analog tape recorders, one note at a time (most famously, Switched-On Bach).

Now they pre-date MIDI interfaces, but only by maybe 15 years, and MIDI has been adapted to all sorts of things, bagpipes included. So this must be a valid interpretation of the sequence - at least, when played on a monophonic instrument.

So, should that be the only correct interpretation of the sequence? No, that would be far too restrictive on polyphonic synthesisers.

These can mimic the operation of acoustic keyboard instruments : one voice (string or pipe) per key, where repeating a note must cut off the first note as you observed.

Or they can have a pool of voices, which are successively allocated to notes, returning to the pool after the sustain. This could avoid the "implicit off" - unless the pool is exhausted by too many sustained notes at a time.

| improve this answer | |

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.