Discussion:
[jOrgan-user] Sample Size and Timber distortion
John Beach
2017-06-22 13:28:00 UTC
Permalink
Having described, in a previous posting, the miniscule size of the Oboe sample that was in the lite version of the downloadable demo of an SFZ organ, see it as a frame of reference
for what I am about to tell you.

On the assumption that this miniscule size was a valid concept, I generated two sine waves in Audacity, editing them to be used in my additive synthesizer disposition in jOrgan.
the sample size was approximately 55, i.e., about two complete cycles of the sine waves. What I experienced on repeated occasions of trying to use the jOrgan additive synthesizer
disposition was the sound quality of a sawtooth wave form. I was mystified, knowing that the wave file was a sine wave. So I generated two new sine waves (A880 and A1760) and made
them each a full second in length with a .001 fade-in attack. Put the new wave files in the soundfont and the problem was corrected. So, apparently, there is a substantial degree of
truth and importance to the idea that samples must be long enough to maintain the accuracy of timber. The miniscule sine waves were being distorted to the point of sound very strongly
like sawtooth wave forms, unusable.
Given Colin Pykett’s recent introduction of Trendline Synthesis, his expertise and experience in the field, and the fact that the output wave file from the program is .055 seconds, I am questioning what the minimum length of a wave file or sample must be in order to ensure the maintenance of timber quality? It seems to me that this is a critical issue and ought to be
known before editing wave files in any format is undertaken. Is there a kind of inverse, proportional relationship between frequency and wave-form length which, obviously, adversely affects
timber by distortion of the wave form? Is this calculable, mathematically, to the extent that a kind of scaling in this electronic medium is possible taking advantage of this? Or, is it wiser and
better to avoid it altogether?

John Beach
Thomas Beck
2017-06-22 13:40:14 UTC
Permalink
John,

Isn't the correct spelling for "timber" in this context "timbre?"
Post by John Beach
Having described, in a previous posting, the miniscule size of the Oboe
sample that was in the lite version of the downloadable demo of an SFZ
organ, see it as a frame of reference
for what I am about to tell you.
On the assumption that this miniscule size was a valid concept, I
generated two sine waves in Audacity, editing them to be used in my
additive synthesizer disposition in jOrgan.
the sample size was approximately 55, i.e., about two complete cycles of
the sine waves. What I experienced on repeated occasions of trying to use
the jOrgan additive synthesizer
disposition was the sound quality of a sawtooth wave form. I was
mystified, knowing that the wave file was a sine wave. So I generated two
new sine waves (A880 and A1760) and made
them each a full second in length with a .001 fade-in attack. Put the new
wave files in the soundfont and the problem was corrected. So, apparently,
there is a substantial degree of
truth and importance to the idea that samples must be long enough to
maintain the accuracy of timber. The miniscule sine waves were being
distorted to the point of sound very strongly
like sawtooth wave forms, unusable.
Given Colin Pykett’s recent introduction of Trendline Synthesis, his
expertise and experience in the field, and the fact that the output wave
file from the program is .055 seconds, I am questioning what the minimum
length of a wave file or sample must be in order to ensure the maintenance
of timber quality? It seems to me that this is a critical issue and ought
to be
known before editing wave files in any format is undertaken. Is there a
kind of inverse, proportional relationship between frequency and wave-form
length which, obviously, adversely affects
timber by distortion of the wave form? Is this calculable,
mathematically, to the extent that a kind of scaling in this electronic
medium is possible taking advantage of this? Or, is it wiser and
better to avoid it altogether?
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
https://lists.sourceforge.net/lists/listinfo/jorgan-user
John Beach
2017-06-22 13:57:02 UTC
Permalink
Timber, timbre, honor, honour, savor, savour, English, English, American, Canadian, Australian, etc., etc., etc.

John B.
John Beach
2017-06-22 13:59:09 UTC
Permalink
And, Thomas, to the Frenchman, le timbre is the “postage stamp.”

John B.
Thomas Beck
2017-06-22 14:05:22 UTC
Permalink
If you are implying that timbre is the preferred English spelling and
timber the American, Merriam-Webster says otherwise.
Post by John Beach
And, Thomas, to the Frenchman, le timbre is the “postage stamp.”
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
https://lists.sourceforge.net/lists/listinfo/jorgan-user
John Beach
2017-06-22 14:36:17 UTC
Permalink
As previously described, the size of the sine wave is what causes distortion to sawtooth by Fluidsynth. The proof is that the sound of the sine waves are correct in Polyphone at all the footages of the harmonic partials (from 32 feet to 1/4 foot). The identical, additive-synthesizer disposition with Creative Sound---manually loading the soundfont into bank/RAM using Soundfont Bank Manager—, works properly with the 2 cycles of the wave file at frequencies of A880 and A1760. So, the problem of distortion is isolated to Fluidsynth in jOrgan. Does anyone know what the reason for this might be? It is obviously a limitation of the software synthesizer, but since hardware has the capability, and software is defined as written instructions which make a piece of hardware work, is it not possible to correct the instructions?

