Piano World Home Page

Tuning Simulator

Posted By: bobrunyan

Tuning Simulator - 12/04/15 05:55 PM

Hi all,

I've developed a Tuning Simulator that you can have a look at and download from the following link:

https://docs.google.com/spreadsheets/d/1Y1_Fc6XohmKh6bPCE5olso5VCDfIZdPYiOsR2k5KGIQ/edit?usp=sharing

The simulator enables you try tuning the notes of the temperament octave F3-F4 by adjusting their frequencies. The resulting beat rates are then displayed for all of the intervals in which audible beats occur. Deviation from equal temperament is also displayed.

This simulator simulates real tuning in some important ways, but leaves out many of the difficulties we face on real pianos, like strings that are not perfect, inharmonicity, the difficulty of setting strings and pins, hearing subtle differences in beat rates, etc.

Even without these difficulties, you'll find that it is not easy to set a temperament. I've initialized it to be out of tune. Try your temperament sequence and see if you can get it back in tune.
Posted By: UnrightTooner

Re: Tuning Simulator - 12/04/15 07:32 PM

After I changed the formulas to show negative numbers for narrow intervals, it took me 30 minutes to get all the RBIs progressive using the 8-note, P5 temperaments sequence I have been using:

frequency of F3 174.60 174.61 -0.1
frequency of F#3: 185.00 185.00 0.0
frequency of G3: 196.00 196.00 0.0
frequency of G#3: 207.70 207.65 0.4
frequency of A3: 220.00 220.00 0.0
frequency of A#3: 233.10 233.08 0.1
frequency of B3: 246.95 246.94 0.1
frequency of C4: 261.60 261.63 -0.2
frequency of C#4: 277.10 277.18 -0.5
frequency of D4: 293.68 293.67 0.1
frequency of D#4: 311.20 311.13 0.4
frequency of E4: 329.60 329.63 -0.1
frequency of F4: 349.20 349.23 0.0



Posted By: bobrunyan

Re: Tuning Simulator - 12/04/15 08:07 PM

Jeff,

Thanks for trying the simulator!

I decided not to show the narrow intervals as negative because when we are tuning real pianos we don't have that advantage. Sometimes I don't know whether I am narrow or wide, especially with fourths and fifths, until I test.
Posted By: UnrightTooner

Re: Tuning Simulator - 12/05/15 10:10 AM

It wouldn't have taken me nearly as long if I had remembered that without iH, the 5ths beat about 3/4 bps instead of 1/2 bps on a real piano.

I can't imagine not knowing if a 4th or 5th is wide or narrow. It is so obvious when you tune them. It was with me from my first try. But, yeah, use all the tools and tests that are available that you might need.
Posted By: bobrunyan

Re: Tuning Simulator - 12/07/15 02:55 PM

Originally Posted by UnrightTooner
It wouldn't have taken me nearly as long if I had remembered that without iH, the 5ths beat about 3/4 bps instead of 1/2 bps on a real piano.


Without iH, the beat rates for 5ths in the F3-F4 octave range from 0.6 to 0.8. In real pianos, it depends on the piano. I can't tell the difference between 0.5 bps and 0.75 bps reliably in a real piano anyway.

At your suggestion, I've changed the simulator to show narrow intervals as negative. Without this help, it turned out harder to figure out which side of pure you're on with the simulator than with a real piano.
Posted By: Bellyman

Re: Tuning Simulator - 12/07/15 07:50 PM

I have a lot of stuff turned off on my computer so I'm not sure if I may have missed something important.

Does this simulator actually have aural output that I can hear and adjust the frequencies until I hear what I think is the appropriate interval?

Posted By: bobrunyan

Re: Tuning Simulator - 12/07/15 08:55 PM

No. You just enter frequencies and you see the resulting beat rates of the various intervals.

I wonder if someone might be interested to take the next step and write a program to generate sampled piano tones and allow one to adjust their frequencies. You could diplay beat rates and frequencies of fundamental and partials or optionally cover them up and check them after you finish setting a temperament.
Posted By: bobrunyan

Re: Tuning Simulator - 12/07/15 09:01 PM

To calculate the beat rates accurately, you'd need inharmonicity numbers for each note of the temperament octave of the piano from which the samples were recorded (or at least a piano with the same scaling).
Posted By: Chris Leslie

Re: Tuning Simulator - 12/07/15 09:30 PM

Here is my version with sound and inharmonicity:
Tuning Simulator
Let me know if you have trouble opening and running it.
Posted By: bobrunyan

Re: Tuning Simulator - 12/07/15 10:04 PM

Chris,

I've just installed Java on my Windows machine. I'm running the Chrome browser. Eager to try your simulator. When I click on the downloaded .jar file, nothing happens. Tried it in Internet Explorer as well. That gets me as far as unzipping the file, where I see a bunch of classes and a folder called "MF".

Any ideas?

Posted By: prout

Re: Tuning Simulator - 12/07/15 10:48 PM

Originally Posted by bobrunyan
Chris,

I've just installed Java on my Windows machine. I'm running the Chrome browser. Eager to try your simulator. When I click on the downloaded .jar file, nothing happens. Tried it in Internet Explorer as well. That gets me as far as unzipping the file, where I see a bunch of classes and a folder called "MF".

Any ideas?


Bob,

Just rename the file folder you downloaded, which should be named "Tones.zip" to the new name "Tones.jar". This icon will then change from a zip folder to a java executable. Just click on the executable and the tuner will open.

Hey Chris, Thanks for posting the new version. I really like it.
Posted By: Bellyman

Re: Tuning Simulator - 12/07/15 10:49 PM

