Tux Guitar


Subject Measure editing

Author Message
Post: Apr 20th 2009 at 3:34 PM

Practicing on the 1.1 realease, I noticed it would very nice to have the following capabilities:
1) be able to delete all items of a beat by just tapping delete, rather than having to do "clean beat" and then click on the insert-chord icon/menu to then click on "clean" to remove the chord name and diagram. It seems obvious that if you want to clean a beat, you want to remove both its chord name/diagram and its note representation;
2) it would be VERY nice to be able to shift left or right one or several consecutive selected beats; this would avoid having to delete them and re-enter them, with the pain of having to note everything down on a piece of paper before you delete them to re-enter them.

Very nice product otherwise!!

Back to Top
Post: Apr 22nd 2009 at 9:37 PM

> you want to remove both its chord name/diagram
Well more than a suggestion, it's a bug report.
I fixed it now under development version.

> be able to delete all items of a beat by just tapping delete,
Delete key, is reserved to delete notes (not all beat)
but, you can use the shortcut editor to use a different key, or a convination like "Ctrl + Del"

Back to Top
Post: Apr 28th 2009 at 12:55 PM

Good to know about the bug handling you mention.
Any handling plan also for the second suggestion of selecting and moving around things or there is another way to do this in the current product?

Back to Top
Post: Apr 29th 2009 at 5:43 PM

No there are no ways yet to do that.
there are plans for that feature but i can't promise you that they will be available on next release.

on current version, you can move beats inside a measure (with Insert|Delete keys, only if there is available space ) but not move a beat and mote all others at the right of the track.

Back to Top
Post: Apr 30th 2009 at 3:18 PM

Thanks for the fast answer. Now, how do you move beats inside a measure with Insert|Delete keys (with available beat internal space)? Whe I press Delete key, it delets a note, not the beat. And when I press Ctl-Delete keys, the beat cleans up but Ctl-Insert (for instance) does not brings it back, whatever available place I choose to put it back. I dont see any way to do that in the doc.

Back to Top
Post: Apr 30th 2009 at 3:44 PM

To move beats to left, you need first have space at the left.
this means, you need be placed on a silence (rest)

cleaning, if you put the cursor on a rest beat.
and press "Del" all notes placed at the right of this beat, will be moved to left.

now, if you have a rest beat at the end of the measure.
and your cursor is under a note in the middle of measure.
if you press "Insert" the note and all beats at the right will be moved ( and the last rest will be removed )
but, the condition is "the note duration" must be equal or lesser than the last rest.

See these examples:
Read "R" as rest or silence
Read "N" as a note.

1_ Delete:
Put the cursor under "R" ( second beat )
Pres "Delete"
You should get a result like:

2_ Insert:
Put the cursor on first beat
click "Insert"
Result should be

Back to Top
Post: Apr 30th 2009 at 7:38 PM

Thanks. Actually only the first editing operation ("Delete" keystroke when under a rest beat) was working for me. The second action, I am not sure I get it. You mention 'Click "Insert"', I guess you meant hitting the key "Insert" as I dont see any "Insert" menu option to click over. As far as hitting the "Insert" key, this does not move anything on my Tux screen. Am I missing your point?

Back to Top
Post: May 5th 2009 at 1:46 PM

Sorry, i mean "press" insert key.
remember that you must have free space ( equal or greater than the beat you are moving ) at the end of the measure

follow these steps:

1_ start tuxguitar (don't use "new" button, just open a new tuxguitar instance to make sure all durations are reset to defaults)

2_ press "1"

3_ press "Insert"

Back to Top
Post: May 6th 2009 at 3:39 AM

I did exactly that: 1) opened a tux session, 2)pressed "1" and then 3) pressed "Insert" (the key just aside the "Delete") but nothing happen. I mean, while there is empty room on the right of the measure, if I have a quarter already on the first beat and the rest of the measure is free, when over the first beat when doing the above process, a "1" comme on the tab string where my cursor is, and just replaces whatever was there, it does not push the first beat to beat second for instance in order to insert a new beat... So that there is no inserting, just replacement of what was there, which then is lost instead of shifted on the right. Do you see what I mean?

Back to Top
Post: May 6th 2009 at 1:20 PM

mmm wait.. it should works..
what tuxguitar version, and OS are you using ?
what kind of keyboard do you have ?

on my keyboard, i have 2 insert/delete keys.
first are next to "backspace" ( where other keys as home, end, page up and page down )
the others are at the numpad. ( these keys works only if "num lock" isn't enabled )
Do you have same keyboard style ? ( what of both insert keys are you using )

It it's a keyboard thing, ( i mean, the key code is different than the code tuxguitar expects )
let me know please this.
go to "Tools -> Shortcuts"
make 2 clicks to any action, and try to use "Insert" key.
don't you see any error message saying "The key is reserved" ?
if yes, i don't think it's a key code problem.

so if not related to the code..
can you please try this new test ?
1_ do a new song ( make sure that Undo/Redo buttons are disabled )
2_ press "Insert"
does now the "Undo" button change status to enable ?

Back to Top
Post: May 6th 2009 at 7:41 PM

Hi Julian,

My TuxGuitar version is 1.1 per the About dialog box. I installed it very recently as a matter of fact. I run it under Windows XP 5.1.2600 Service Pack 3.

I have pretty much the same insert/delete key setup than you have actually.

I have tried both insert keys. I also tried the numpad one with and without num pad enabled. None of these actions had any effect whatsoever anywhere into the measure of a any new song I tried editing.

As far as Tools/Shortcuts are concerned, 2-clicks popped up a dialog box "Key Binding Editor" saying "" then "Press a Key" with 2 buttons, "Clean" and "Cancel". Pressing then "Insert" key did not send the error message you mentionned, didn't say anything actually, and did not make the dialog box disappear either. Doing the same with "Delete" key did answer the key was reserved however. So its code is recognized, but apparently not the "Insert" key one. And this is true for both insert keys (num pad one with numpad disabled, and the one beside "Home", "End", "Delete", etc.).

As far as the second test is concerned, with a brand new empty song, (both Undo/Redo buttons are disabled), pressing "Insert" does not change any of these buttons status, they stay disabled with this key pressed.

It sounds like a key code thing then...

Back to Top
Post: May 10th 2009 at 1:57 PM

Yes, it definitly seems to be a key code problem

can you make this little thing please ?

go to Tools -> Shortcuts, and choice "Set Downstroke"
set "Insert" (or Ctrl+Insert ) key to this action.
close the editor, and close tuxguitar.

Go to: C://Documents and Settings/[the_logged_user]/.tuxguitar

inside this folder, you have all configuration of tuxguitar.
try open "shortcuts.xml" with IE/firefox (or any text editor)

In the document, search for the text:

show me please, what is the value of the "key" where is this action.
( the value should be "16777225", but i beleive your keyboard/windows haven't this value for insert )

Back to Top
Post: May 10th 2009 at 8:18 PM

Hi Julian,

Here is what I get with Ctrl-Insert:

Actually when in the Shortcuts editor dialog, hitting "Insert" key when requested to press a key does not do anything to the dialog at all. So I had to choose "Ctrl-Insert" and even then, the dialog editor reacted by associating Control-Control to the DownStroke event, not Control-Insert... And the corresponding XML code is as above.

Back to Top
Post: May 10th 2009 at 8:29 PM

Oops, I see that pasting the XML code into this Reply Dialog brings it to be erased from the text!! I'll try it again, removing some possible meta characters (code anyway is 262144).

shortcut action action.beat.general.set-stroke-down key "262144" mask "262144"

Back to Top
Post: May 10th 2009 at 8:39 PM

I still believe that the capability of shifting right (or left) a whole half of a piece of music tablature when you have made some duration error in the middle of it would be a VERY nice feature. The capability to insert (or remove) ANY duration object (note or silence) anywhere and see the piece of music being shifted right or left by that duration would help a lot.

I tried to do it on my own by doing the following:
1. export tg tablature as a MIDI file
2. convert this MIDI file to text file (mf2t utility)
3. edit it and change measure/beat/click values from a given measure to the end.
4. convert this to MIDI file (t2mf utility)
5. import this into TuxGuitar.

It works, but... 1) you loose all original tablature (replaced by a Tux automaticity converting notes to tablature, which looses ideal ones one had entered to begin with; 2) you loose chord names and diagrams; 3) you loose markers, repeats, etc... So it's a lot of pain to correct such an error. And I consider it would be very valuable that be handled within Tux rather than by any external means.

Don't you think so?

Back to Top
Post: May 10th 2009 at 8:51 PM

mmm, no it seems that it isn't reading the input key.
if you click insert, and nothing happens ( nothing received )
or you click Ctrl+Insert and see "ctrl+ctrl"
and now i see the key code "262144" that is "Control" ( see the mask ).

it seems that something on top in your OS is using Insert key, so tuxguitar never receibe it.

A similar case should happen if you try to use "Ctrl+Alt+Del", window will show you the taskmanager instead of send the event to tuxguitar.

Unfortunatly, this action is not configurable from application.
but, you can manually add a key to this action:

Try copy one existent line from the shortcuts.xml file,
and replace the attributes to:

action="action.note.general.insert" key="113" mask="0"

It's important to do that with tuxguitar "closed" (because it will override the file when you close it later )

then, start tuxguitar again, and try it with "q" ( 113 ) key. it should make the action that you can't make work with Insert.

Back to Top
Post: May 10th 2009 at 8:56 PM

It seems we write at same time.

The feature of move ( not only 1 measure components ) is already planned to do. but please, be patience :)
it will be done..

Back to Top
Post: May 10th 2009 at 9:40 PM

Thanks a lot. The cue about insert key worls like a charm.

I dont see any application on my PC which would particularly capture Insert key code in front of any one, but nevertheless, it i s a fact it is not received at all in Tux, so the 'q' or any other regular key from the keyboard will do, then. Thanks again.

For the general insrt feature, it is very good that this is already planned. I didn't know that. Do you have any idea of its release date?

Back to Top
Post: May 10th 2009 at 9:48 PM

No, it's hard to know a release date.
you know, it's free, it's a hobby. We can work on tuxguitar only when we have "free" time (it's not as a regular job). this make impossible to know the future, i mean, how many free time will we have next week, or next month, so this is why it's hard to calculate a release date.

Back to Top
Post: May 10th 2009 at 10:12 PM

I understand.

I thought of another suggestion which could help handle various requests like that more easily on a temporary basis and give you ore time to develop then. Would it be possible to have the capability to export (and import from afterwards) a TuxGuitar tablature/notation as a text file containing the same data there is in the .tg file but on a totally ASCII readable way? That way, one could take the chance of changing what one has to change directly in the text file without losing anything and re-import it to Tux for saving later as a final .tg file? Do you see what I mean? Like another 'save as' capability but in a text format rather than binary?

It would be a great tool while desired features are not yet available.

(I think in JAVA or C++ it is not necessary a big deal as it's an archiving technique by printf rather than shooting out the binary structure). What do you say?

Back to Top
Post: May 12th 2009 at 11:57 PM

OK, my last suggest does not seem to appeal anything. I have another one, after having examine for some time the internal structure of .tg file to see if I could remedy my problem while you guys are developping future release. I understand it's a lot of work and it is done on free time.

Would it be possible to have a good document on the internal structure of a .tg file? I already spotted quite a bunch of things looking at it and into the Java sources, but I am afraid I am not hot enough in reverse engineering to fully understand the structure.

Thanks in advance.

Back to Top
Post: May 15th 2009 at 9:09 PM

> Would it be possible to have the capability to export ....
Well, i had planned to do something like, but on XML format.
saving all TGSong structure.
The version 0.1 or 0.2 (not remember now) used XML format to read/save files.
but i switched to a binary format, because the size of the files.
So later i planned to add XML structure again, as a new option, and have also some kind of "terminal" where you can paste any XML segment, and tuxguitar display it.

But these are not priority things now.. they are planned and may be added, but not for next release.
It can be very easy as you say to create the file
but beleive me that is not so easy read it later.
because when anybody manually edit the file, you need to make a lot of validations on the application side.

> Would it be possible to have a good document on the internal structure of a .tg file?

No there isn't a document of the file.. there are only the sources.

by the way, now i suggest you :)
don't spend time trying to modify the binary file.
it will take more time for you to do that, than create the full file again :p

the binary file, was planned to be so small as it's possible. there are a lot of bitwise there, and it's not easily editable from any hex editor.
if you change only 1 number on the file, you can make it unreadable. it's definitly not a good idea

Back to Top
Post: May 18th 2009 at 3:23 AM

Thanks, Julian. I tried hard to do that hexa editing and could make some progress, but it's too big a task to be rewarding. For the song I was editing trying to shift measures 2 beats on the right, I eventually had to flush all the 40 measures at the end of it and re-enter them. It was a lot of work but less than hexa attempt...:))
Anayway, I understand and appreciate what you say. I would still like to have the full XML structure when you'll add this as an option. Anyway, ideally, it would be much more efficient to have TuxGuitar be able to shift measures right and left for any number of beats or beat fraction requested.

Back to Top
Post: May 18th 2009 at 2:04 PM

There is something done on SVN version.
i think it could be more easy for you try to download and build the sources, than try modify the .tg file or move all manually.

See at sourceforge how to get sources:

Follow this instructions to build from sources:
( note that this doc wasn't updated since 1.0, maybe some properties have different names )

About The current feature status:
there is no way to select how long is the move now.
you have only 2 menu items ( at Beat menu )
Move Left and Move Right. ( The plan is to add a new option to move named "custom move" where you can select the duration of the move. )
the move duration, is now determined by the "current selected voice duration"
So cleaning, if you have the cursor under a half duration, and do "Move Right" , all notes from selection to the end, will be moved 1 half to the right.

Something important.
if you make a "left" move.
all beats that are beetween selection and first beat to move ( depending on selection duration ) will be removed.

The best thing you can do is try to prepare the space first.
i mean, if you need to move 2 beats ( on a 4/4 measure )
don't do "2 moves of a quarter"
just try to do "1 half move"
so first, try change the duration of the selected beat (later you can restore it) and make the move.
This is because, when you move all notes, all beat/voices that their duration are greater than measure len, will create new tied notes. so if you make a lot of moves, you can get a lot of unnecesary tied beats.

Don't try to write to .tg with "save/save as" on SVN version. TG-v1.2 file format is under development, and will have changes until 1.2 release. ( if you save to it, you'll not able to open later with next version )

Just do:
File -> Export -> TuxGuitar 1.1
so it will write a .tg file, but with 1.1 structure.

However, i suggest you a backup of original file before work on it with the development version.

Back to Top
Post: May 31st 2009 at 7:04 PM

Ok, thanks Julian. I think I'll wait for the 1.2 next version where moving will be allowed for any measure fraction duration, if I understand well.

Back to Top
Post: Dec 31st 2010 at 8:09 PM

this software is great but..
is there anything out there that plays the actual note cord.
i am just learning to play ,this method is too easy .
if a cure song has the note of c or g i want to learn to play the coard not a plain string do you understand what i mean?

Back to Top