On Sep 7, 7:28�am, "Shimon M" <shimon.ma...@gmail.com> wrote:
> I came back with numbers:
>
> On C(4) with volume 16: the fequency 261.626 gets 86,515
> On 15: 98,206
> On 10: 40,688
> On 5: 277,891
> On 2: 100,165
>
> So I am baffled all completley.
>
> When I listen to it, it does sound lower! and more importantly, I printed
> out the array of the sample each time, and the numbers look lower (closer
> to zero, everytime I lower the volume), but the FT's result doesn't go
> down, necessarilly.
I suggest you plot to complete magnitude spectrum from the FFT
result, and check the overall level, not just the one bin where there
may only be mostly noise.
imho. ymmv.
Reply by Richard Dobson●September 7, 20092009-09-07
Shimon M wrote:
> I came back with numbers:
>
> On C(4) with volume 16: the fequency 261.626 gets 86,515
> On 15: 98,206
> On 10: 40,688
> On 5: 277,891
> On 2: 100,165
>
> So I am baffled all completley.
>
> When I listen to it, it does sound lower! and more importantly, I printed
> out the array of the sample each time, and the numbers look lower (closer
> to zero, everytime I lower the volume), but the FT's result doesn't go
> down, necessarilly.
>
Are you certain your FFT is correct? You need someone in your department
qualified to do so, to look at it. Have you tested it with a plain
sinusoidal input?
> Another question - I used Audacity on samples and got on volumes 16,8,4,2
> - dB -33, -38, -45, -57.
>
That's reasonably reasonable. Suggests there is indeed something wrong
either with your FFT, or with how you are reading your sample data.
> Why are dB negative in audacity?
> What is the ralationship between these numbers? I am assuming it is
> logarithmic.
These are ~very~ basic, almost elementary questions! See here:
http://en.wikipedia.org/wiki/DBFS
Here's a clue: say that digital peak = 1.0, digital silence = 0. Take
the log of each (try it on your calculator). Which is the more useful as
a reference level?
You ~absolutely~ need to be fully conversant with all the numbers and
units you are working with; whether the dB scale as used everywhere in
the music industry, or the output of a correctly implemented FFT. That
is not something that can possibly be addressed here.
There must be someone in your department who knows the basics of digital
audio and could help you. If not, who will assess your project?
Richard Dobson
Reply by Shimon M●September 7, 20092009-09-07
I came back with numbers:
On C(4) with volume 16: the fequency 261.626 gets 86,515
On 15: 98,206
On 10: 40,688
On 5: 277,891
On 2: 100,165
So I am baffled all completley.
When I listen to it, it does sound lower! and more importantly, I printed
out the array of the sample each time, and the numbers look lower (closer
to zero, everytime I lower the volume), but the FT's result doesn't go
down, necessarilly.
Another question - I used Audacity on samples and got on volumes 16,8,4,2
- dB -33, -38, -45, -57.
Why are dB negative in audacity?
What is the ralatioship between these numbers? I am assuming it is
logarithmic.
Thank you, again.
Reply by Richard Dobson●September 7, 20092009-09-07
Rune Allnor wrote:
> On 7 Sep, 13:07, Richard Dobson <richarddob...@blueyonder.co.uk>
> wrote:
>
>>> Any explanation? This is my last obsticle in completing the prj.
>> Impossible to say fur sure without knowing what Guitar Pro is meant to
>> be doing with those units.
>
> ...keep in mind that it *could* be as simple as scaling
> the samples by some constant gain factor...
>
Indeed. The raw samples are very likely normalized and/or in some way
relatively equalized; the OP is ostensibly recording the performance
output. We do not know if the same sample is used. If the instrument is
comprehensively multi-sampled, different samples are recorded not only
with respect to pitch, but also with respect to dynamics. I.e. one
sample is used for forte and a different one is used for piano. GP is
advertised as offering highly realistic performance (however one is
suppose to judge that), which would make multi-sampling pretty well
mandatory. So it is a reasonable prediction that the quieter note is not
simply the louder note attenuated; depending on how different the two
specified GP levels are.
It may very well be that the assumptions the OP is making abut how the
software works are unwarranted, and risk leading to false or confused
results.
Richard Dobson
Reply by Rune Allnor●September 7, 20092009-09-07
On 7 Sep, 13:07, Richard Dobson <richarddob...@blueyonder.co.uk>
wrote:
> > Any explanation? This is my last obsticle in completing the prj.
>
> Impossible to say fur sure without knowing what Guitar Pro is meant to
> be doing with those units.
...keep in mind that it *could* be as simple as scaling
the samples by some constant gain factor...
Rune
Reply by Richard Dobson●September 7, 20092009-09-07
Shimon M wrote:
> Hello again - Thank you for all your help, I have made greaqt progress
> with it, and I am close to finishing my project.
>
> I have two final question:
> 1. Volume issue:
> It is my understanding that sample points on which we preform FT (or FFT),
> are basically the energy sampled at that point. However, when I create
> samples for testing - I notice that:
>
> On a smaple of C note at volume 16 (guitar pro units) - the FFT returns a
> certain amplitude for 261.626 Hz.
>
> but, on a similar sample with volume 8 - this amplitude is a bit larger!
>
Too vague - "a bit larger" tells us nothing useful. We need (and you
should be supplying) hard numbers.
> Is this because the results I am seeing are basically relative, and not
> absolute (I expected all amplitudes to drop by half - or by some factor [in
> case the units are linear to decibels], but instead amplitude for C
> increased! [only a bit]).
>
> Any explanation? This is my last obsticle in completing the prj.
Impossible to say fur sure without knowing what Guitar Pro is meant to
be doing with those units. However, if the application selects or
synthesizes (or low pass filters) a tone dependent on the requested
volume, one would expect the quieter note to have less HF energy than
the louder one; so that the ~relative~ amount of fundamental will be
greater in the quieter tone. Listening to the sounds should settle the
question. You may need to revise your expectations in this respect.
And of course, make sure the sound is not going through any non-linear
processing such as compressors, etc. Much software ("pro" and
otherwise) relies heavily on such things to give their otherwise meagre
sounds some apparent substance and "power".
Richard Dobson.
Reply by Shimon M●September 7, 20092009-09-07
Hello again - Thank you for all your help, I have made greaqt progress
with it, and I am close to finishing my project.
I have two final question:
1. Volume issue:
It is my understanding that sample points on which we preform FT (or FFT),
are basically the energy sampled at that point. However, when I create
samples for testing - I notice that:
On a smaple of C note at volume 16 (guitar pro units) - the FFT returns a
certain amplitude for 261.626 Hz.
but, on a similar sample with volume 8 - this amplitude is a bit larger!
Is this because the results I am seeing are basically relative, and not
absolute (I expected all amplitudes to drop by half - or by some factor [in
case the units are linear to decibels], but instead amplitude for C
increased! [only a bit]).
Any explanation? This is my last obsticle in completing the prj.
Thank you.
Reply by R.Nicholson●September 5, 20092009-09-05
On Sep 2, 4:46=A0am, "Shimon M" <shimon.ma...@gmail.com> wrote:
> Hello, Everyone,
>
> I am designing a software for a course, and it is suppose to do the
> following:
> 1. get a wave file
> 2. analyze it - to notes and instruments that play them
> 3. enable changing an instrument with another.
>
> Yes, I know these are all things that are under research, and that there
> is no magic solution.
>
> Yet, since this is for a course, it doesn't have to be robust - if I can
> get it to work only on a small group of samples, that would be OK. So I
> chose GuitarPro
Don't use guitar sounds. The frequencies produced by stringed
instruments are not the same as the musical pitch, especially
for low notes (much lower than Concert A).
To make things simple for a student project, try flute music in
the mid to high range for a much simpler spectra. Play songs
with a very slow tempo, say 60 bpm.
If you plan on using an FFT, see the list on my web page of a few
misunderstandings on how an FFT works.
http://www.nicholson.com/rhn/dsp.html
IMHO. Good Luck.
--
rhn A.T nicholson d.0.t C-o-M
Reply by Rune Allnor●September 4, 20092009-09-04
On 4 Sep, 12:08, "Shimon M" <shimon.ma...@gmail.com> wrote:
> One last question, if I may:
>
> How may I reverse a fourier transfrom?
>
> I assume that is a bit hard - since I only got a finite number of
> frequencies from the fourier transfrom.
The Discrete Fourier Transform (DFT) is exact for the data
you actually have - discrete-time data of finite extent.
> So, if I wanted to reverse it -
> I'll need to integrate on all possible frequncies (which I don't have).
...which is why a DFT can only be an approximation of
what most people mean by 'Fourier Transform' (FT of
continuous data of infinite extent)...
> Nevertheless, Since I can only re-build a finite, discrete signal - there
> is pobably an approximation good enough, using a sum (as opposed to
> integral).
Use the Inverse DFT, IDFT. The DFT/IDFT pair is exact for
discrete data of finite extent.
Rune
Reply by Shimon M●September 4, 20092009-09-04
One last question, if I may:
How may I reverse a fourier transfrom?
I assume that is a bit hard - since I only got a finite number of
frequencies from the fourier transfrom. So, if I wanted to reverse it -
I'll need to integrate on all possible frequncies (which I don't have).
Nevertheless, Since I can only re-build a finite, discrete signal - there
is pobably an approximation good enough, using a sum (as opposed to
integral).
Thank you.