It worked on my computer, Chris. It will take some playing with it to get good enough not to tweak stuff I didn't intend to while trying to do something else. Plus, my computer speakers are pretty awful... gotta see if a set of headphones will help.

Interesting program. Thanks for sharing.
Posted By: Mark R.

Re: Tuning Simulator - 12/08/15 08:10 AM

Chris,

Fascinating programme! I'll test my current sequence (CM3s, then U3U3D5) to see what I get... I played around for a few minutes to try and set CM3s from F3 to A4. Pity that C#3 is not included. I found octave setting quite difficult (obviously not looking at the numbers). But perhaps my earbuds are simply over-emphasising the higher partials.
Posted By: Chris Leslie

Re: Tuning Simulator - 12/08/15 08:28 AM

Thanks Mark. I know what you mean about listening to octaves. I think it is because the partials have a fixed and uniform volume. A real piano will probably favour certain partials and thus create a specific purer sounding octave somewhere. In a previous version I had the option to adjust the relative weighting of the partials but I removed it in later versions to make the program simpler to use.

Sorry about the C#3. Also in previous versions the whole keyboard compass was used so you could tune a whole piano, but it got very complicated.
Posted By: Mark R.

Re: Tuning Simulator - 12/08/15 10:23 PM

I've recently upgraded my home PC to Windows 10. Chrome (v. 47) won't open the .jar file... I gather Chrome no longer supports NPAPI. And the built-in browser, MS Edge, apparently doesn't support plugins - and neither does Internet Explorer (v. 11).

So, as far as this PC noob can see, I can't open the .rar file. Can anyone advise?
Posted By: prout

Re: Tuning Simulator - 12/09/15 03:01 AM

Originally Posted by Mark R.
I've recently upgraded my home PC to Windows 10. Chrome (v. 47) won't open the .jar file... I gather Chrome no longer supports NPAPI. And the built-in browser, MS Edge, apparently doesn't support plugins - and neither does Internet Explorer (v. 11).

So, as far as this PC noob can see, I can't open the .rar file. Can anyone advise?


I have windows 10 on two computers, both doing automatic updates. One opened the downloaded file from Chris immediately. The other computer required that I change the file type from .zip to .jar, which subsequently has worked well.

Both files were downloaded and saved and then opened as an executable file. I have not tried to run a file from a browser.
Posted By: Mark R.

Re: Tuning Simulator - 12/09/15 08:48 AM

Thanks, prout. I also downloaded the .jar and then tried to run it. However, Windows 10 could not find a suitable application. That's how I came to try the various browsers, thinking that they may be Java-enabled. Could it be that I need to install some form of Java for Windows 10? (Sorry for OT)
Posted By: prout

Re: Tuning Simulator - 12/09/15 01:47 PM

I am not sure where the problem lies. Perhaps Chris can solve it.
Posted By: bobrunyan

Re: Tuning Simulator - 12/09/15 02:28 PM

I'm having the same problem on my computer with Windows 10. I downloaded the file and it showed up in my download folder as .jar file. I've installed Java. Testing Java shows that it is enabled. When I try to run the .jar file, nothing happens.

It works fine on my wife's computer, running Windows 7.
Posted By: UnrightTooner

Re: Tuning Simulator - 12/09/15 02:44 PM

I guess I will hold off on upgrading from Window 8.1 to Windows 10...
Posted By: prout

Re: Tuning Simulator - 12/09/15 03:03 PM

Open a command prompt (right click the windows icon at the lower left edge of the screen and then left click 'command prompt'). A black Command Prompt window will appear on the desktop (it may be covered by other open windows). Type 'java -version' in the window and hit "return". You should see several lines of which one should be 'java<TM> SE Runtime Environment <build x....>'.

If you don't see the Runtime Environment then the programme will not run.

As well, right click on the 'Tones.jar' file and left click on 'Open with...'. It should say "Java(TM) Platform SE binary".
Posted By: prout

Re: Tuning Simulator - 12/09/15 03:20 PM

Guys, it is important to understand that Java is a cross-platform language that does not usually come with any version of Windows or Android or Apple OS or Unix or Linux or...

You must download at least the Runtime Environment from Java.com.

That being said, many of you probably downloaded it in the past without realizing it. This happens when a java programme or java app you try to run from the internet asks you for permission to do x, which requires Java.

Edit: reference correction
Posted By: Chris Leslie

Re: Tuning Simulator - 12/09/15 07:28 PM

If you have the Java Runtime Environment installed then a .jar file should have an icon that looks like a cup of steaming coffee. If not then download and install Java for your computer.

I tried it on my wife's Windows computer that was recently upgraded to Version 10. It downloaded automatically renamed to a .zip file. I had to manually rename it to a .jar file to get it to have a coffee icon and to run with a click. I think this also occurred with Version 8.

Compared to my beat up old Apple, when running on my wife's computer I noticed that when multiple notes are selected then I get an annoying excessive delay between the sounding of each note.
Posted By: prout

Re: Tuning Simulator - 12/09/15 07:46 PM

Originally Posted by Chris Leslie
If you have the Java Runtime Environment installed then a .jar file should have an icon that looks like a cup of steaming coffee. If not then download and install Java for your computer.

I tried it on my wife's Windows computer that was recently upgraded to Version 10. It downloaded automatically renamed to a .zip file. I had to manually rename it to a .jar file to get it to have a coffee icon and to run with a click. I think this also occurred with Version 8.

Compared to my beat up old Apple, when running on my wife's computer I noticed that when multiple notes are selected then I get an annoying excessive delay between the sounding of each note.


I have not experienced a noticeable delay on my windows computers.
© 2019 Piano World Piano & Digital Piano Forums