Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
The calculations made within this post were calculated to 12 digit floating point, but for the sake of readability I am rounding all numbers to the thousandths. This means math done with these numbers will not be perfectly accurate.

To understand this post, it is required to know some prerequisite jargon, basic sound science, and the construction of valve-based brass instruments. If you're well versed in music theory and brass instruments, you can probably skip the next paragraph.

Brass instruments are constructed by making a long tube (usually about 57 inches) and placing three valves along the pipe which redirect the flow of the air in the instrument to longer tubing. The first valve is tuned to lower the instrument two semitones, the second valve one semitone, and the third valve three semitones. These valves are not mutually exclusive, as engaging all three valves will lower the instrument's pitch approximately six semitones. I will denote which valves are engaged by referring to valves as 1, 2, and 3 and simply placing them next to each other. When no valves are pressed, I will call that an open fingering. For example, when I am pressing the first and third valves, I would call that fingering 13. If I am pressing all three valves, that would be fingering 123.
Brass instruments, as well as most wind instruments, produce sound by blowing/buzzing on the end of a tube and producing a sound wave, the trough/peak of which is exactly at the exit of the tube. (This is in very general terms.) Since the speed of sound is relatively constant, the frequency of the dominant note is determined by the length of the tube being played. The wavelength of the note being played is therefore twice the length of the instrument. It's a little more complicated with partials (overtones), but we'll talk about that later.
To help explain, the functionality of brass instruments is actually very similar to a guitar in construction. When you strum the E string on a guitar, the guitar plays an E. If you place your finger on the middle fret of the E string (thereby effectively halving the length of the string) the string, when strummed, will also play an E, but this time an octave up. Well, how do we get all the notes in between those two Es? There are 11 frets between the open E and the octave up E, which of course play the chromatic scale between those two notes, but notice that the distances between frets gets larger as they approach the headstock. this is because to lower a note one half step, you decrease the length of a string (or tube!) proportionally, not linearly. I could go over all the math, but just know that to raise the pitch of a trumpet by one half step, you must multiply the length of the tube by about 0.944. Lowering the pitch requires multiplying the length by about 1.059. Remember, you must increase and decrease the length proportionally, not linearly, so as the trumpet gets longer, you begin requiring increasingly more tubing to lower it one half step. This is the root of the issue.

Brass instruments can not be, as of now, perfectly in tune. On a hypothetical perfectly manufactured instrument, tubing would be as follows, rounded to the nearest thousandth:
    Trumpet Length: 56.633 in.
    First Valve Length: 6.935 in.
    Second Valve Length: 3.368 in.
    Third Valve Length: 10.715 in.

You should immediately notice that the third valve, which lowers the instrument three semitones, is notably more than thrice as long as the second valve, which lowers it one semitone. This is because the length of tubing required to lower a brass instrument by n semitones is not simply length+3.368n, it is actually more like length((1.059)^n)-length. By this math, we find that the valves are actually tuned perfectly, because each valve follows this formula. For instance, the third valve should be 56.633((1.059)^3)-56.633, which is 10.715.

This is where the tuning inaccuracies come into play. If the first and third valves are played, for instance, it will raise the length by 17.650 inches, which is 1.313 inches less than the 18.966 inches required to lower the instrument the full five semitones. You can see now why tuning on-the-fly is crucial to remaining in tune. A perfectly tuned trumpet will still be out of tune on every fingering that requires more than one valve. Here's a table describing the tube lengths:
    Fingering 12:
      Current tube length: 10.303 in.
      Ideal tube length: 10.717 in.
      Length deficit: 0.413 in.

    Fingering 13:
      Current tube length: 17.650 in.
      Ideal tube length: 18.966 in.
      Length deficit: 1.313 in.

    Fingering 23:
      Current tube length: 14.083 in.
      Ideal tube length: 14.722 in.
      Length deficit: 0.637 in.

    Fingering 123:
      Current tube length: 21.018 in.
      Ideal tube length: 23.462 in.
      Length deficit: 2.440 in.

Indeed, as more valves are pressed down, the tuning inaccuracy becomes drastic. On our hypothetical perfectly manufactured trumpet, fingering 123 played with its root note required a slide to be pulled out a full 1.220 inches to be in tune. Wow. How do we fix this?

Well, the solution needs to be a mechanism which extends a slide/extra valves depending on what combinations of valves are pressed. This means we need mechanical logic gates. And this is where I appeal to the infinite creativity of you guys. How would I do this? This is my working design as of now. A slide attached to all three valves would move different distances depending on what is pressed. This is just a model, and I have not yet crunched any numbers, because holy cow it's complicated, but that's for another post. Look at the diagrams on the bottom left to understand what this thing is supposed to do. Do you guys have any ideas?
Bassoonist/Percussionist/Trombonist here, I play them in my school's concert/marching/pep band, respectively. I've been studying instrument design on and off for about a year now and have designed a variety of aerophones, with varying success. I'm currently working on (read: barely ever working on but I do it when I have time) expanding my collection of crappy 3d printed horns (more about this in future posts)

Your main issue is caused by the fact that one valve can be used multiple times. A length that works for one valve combination will not work for another.

The modern trumpet does a very good job, as good as it can.

I'm not sure how familiar you are with playing the instrument, but the trumpet does actually have a tuning slide on the 3rd valve that needs to be adjusted on certain button combinations.

This is pretty much unavoidable without prohibitively increasing the cost, size, and complexity of the instrument, as you surely have noticed.

Additionally, the slides are used to compensate for out-of-tune notes.

Notably, the 7th partial is incredibly flat. Let's say we have an ideal straight-bore instrument with a fundamental of A4, at 440 hz. (This happens with other partials, but I'm picking the 7th to further my point)

