Sample Size and Wave Form distortion

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sample Size and Wave Form distortion

jbeach2646
The problem which I described previously of the sine wave taking the characteristics of a sawtooth  is presented with graphs with a detailed explanation of why this occurs, in particular, as it relates to digital conversion at the link below.  It is akin to the notion of “how many words are needed to form a definition?”  Rameau’s “Treatise on Harmony” presents the reader with the length of a string, halving the length of the string produces the octave (two times) the frequency of the frequency produced at the original, full length of the string.  When the string gets so short that it produces no vibration, it has no timber because the substance or material which vibrates to produce the sound is to too short to do so.  I think this explains why the character of electronically-produced sounds is, often, identifiable as such and, to purists, especially organists, it is unsatisfactory, because it is readily differentiable from the sound produced by the substances of which pipes are made. 
 
I am curious as to whether there is a perceptible difference in tone quality between Principal stops made of wood and those of Tin/Lead alloy?  The term “diapason,”  as we know, is from the Greek “dia=through  “pason” from the plural of “pan”=all, “pasa,”  “on” is the inflected ending of the case which is required by the preposition “dia.”  The word “kordon,”=strings, plural, is implied, but not used. 
So the question, logically, arises, at what point “through all the strings” does a principal no longer sound like a principal.  I have thought that a principal has an identifiable timber with a blend of 8’,4’ and 2-2/3’, which is more pleasing than the sound obtained when 2’ and 1-3/5’ are added to the mix, rendering the harshness of a “cornet.”
 
A Principal should be a principal (with a languid), not a reed, as a sine wave should be a sine wave, not a sawtooth.
 
So, how many cycles are necessary to identify timber in relation to frequency when sampling?  If this explains the concept of “scaling”  in ranks, it seems that, with minor exceptions at extreme frequencies, a formula should be possible to approximate scaling for digital ranks in soundfonts.   Then, the question arises, what parameters are used to do so? There is Frequency Cutoff (Hz) and Frequency resonance (dB). 
 
How many (not how few) digits, digitally, define a straight line........?
 
 
 
I increased the number of complete cycles in the sine wave (A880 and A1760) to 8 and 16, respectively, and there is
no problem of wave form distortion.   So, timber is determined by wave form.
 
This is a basic discovery for me.  I am not an engineer, needless to say.    
 
 
 
John Beach

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

greenfox
Yes, the article you have found is exactly what I was referring to.

Simply providing a longer sample is not usually going to solve the problem. You need to use a faster sampling speed, but we don't have control of that in Fluidsynth. 

I can't explain why you are able to hear a satisfactory result by providing a longer sample. 

Regards 
Rick 

On 23 Jun 2017 6:16 pm, "John Beach" <[hidden email]> wrote:
The problem which I described previously of the sine wave taking the characteristics of a sawtooth  is presented with graphs with a detailed explanation of why this occurs, in particular, as it relates to digital conversion at the link below.  It is akin to the notion of “how many words are needed to form a definition?”  Rameau’s “Treatise on Harmony” presents the reader with the length of a string, halving the length of the string produces the octave (two times) the frequency of the frequency produced at the original, full length of the string.  When the string gets so short that it produces no vibration, it has no timber because the substance or material which vibrates to produce the sound is to too short to do so.  I think this explains why the character of electronically-produced sounds is, often, identifiable as such and, to purists, especially organists, it is unsatisfactory, because it is readily differentiable from the sound produced by the substances of which pipes are made. 
 
I am curious as to whether there is a perceptible difference in tone quality between Principal stops made of wood and those of Tin/Lead alloy?  The term “diapason,”  as we know, is from the Greek “dia=through  “pason” from the plural of “pan”=all, “pasa,”  “on” is the inflected ending of the case which is required by the preposition “dia.”  The word “kordon,”=strings, plural, is implied, but not used. 
So the question, logically, arises, at what point “through all the strings” does a principal no longer sound like a principal.  I have thought that a principal has an identifiable timber with a blend of 8’,4’ and 2-2/3’, which is more pleasing than the sound obtained when 2’ and 1-3/5’ are added to the mix, rendering the harshness of a “cornet.”
 