Again, since this is an apparent limitation of Fluidsynth, we need to know what the minimum length of a wave file must be in order to avoid the problem of sound distortion which is a potential
problem.

In Polyphone, my settings are Creative ASIO. However, there is normal, sine wave output with both Windows Primary Sound Driver and the option of Creative Speakers, proving that the problem
is with Fluidynth.

John Beach
Graham Wykes
2017-06-22 23:30:20 UTC
Permalink
I would first be looking carefully at the amplitude of the samples. Is it
possible that FS is being overloaded? What gain settings are being used?
Hardware often has more headroom than software.

How does FS react with more attenuation set in the soundfont?

Cheers
Graham
Post by John Beach
As previously described, the size of the sine wave is what causes
distortion to sawtooth by Fluidsynth. The proof is that the sound of the
sine waves are correct in Polyphone at all the footages of the harmonic
partials (from 32 feet to 1/4 foot). The identical, additive-synthesizer
disposition with Creative Sound---manually loading the soundfont into
bank/RAM using Soundfont Bank Manager—, works properly with the 2 cycles of
the wave file at frequencies of A880 and A1760. So, the problem of
distortion is isolated to Fluidsynth in jOrgan. Does anyone know what the
reason for this might be? It is obviously a limitation of the software
synthesizer, but since hardware has the capability, and software is defined
as written instructions which make a piece of hardware work, is it not
possible to correct the instructions?
Again, since this is an apparent limitation of Fluidsynth, we need to know
what the minimum length of a wave file must be in order to avoid the
problem of sound distortion which is a potential
problem.
In Polyphone, my settings are Creative ASIO. However, there is normal,
sine wave output with both Windows Primary Sound Driver and the option of
Creative Speakers, proving that the problem
is with Fluidynth.
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
https://lists.sourceforge.net/lists/listinfo/jorgan-user
g***@gmail.com
2017-06-22 23:56:09 UTC
Permalink
Hi John

I think your testing has pointed the magnifying glass at why many people
are not satisfied with the sound of Fluidsynth in jOrgan.

I wonder if it has to do with the number of sample points Fluidsynth takes
from the sample to create the synthesized output.
It seems to me that there are not enough sample points taken from the sign
wave to reproduce the rounded sign wave signal.
This problem would present different audio distortion on more complex wave
forms, and would distort or loose crucial upper harmonics.

Regards
Rick

P.S. I use "reply" in gmail from my Android phone or tablet for
communication with this group.
Post by John Beach
As previously described, the size of the sine wave is what causes
distortion to sawtooth by Fluidsynth. The proof is that the sound of the
sine waves are correct in Polyphone at all the footages of the harmonic
partials (from 32 feet to 1/4 foot). The identical, additive-synthesizer
disposition with Creative Sound---manually loading the soundfont into
bank/RAM using Soundfont Bank Manager—, works properly with the 2 cycles of
the wave file at frequencies of A880 and A1760. So, the problem of
distortion is isolated to Fluidsynth in jOrgan. Does anyone know what the
reason for this might be? It is obviously a limitation of the software
synthesizer, but since hardware has the capability, and software is defined
as written instructions which make a piece of hardware work, is it not
possible to correct the instructions?
Again, since this is an apparent limitation of Fluidsynth, we need to know
what the minimum length of a wave file must be in order to avoid the
problem of sound distortion which is a potential
problem.
In Polyphone, my settings are Creative ASIO. However, there is normal,
sine wave output with both Windows Primary Sound Driver and the option of
Creative Speakers, proving that the problem
is with Fluidynth.
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
https://lists.sourceforge.net/lists/listinfo/jorgan-user
John Reimer
2017-06-23 00:20:34 UTC
Permalink
Post by g***@gmail.com
I think your testing has pointed the magnifying glass at why many people
are not satisfied with the sound of Fluidsynth in jOrgan.
Satisfaction with what one is hearing can be an elusive matter, depending on
a number of subjective variables not related to the "actual" reproduction.
I'm not trying to defend Fluidsynth against all comers. At times when I have
had Linux installed on my console computer (and this is no longer the case),
I have felt that the sound is superior to that from Fluidsynth, but later I
find myself wondering about it, especially when at the moment I have to use
Fluidsynth with its backends, and I really find nothing about the sound to
fault.

