Generic Just Intonation Tuner

need a feature, suggest here

Re: Generic Just Intonation Tuner

Postby Broomy » Mon Dec 11, 2017 8:02 pm

I think it works.... :D

There is still some work I have to do:
- free allocated memory (need some guidance there...)
- cleaning up code
- add text to the readme file
- fix the transition of the last note of a scale to the root note an octave higher
...

Hermann, you been very helpful and very patient every time I stumbled.
You're a great mentor, thanks man!

Cool!

For the rest of the evening: busy playing just intervals on my fretless guitar... ;)

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

Re: Generic Just Intonation Tuner

Postby brummer10 » Tue Dec 12, 2017 7:17 am

Broomy wrote:I think it works.... :D

Great :)

Broomy wrote:There is still some work I have to do:
- free allocated memory (need some guidance there...)


Well, best is to use the gobject_class->finalize call from the widget class.
On top of the gxtuner.cpp file we add:
Code: Select all
static void gx_tuner_destroy(GObject  *object);


Then add to
static void gx_tuner_class_init(GxTunerClass *klass)

Code: Select all
    gobject_class->finalize = gx_tuner_destroy;


then we add the new function

Code: Select all
static void gx_tuner_destroy(GObject *object) {
    g_return_if_fail (object != NULL);
    g_return_if_fail (GX_IS_TUNER (object));
    GxTuner *tuner = GX_TUNER(object);
    for(int i=0;i<MAXSCALENOTES;i++) {
           free(tuner->tempscaletranslatednames[i]);
    }
}


now, when the tuner object gets destroyed (on exit) the memory is freed.
Broomy wrote:Hermann, you been very helpful and very patient every time I stumbled.
You're a great mentor, thanks man!


I'm glad you enjoy the journey. :)
I'm glad that we get a open source generic just intonation tuner in the result.

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

Re: Generic Just Intonation Tuner

Postby Broomy » Wed Dec 13, 2017 6:30 pm

Added the destroy function and resized the minimal window dimensions.

Made a pull request, if the function works ok, then the commits can be merged with master.

Kind regards,

Hans

Edit:
- Added two scales.
- Transition from last note to root is still a minor issue, will look into that soon.
User avatar
Broomy
 
Posts: 203
Joined: Thu Apr 24, 2014 7:53 am

Re: Generic Just Intonation Tuner

Postby Broomy » Sat Dec 16, 2017 11:11 am

I've been playing around with the tuner and it's doing its job well.

Because of the JI, there can be some improvement be made on calculating the ratios needed for the needle of the tuner. It's not a big issue, but it could improve a bit. I'll will look into it some time soon.

Do you think I should make a small manual or add the extra text to the readme file?

Is it ok to update to a higher version? For instance we could make it version 3.0. Tuningwise 3 is the first prime number which generates other notes then octaves. So it's kinda cool -in a nerdish way- to update to version 3, now the Just Intonation is implemented. ;)

Would it be an idea to update the title of the gxtuner repo, that the just intonation option is in there?

Kind regards!

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

Re: Generic Just Intonation Tuner

Postby brummer10 » Sat Dec 16, 2017 6:30 pm

Hi Hans

Congrats to a great peace of open source you've developed. This is the way open source works.

So, I would say "Go for it". Means, yes. all you said is reasonable, and yes, do it.

Just one remark, we shouldn't change the application name, as it is part of a couple of distributions already, and distribution maintainers get some hard times if a application name change. All other stuff, I'll hand over to you with pleasure, just, change anything to what you think is nice.

I'll be there for any question and support, I'll be part of the party. :metal2:

One remark more to the GUI, there is a discrepancy on start up, between the selector and the window title, that needs to be synced.
And one more remark, I guess it should be pleasure the GUI, if the Just Intonation Settings could be hide, means, I think most people want to set them, and then just use the tuner, without viewing all the selectors in the GUI. Maybe a expander will be useful therefore.
https://developer.gnome.org/gtk3/stable ... ander.html
In principle, you could use it like a box, just that it could show/hide what it contain.

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

Re: Generic Just Intonation Tuner

Postby Broomy » Mon Dec 18, 2017 7:18 am

Thanks Hermann!

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

Re: Generic Just Intonation Tuner

Postby Broomy » Wed Jan 03, 2018 3:25 pm

Alright been playing around with the tuner and I'm content with how it works.

But there are some things I want to improve:
1. Calculating the needed matrix from any given ratios. Which simplifies the input of a new scale;
2. Display the ratio (besides the notename) compared to the tonic;
3. Add a extra signal handler / textbox for switching between JI and TET;
4. Save last used settings for the next time;
5. Take the creation of notenames out of the tunerloop and only create notenames when the base note or scale is changed;
6. Make keyboard links to different text combo boxes (so when for instance "d" is pressed combobox with scales is selected).

Points 1 - 3 will be no problem to adjust, but I could use some advice on point 4 - 6.
@Hermann could you give me some advice on how to proceed or where to look?

Best wishes!

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

Re: Generic Just Intonation Tuner

Postby brummer10 » Wed Jan 03, 2018 7:12 pm

Well, I'm on a journey right now with only my mobile.
Will be back within 14 days.

Greeting
Hermann
User avatar
brummer10
Site Admin
 
Posts: 794
Joined: Thu Mar 26, 2009 6:57 pm

Re: Generic Just Intonation Tuner

Postby Broomy » Thu Jan 04, 2018 6:45 am

No problem, there's no hurry.

Great! Enjoy your journey!

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

Previous

Return to Suggestion Box

Who is online

Users browsing this forum: No registered users and 1 guest

cron