A Principal should be a principal (with a languid), not a reed, as a sine wave should be a sine wave, not a sawtooth.
 
So, how many cycles are necessary to identify timber in relation to frequency when sampling?  If this explains the concept of “scaling”  in ranks, it seems that, with minor exceptions at extreme frequencies, a formula should be possible to approximate scaling for digital ranks in soundfonts.   Then, the question arises, what parameters are used to do so? There is Frequency Cutoff (Hz) and Frequency resonance (dB). 
 
How many (not how few) digits, digitally, define a straight line........?
 
 
 
I increased the number of complete cycles in the sine wave (A880 and A1760) to 8 and 16, respectively, and there is
no problem of wave form distortion.   So, timber is determined by wave form.
 
This is a basic discovery for me.  I am not an engineer, needless to say.    
 
 
 
John Beach

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
greenfox - Brisbane Queensland Australia
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

jbeach2646
Rick said, “I can't explain why you are able to hear a satisfactory result by providing a longer sample.”
 
I think the reason comports with the concept of a wave form being dependent on, and the result of, the substance of the physical model which comprises the boundaries in which or by which it is formed.  TrendLINE synthesis actually is the essence of it, in electronics, if not perceptibly, inside a pipe, a flat surface is a straight line.  The convergent factors of substance, shape and length determine modulation and  produce both timber and frequency, wave form.  This is represented by the straight line, the specific modulation of which, by electric or electromagnetic force causes regular or irregular distortion of the line, the wave form.  While timber is dependent on the material substance and shape (form) of the model, frequency (pitch) is dependent on length.  We are more often concerned with frequency, in making soundfonts,  than with timber (which is thought, psycho-acoustically, to remain the same in an instrument) and we know that the computer can, easily, adapt almost any reasonably-long, wave file, of a sufficiently high frequency to almost any lower frequency and, in the case of the computer, two octaves above the original frequency,  and still retain the identifiable quality of timber, regardless of whether it complies with subtle variations/consistencies which scaling is believed to enhance in real ranks of pipes.  
 
The length of the wave form of 2 cycles for the sine wave, theoretically, a completely undistorted-by-modulation, straight line, was, apparently, so short that it did not contain enough information to identify it apart from the effect of the force of electricity which generated it to the point of distortion to another wave form, the sawtooth.  I conceptualize timber as distinct from pitch, while being comprised, synthetically, of multiple, harmonic frequencies.  The distortion of the wave form did NOT affect the frequency of the harmonic partials in the synthesizer.  Only the timber was negatively affected and that, only in Fluisynth, not in Creative Sound.  Fluidsynth could define pitch, but it could not define timber, apparently, due to the distortion of Fundamental medium (the line), frequency.  So, if the length of the line is the pitch, the modulation of the incremental part (integer) of the line is its timber.  In Audacity, a sine wave, zoomed way IN, shows the individual dashes which comprise the straight line.   At the length of two cycles, the lines of the wave form had tiny box-like forms in them and these, apparently, set up the sawtooth sound, even though the form was a curve and not straight-line angular. 
 
 
John B.
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

RoyR
  Or could it just be because the fundamental frequency isn't a multiple of the sampling rate so you get a different part of each wave cycle. The more cycles you sample the more comprehensive view of the wave you get?

      Have fun,

            Roy.


On 23 June 2017 at 17:50, John Beach <[hidden email]> wrote:
Rick said, “I can't explain why you are able to hear a satisfactory result by providing a longer sample.”
 