I have never forgotten my attempts some years ago to compare Fluidsynth with
Linux, and may have had VSTSynthFont as part of the comparison also. And all
this was using the onboard sound. I used the Audacity analyser to compare
frequency response, harmonic distortion and intermodulation distortion, and
I found no real difference between any of them. They were all VERY GOOD.

Somewhat earlier I had a look at how the various systems cope with
transients. I don't remember significant discoveries, but I did discover
that the most "accurate" rendition of transients occurs when dealing with
waveforms which have a high amplitude. Low level waveforms fared quite
badly, and this result is not surprising, given that we are dealing with
digital processing. Rightly or wrongly, when processing I normalize them all
to a high level first, so that all samples are saved at next to maximum
level, and I depend on the soundfont parameters to bring them down to the
correct level. I have no idea whether in practice this is important.

John Reimer




--
View this message in context: http://jorgan.999862.n4.nabble.com/Sample-Size-and-Timber-distortion-tp4665298p4665312.html
Sent from the jOrgan - User mailing list archive at Nabble.com.
John Beach
2017-06-23 01:51:28 UTC
Permalink
John R. I concur entirely with your remarks about Fluidsynth and,
interestingly, your practice, (although it has been
more related to real pipe sounds edited with some synthesis mixing, and mine
has been entirely with additive-synthesized sounds), and mine are almost
identical. I record using Audacity and Effect> Normalize the recorded sound
for the purpose of editing, which consists of removing the silence before
the attack and saving a 4-second portion, deleting everything after that
point. Then I import the wave files into Polyphone and I use 61
instances of that wave file for each note in the compass of the stop,
editing the parameters for each note in Polyphone. I was curious to see how
SFZed would handle such a soundfont in conversion. So I converted an 8'
Principal. SFZed labelled each note of the compass, lo key hi key (same),
loop mode (continuous) pitch keycenter C6, cutoff frequencies (specified
pitch), pan, attack and release Effect 1 (Reverb) and Effect 2 (Chorus).

It is the exact settings as in an SF2 editor, so the easiest way to editing
for the SFZ format would be in Polyphone, creating a soundfont with all the
parameters, then import it in SFZed and in a second you have the SFZ file.

While I believe that Fluidsynth is functional and acceptable, in deference
to those who do not, unless you are willing to outlay $1500 for a
professional organ sound engine such as Artisan Organs, my suggestion would
be to invest in several of the best Creative Labs X-Fi soundcards---used
though they will be---and enjoy the sound quality difference.
Drivers are still provided for those soundcards and the sound articulation
is superb! This is, probably, a $50 to $100
solution to the problem. You might even be able to get multiple soundcards,
although, while one PCI/PCIe slot soundcard and the onboard audio (Realtek)
will work together in a disposition, I have had trouble trying to get
Windows 10 to recognize two PCI/PCIe soundcards installed on the same
machine.


John Beach
John Beach
2017-06-23 02:05:38 UTC
Permalink
Rick, the puzzle about the sine wave was that it has no upper harmonic partials and individual footages of a sine wave are nothing more than that sine wave at one frequency or another, specified by the root key. I suspect that Fluidsynth was taking the short length of the 2-cycles of the sine wave and, while the loop should have preserved the sine quality, somehow it was distorted to the quality of a sawtooth, very heavily buzzy. The sound would be usable in some
instruments, strings and reeds, but the question remains why the small size caused the distortion in Fluidsynth and it must indicate that there is a minimum amount of samples which must be present in order for an instrument timber to
be maintained or for the wave form to retain its original character.

