Whistle Calculator Version 2

The Ultimate On-Line Whistle Community. If you find one more ultimater, let us know.
Kypfer
Posts: 500
Joined: Fri Oct 29, 2010 4:27 pm
antispam: No
Please enter the next number in sequence: 12

Re: Whistle Calculator Version 2

Post by Kypfer »

No, nothing changes ... the title bar stays the same, "Unnamed Whistle (unsaved)" and the View menu never shows more than *Unnamed

Just tried ver1.02 again, I can save and re-load in that version OK, so my Java runtimes are working after a fashion ...

FYI ... on a different tack :

Just looking at the on-line version of the applet ... there's a problem with the "Major BLF + b7 JI" option : C6 is showing as C0, so it gives an error
"I'm playing all the right notes—but not necessarily in the right order."
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Re: Whistle Calculator Version 2

Post by DrPhill »

Kypfer wrote:No, nothing changes ... the title bar stays the same, "Unnamed Whistle (unsaved)" and the View menu never shows more than *Unnamed

Just tried ver1.02 again, I can save and re-load in that version OK, so my Java runtimes are working after a fashion ...
Oh bother. I hate this sort of software glitch. If I could reproduce it here I could fix it. Are you willing to work with me to sort this out? I understand if you are not - it may not seem worth the effort for the gain. But if you are I would appreciate it.

First, try downloading the executable again and start clean. Meanwhile I will start implementing logging/tracing so that we can follow the execution path. Then I can send you the version with logging/tracing, or upload it. Writing this bit may take a day or so, but it needs to be done eventually.
Kypfer wrote: FYI ... on a different tack :

Just looking at the on-line version of the applet ... there's a problem with the "Major BLF + b7 JI" option : C6 is showing as C0, so it gives an error
Well spotted. You can temporarily fix this by menu - edit - scale patterns. select the scale pattern from the drop-down, and change the offending token from 16/9* to 16/9B*, and press OK. I have fixed the code, so the next version will not have this problem.
hans wrote:
DrPhill wrote:A line drawing, no shading, with hidden hole lines in lighter colour. Would that work for you?
That may be fine! It could be shaded though, using some opacity to see what is "behind" in a different shade of greyness (lighter).
I have fiddled with the opacities (?) in the drawing routine - the next release will have a 'translucent whistle' option.
Phill

One does not equal two. Not even for very large values of one.
User avatar
hans
Posts: 2259
Joined: Fri Nov 01, 2002 6:00 pm
antispam: No
Please enter the next number in sequence: 8
Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
Location: Moray Firth, Scotland
Contact:

Re: Whistle Calculator Version 2

Post by hans »

Great, looking forward to the translucent version!

Regards loading and saving wdf files:

1. What is the difference between "Load Whistle" and "Load Whistle (replace current)", and between "New Whistle" and "New Whistle (replace current)"?

2. I can change a whistle design as a wdf file, and load it successfully, but the title bar still reads as "Unnamed Whistle", but with the correct file path and file name in brackets. I am not sure how to "name" a whistle design, if it is not just the file name.
PS: I see now that I can name a whistle under Edit - Whistle Name, and that name is saved in the wdf file.

3. Could the saving dialogue be improved? The file name mask shows as *.wdf, but when I type in a name to replace that and not add .wdf the extension is not added automatically. I think the default should be "Save As .wdf file".

Thanks for all your work!
Kypfer
Posts: 500
Joined: Fri Oct 29, 2010 4:27 pm
antispam: No
Please enter the next number in sequence: 12

Re: Whistle Calculator Version 2

Post by Kypfer »

Phill

PANIC OVER -*-*-*- I've just downloaded the latest Java runtimes and re-installed and it's all working :D

Yes, I'm quite happy to help with the testing. I've done a little programming myself, ages ago, and remember how frustrating it could be to have a working utility on my machine, which didn't behave itself elsewhere.

