Tux Guitar

Problems

Subject Two-screen



Author Message
John
Post: Mar 11th 2007 at 4:55 PM

Hello!
Now, I have a bi monitoring and I have a problem :
I can't see right tablature.

I have the feeling that tuxguitar believe that I have a big resolution display cos of the two screens.

Do you know what I mean?


Back to Top
 
John
Post: Mar 16th 2007 at 12:08 PM

This problem will be solved in a next version?

It could be interesting to have zoom, it could solve this problem.


Back to Top
 
Julian
Post: Mar 16th 2007 at 12:20 PM

mm sorry... i forget reply this topic.

can you show me an screenshot of your problem ??


Back to Top
 
John
Post: Mar 16th 2007 at 4:35 PM

http://img453.imageshack.us/img453/8066/tuxguitarjq6.png


Back to Top
 
Julian
Post: Mar 16th 2007 at 5:02 PM

Ok.. i see the bug..

but.. i'll need your help to fix it
do you know how build tuxguitar from sources ??


Back to Top
 
Julian
Post: Mar 16th 2007 at 5:05 PM

its not about bug....
i see in your screen big fonts!!!
you can config the note font at the config dialog.. do you know that ???


Back to Top
 
John
Post: Mar 16th 2007 at 6:27 PM

>> do you know how build tuxguitar from sources ??

No, how to do that?

>>i see in your screen big fonts!!!
>>you can config the note font at the config dialog.. do you know that ???

Yes, of course, I know.
I recently uninstalled Tuxguitar because there is a dependance between Eclipse and Tuxguitar in Debian Etch. Tonight I installed the ubuntu version (there is no dependance with Eclipse) for the screenshot and I forgot to configure Tuxguitar^^


Back to Top
 
Julian
Post: Mar 16th 2007 at 6:50 PM

well,

i tell you build instructions (asuming you want build ubuntu version)

1_ requeriments:
"sun-java5-jdk" or later installed in your system.
"ant" available at ubuntu repositories.
download source files:
http://prdownloads.sourceforge.net/tuxguitar/TuxGuitar-0.9.1-src.tar.gz?download

2_ configure build properties:
after extract source files, edit build.properties file,
and uncomment (# char) lines at "UBUNTU DAPPER BUILD PROPERTIES" section. and comment or remove others.
and check the paths are Ok... (look itext.jar is at /usr/lib/java.. have installed old ubuntu release to keep this file)

3_ build package
open a terminal, go to the sources folder and exec "ant"

if all is alwrite, you will see a new package "tuxguitar-[version].deb"


that was for build package.. now. we need fix the bug.
i think i know where is the problem:
edit the file "src/org/herac/tuxguitar/gui/editors/tab/layout/PageViewLayout.java"
at line 31, try replace:
this.displayWidth = (getTablature().getDisplay().getBounds().width - getTablature().getVerticalBar().getSize().x);
to
this.displayWidth = (getTablature().getDisplay().getClientArea().width - getTablature().getVerticalBar().getSize().x);

now you can rebuild the package and test if bug is fixed.

tell me if you can understand (sorry my english)
bye


Back to Top
 
John
Post: Mar 16th 2007 at 7:25 PM

Yes I did what you wrote :
>open a terminal, go to the sources folder and exec "ant"
>if all is alwrite, you will see a new package "tuxguitar->[version].deb"

package tuxguitar was created.
After I replaced the line 31.
And in the end, i did ./build.sh

But the bug is not fixed, i have always the same problem.


Back to Top
 
Julian
Post: Mar 16th 2007 at 7:41 PM

if i understand well, you didn't reinstall the .deb package after change the source file..

>package tuxguitar was created.
you need do this, after replace the line, to changes take effect.

>After I replaced the line 31.
Ok.. now exec:
$ant
$sudo dpkg -i tuxguitar-[version].deb
$tuxguitar (to test)

>And in the end, i did ./build.sh
build.sh is used by and to make a .deb file.. you shouldn't exec this file.


Back to Top
 
John
Post: Mar 17th 2007 at 4:28 AM

ah ok.
So I did :
$ant #in the directory Tuxguitar

There is most of Warning :
[copy] Warning: files/undo.png modified in the future.

In the end :
BUILD SUCCESSFUL
Total time: 22 seconds

>$sudo dpkg -i tuxguitar-[version].deb

I'm on debian (it's not important?)
So I wrote in another console:
su
dpkg -i tuxguitar-0.9-ubuntu-6.10-1.deb

message of update...

$ tuxguitar

There isn't error message but the bug isn't fixed.

Maybe it could help you :
-When I play a song with tuxguitar, I can't see the left tablature.
-If I move the bottom scrollbar :
http://img443.imageshack.us/img443/5404/tuxguitar2jh7.png
http://img443.imageshack.us/img443/3930/tuxguitar3my0.png

I can't see the last left measures(measure 6,15,23,...).


Back to Top
 
Julian
Post: Mar 17th 2007 at 9:23 AM

mmm..

well... we'll need add some lines and see the result..
open the same source code file...
at line 31 (same as you modify ...)
change:
this.displayWidth = (getTablature().getDisplay().getClientArea().width - getTablature().getVerticalBar().getSize().x);
TO:
this.displayWidth = 1024;
//this is not a solucion.
//at this line you are hardcoding witdh to 1024..

after that line, and before " } " add this:

System.out.println(TuxGuitar.instance().getDisplay().getBounds());
System.out.println(TuxGuitar.instance().getDisplay().getClientArea());
System.out.println(TuxGuitar.instance().getDisplay().getPrimaryMonitor().getClientArea());
System.out.println(TuxGuitar.instance().getShell().getMonitor().getBounds());
System.out.println(TuxGuitar.instance().getShell().getMonitor().getClientArea());

rebuild and install the package and launch the app..
you will see at the terminal.. the results of System.out.println(...)... lines.
please paste here that results..


Back to Top
 
John
Post: Mar 17th 2007 at 9:32 AM

When I do :
$ ant


[javac] symbol : variable TuxGuitar
[javac] location: class org.herac.tuxguitar.gui.editors.tab.layout.PageViewLayout
[javac] System.out.println(TuxGuitar.instance().getDisplay().getBounds());
[javac] ^
[javac] /mnt/commun/test/TuxGuitar-0.9.1-src/src/org/herac/tuxguitar/gui/editors/tab/layout/PageViewLayout.java:35: cannot find symbol
[javac] symbol : variable TuxGuitar
[javac] location: class org.herac.tuxguitar.gui.editors.tab.layout.PageViewLayout
[javac] System.out.println(TuxGuitar.instance().getDisplay().getClientArea());
[javac] ^
[javac] /mnt/commun/test/TuxGuitar-0.9.1-src/src/org/herac/tuxguitar/gui/editors/tab/layout/PageViewLayout.java:36: cannot find symbol
[javac] symbol : variable TuxGuitar
[javac] location: class org.herac.tuxguitar.gui.editors.tab.layout.PageViewLayout
[javac] System.out.println(TuxGuitar.instance().getDisplay().getPrimaryMonitor().getClientArea());
[javac] ^
[javac] /mnt/commun/test/TuxGuitar-0.9.1-src/src/org/herac/tuxguitar/gui/editors/tab/layout/PageViewLayout.java:37: cannot find symbol
[javac] symbol : variable TuxGuitar
[javac] location: class org.herac.tuxguitar.gui.editors.tab.layout.PageViewLayout
[javac] System.out.println(TuxGuitar.instance().getShell().getMonitor().getBounds());
[javac] ^
[javac] /mnt/commun/test/TuxGuitar-0.9.1-src/src/org/herac/tuxguitar/gui/editors/tab/layout/PageViewLayout.java:38: cannot find symbol
[javac] symbol : variable TuxGuitar
[javac] location: class org.herac.tuxguitar.gui.editors.tab.layout.PageViewLayout
[javac] System.out.println(TuxGuitar.instance().getShell().getMonitor().getClientArea());
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 5 errors


Back to Top
 
Julian
Post: Mar 17th 2007 at 9:40 AM

mmm sorry.. i forgot the import...

look at the top of the same file..
after: "package org.herac.tuxguitar.gui.editors.tab.layout;"
you will see some lines begin with "import "

add this new line:
import org.herac.tuxguitar.gui.TuxGuitar;

now it should build.


Back to Top
 
John
Post: Mar 17th 2007 at 9:47 AM

$ tuxguitar
Rectangle {0, 0, 2304, 1024}
Rectangle {0, 0, 2304, 1024}
Rectangle {0, 28, 2304, 996}
Rectangle {0, 0, 1280, 1024}
Rectangle {0, 0, 1280, 1024}


Back to Top
 
Julian
Post: Mar 17th 2007 at 9:57 AM

fine,
1280*1024 is your monitor resolution ?

so, replace again the "this.displayWidth...." line :p.. to:
this.displayWidth = (getTablature().getMonitor().getBounds().width - getTablature().getVerticalBar().getSize().x);

rebuilt it... i think bug should be fixed..
tell me what happends.


Back to Top
 
