In Mathematica 9, Soundnote[None] has zero duration if it is the last note in a Sound expression. For instance, the sound object


has a correct duration of 3 seconds, while


has a duration of 2 seconds. This means that a SoundNote[None] has a duration of 1 second if and only if it is not the last note, otherwise has zero duration. This does not make sense at all. Silent notes must have the same duration at any point of a musical composition. As an example of consequence of this non-sense behaviour, let us superimpose two sounds objets composed of the same number of notes, one of which has a silent note at its end:

s1 = Sound[{"Piano", SoundNote[1], SoundNote[5], SoundNote[8]}, {0, 3}];

s2 = Sound[{"Viola", SoundNote[3], SoundNote[1], SoundNote[None]}, {0, 3}];

Sound[{s1, s2}]  

enter image description here You can see that they do not superimpose as you might expect. Each instrument should play a note every second. What happens instead, is that the Viola (green) plays every 1.5 seconds because has a silent note at the end.

  • 2
    $\begingroup$ Is this just a bug you've noticed, or is there a question? $\endgroup$ – dr.blochwave Aug 11 '14 at 18:39
  • $\begingroup$ s2 = Sound[{"Viola", SoundNote[3], SoundNote[1], SoundNote[1, SoundVolume -> 0]}, {0, 3}]; Redefine SoundNote[] accordingly. $\endgroup$ – Dr. belisarius Aug 11 '14 at 21:06
  • $\begingroup$ To me it is a conceptual bug (same in Mathematica 10). SoundNote[None] is a pause, and it must have a duration even at the end of a sequence of notes. Pauses are part of composition everywhere in a musical sheet, they are not ignored if they are at the end. $\endgroup$ – Fortsaint Apr 7 '16 at 18:54

Your Answer

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

Browse other questions tagged or ask your own question.