From: Vladimir S. <ha...@gm...> - 2004-12-06 05:50:48
|
Hi Mark, > So I think I'm not getting the idea across very well. Let's take I think i did understood and i'm not disagreeing, but i'd like to figure out a few things. > The issue to see here is that the exact time the second note starts > can, in this simple case, have a dramatic effect on what you hear. If > I play the second note exactly at a time n*1/1000 seconds later, then > the second note reinforces the first and you get a signal that's twice > as loud. However, if I play the note at n*1/2000 seconds later, where > n is odd, then the two notes exactly cancel and you get no sound! The > first sine wave is going down at the very instant that the second is > going up. (A 180 degree phase shift) agree, but only if the sample is uniform like sin(x) > The second example is something that cannot happen with a real piano > string. true. >Whatever the resultant waveform clearly the string is still > vibrating. There are not two separate sine waves of the same frequency > on the same string. There is one resultant vibration. that depends on what the definition of "IS" is :))) We could say that 2sin(x) is really sin(x)+sin(x) (and are in the same phase) can't we? > the two notes would be 'in sync' or would be playing with a 0 degree > phase shift. This means that the two sets of samples are being read > and played back in sync. for the case of simple sin(x) two playin in sync will then be sin(x) + sin(x) = 2sin(x). So that's the same one with twice the amplitude. Moreover, if the sample is just sin(x) then if the first note was hit with attack level 10 and another with attack level 20 and we (for the sake of simplicity) play 10sin(x) for the first and 20sin(x) for second we could then just play 30sin(x) for the two of them. > The way playing two notes is different from playing one note is that > the second note is reading the starting samples while the first note > is reading samples further on in the stream. If sample is sin(x) then it doesn't matter because they will be reading the same data. However if it's different then it will be really difficult to define "in sync". >The idea is that we keep > the two streams separated by a value equal to some multiple of their > fundamental frequencies. I can elaborate on this more if required. i think i understand the idea, but let's consider a few more examples. let's say a sample is something like a bell. for simplicity, let's forget about the envelope. you take a note . . . sampler plays "Bim....Bom" Now, if we play it the second time, what would be in sync for the two? Technically speaking, "Bim" in the beginning of the sample could have a period that is quite different from "Bom". So we can't really say that Bim could be "in sync" with Bom. Bell is perhaps not a very good example but i think there are many others. So for some samples it "merging" could work while for some others it could not. -- Regards, Vladimir |