Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

Sound[{SoundNote[None],SoundNote[None],SoundNote[1]}]

has a correct duration of 3 seconds, while

Sound[{SoundNote[1],SoundNote[1],SoundNote[None]}]

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.

share|improve this question
2  
Is this just a bug you've noticed, or is there a question? –  blochwave Aug 11 at 18:39
    
s2 = Sound[{"Viola", SoundNote[3], SoundNote[1], SoundNote[1, SoundVolume -> 0]}, {0, 3}]; Redefine SoundNote[] accordingly. –  belisarius Aug 11 at 21:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.