FYI : I've just created the following file and saved and re-loaded it :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<WhistleCalculator Version="2.00">
<WhistleSpecification>
<Scale>
<ScalePatternName>Major BLF +th ET</ScalePatternName>
<BaseNoteName>D5</BaseNoteName>
</Scale>
<Tube>
<Bore>15.0</Bore>
<Thickness>1.5</Thickness>
</Tube>
<Window>
<Width>6.35</Width>
<Length>6.35</Length>
</Window>
<Holes HoleCount="9">
<Hole1>
<Width>5.0</Width>
<Offset>0</Offset>
</Hole1>
<Hole2>
<Width>5.0</Width>
<Offset>0</Offset>
</Hole2>
<Hole3>
<Width>7.0</Width>
<Offset>0</Offset>
</Hole3>
<Hole4>
<Width>6.0</Width>
<Offset>0</Offset>
</Hole4>
<Hole5>
<Width>7.5</Width>
<Offset>0</Offset>
</Hole5>
<Hole6>
<Width>7.5</Width>
<Offset>0</Offset>
</Hole6>
<Hole7>
<Width>8.0</Width>
<Offset>180</Offset>
</Hole7>
<Hole8>
<Width>5.0</Width>
<Offset>0</Offset>
</Hole8>
</Holes>
</WhistleSpecification>
<ScalePattern>
<Name><![CDATA[Major BLF +th ET]]></Name>
<Description/>
<Pattern>-2S,0S,2S,4S,5S,7S,9S,11S,12S</Pattern>
</ScalePattern>
</WhistleCalculator>

The above listing is for an 8-hole "recorder-type" whistle, a favourite configuration of mine. With use of the graph it conveniently demonstrates that 15mm is the maximum practical bore size for a "hi-D" instrument to give two full octaves.

So ... what's the chances of introducing the facility to calculate for tapered bores in TWCalc


:lol: ... only joking
"I'm playing all the right notes—but not necessarily in the right order."
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Re: Whistle Calculator Version 2

Post by DrPhill »

hans wrote:Great, looking forward to the translucent version!

Regards loading and saving wdf files:

1. What is the difference between "Load Whistle" and "Load Whistle (replace current)", and between "New Whistle" and "New Whistle (replace current)"?
Whistle Calculator can have more than one whistle loaded at a time. If there is more than one whistle you can quickly swap between them using Menu - view - (whistle name).
Whistle Calculator has the notion of a 'current whistle'. The 'current whistle' is the one on display. When you open Menu - view the current whistle has an asterisk ('*') next to it.


"Load Whistle" loads a new whistle from a file, and adds it to the list of whistles in memory. The loaded whistle becomes the 'current whistle'.

"Load Whistle (replace current)" removes the current whistle from memory. It then loads a new whistle from a file, and adds it to the list of whistles in memory. The loaded whistle becomes the 'current whistle'.

"New Whistle" Creates a new whistle with default values, and adds it to the list of whistles in memory. The new whistle becomes the 'current whistle'.

"New Whistle (replace current)" removes the current whistle from memory. It then creates a new whistle with default values, and adds it to the list of whistles in memory. The new whistle becomes the 'current whistle'.

I should add that info to the user manual.
hans wrote: 2. I can change a whistle design as a wdf file, and load it successfully, but the title bar still reads as "Unnamed Whistle", but with the correct file path and file name in brackets. I am not sure how to "name" a whistle design, if it is not just the file name.
PS: I see now that I can name a whistle under Edit - Whistle Name, and that name is saved in the wdf file.
I thought that a name should not be a file name. At some future time we might want to save more than one whistle in a file.
hans wrote: 3. Could the saving dialogue be improved? The file name mask shows as *.wdf, but when I type in a name to replace that and not add .wdf the extension is not added automatically. I think the default should be "Save As .wdf file".
Can do. I have done this before in other programs. Its on the TODO list.
hans wrote: Thanks for all your work!
A pleasure. And thanks for all your help.
Phill

One does not equal two. Not even for very large values of one.
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Re: Whistle Calculator Version 2

Post by DrPhill »

Kypfer wrote:Phill

PANIC OVER -*-*-*- I've just downloaded the latest Java runtimes and re-installed and it's all working :D

Yes, I'm quite happy to help with the testing. I've done a little programming myself, ages ago, and remember how frustrating it could be to have a working utility on my machine, which didn't behave itself elsewhere.

The above listing is for an 8-hole "recorder-type" whistle, a favourite configuration of mine. With use of the graph it conveniently demonstrates that 15mm is the maximum practical bore size for a "hi-D" instrument to give two full octaves.
Thanks for telling me. I still need to do some error logging and tracing functions, but they are not my favourite pastime. They also either bloat the runtime (executable) or make the source code look a mess.

As for testing, thanks for the offer. At present having people use if for real seems to be turning up bugs etc.
Kypfer wrote: So ... what's the chances of introducing the facility to calculate for tapered bores in TWCalc


:lol: ... only joking
If someone who understands the acoustic physics can explain how the equations change I can probably do it. Smoothly tapered (constant taper) bores would be simpler than some of the more complex bores in use. It would be an interesting challenge and a learning experience.
Phill

One does not equal two. Not even for very large values of one.
User avatar
Thomas-Hastay
Posts: 839
Joined: Tue Jun 26, 2001 6:00 pm
antispam: No
Please enter the next number in sequence: 8
Location: Between my Ears or in "Nord" East MN
Contact:

Re: Whistle Calculator Version 2

Post by Thomas-Hastay »

Dear Dr. Phill

I have an emotional need for your calculator program! It has helped my peace of mind and emotional growth, please place me on your mailing list for any program updates. If it were not for you, the emotional stress of whistlemaking WhOA by hand calculation would cause me brain damage! Bless you Dr. Phill!

Your friend (I hope)
Thomas Hastay.
thomashastay@yahoo.com
"The difference between Genius and stupidity, is that Genius has its limits" (Albert Einstein)
thomashastay@yahoo.com
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Re: Whistle Calculator Version 2

Post by DrPhill »

Thomas-Hastay wrote:.............. please place me on your mailing list for any program updates.
Its good to know the program helps. I think you can monitor the project on SourceForge to know when new files are updated. I have not used this facility myself, so I cannot be more specific.

And for all you grateful people out there: You can give me a thumbs up or even a comment on the SourceForge page. :D
Phill

One does not equal two. Not even for very large values of one.
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 Calculator Version 2

Post by highwood »

I will preface this comment with the note that I have not calculated holes for or made a conical whistle.

That said it is my understanding that underlying equation for hole placement is the same for the four types of wind instrument - that is conical or cylindrical with either both ends open (flute, includes whistles, recorders etc) or one end effectively closed (clarinet, oboe, sax, bassoon ... ) - and so it should be straight forward to adapt the calculator

The equations used by the calculator under discussion are the solution(s) (I believe I have not studied the code) to a first order approximation of the equation mentioned above. I will not go to the trouble of reproducing the equations here (I'm partly too lazy to look them up right now, sorry) - they are out there if you look, first published in 1929 if memory serves. Ask if you really want to know I could look it up.

I don't really see why the approximate solution equations should not work equally well for a conical instrument (as I said I have not tried) but the measurements are defined differently - its been a while since I studied the diagrams but for starters in conical instruments the imaginary apex of the cone was involved in the length measurement - so you cannot simply plug in a different id for each hole and get meaningful answers.

One day I'll get to conical whistles...
“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
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Whistle Calculator Version 2.01

Post by DrPhill »

version 2.01 is available for use, or for download.

Version 2.01 was supposed to be a maintenance release, but I got carried away and added some extra goodies:
  • * The built in scale patterns for Major JI + b7 contained an error for the thumbholes leading to errors in the whistle calculations. This has been fixed.
    * A new view option has been added so that the whistle can be viewed translucently. This means that holes 'behind' whistle can be seen , paler than holes 'at the front'. The setting is remembered in the ini file.
    * Error logging and tracing skeleton has been implemented. You will see some error log files created when you run The Whistle Calculator. You can delete these at any time. Expect to see more control over error logging and tracing appearing - but we hope never to need to use it!
    * File extensions (for example '.wdf ') are added for you if you forget when specifying a save file name.
    * The menu bar has been rearranged slightly, so the list of whistles has its own drop-down menu.
    * Cut Off ratios are displayed for each hole. The cutoff ratio goes red when it drops below 2. The cut off ratios can be hidden, the setting is remembered in the ini file.
    * The cut off ratio graph can be turned off from the View Menu. The setting is remembered in the ini file.
Enjoy
Phill

One does not equal two. Not even for very large values of one.
Kypfer
Posts: 500
Joined: Fri Oct 29, 2010 4:27 pm
antispam: No
Please enter the next number in sequence: 12

Re: Whistle Calculator Version 2

Post by Kypfer »

version 2.01 is available for use, or for download.
Thank you ... lots of nice new features to make life even easier :)

I used TWCalc v2.0 "in earnest" this afternoon 8)

Over the last few weeks I've made several whistles using various resources, from differing materials, some good, some not so good, some with a nice tone but poor tuning etc. so I took one of the best sounding (but poorly tuned) ones, cut the whistle-head off, entered the required parameters into TWCalc, cut and drilled a new body, spliced this onto the previously salvaged whistle-head, and had a playable whistle in under an hour ... with all the holes in the right place and as near as dammit the right size first time ... :thumbsup:

If this program gets no more development, it's already a seriously competent tool - THANK YOU !
"I'm playing all the right notes—but not necessarily in the right order."
User avatar
hans
Posts: 2259
Joined: Fri Nov 01, 2002 6:00 pm
antispam: No
Please enter the next number in sequence: 8
Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
Location: Moray Firth, Scotland
Contact:

Re: Whistle Calculator Version 2

Post by hans »

Re: Version 2.01
Great new features, thanks!
Some quick observations:

1. Hiding the Cut-off Graph results in a big unused vertical space. I can resize the window height, so the space disappears. But on exit and reload the space is there again, window size is not remembered.

2. Hiding the Offset Controls works, but when changing Scale pattern, the Offset controls reappear, even though View says they are hidden (unticked). I have to manually unhide them in View and hide them again.

3. Shrinking window width results in first line wrapping, but the wrapped items like Window Width and Window Length are only partly visible (the top half). Seems to be some issue with line height or something.

4. Translucent whistle view may be what is expected from changing opacity factors, but it looks so milky. Could it not look as dark and clear as the normal view, but just the back holes bright (white or light grey)?

5. Is there a possible bug in the cutoff frequency calculation of hole 1 (top hole), when using the various Flutomat calculation routines? It is very low for what I regard as a normal hole 1 size, and does not correspond with my own javascript calculator. All other holes do.
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Re: Whistle Calculator Version 2

Post by DrPhill »

Kypfer wrote:Thank you ... lots of nice new features to make life even easier :)
Kypfer wrote:If this program gets no more development, it's already a seriously competent tool - THANK YOU !
Its good to get positive feedback.

hans wrote:Re: Version 2.01
Great new features, thanks!
Some quick observations:
Glad you like it......
hans wrote: 1. Hiding the Cut-off Graph results in a big unused vertical space. I can resize the window height, so the space disappears. But on exit and reload the space is there again, window size is not remembered.
Window size and position remembered in V2.02.
hans wrote: 2. Hiding the Offset Controls works, but when changing Scale pattern, the Offset controls reappear, even though View says they are hidden (unticked). I have to manually unhide them in View and hide them again.
Fixed v2.02.
hans wrote: 3. Shrinking window width results in first line wrapping, but the wrapped items like Window Width and Window Length are only partly visible (the top half). Seems to be some issue with line height or something.
Sort of fixed in v2.02. I have split line one into two lines. In order to see the problem you will need to make the window so narrow that the hole information is unusable.....
hans wrote: 4. Translucent whistle view may be what is expected from changing opacity factors, but it looks so milky. Could it not look as dark and clear as the normal view, but just the back holes bright (white or light grey)?
I took the simple option of fiddling with a few parameters. A full solution would have no shading etc. If I get time I will look at this again.
hans wrote: 5. Is there a possible bug in the cutoff frequency calculation of hole 1 (top hole), when using the various Flutomat calculation routines? It is very low for what I regard as a normal hole 1 size, and does not correspond with my own javascript calculator. All other holes do.
I do not think so (though bugs are always possible). Give me an example and I will look at it.
Phill

One does not equal two. Not even for very large values of one.
User avatar
DrPhill
Posts: 1610
Joined: Wed Nov 19, 2008 11:58 am
antispam: No
Please enter the next number in sequence: 10
Location: None

Re: Whistle Calculator Version 2

Post by DrPhill »

hans wrote:5. Is there a possible bug in the cutoff frequency calculation of hole 1 (top hole), when using the various Flutomat calculation routines? It is very low for what I regard as a normal hole 1 size, and does not correspond with my own javascript calculator. All other holes do.
I am going to take a long shot here. Are you doing calculations for a whistle +b7? Do your calculations allow for the fact that the b7 hole is closed, and the distance in the cut off frequency equation needs to be to the next OPEN hole?

If you use the distance to the b7 hole you get a lower cut off frequency, hence lower cut off ratio.......

My apologies if I am wrong.
Phill

One does not equal two. Not even for very large values of one.
User avatar
hans
Posts: 2259
Joined: Fri Nov 01, 2002 6:00 pm
antispam: No
Please enter the next number in sequence: 8
Tell us something.: I've been making whistles since 2010 in my tiny workshop at my home. I've been playing whistle since teenage times.
Location: Moray Firth, Scotland
Contact:

Re: Whistle Calculator Version 2

Post by hans »

Thanks Phill,
I had a bug in my own calculator, due to a thumb hole being present or not.
Post Reply