I think the reason comports with the concept of a wave form being dependent on, and the result of, the substance of the physical model which comprises the boundaries in which or by which it is formed.  TrendLINE synthesis actually is the essence of it, in electronics, if not perceptibly, inside a pipe, a flat surface is a straight line.  The convergent factors of substance, shape and length determine modulation and  produce both timber and frequency, wave form.  This is represented by the straight line, the specific modulation of which, by electric or electromagnetic force causes regular or irregular distortion of the line, the wave form.  While timber is dependent on the material substance and shape (form) of the model, frequency (pitch) is dependent on length.  We are more often concerned with frequency, in making soundfonts,  than with timber (which is thought, psycho-acoustically, to remain the same in an instrument) and we know that the computer can, easily, adapt almost any reasonably-long, wave file, of a sufficiently high frequency to almost any lower frequency and, in the case of the computer, two octaves above the original frequency,  and still retain the identifiable quality of timber, regardless of whether it complies with subtle variations/consistencies which scaling is believed to enhance in real ranks of pipes.  
 
The length of the wave form of 2 cycles for the sine wave, theoretically, a completely undistorted-by-modulation, straight line, was, apparently, so short that it did not contain enough information to identify it apart from the effect of the force of electricity which generated it to the point of distortion to another wave form, the sawtooth.  I conceptualize timber as distinct from pitch, while being comprised, synthetically, of multiple, harmonic frequencies.  The distortion of the wave form did NOT affect the frequency of the harmonic partials in the synthesizer.  Only the timber was negatively affected and that, only in Fluisynth, not in Creative Sound.  Fluidsynth could define pitch, but it could not define timber, apparently, due to the distortion of Fundamental medium (the line), frequency.  So, if the length of the line is the pitch, the modulation of the incremental part (integer) of the line is its timber.  In Audacity, a sine wave, zoomed way IN, shows the individual dashes which comprise the straight line.   At the length of two cycles, the lines of the wave form had tiny box-like forms in them and these, apparently, set up the sawtooth sound, even though the form was a curve and not straight-line angular. 
 
 
John B.
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

jbeach2646
Roy said, “Or could it just be because the fundamental frequency isn't a multiple of the sampling rate so you get a different part of each wave cycle. The more cycles you sample the more comprehensive view of the wave you get?
 
Roy, I think the wave file needs to be looked at as a multi-stranded wire, each wire having a harmonic frequency and a given amplitude (the whole equals the sum of its parts).  Then, if the wave line is four seconds in duration, 100 cycles per second,
there are 400 cycles in the wave file, but the wave line (consisting of the synthesized, harmonic partials, the “blend”) is the
frequency or pitch at which it was recorded.  I believe it retains its timber character at other frequencies, because the whole still
equals the sum of its parts which are all being multiplied or divided at the the same rate or by the same amount with transposition. 
 
Does this make sense?
 
John Beach

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

RoyR
Hi, John,

               It makes sense but seems to amount to a simple spectrum analysis. On the assumption I made it would mean that sampling more cycles gives a higher probability of seeing all the harmonics.

...Probably all boils down to the same thing mathematically but I'm seeing it rather like the strobe torch you can use to analyse cyclic events too fast to see with the naked eye.

   The problem with that is it relies on a perfectly repetitive cycle. Much of the discussion here seems to relate to the fact that a pipe sound is NOT perfectly repetitive and that sense of "movement" largely distinguishes it from any mathematical model.

   I'm just babbling really, I don't actually use any software synths!

      Have fun,

            Roy.


On 23 June 2017 at 23:24, John Beach <[hidden email]> wrote:
Roy said, “Or could it just be because the fundamental frequency isn't a multiple of the sampling rate so you get a different part of each wave cycle. The more cycles you sample the more comprehensive view of the wave you get?
 
Roy, I think the wave file needs to be looked at as a multi-stranded wire, each wire having a harmonic frequency and a given amplitude (the whole equals the sum of its parts).  Then, if the wave line is four seconds in duration, 100 cycles per second,
there are 400 cycles in the wave file, but the wave line (consisting of the synthesized, harmonic partials, the “blend”) is the
frequency or pitch at which it was recorded.  I believe it retains its timber character at other frequencies, because the whole still
equals the sum of its parts which are all being multiplied or divided at the the same rate or by the same amount with transposition. 
 