The frequency of the 7th partial in our theoretical world where cows are spheres floating in the vaccuum of space is 7 times our fundamental, or 3080 hz.

This is closest to G7, which is supposed to be at around 3135.96 hz.

This is an astounding 100 * 12 * log2(3135.96/3080)= thirty-one cents flat.

We'd need to shorten the initial tube by - (343000/(2*440)) - (343000/(2*(440+56/7)))= about 7mm, but this would make all of our other frequencies sharp. (see footnote 1 for equation explanation)

This is usually fixed by adjusting embrochure to bend the pitch and by moving in tuning slides.

Not only does this cause issues for any automatic tuning-slide-adjuster (it can't read your mind and compensate for you), but the changing playing conditions will cause major issues. Not all parts of the instrument expand and contract at the same rate, and any automatic tuning-slide-adjuster somehow needs to compensate for this.

We could take a hint from the self-tuning guitars, which have super clever embedded electronics to tune strings as you play. With a bit of calculus and a bunch of clever computations, it would be non-trivial (but not impossible) to have an arduino, sensors for the valves, and actuators that automatically adjust tuning slides.

Hate to plug one of my instruments (I'd be mentioning it even if I didn't play it, tbh), but the trombone is basically the ideal brass instrument as far as tuning and ease of play is concerned, it's basically a giant tuning slide and the notable lack of bends and relatively nice bore and mouthpiece make it pretty fun to play.

Footnote 1:

The calculation for getting length of open-ended tubing (assuming cows are spheres floating in the vaccuum of space) in mm from a frequency is (speed of sound in mm/s)/(2*frequency). The speed of sound in air is 343000mm/s.

The difference in frequency between G7 and our 7th partial is about 56 hz, so we need a fundamental of about 440+56/7 in order to get the G7 to be in tune.

I calculate the length for a fundamental of 440 hz, and then for a fundamental of 440+56/7hz.

Footnote 2, aka _iPhoenix_ rambling endlessly on bassoons:
Brass instruments and woodwind instruments are very, very similar from the perspective of mathematics.

The bassoon, for instance (most woodwinds have this issue, but the bassoon really brings this out), is notoriously difficult to play well for a similar reason. The bassoon is full of little hacks and tricks to get around this, which are a pain for the bassoonist.

Many tone holes and buttons are used multiple times. This is very similar to the 3rd valve issue, where it is used multiple times in ways requiring different lengths. This issue gets worse and worse the higher up you go in the range of the instrument.

The bassoonist compensates for this with absolutely bonkers fingering charts. I won't go into details here, but the reason they are so crazy is that by adding certain keys a note can be made more in-tune and more stable (this is very similar to moving the 3rd valve slide). Fun fact: The bassoon has 9 keys justfor the left thumb. Gee thanks

The bassoon-maker cannot compensate for these tone hole issues because what is required for one note is completely different for another.

Bassoons already have complex logic gates on them, most often or gates and and gates. Adding more logic would result in more buttons, not less.
What are your thoughts on electronic reproduction of such instruments? ... Or is that heresy?
tr1p1ea wrote:
What are your thoughts on electronic reproduction of such instruments? ... Or is that heresy?


At risk of taking over Sam's thread, which I really don't want to do, here we go...

Personally, I don't have an issue with it. I love electronic music and electronic music production, particularly with synthetic instruments that are close to or replicate some aspect of a physical one.

I find the physical aspect of playing the instrument engaging and half the fun. Having instruments with all their individual quirks makes them unique and interesting, even if they are annoying. I think it'll be cool to see how far this project will go, I'm not quite sure how it would be done.

As a programmer and an instrumentalist, I am super intrigued with the idea of mixing electronic "perfection" and the complicated world of physical instruments. It'd be super cool to have a computer actually play music on a physical wind instrument.

If you read what I've been posting in some discord channels on the cemetech discord server, you'll know I've been writing scripts to convert midi files into gcode to play on my 3d printer (I'll Probably Post About it at Some Point™). This kind of interdisciplinary stuff is lots of fun for me personally.

Back to the topic (Evil or Very Mad), it seems that the image that was posted is either too large for my computer to download correctly or broken.
As a trumpeter, this seems pretty cool!
Also yes, the imgur link appears to be broken.
I, too, am a trumpet player. It is indeed interesting to know the math behind tuning on the fly. But surely it's not all mechanical is it? 12 years of trumpeting and I have certainly learned how to adjust a fair amount with my embouchure while maintaining good tone. Personally, I don't think the math is everything behind intonation. While it is helpful to know for notes such as A above the staff and especially low C#, different people's embouchure for different partials will cause notes' intonation to differ from what the math would imply. Low Eb I think is a good example of this. The math suggests that this should be a slightly sharp note, but for me it has always been just slightly flat purely due to embouchure, the fact that people's faces are different shapes, and a whole lot of other factors that have nothing to do with the trumpet itself.

I do think that a mechanical solution to this problem would be pretty fantastic though, I just don't know if would accomplish the goal to the degree you have in mind because of personal tuning discrepancies like I mentioned before. I think this concept would be much more appealing if it was able to be personalized to the player to account for their own intonation anomalies. Or, better yet, something that could listen to the sound coming out of your instrument and automatically adjust slides so that no matter who plays the instrument, it puts it in tune. For this to work though, you'd have to push in the tuning slide to make everything flat so that the slides would always have to be pulled out... but then open notes would be sharp... ok, maybe don't do that one, but I do think personalization would have to be a factor in any design you attempt. That is just my opinion though. I agree that there still is something to be said about a mathematically perfect instrument. It certainly would be a first in music!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement