Indian Scale tuner

need a feature, suggest here

Re: Indian Scale tuner

Postby Broomy » Sun Nov 05, 2017 6:24 pm

I've been pondering over a practical solution for the JI tuner.

I think that the two following options will suffice:
- The Harry Partch scale contains the most common JI ratios. If possible the note names could simply be the ratio (per example, 4/3, 3/2 as a note name).
- A cents option. Most people can't hear tonal difference between to notes when they differ 5 or less cents. A tuner with per example steps of 3 cents will give a good workable option. So when playing a fifth above the tonic I can intonate on 702 cents.

Hans
User avatar
Broomy
 
Posts: 175
Joined: Thu Apr 24, 2014 7:53 am

Re: Indian Scale tuner

Postby brummer10 » Mon Nov 13, 2017 4:51 am

Broomy wrote:- The Harry Partch scale contains the most common JI ratios. If possible the note names could simply be the ratio (per example, 4/3, 3/2 as a note name).


Well, I could do that, just, where do you think I should put the reference Frequency on?
Should it be on 9/7?
User avatar
brummer10
Site Admin
 
Posts: 763
Joined: Thu Mar 26, 2009 6:57 pm

Re: Indian Scale tuner

Postby Broomy » Tue Nov 14, 2017 5:28 pm

That would be great.
You could use the 1/1 ratio for the reference frequency.
here's the list of intervals.

Do you mind to add some comments in the code for me to understand what you do?
I've tried to analyze the code from the Ptomely scale tuner, but I didn't understand the function of some of the code.
Then I can try to use that info to create more scales if needed.

Thanks in advance!

Hans
User avatar
Broomy
 
Posts: 175
Joined: Thu Apr 24, 2014 7:53 am

Re: Indian Scale tuner

Postby brummer10 » Wed Nov 15, 2017 5:46 am

Broomy wrote:Do you mind to add some comments in the code for me to understand what you do?

Yes, sure.
I've added now a couple of comments, hope it helps. Here is the diff:
https://github.com/brummer10/gxtuner/co ... 5e0375d075

Let me know if you need more Info, and I'll try to explain my code a bit better.

regards
hermann
User avatar
brummer10
Site Admin
 
Posts: 763
Joined: Thu Mar 26, 2009 6:57 pm

Re: Indian Scale tuner

Postby Broomy » Wed Nov 15, 2017 9:14 am

Great!

I will give it a go this week!

Hans
User avatar
Broomy
 
Posts: 175
Joined: Thu Apr 24, 2014 7:53 am

Re: Indian Scale tuner

Postby Broomy » Wed Nov 15, 2017 8:56 pm

Thanks for your comments they really helped me to understand the way it works.
I've made a fork of GXtuner and added a 65 tone tuner, based on a scale calculated by the composer Ben Johnston.
(I've forgot to tag my commit (and don't know how to revert that).)

I've did a "make" and "make install" and some tests.
The tuner works!

But I think there're a few small issues with the Just Intonation tuners.
With the Johnston scale the last four notes of scale don't show up. Maybe because they are very close related, but that doesn't seems to be an issue with other intervals.
With the shruti tuner I can only let the last note (N2) appear when I play the note a bit flat or exactly in tune. When I play it a bit sharp it instantly changes to the Sa (first note).
I've checked the 31-TET and 53-TET tuners in Guitarix and there I can easily slide from note to note.

I'll try to think about an alternative algorithm for the (last note(s)) of the tuner.

Hans
User avatar
Broomy
 
Posts: 175
Joined: Thu Apr 24, 2014 7:53 am

Re: Indian Scale tuner

Postby Broomy » Thu Nov 16, 2017 6:00 am

Two thoughts:
1. Because we are in an logarithmic environment, it maybe more accurate to calculate the difference between two intervals as follows: difference=(ratio1xratio2)^1/2.

2. Maybe we could an extra "else if" after the last note referring to the first note:
Code: Select all
} else if (percent > ALMOST2 ) {
+        display_note = 0;
+        scale = ((percent-1.0125))/2.0;


Hans
User avatar
Broomy
 
Posts: 175
Joined: Thu Apr 24, 2014 7:53 am

Re: Indian Scale tuner

Postby brummer10 » Thu Nov 16, 2017 6:30 am

Broomy wrote:Thanks for your comments they really helped me to understand the way it works.


I'm glad it helps.
Broomy wrote:I've made a fork of GXtuner and added a 65 tone tuner, based on a scale calculated by the composer Ben Johnston.
(I've forgot to tag my commit (and don't know how to revert that).)


Great. Tagging you usually only do for releases, for commits you ain't need tags, just proper commit messages.

Broomy wrote:But I think there're a few small issues with the Just Intonation tuners.
With the Johnston scale the last four notes of scale don't show up. Maybe because they are very close related, but that doesn't seems to be an issue with other intervals.
With the shruti tuner I can only let the last note (N2) appear when I play the note a bit flat or exactly in tune. When I play it a bit sharp it instantly changes to the Sa (first note).


Broomy wrote:I'll try to think about an alternative algorithm for the (last note(s)) of the tuner.


I guess the issue may be the octave indicator,

Code: Select all
else if (freq_is < (ref_c)-5.1) {
        indicate_oc = 3; // standart 220hz == 50%
        multiply = 2;
    }


the -5.1 (Hz) may be to high. It should be the half (or a little less) of the difference between the last note in the octave and the first note of the next octave. The same logic then we use in the note indicator, just in Hz. If we set it to high, we receive a wrong multiply value and end up in the next octave.

It's possible that I ain't have calculated that correct for the shruti tuner, maybe we need to lower this value.

I also see a little error in your Johnston scale, note 63 and 64 have the same indicator values.
User avatar
brummer10
Site Admin
 
Posts: 763
Joined: Thu Mar 26, 2009 6:57 pm

Re: Indian Scale tuner

Postby brummer10 » Thu Nov 16, 2017 6:56 am

brummer10 wrote:I guess the issue may be the octave indicator,


Code: Select all
    else if (freq_is < (ref_c)-5.1) {
            indicate_oc = 3; // standart 220hz == 50%
            multiply = 2;
        }


Also I guess we need to subtract the half of the diff between last note and first note in next octave before we multiply to the next octave, instead afterwards.
For the shruti tuner it should be 5.078125Hz max, instead 5.1Hz. So just using 5Hz would be sufficient I guess.
I guess for the Johnston scale it should be less.
User avatar
brummer10
Site Admin
 
Posts: 763
Joined: Thu Mar 26, 2009 6:57 pm

Re: Indian Scale tuner

Postby Broomy » Thu Nov 16, 2017 9:40 am

brummer10 wrote:Also I guess we need to subtract the half of the diff between last note and first note in next octave before we multiply to the next octave, instead afterwards. For the shruti tuner it should be 5.078125Hz max, instead 5.1Hz. So just using 5Hz would be sufficient I guess.

Yes that would be a good idea and also adjust the amount of frequency you substract for the octave we are in. The same as you do with the c_ref.

So making a variable dif_freq which is derived from
ratiodif = 2 - (RatioHighestNote*2)^1/2

for example
Code: Select all
} else if (freq_is < (ref_c/4.0)-(ref_c/4.0)*ratiodif) {
         indicate_oc = 1; // standart 55hz == 12,5%
         multiply = 8;
Last edited by Broomy on Thu Nov 16, 2017 9:58 am, edited 1 time in total.
User avatar
Broomy
 
Posts: 175
Joined: Thu Apr 24, 2014 7:53 am

PreviousNext

Return to Suggestion Box

Who is online

Users browsing this forum: No registered users and 1 guest