Does this make sense?
 
John Beach

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

jbeach2646
Roy, in any sound, the constituent parts which comprise it are all present simultaneously, so even though they are harmonic partials, they create a blend which is the timber.  On the
vertical graph, we see the frequency of the harmonic and its amplitude as separate and distinct, individual parts.   But they are what comprise the line of the wave form, the differences in
which are marked, when one compares a stopped flute wave form  to almost any other organ stop wave form.  When played back, they are being read as a synthesized whole, not as particular,
individual parts.  In Audacity, the use of Mix and Render involving any number of different types of individual, wave forms would show what happens.  The particular structure of the line
changes relative to the added frequencies of the wave forms that are added to the mix.  In editing, we can “undo,” the addition or deletion of a part, but in the finalized wave file, the timber is,
again, fully complying with the mathematical rule that the “whole equals the sum of its part.”  “Whole” and “Sum” are operative.  Part has lost its distinctive identity. 
 
If the various footages used to synthesize sounds were actual pipe ranks in a pipe organ and there were a way to actually regulate the flow of wind into them at specific amplitudes and they were all played simultaneously, the ensemble result, a timber,  is the equivalent of what is contained in the wave file.  The harmonic partial may be a solo part, bass, tenor, alto, soprano, but in a choir, it forms the “chorus.” You may hear one part as louder than another.  But can you hear the flute 1-1/3” IN the Oboe?   I doubt it.  I hear the trumpet, I don’t hear the individual sine flute
footages (harmonic partials) which may, or may not have been used to produce the timber of the trumpet. 
 
 
It is how much of the length of a wave file Fluidsynth needs in order to accurately reproduce the sound which lies, somewhere,  between more than 2 cycles and, at most, 8 cycles, even though
the frequency is 1046 cycles.  Regardless of the length of the wave file, on importing into Polyphone, the program can tell me what the frequency (Midi note number) of the wave file is.  I don’t know why it can do this, since I can assign that wave file with its intrinsic frequency to any key, assign a root key to it, and it will play at the proper pitch, which is some interval different from
the original, recorded frequency or pitch.
 
Apparently, one of the fundamental absolutes of MIDI is that the numbers of the keys of the keyboard are a constant.  Those numbers, 0-127 (base=0) do not change.  Wave files of notes/pitches/frequencies can be assigned to the MIDI note number which may not be concert or pianoforte pitch.  The concept is based on key channels in old tracker pipe organs.  The key
channels were at the tail end of the keys and the pipes, any footage, stood in the holes over the key channels.  Depending on how many ranks of pipes were in the division, if one looked
directly behind Middle C Key of the keyboard, one might see the 2’-C of the 8’ Open Diapason, 1’-C of the 4’ Principal, 2/3’-G of the 2-2/3’ Nazard, etc.  It gets complicated because, as frequencies, (based on the constancy of pianoforte pitch) they are, in our minds, equivalent to keys.  We don’t perceive the frequency or note as being separate or distinct  from the key.
The key is a part, the hammer is a part, the string is a part, and the sound is the result.  By tuning, we could have the pitch or frequency of D# play when striking C, or we could connect D#
string to a position to be struck by the C-Key hammer.  Politically, this is, needless to say, liberalism run amok!
 
I guess we will be forgiven for attempting to hold ourselves to pipe organ standards......
 
John
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

Peter Hanlon
I have been a little bemused by the references to sawtooth and timber-rr, and it really ‘resonates' with me. In 1970, I analysed the set of voices in my electronic organ using a CDC3600 mainframe. No sampling, just analysing the filters. I attach the output, although the program is long lost. The architect of the electronics was Richard Dorf, and he produced a book on electronic instruments which was digitised by The University of Michigan in 2010 and is available on Google. It gets heavily into sawteeth and harmonics. Sometimes it is useful to go back and look at the work of those whose shoulders we stand upon. From my tyro viewpoint, every stop has its own frequency response signature, possibly with a few wrinkles and scratchouts, but a signature nonetheless.

Peter
 

ancient.pdf (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

greenfox
Hello Peter 

I left it a little while to see if anyone else would reply.
Are you saying in your comment that people are mistaken in the discussion of tone and waves such as sine and sawtooth? 

It is my understanding that two different graphs are being confused in this discussion. 

Depicting sound as amplitude (or dB) over time will give a waveform. A pure sine wave will sound like a flute. Other instrument tones will change the shape somewhat but will still be a wave. It will not be easy to recognize instrument families visually. 

The chart you attached I would call a spectrum analysis, being amplitude over frequency. In this chart it is certainly much easier to see and recognize the signature shape of an instrument family.

Any chart produced by a computer, no matter how old, will have been sampled at a sampling rate even if it was not spelled out as such at the time. It is the only way computers can work. 

Regards 
Rick 

On 27 Jun 2017 1:22 pm, "Peter Hanlon" <[hidden email]> wrote:
I have been a little bemused by the references to sawtooth and timber-rr, and it really ‘resonates' with me. In 1970, I analysed the set of voices in my electronic organ using a CDC3600 mainframe. No sampling, just analysing the filters. I attach the output, although the program is long lost. The architect of the electronics was Richard Dorf, and he produced a book on electronic instruments which was digitised by The University of Michigan in 2010 and is available on Google. It gets heavily into sawteeth and harmonics. Sometimes it is useful to go back and look at the work of those whose shoulders we stand upon. From my tyro viewpoint, every stop has its own frequency response signature, possibly with a few wrinkles and scratchouts, but a signature nonetheless.

Peter


ancient.pdf (1M) <http://jorgan.999862.n4.nabble.com/attachment/4665349/0/ancient.pdf>




--
View this message in context: http://jorgan.999862.n4.nabble.com/Sample-Size-and-Wave-Form-distortion-tp4665316p4665349.html
Sent from the jOrgan - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
greenfox - Brisbane Queensland Australia
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

Peter Hanlon
Hi Rick,

The curves that I produced weren’t based on samples directly, only on analysis of the electronic filters that accompanied each stop in the electronic organ. Richard Dorf no doubt had done sampling on real instruments and built his circuits to emulate them.

I have a distant memory that sawtooth is a rich form of harmonics but no odd components replicating an open pipe. The Dorf book is all about this stuff.

Best wishes,

Peter


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

John Reimer
Administrator
Peter Hanlon wrote
I have a distant memory that sawtooth is a rich form of harmonics but no odd components replicating an open pipe.
 
Peter,

A sawtooth wave has ALL the harmonics, with the fundamental strongest, and then all descending in amplitude according to the harmonic. In terms of amplitude, the second harmonic has 1/2 the amplitude of the fundamental (which is also called the first harmonic), the third harmonic 1/3, the fourth 1/4 and so on.

It is the square wave which has no even harmonics, giving it that recognisable hollow sound.

John Reimer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample Size and Wave Form distortion

Peter Hanlon
Good one John, and see you in Sydney some day,

Peter 
On 1 Jul 2017, at 2:27 pm, John Reimer [via jOrgan] <[hidden email]> wrote:

Peter Hanlon wrote
I have a distant memory that sawtooth is a rich form of harmonics but no odd components replicating an open pipe.
 
Peter,

A sawtooth wave has ALL the harmonics, with the fundamental strongest, and then all descending in amplitude according to the harmonic. In terms of amplitude, the second harmonic has 1/2 the amplitude of the fundamental (which is also called the first harmonic), the third harmonic 1/3, the fourth 1/4 and so on.

It is the square wave which has no even harmonics, giving it that recognisable hollow sound.

John Reimer



If you reply to this email, your message will be added to the discussion below:
http://jorgan.999862.n4.nabble.com/Sample-Size-and-Wave-Form-distortion-tp4665316p4665425.html
To start a new topic under jOrgan - User, email [hidden email]
To unsubscribe from jOrgan, click here.
NAML

Loading...