whistle makers: new flutomat implementation

The Ultimate On-Line Whistle Community. If you find one more ultimater, let us know.
User avatar
Daniel_Bingamon
Posts: 2227
Joined: Wed Jun 27, 2001 6:00 pm
antispam: No
Location: Kings Mills, OH
Contact:

Re: whistle makers: new flutomat implementation

Post by Daniel_Bingamon »

I may take a look at it and see if I can put some of this into TWCalc. Nice thing about the C language code is that the interative functions can run longer instead of a fixed set that the spreadsheet does.

How does your embouchure hole/window formula come out? There are so many variables that affect this.
Email - YouTube - Ebay - Website $28 Low-D
User avatar
ctilbury
Posts: 349
Joined: Mon Jun 28, 2004 12:56 am
Please enter the next number in sequence: 1
Contact:

Re: whistle makers: new flutomat implementation

Post by ctilbury »

Daniel_Bingamon wrote:I may take a look at it and see if I can put some of this into TWCalc. Nice thing about the C language code is that the interative functions can run longer instead of a fixed set that the spreadsheet does.

How does your embouchure hole/window formula come out? There are so many variables that affect this.
The way that the formulas are currently configured is exactly what flutomat has. I have not touched that stuff at all.

Here is my list of TODOs in the order that I am planning to do them:
1. What I am working on now is getting the notes to display correctly in every instance.
2. Make the number of holes to change correctly.
3. Get the calculations to display correctly.
3a. Make sure the results of the calculations match flutomat as a starting point.
4. Make the metric/inch conversion working correctly.
5. I want to do a graph like TWCalc for the cutoffs. It should be fairly easy with javascript.
6. Make a pull-down with different scales (aka interval sets).

After that, there is lots more that could be done. I want to stop there and see where I am.

You can get the source code by browsing to http://www.whistlemaker.com/pages/calc.js . If you (or anyone else) want to make changes, email the entire file (as an attachment, preferably), with your changes and I will check your work and merge them into the one on the web site. Be sure to make notes at the beginning of the file as to what you changed along with your name and the date. That will stay in in the file permanently. If you want to email me, please use the contact form in the web site.
Happy Whistling!
-=ChuckT=-
www.whistlemaker.com
User avatar
Daniel_Bingamon
Posts: 2227
Joined: Wed Jun 27, 2001 6:00 pm
antispam: No
Location: Kings Mills, OH
Contact:

Re: whistle makers: new flutomat implementation

Post by Daniel_Bingamon »

I have the TWCalc source code available as well. I call it "Open Source Whistlemaking".

On the cutoff graph, I found the use of a "Cutoff Ratio": Cutoff / Frequency a good way to determine the quality of the tonehole. The ratio is pretty good but it really needs some form of logarithmic function.
Email - YouTube - Ebay - Website $28 Low-D
User avatar
ctilbury
Posts: 349
Joined: Mon Jun 28, 2004 12:56 am
Please enter the next number in sequence: 1
Contact:

Re: whistle makers: new flutomat implementation

Post by ctilbury »

The larger parts of the calculator are now done and it should be useful as it is.

Here is what works:
  • The calculations yield the same results as flutomat does, far as it goes.
  • Metric or inch calculations.
  • Arbitrary number of holes.
  • Printing to a printer is supported.
  • Inch calculations support fractions as well as decimal notation for the hole sizes.
  • Save and load a whistle are working using a cookie.
  • Iterative and non-iterative Benade calculations are supported
  • Most changes cause the calculations to be performed automatically.
Here is what does not work:
  • The cutoff frequencies are not calculated correctly. I am not sure what to do about this. (help!)
  • The cutoff freq graph has not been started yet.
  • The pull-down for different scales is not implemented.
  • No internal support for calculating tapers is in place, except the calculation method can be changes. For example, having separate bore diameters for each hole is not supported.
I am very interested in hearing people's feedback on this. Especially all of the stuff that is broken. If you want to make changes yourself, contact me via PM or using the contact form on the web site. You can go directly to the calculator here: http://www.whistlemaker.com/pages/flute ... ulator.php.
Happy Whistling!
-=ChuckT=-
www.whistlemaker.com
User avatar
ctilbury
Posts: 349
Joined: Mon Jun 28, 2004 12:56 am
Please enter the next number in sequence: 1
Contact:

Re: whistle makers: new flutomat implementation

Post by ctilbury »

I have updated the calculator a little bit. You can now store more than one configuration. Everyone has their own storage because it stores them all in a single cookie on your own computer. Saving and deleting both work. I have tested it a bit more and fixed some bugs. I also got it to work as a stand-alone calculator, without WWW access, but it has to be modified for that to work. I may make a zip file available if there is any interest.