John
Post: Mar 17th 2007 at 10:21 AM

>1280*1024 is your monitor resolution ?

My first monitor resolution is 1024x768
My second monitor resolution is 1280x1024

So it's better. If i move the tuxguitar window to the second screen, it works: it fits tuxguitar window to the second monitor resolution. But if then I move the tuxguitar window to the first screen, it doesn't fit tuxguitar window to the first monitor resolution, tuxguitar window stay in the other resolution.


Back to Top
 
Julian
Post: Mar 17th 2007 at 10:28 AM

well.. we found the correct value..

>if move......
for the moment that never doesn't works.. because app take value only when PageLayout is created... (something to fix)

i have only 2 more questions:
1_ don't move.. try.. start tuxguitar in monitor 1.. and see if its good.. and then try start in second monitor.. and see again.. (i need now if is talking width from Used monitor)

2_ move beetewn monitors, like in your post.. but after move... switch to "linear layout", and back to "page layout" (it'll cause, pageLayout reinitialized.. so width should be correct)..

please say that 2 steps results...


Back to Top
 
John
Post: Mar 17th 2007 at 3:20 PM

>1_ don't move.. try.. start tuxguitar in monitor 1.. and see if its good.. and then try start in second monitor.. and see again.. (i need now if is talking width from Used monitor)

I start on the first monitor(1024x768) : there is a problem of resolution.
I start on the second monitor : It works.

>2_ move beetewn monitors, like in your post.. but after move... switch to "linear layout", and back to "page layout" (it'll cause, pageLayout reinitialized.. so width should be correct)..

Yes, when i switch to "linear layout" and back to "page layout", the width always become correct (on both monitors).


Back to Top
 
Julian
Post: Mar 17th 2007 at 3:30 PM

Well,

you can move the line replaced:
this.displayWidth = ..........

to the first line of "public void paintSong(GC gc,Rectangle clientArea,int fromX,int fromY)" method..

AFTER " { " AND BEFORE "clearTrackPositions();"

that method is executed to redraw tablature.. so if you put the displayWidth line there.. the app should auto adjust width when you move beetween monitors..

all of this will be fixed for next release!
very thanks for your help.


Back to Top
 
John
Post: Mar 17th 2007 at 4:23 PM

Yeah! I tested : it works!
Tuxguitar is "bi monitoring compatible" :D

> very thanks for your help.

You're welcome, it's the first time i have helped a open-source project, it's fun.


Back to Top
 
mac
Post: May 26th 2007 at 1:37 PM

i also have a bi monitor problem, but i'm on a mac

to see the whole score i need to stretch tuxguitar across my 2 monitors (something i don't want to do)

seems like he worked it out, is this correction available to everyone or do i have to change the source or something


Back to Top
 
Julian
Post: May 26th 2007 at 1:55 PM

Hi,
the bug is fixed at CVS version.. but on CVS version are only sources.. so you must build the sources.
or wait to next version release (its not nearly yet)


Back to Top
 
ktulu
Post: Jun 30th 2007 at 9:03 AM

I have the same problem, so I tried to compile the sources of tux guitar.
I worked but now when I launch tuxguitar I have this error :

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

I have also another poblem with alsa plugin when I try to build :
[javac] /home/theo/programmes/TuxGuitar-alsa-0.9-src/TuxGuitar-alsa-0.9-src/src/org/herac/tuxguitar_alsa/plugin/TGPluginConfig.java:17: package org.herac.tuxguitar.gui.util does not exist
[javac] import org.herac.tuxguitar.gui.util.TuxGuitarFileUtils;
[javac] ^
[javac] /home/theo/programmes/TuxGuitar-alsa-0.9-src/TuxGuitar-alsa-0.9-src/src/org/herac/tuxguitar_alsa/plugin/TGPluginImpl.java:6: package org.herac.tuxguitar.gui does not exist
[javac] import org.herac.tuxguitar.gui.TuxGuitar;
[javac] ^
[javac] /home/theo/programmes/TuxGuitar-alsa-0.9-src/TuxGuitar-alsa-0.9-src/src/org/herac/tuxguitar_alsa/plugin/TGPluginImpl.java:7: package org.herac.tuxguitar.gui.system.plugins does not exist
[javac] import org.herac.tuxguitar.gui.system.plugins.TGMidiPlugin;
etc etc, i have a lot of lines like that.
I have not edited the build.properties.
What can I do ?
I am on Ubuntu Feisty.
thanks :)


Back to Top
 
Julian
Post: Jun 30th 2007 at 10:51 AM

Hi,

>UnsupportedClassVersionError: Bad version number in .class file
make sure, you are running it with same version of java as you build the app.
try this:
java -version
javac -version

about tuxguitar-alsa:
you are trying to build tuxguitar-alsa "0.9", but if you have tuxguitar from "CVS", you need tuxguitar-alsa from CVS too.
however, there is a prebuilded tuxguitar-alsa (and other plugins) on CVS version.
look at:
TuxGuitar/share/services/
and
TuxGuitar/share/plugins/

they was builded under Ubuntu feisty, with JDK 1.5..
so if you have java 1.5 or later, they should work.

Note, tuxguitar-alsa is not at "menu -> plugins" anymore..
you can see it at Config dialog.


Back to Top
 
ktulu
Post: Jun 30th 2007 at 11:46 AM

all right !
I had a bug because I didn't download the cvs sources and the script generated /usr/bin/tuxguitar was using java-1.5 but now with the cvs sources from sourceforge, the script works well :)
thank you very much.
and the display bug for dual screen is not here anymore. yeahhh


Back to Top
 
kkuehl
Post: Nov 16th 2007 at 3:02 PM

Hi,
I have compiled tuxguitar from CVS (11/16/2007).
I have a dual display monitor. I am experiencing the same problem as described above.

displayWidth no longer exists in PageViewLayout.java

It seems to be replaced with this:

public int getMaxWidth(){
if(this.monitorWidth <= 0){
this.monitorWidth = ((TuxGuitar.instance().getShell().getMonitor().getClientArea().width - getTablature().getVerticalBar().getSize().x) - 20);
}
return (this.monitorWidth - (DEFAULT_HORIZONTAL_SPAN * 2));
}

So I added the debugging information mentioned above:

System.out.println(TuxGuitar.instance().getDisplay().getBounds());
System.out.println(TuxGuitar.instance().getDisplay().getClientArea());
System.out.println(TuxGuitar.instance().getDisplay().getPrimaryMonitor().getClientArea());
System.out.println(TuxGuitar.instance().getShell().getMonitor().getBounds());
System.out.println(TuxGuitar.instance().getShell().getMonitor().getClientArea());


Here are my results:

Rectangle {0, 0, 2048, 768}
Rectangle {0, 0, 2048, 768}
Rectangle {0, 0, 2048, 744}
Rectangle {0, 0, 2048, 768}
Rectangle {0, 0, 2048, 768}
Rectangle {0, 0, 2048, 768}
Rectangle {0, 0, 2048, 768}
Rectangle {0, 0, 2048, 744}
Rectangle {0, 0, 2048, 768}
.....

It would be cool to make a dual monitor Layout option where it would divide the width in half.


Back to Top
 
Julian
Post: Nov 16th 2007 at 5:19 PM

Hi,
you added 5 "System.out.println" lines.. but you have 8 results :p...

so, please try change that lines for this new:

System.out.println("Display Bounds: " + TuxGuitar.instance().getDisplay().getBounds());
System.out.println("Display Client: " + TuxGuitar.instance().getDisplay().getClientArea());
System.out.println("Monitor Count: " + TuxGuitar.instance().getDisplay().getMonitors().length);
System.out.println("Primary Monitor Bounds: " + TuxGuitar.instance().getDisplay().getPrimaryMonitor().getBounds());
System.out.println("Primary Monitor Client: " + TuxGuitar.instance().getDisplay().getPrimaryMonitor().getClientArea());
System.out.println("Shell Monitor Bounds: " + TuxGuitar.instance().getShell().getMonitor().getBounds());
System.out.println("Shell Monitor Client: " + TuxGuitar.instance().getShell().getMonitor().getClientArea());



I'm also, added a new line to know how many "monitors" know SWT you have.. because i see allways a "2048" width in your previous information..

bye


Back to Top
 
kkuehl
Post: Nov 16th 2007 at 6:01 PM

Display Bounds: Rectangle {0, 0, 2048, 768}
Display Client: Rectangle {0, 0, 2048, 768}
Monitor Count: 1
Primary Monitor Bounds: Rectangle {0, 0, 2048, 768}
Primary Monitor Client: Rectangle {0, 0, 2048, 744}
Shell Monitor Bounds: Rectangle {0, 0, 2048, 768}
Shell Monitor Client: Rectangle {0, 0, 2048, 768}


I have dual monitors, but it is treated as one. (ATI video card running on Kubuntu).


Back to Top
 
Julian
Post: Nov 16th 2007 at 6:38 PM

As i thougth, SWT don't know you have 2 monitors.

i have no much experience with 2 monitors, because i have only one...
so not sure if it's an SWT bug..

What SWT version are you using ??? can you test with other ??


Back to Top
 
kkuehl
Post: Nov 16th 2007 at 7:09 PM

I think it is because of this in my xorg.conf:

Section "Device"
#Identifier "aticonfig-Device[0]"
Identifier "Dual-Device"
Driver "fglrx"
Option "DesktopSetup" "horizontal,reverse"
Option "EnableMonitor" "crt1,tmds1"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Option "ForceMonitors" "crt1,tmds1"
EndSection

My proposed resolution for this type of situation would be to have a dual monitor option in layout that would divide your resolution in half when "checked". Another idea would be to have something in settings allowing you to set your maximum width.


Back to Top
 
hernux
Post: Nov 16th 2007 at 8:32 PM

The problem is that you're not using a real dual head configuration.. it's a virtual dual-head system managed by the ati drivers..
As you can see, in your xorg configuration you have only one device, and its registering as one big screen, that's why gtk can't understand it.

I have similar issues using virutal dual-head with nvidia, so I dropped that configuation and created a real dual-head with two video cards..

I will try to find any information about it, to help Julian fix this.. however it will be very difficult without your config at home.

cheers


Back to Top
 
Julian
Post: Nov 17th 2007 at 7:53 PM

kkuehl:

> "divide your resolution in half when "checked""
this is not a good idea, because you can have 2 monitors, with different sizes.. ( 1280 + 1024 / 2 will not return the wanted result )

But i added a config key "layout.page.force-width" to "force" the page layout width on CVS version.

this thing will be abble only by "manually" edit the configuration file..
i'll be not included on the Config dialog,
because this is not a multiplatform thing,
a lot of users can be confused if see that option.

So this is what you need do:

Edit this hidden file: ( ~ = /home/[your user] )
~/.tuxguitar-1.0/config.properties

and set:
layout.page.force-width=1250

1250 is an example of a 1280 screen width..( there are something like 30 pixels of borders + scroll )


WARNING: Make sure, tuxguitar is closed when you modify the config file.. if not, tuxguitar will be override the file with the current values, and your change will be removed.


Back to Top
 
kkuehl
Post: Nov 19th 2007 at 2:32 PM

Thanks for adding this feature! I am going to make more suggestions in another thread as well as ask some additional questions. Keep up the great work. I am a C++ programmer/guitarist. I am hoping to familiarize myself with the code and hopefully provide patches instead of just making requests (someday).


Back to Top
 
weining
Post: Mar 8th 2012 at 1:28 PM

Why do Goyard tote bags we go goyard bags to these goyard tote for sale lengths goyard tote replica for you? Simple. goyard handbags Over goyards the goyard tote replica past 15 goyard tote bags buy years we’goyard tote bags for sale ve seen goyard tote bags st louis changes goyard tote bags barneys in this goyard tote bags price industry goyard st louis tote replica that would goyard bags replica knock goyard bag online your goyard tote bags white socks goyard pairs off – both sac goyard good goyard barneys and bad. In goyard price our goyard online business, we goyard need to goyard tote be on goyard handbags online top of goyard bags online every goyard.com change Christian Louboutin replica out Fake christian Louboutin there to Faux Chrisitan Louboutin ensure Christian Louboutin replica boots our Replica christian Louboutin customers red bottom shoes are well Christian louboutin imitation taken knock off christian louboutin bootscare of christian louboutin replica handbags and christian louboutin boots 2011completely louboutin shoes satisfied. christian louboutin sale shoes That’s christian louboutin for less our shoes christian louboutin promise christian louboutin on sale to you – buy christian louboutin complete christian louboutin shoes cheap satisfaction christian louboutin discount shoes or your christian louboutin daffodile money back christian louboutin replica daffodile when you Designer handbagsbuy replica Replica Handbags watches.And Louis Vuitton replica for over Replica Bags 20 years Replica bags uk we’ve pioneered designer handbags purses unbelievable designer handbags for cheap advances in designer wholesale handbags an industry designer handbags discount that’s been designer handbags for sale tainted by designer handbag sale the phrase top designer handbags fake watches.Why best designer handbags do we say designer handbag online tainted? Because designer leather handbag the term fake designer bags for less almost always discount designer handbags outlet mean “junk.” And designer handbags discounted we never accept junk here.Rolex is a world famous Watch company, but not every one has got the money to buy Rolex watch, so for them there is the option of Rolex Watch Replicas. For buying Rolex Watch Replicas it is necessary to go to a good and reputed shop as they can offer such Rolex Watch Replicas that are quality wise sound.


Back to Top