Creating formula from musical bar test population

In summary: Your device only shows the fundamental frequency of the bars. If you want to produce a musical instrument, you should know that perceived pitch and actual measured frequency are not going to match across the whole range of the instrument. The lower "correct" frequencies are going to sound sharp and the "correct" higher frequencies are going to sound flat. A few moments with a tone generator that shows frequency will demonstrate this immediately - that frequency doubling and halving does not result in what sounds like octaves.The choice of tuning for pianos, for example, compensates for this by tuning the low strings a little flatter than the frequency figure would suggset, and likewise tunes the
  • #1
preston8
18
0
Hello,

I'm creating a musical device which has stainless steel bars cut with a laser cutter. They are all the same length but vary in width. I created a set of test lengths (50 in total) and tested the pitch of each one using a tone analyzer. Now I'm looking to fit a curve to the data so that I can put in any pitch I want and get a length that the bar needs to be to achieve that pitch.

I know that the equation I generate won't be spot-on, but I would like to get as close as possible.

Here's the test data for each bar:
bars_zpsdddfe05a.png


I mapped a "power" curve to the data set:
graph_zps7012f1d8.png


The curve yielded these results, but there is a significant error in the higher pitches:
results_zps877caa5e.png


I'm wondering what types of statistical tools I can use to perhaps reduce the error in the calculations.

-P
 
Physics news on Phys.org
  • #2
If the data is basically transverse vibrations of beams, you would expect the frequencies and lengths to be related by
$$L = \frac{A}{\sqrt f}$$
and your fitted curve is close to that (the exponent is -0.505 not -0.5).

I don't understand what you did to get your final table. Presumably you started from the "desired pitch" and got the "Estim length" somehow, and then converted that length to the "Hz" value using a different formula. But you have only showed us one formula, on your chart ... :confused:
 
  • #3
Does your tone analyzer show the frequencies of the harmonics?
 
  • #4
@AlphaZero:
I actually used the formula you posted to derive the lengths for my initial set. I found that the lower pitch bars were spot-on, but pitch error became more pronounced as I tested higher pitched bars. I was hoping that by using a curve fit, I could get even more accurate.

I apologize for not showing the source of the data in the last photo. I plotted Pitch vs. Time instead of Time Vs. Pitch and created another power curve fit. I reversed the data to see what the result would be. This may be erroneous and not a good method of prediction.
reverse_zpse83558b3.png


@bahamagreen:
My tone analyzer only shows the fundamental.
 
  • #5
If your intent is to produce a musical instrument, you should know that perceived pitch and actual measured frequency are not going to match across the whole range of the instrument. The lower "correct" frequencies are going to sound sharp and the "correct" higher frequencies are going to sound flat. A few moments with a tone generator that shows frequency will demonstrate this immediately - that frequency doubling and halving does not result in what sounds like octaves.

Tuning for pianos, for example, compensates for this by tuning the low strings a little flatter than the frequency figure would suggset, and likewise tunes the higher notes progessively sharper than the frquency would suggest. Do a search on "German tuning" to find out more.

If you create your instrument to produce perfect frequencies where each octave is an exact doubling of frequency, the result will be pretty unusable and unlistenable. Also, you will need to choose a temperament for the instrument.
 
  • #6
@bahamagreen

Are there devices that can identify the "perceived" pitch of my bars instead of the "correct" pitch? Or is this something that is done by ear? My particular device only shows the true pitch.
 
  • #7
By ear... do you hear the pitches of the metal bars when you strike them?
 
  • #8
I'm probably not the best person to perform the tuning. So, I would need to strike every bar, compare it with a tone generator, and tune the bars in the same session?

I'm confused why a temperment is needed when we're just going to change the pitches based on what sounds correct. Based on a particular temperment, can't I follow the rules for the temperment or do I need to do the perceived tuning as well?
 
  • #9
Comparing the pitches with a tone generator won't tell you how to adjust the pitches to tune unless you use specific frequencies from the tone generator... and those are going to be some temperament.

The choice of temperament is going to determine how the result is going to sound... the idea of "what sounds correct" is really the whole problem. Some make the fifth intervals sound better, some make the thirds sound better, some only sound good when restricting the key signatures played, or restricting the harmonies employed.

Historically, there have been dozens of temperaments, but the main ones in Western music have been these:

Pythagorean tuning
Quarter-comma meantone temperament
Syntonic-diatonic just intonation
Well temperaments
Equal temperament

If you look at the Wikipedia page "Musical temperament", you can find out more and jump to specific temperaments you might want to consider - you will find frequencies and ratios of frequencies used to build them, but the relationship of temperament to the shifting of perceived pitch approaching the extremes of frequency range is a further complication.

In practice, the temperament maps to the perceived pitches, not the frequencies. Yet, most of the analysis of temperaments is done with frequency ratios as if the perceived shift doesn't exist... some of the temperament schemes involve multiple octaves in the frequency construction process, so the perceived shift may be confounded with the various "problems" associated with some of them.

What might be very helpful when you are doing your final tuning is to have a musician friend help out in the last stages. You need to have a methodology that includes recognizing when the temperament you select is achieved. For example, if just try it by ear you will naturally attempt the Pythagorean temperament because it is based on the harmonic series and is pleasant to the ear. But if you try to fine tune it for different tonal centers (key signatures), you will find that corrections are needed every time you switch to another key, and you will go round and round trimming the bars futilely until the whole thing is messed up beyond recovery.
 
  • #10
preston8 said:
I actually used the formula you posted to derive the lengths for my initial set. I found that the lower pitch bars were spot-on, but pitch error became more pronounced as I tested higher pitched bars. I was hoping that by using a curve fit, I could get even more accurate.

I apologize for not showing the source of the data in the last photo. I plotted Pitch vs. Time instead of Time Vs. Pitch and created another power curve fit. I reversed the data to see what the result would be. This may be erroneous and not a good method of prediction.

If the data points were exactly on the curve, the two equations you got would be mathematically equivalent. if ##y = ax^b##, then ##x = (1/a)^{1/b}y^{1/b}##.

But your points don't lie exactly on the curve, so when you fitted the two curves you got slightly different results.

There is no obvious reason why the measured data should fit a curve of the form ##y = ax^b## exactly, with b slightly different from = -0.5. If you want to correct the lengths of your bars, it might be better to actually plot the errors, for example plot (measured freq - theoretical freq) against measured freq or maybe ((measured - theoretical)/measured) against measured. Then fit a curve to that graph - not necessarily a power law, maybe a polynomial will fit better.

Then, to get the "real world" frequency you want, you would find the theoretical frequency from that curve, and then the length from your theoretical ##A/\sqrt f## formula.

Note, you can also tune these type of bars after you have cut them. If you make the middle of the bar slightly thinner by filing away some material, you will lower the pitch. If you make the ends slightly thinner, you will raise it. That might be a more practical way to make the final adjustments than by trying to cut the exact "correct" length.
 
  • #11
Thank you for clearing this up and providing additional information that I was not aware of.
 

Related to Creating formula from musical bar test population

What is a musical bar test population?

A musical bar test population is a group of individuals who have been given a specific musical bar test to assess their abilities in certain areas of music, such as rhythm and pitch recognition.

Why is it important to create a formula from musical bar test population?

Creating a formula from a musical bar test population allows us to quantify and analyze the data collected from the test. This can help us identify patterns and trends, as well as make predictions about future performances.

What factors are considered when creating a formula from musical bar test population?

When creating a formula from a musical bar test population, factors such as the difficulty of the test, the type of musical bar used, and the scoring system must be taken into account. The formula must also be statistically valid and reliable.

How can a formula from musical bar test population be used?

A formula from a musical bar test population can be used to compare individuals' performances on the test, track progress over time, and identify strengths and weaknesses in specific areas of music. It can also be used to make predictions about future performances and inform teaching strategies.

Are there limitations to creating a formula from musical bar test population?

Yes, there are limitations to creating a formula from a musical bar test population. The formula may only be applicable to the specific test and population it was created from and may not accurately represent all individuals' abilities in music. It is important to consider these limitations when interpreting the results of the formula.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Mechanical Engineering
Replies
16
Views
328
  • Mechanical Engineering
Replies
10
Views
1K
  • General Discussion
Replies
13
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
6
Views
2K
Back
Top