Next, I really want to get the cutoff frequencies to calculate correctly and get the graph working. And after that, I want to implement different scales (such as minor or flat-7) as a pull-down menu. Should be fairly easy. (Daniel?)

After that, I would like to work on cross fingerings. What I have in mind is to put a check box next to a hole to indicate that it is closed, and then calculate the frequency, the note and the % deviation from the actual note for the cross.

I wonder what one would have to do to get the calculator to evaluate the second octave for a set of holes.

Not bad for 1200 lines of bad javascript, so far. :P
Happy Whistling!
-=ChuckT=-
www.whistlemaker.com
User avatar
hoopy mike
Posts: 1395
Joined: Sat May 03, 2008 3:09 am
Please enter the next number in sequence: 1
Location: Nottingham
Contact:

Re: whistle makers: new flutomat implementation

Post by hoopy mike »

Looks really useful. Maybe I'm missing something obvious, but where's the measurement for the total length (i.e. fipple/windway/blade to the bell)?
User avatar
ctilbury
Posts: 349
Joined: Mon Jun 28, 2004 12:56 am
Please enter the next number in sequence: 1
Contact:

Re: whistle makers: new flutomat implementation

Post by ctilbury »

hoopy mike wrote:Looks really useful. Maybe I'm missing something obvious, but where's the measurement for the total length (i.e. fipple/windway/blade to the bell)?
So far, I have not put that in. 1) I have not found a way to do that accurately, and 2) It does not seem that useful to me. I always tune the body before I cut the holes anyway. :)

I am looking at porting part of Daniel Bingamon's TWCalc to javascript. His calculator does do it accurately.
Happy Whistling!
-=ChuckT=-
www.whistlemaker.com
User avatar
hoopy mike
Posts: 1395
Joined: Sat May 03, 2008 3:09 am
Please enter the next number in sequence: 1
Location: Nottingham
Contact:

Re: whistle makers: new flutomat implementation

Post by hoopy mike »

ctilbury wrote:
hoopy mike wrote:Looks really useful. Maybe I'm missing something obvious, but where's the measurement for the total length (i.e. fipple/windway/blade to the bell)?
So far, I have not put that in. 1) I have not found a way to do that accurately, and 2) It does not seem that useful to me. I always tune the body before I cut the holes anyway. :)

I am looking at porting part of Daniel Bingamon's TWCalc to javascript. His calculator does do it accurately.
.

Ah, ok. Maybe a rough guide with a health warning would be a good start.
henryz
Posts: 166
Joined: Sat Mar 08, 2008 5:24 pm
antispam: No
Location: Clinton Co. Indiana

Re: whistle makers: new flutomat implementation

Post by henryz »

I see some difference in results between Chuck's new calculator and TWCalc 3.2.
Example (my stealth practice whistle) follows:

Code: Select all

VNB High D (587.33 Hz)				
0.400” Bore/0.048” wall aluminum tube				
				
		                   Distance from           Distance from	
Note	 Hole Dia	    Bell end (Chuck)	    Bell End (TWCalc 3.2)	         Diff (%)
E	    13/64                1.666	                1.608	                 3.6
F#	    9/32	             2.631	                2.587	                 1.7
G	     3/16                3.206	                3.199	                 0.2
A	    15/64                4.151	                4.097	                 1.3
B	    15/64	             4.974	                4.928	                 0.9
C#	   13/64	             5.777	                5.725	                 0.9
I haven't tried enough comparative examples to see if this is a fixed difference or varies with bell note frequency. This difference, implemented in real hardware, might be negligible. Might be worth a try just to see if that's the case.
I'm glad to see you guys working on improving whistle calcs. It makes life easier for us hobbyists. Thanks!
User avatar
ctilbury
Posts: 349
Joined: Mon Jun 28, 2004 12:56 am
Please enter the next number in sequence: 1
Contact:

Re: whistle makers: new flutomat implementation

Post by ctilbury »

Good data! Thanks. I know for sure that twcalc is much better than the raw benade formulas. I dont know why yet. The iterative/non iterative calculation procedures in my calculator also produce slightly different results. I think the iterative function is a little better. In the end, none of them are perfect. You still have to adjust the holes a little to get it really right. These calculators are really intended (imho) to give a good place to start.

I have been trying to get a working copy of TWCalc for Linux using WineLib. I got it to build... No real happiness there yet.
Happy Whistling!
-=ChuckT=-
www.whistlemaker.com
henryz
Posts: 166
Joined: Sat Mar 08, 2008 5:24 pm
antispam: No
Location: Clinton Co. Indiana

Re: whistle makers: new flutomat implementation

Post by henryz »

TWCalc for Linux would be nice, indeed! (I've been using Linux as my primary OS since 1998.) I'd presume (perhaps incorrectly) that TWCalc was coded with VB. If so, you might want to look at Gambas, KBasic or Lazarus/Free Pascal as possible ways to produce a native Linux version of TWCalc. RealBasic would also work (very VB-like), but is only free for non-commercial use.
User avatar
ctilbury
Posts: 349
Joined: Mon Jun 28, 2004 12:56 am
Please enter the next number in sequence: 1
Contact:

Re: whistle makers: new flutomat implementation

Post by ctilbury »

I am a long-time user of Linux as well. TWCalc is written in C and uses the old style of windows programming. That is the callbacks are defined using the PASCAL keyword and uses a super-loop for event handling. I got it to build without any trouble using WineLib. I have not figured out how to run it. WineLib builds a file called twcalc.exe.so. This is a library and I told winemaker to create an executable. I need to figure out how to use these tools. What (little) I have read in the docs does not make sense, so I think that I am missing some basic data. If you want to take a crack at it, ask Daniel to send the source to you.
Happy Whistling!
-=ChuckT=-
www.whistlemaker.com
User avatar
Feadoggie
Posts: 3940
Joined: Mon Feb 14, 2005 11:06 pm
antispam: No
Location: Stout's Valley, PA, USA

Re: whistle makers: new flutomat implementation

Post by Feadoggie »

ctilbury wrote:In the end, none of them are perfect.
I guess I have always thought that the calculators are closer to perfect than my whistle making skills. The calculations include a couple of fudge factors for "end correction" and "tone hole efficiency". Don't they? And we all use different mouthpiece designs, wall thickness and hole layouts. So it's not easy to design a "one calculator to rule them all" piece of software. The way I figure it, you can either calculate a whislte design and mess around with the whistle to get it right or mess around with the calculator to get it to describe your whistles. We still have to make the whistle. I've been using my own spreadsheet for years and more recently Daniel's TWCalc . The first whistle made after a design iteration is never very far off.
ctilbury also wrote: You still have to adjust the holes a little to get it really right. These calculators are really intended (imho) to give a good place to start.
I couldn't agree more, Chuck. It is a great place to start and it sure beats starting from scratch and building whistle after whistle via the trial and error method. Although that provides it's own lessons and insights.

Thanks for working at this stuff guys.

Feadoggie
I've proven who I am so many times, the magnetic strips worn thin.
henryz
Posts: 166
Joined: Sat Mar 08, 2008 5:24 pm
antispam: No
Location: Clinton Co. Indiana

Re: whistle makers: new flutomat implementation

Post by henryz »

Well - I'd have to get a better at GUI-style programming to do that. (port TWCalc to one of the VB work-alikes). It would be a good project at that point.

What you're describing, Chuck, sounds an awful (and I stress that word) lot like down&dirty GUI coding using Gtk+ -- callbacks from a main event loop, everything coded in c. Not a pleasant way to do things.
highwood
Posts: 562
Joined: Thu Feb 07, 2008 3:30 pm
antispam: No
Please enter the next number in sequence: 12
Location: Ohio

Re: whistle makers: new flutomat implementation

Post by highwood »

henryz wrote:I see some difference in results between Chuck's new calculator and TWCalc 3.2.
Example (my stealth practice whistle) follows:

Code: Select all

VNB High D (587.33 Hz)				
0.400” Bore/0.048” wall aluminum tube				
				
		                   Distance from           Distance from	
Note	 Hole Dia	    Bell end (Chuck)	    Bell End (TWCalc 3.2)	         Diff (%)
E	    13/64                1.666	                1.608	                 3.6
F#	    9/32	             2.631	                2.587	                 1.7
G	     3/16                3.206	                3.199	                 0.2
A	    15/64                4.151	                4.097	                 1.3
B	    15/64	             4.974	                4.928	                 0.9
C#	   13/64	             5.777	                5.725	                 0.9
I haven't tried enough comparative examples to see if this is a fixed difference or varies with bell note frequency. This difference, implemented in real hardware, might be negligible. Might be worth a try just to see if that's the case.
I'm glad to see you guys working on improving whistle calcs. It makes life easier for us hobbyists. Thanks!
I am assuming that this is an equal tempered scale, correct (I ask so I can check numbers myself).
Now if we look at the E (I know it is the worst) 3.6% does not seem to much nor does 0.058 inches but if you calculate that as a cents difference it is about 60 cents - TWCalc being flatter. The 0.9% is still 15 cents different.
Small differences matter - and certainly the Flutomat is only going to get you in the ballpark, I have never used TWCalc.

Henryz, how do these calcs match up to the real thing? I know when I was using a spreadsheet based on Kosel's I added 'fudge factors' to get the results to closer match my whistles.

Bill
Last edited by highwood on Wed Aug 12, 2009 10:41 pm, edited 1 time in total.
“When a Cat adopts you there is nothing to be done about it except put up with it until the wind changes.” T.S. Elliot
Post Reply