John B.
Aaron Laws
2017-06-26 23:30:47 UTC
Permalink
Post by John Beach
Having described, in a previous posting, the miniscule size of the Oboe
sample that was in the lite version of the downloadable demo of an SFZ
organ, see it as a frame of reference
for what I am about to tell you.
On the assumption that this miniscule size was a valid concept, I
generated two sine waves in Audacity, editing them to be used in my
additive synthesizer disposition in jOrgan.
the sample size was approximately 55, i.e., about two complete cycles of
the sine waves. What I experienced on repeated occasions of trying to use
the jOrgan additive synthesizer
disposition was the sound quality of a sawtooth wave form. I was
mystified, knowing that the wave file was a sine wave. So I generated two
new sine waves (A880 and A1760) and made
them each a full second in length with a .001 fade-in attack. Put the new
wave files in the soundfont and the problem was corrected. So, apparently,
there is a substantial degree of
truth and importance to the idea that samples must be long enough to
maintain the accuracy of timber. The miniscule sine waves were being
distorted to the point of sound very strongly
like sawtooth wave forms, unusable.
Given Colin Pykett’s recent introduction of Trendline Synthesis, his
expertise and experience in the field, and the fact that the output wave
file from the program is .055 seconds, I am questioning what the minimum
length of a wave file or sample must be in order to ensure the maintenance
of timber quality? It seems to me that this is a critical issue and ought
to be
known before editing wave files in any format is undertaken. Is there a
kind of inverse, proportional relationship between frequency and wave-form
length which, obviously, adversely affects
timber by distortion of the wave form? Is this calculable,
mathematically, to the extent that a kind of scaling in this electronic
medium is possible taking advantage of this? Or, is it wiser and
better to avoid it altogether?
John Beach
What you're describing could be explained by the end of the sine wave not
matching the beginning. You're quite sure that they match? For instance, if
your sample is one cycle and the first sample is 0, the last sample should
not also be 0, but a bit less (I hope you understand, so I won't explain
further). The hiccup upon looping is much pronounced if it is done every
cycle. Perhaps one way to test this is: open the file in audacity, copy the
contents, paste the contents perhaps 800 times to simulate the unrolling of
the sample during playback, and see if the sound is much better.

In Christ,
Aaron Laws
John Beach
2017-06-27 02:53:06 UTC
Permalink
Aaron, I did not actually loop the sample. It was so short that I just clicked the button for the start and finish in Polyphone let the sample play to hear if it was properly looped. It sounded
good in Polyphone. That is what was strange. There was no problem with the sound in Polyphone, only in jOrgan Fluidsynth. So, I am assuming that it was, somehow, Fluidsynth’s treatment
of the file that was different. Does Fluidsynth need more size to be able to produce the sound accurately? I don’t know. We don’t see what Fluidsynth does or how it actually handles
the information is receives from soundfonts. We just hear it.

As I said in a previous post, I had soundfonts with 1/10th of a second samples and they worked perfectly.

John Beach
Graham Goode
2017-06-27 05:56:48 UTC
Permalink
In the past I have found that each soundfont editor and player has
slightly different start and stop values for the loop portion (the
stated numerical values are the same, but where they are in the wave
file are sometimes one sample out). This meant that some loops clicked
in Fluidsynth but were fine in Viena. Adjusting the values by one
usually solved the issue. I assume it has something to do with Zero
based beginning of the wave file versus One based beginning of the
wave file.

In effect, the smaller the sample, the larger the One sample
difference in the loop, the more sawtooth the sound would become.

My 2c

GG
John Beach
2017-06-27 06:34:57 UTC
Permalink
Graham, although I use auto-looping in Polyphone, now, I had a lot of
experience with setting the start and stop in smaller wave files. I found
that in 44.1K files, a difference of 42 (frequently, start=x08 to end=50),
and in 48K, a difference of 46, start=x08 to end=x54, would give perfect
results. If there was a problem at that difference, doubling the difference
of 46 to 92 would
solve the problem and give a perfect loop result. In Polyphone, if I have
had a wave file that was too small to auto-loop, generally under one second
in full length, I will left click the start,
right click the end and use the counters to adjust the loop, aurally, until
it is correct. It is usually an exact multiple of 42 for a 44.1K wave file
and 46 for a 48K wave file.

Looping can be deceptive and lead to tuning problems. In auto-looping,
even with 4-second long samples, in the higher pitches, the loops are,
sometimes, unacceptably audible and so I will
manually set the loop points to a small difference, such as above, x08-x50.
This will usually correct the problem with a more sterile, steady-state tone
which prevents rotation of the loop from occurring and being heard.


John B.
Graham Goode
2017-06-27 07:30:48 UTC
Permalink
Hi JohnB,

The perfect loop portion will vary from note to note as the wave
length of each note is different.

I manually listen to each loop produced by an autolooping app and
select those that sound natural.

GrahamG
Post by John Beach
Graham, although I use auto-looping in Polyphone, now, I had a lot of
experience with setting the start and stop in smaller wave files. I found
that in 44.1K files, a difference of 42 (frequently, start=x08 to end=50),
and in 48K, a difference of 46, start=x08 to end=x54, would give perfect
results.
Continue reading on narkive:
Search results for '[jOrgan-user] Sample Size and Timber distortion' (Questions and Answers)
8
replies
what are the things that make the sound quality good?
started 2010-09-10 06:18:53 UTC
home theater
Loading...