LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GNU Solfege modification (https://www.linuxquestions.org/questions/linux-software-2/gnu-solfege-modification-744397/)

nnjond 08-01-2009 02:12 PM

GNU Solfege modification
 
Hi,
I have downloaded a great Ear Trainer; GNU Solfege. Apparently I,m free to modify it and i would like to slow down the scales i'm asked to identify in one of the exercises. Scales Config allows for changes in transposition only. I assumed i have to rewrite something.

Can anyone advise me on how i might do this?

Thanks
__________________

GrapefruiTgirl 08-01-2009 02:56 PM

That depends a lot on what language the stuff is written in (I'm guessing a C variant, but please give us the programming language) as well as how large/complicated the package is (meaning how difficult might it be to edit what you want to edit).

With any luck, it's a C program, and it has a header file (a file ending with .h) in which the speed and other variables are defined, and which, if you edit it and recompile the application, your new speed will be used.

NOTE: Doing this might cause ALL of the exercises to use the new speed though. If this is the case, and is undesired, then a more complicated edit would be needed.

Anyhow, please give us a bit more info on it, and hopefulle someone familiar with the package and/or language can help.

Sasha

pixellany 08-01-2009 03:25 PM

Moved: This thread is more suitable in <Software> and has been moved accordingly to help your thread/question get the exposure it deserves.

Did you actually download the source code? Or perhaps it is written in something like Python?----try opening the executable file with a text editor.

nnjond 08-01-2009 03:30 PM

Thanks for your interest Sascha.

Im sorry I'm not certain which directory to look in to find the hidden files. But I'm hopping the prob is as simple as could be imagined.

GrapefruiTgirl 08-01-2009 03:35 PM

Sorry-- my own post duplicated.

GrapefruiTgirl 08-01-2009 03:35 PM

Could you provide a link to where you downloaded this thing from?

Thanks
Sasha

nnjond 08-01-2009 04:01 PM

Here's the site of GNU Solfege

http://www.solfege.org/

GrapefruiTgirl 08-01-2009 04:28 PM

duplicate post.

GrapefruiTgirl 08-01-2009 04:28 PM

OK, I'm no programming guru, however if you have not gotten any further replies in a little while, I will look at the source code.

HOWEVER:

1) I'm on dialup, so it will take a little while for me to download.

and

2) The source archive is 4MB. That's relatively large; that's potentially a lot of code for someone to look at, considering WHY I want to look at it. So there are definitely no guarantees that I will be able to help.

Meanwhile, have you read the Solfege Wiki site? Maybe there's something in there about this.

I'll check back later.

Sasha

GrapefruiTgirl 08-02-2009 09:54 AM

OK, pixellany is correct: it's python.

If anyone is to be able to help further, please tell us the name of,or describe for us as best you can, which exercise or lesson it is that you wish to edit, so that we can have some idea where to start poking around; there are a lot of files in there!

Sasha

GrapefruiTgirl 08-02-2009 09:54 AM

dupe. Grrr..

nnjond 08-02-2009 12:46 PM

Hey Sasha ! Thanks alot. I did n't think I would be asking for so much help.

The Exersise in particular is reached by the menu, Scales. on opening any particular example, there are 3 commands: new, repeat and repeat slowly. I would like to alter the tempi of these by say, 50%.


nick

GrapefruiTgirl 08-02-2009 01:54 PM

Help: Editing GNU Solfege (Python) to cut tempo by 50%
 
OK...

First, I must say, I am somewhat musically challenged as far as reading & playing music. I just listen to the stuff :)

Secondly, I'm also python-challenged.

Third, ... I forget what was third..

Anyhow, here's what I found, which:

A) I recommend someone who codes in python verify what I have found. I may not be in the exact right spot.
B) You will need to re/compile the software for the change(s) to take place.
C) read the docs too, particularly HERE where it explains how tempo is defined (and to me, implies that it can be set somehow by the user, though it may operate globally on EVERYTHING..) as follows:
Quote:

Tempo

The tempo of music is entered as bpm/beatlen. The following example will set the tempo to 120 beats per minute, each beat being a quarter note.

tempo = 120/4
D) My advice here comes with no warranty ;) so see (A) above.

What I propose:

1) In the extracted sourcecode archive, locate and enter the folder called /src and locate the file called lessonfile.py and open it in a text editor.
2) Locate line 161. This is where the default (???) tempo is set at 60 bpm, duration is set to 4 (1/4 note if I understand right) so if you wanted to change the initial setting, I would cut the 60 in half for a 50% reduction.
3) Go to line 371 of the file. Here is the 'play_slowly' section, where 'play_slowly' takes the tempo and halves it by dividing by 2. If you wanted this to be half again as slow, I would change that to divide by 4 instead.

Careful: halving BOTH the default by 50% AND the 'slowly' tempo by another 50% will give you a REALLY slow tempo when 'play_slowly' is executed.

Having made the above adjustment(s), you would need now to build the project, to produce the executable binary that is the finished application. Now, I repeat, I have no idea about python, so while the documentation tells me to to the usual './configure' then 'make' then 'make install' I don't actually see a configure script in there. The package might need to be autoconf'd first, to generate a configure script..
EDIT: Yes, run the command 'autoconf' before running ./configure

At this moment, I am going to request that this thread be moved to "Programming" and that the title be edited to include the word "Python" so that some python programmers might be able to give further guidance, and/or tell me I'm totally out in left field :D

Also, if I can, I will try to compile this myself, if I can figure out how. It has a lot of GNOME dependencies, and I don't run GNOME, so I may not be able to compile it anyways.

Best of luck; I hope this helps you. I will now request a thread move & title adjustment.

Sasha

nnjond 08-02-2009 11:35 PM

Thanks a lot.


All times are GMT -5. The time now is 07:24 PM.