Tux Guitar

Open Discussion

Subject Forcing line break possible?

Author Message
Post: Apr 8th 2010 at 7:11 PM

Is it possible to force a line break, especially when printing?

For instance forcing to have only two measures per line?


Back to Top
Post: May 1st 2010 at 3:02 PM

no it's not possible. we could add any way to force X measures per line. but we can't control the size of it. you know.. one measure could have 1 note, or 64 , or more... so forcing measure sizes could make very hard pages.

Back to Top
Post: May 25th 2010 at 1:23 AM

What about a manual page break? For instance, so that one could have the chorus measure 1 always start leftmost in the page.

Back to Top
Post: May 25th 2010 at 6:43 AM

@Julian: That wouldn't be that hard in PageViewLayout and PrinterViewLayout. The GP5 fileformat supports this feature. (recognizing the paragraph options in the bar menu&toolbar?). At first we need to find out the Byte which stores this boolean value for the measure (not in MeasureHeader). That shouldn't be to hard. Could be a flag- or a boolean-value.

During the layout process TuxGuitar uses the TempLine class to fit a set of Measures into a line. During generation of the TempLine within the getTempLines Method we check for this flag and return the "unfinished" TempLine as we want to force a lineBreak. Therefore the next measure will be placed into the next line.

Add a new button to the ToolBar and a new flag to the TG file format.


I'll take a look at that and will let you know as soon as I've implemented this feature.

Back to Top
Post: Jun 1st 2010 at 11:03 PM

Force a line break from the specific layout isn't hard.. i was talking about this "x measures by line"..
however it's not my intention to hardcode the file format..

The idea is to add extended support to the file format structure,
so when you create a TG document, the layout, the midi device, or any other plugin or abstract class could save dynamic info to the TG document at it's end.

And it's not about GP* file format, it's not part of the application, just a plugin..

So for instance, the page layout, could call to
TGSong.set( "page-layout.break-measures" , someDomNodeValue ) ;

The jack plugin says:
TGSong.set( "jack-connected-ports" , someDomNodeValue ) ;

( this way you don't have to reconfigure jack for each song every time... ofcourse, jack plugin also must implement the feature )

Then the TG format must be able to save it.. and each file format plugin could save it or just discard this info if it don't supports it.

Back to Top