Re: [Pykaraoke-discuss] Show the lyrics on an other monitor

2007-08-20 Thread Kelvin Lawson
Hi Floris,

> I've found that pygame hasn't support for multiple displays so I guess the
> problem have to be solved with something like os.system('DISPLAY=:0.1 ').
> Unfortunately I can't figure out the point where the "database window" opens
> the "lyrics window"

The playlist GUI (pykaroake.py) calls out to MakePlayer() in pykdb.py to 
start the players. This in turn uses either pycdg.py, pykar.py or 
pympg.py depending on the songfile type. All of these eventually make 
use of InitPlayer() in pykmanager.py to initialise pygame if necessary. 
You may find InitPlayer() is a useful place to do something like this.

That said, I don't know whether it is even possible to set the X display 
in this way. I strongly suspect that it won't be possible to have the 
same process utilising two different X displays (one for WxWidgets and 
one for Pygmae), but I don't know what the rules are there with X. It 
might be necessary to spawn a new process to handle the player windows 
rather than run them as a thread within the existing process. It should 
be possible to insert a different interface between the playlist and the 
players such that two separate processes communicate using something 
like a socket. You'd need to implement two-way communication such that 
the playlist can tell the player process to play/pause etc. and when the 
song finishes the player can callback to the playlist to notify it. 
Hopefully the interface will be clean enough such that you can drop in a 
replacement glue layer to handle the interprocess communication

If you're interested in taking this up I'd be happy to provide further 
info on how it all fits together.

Kelvin.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Pykaraoke-discuss mailing list
Pykaraoke-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss


Re: [Pykaraoke-discuss] Show the lyrics on an other monitor

2007-08-13 Thread Floris


Floris schreef:
> Jay R. Ashworth schreef:
>   
>> On Fri, Aug 10, 2007 at 08:56:31PM +0200, Floris wrote:
>>   
>> 
>>> I use pykaraoke for a couple of months now and I like it.
>>> I have only one question and I hope it will be easy to set it up.
>>> Is it possible to show the lyrics window on an other monitor?
>>>
>>> now I use only pycdg and I made a small script that shows the
>>> lyrics on my TV
>>>
>>> (sample of the script)
>>>
>>> DISPLAY=:0.1 pycdg -w 1024 -h 768 --num-channels=2 -t "LOCUS KARAOKE" "$*"
>>>
>>> This works fine but I don't have the playlist and the search option of 
>>> pykaraoke
>>> 
>>>   
>> I suspect that what you want to do is make that DISPLAY modification at
>> the point in the frontend scripting where pycdg *is called*.  Does
>> that make enough sense to you?  (I don't have it unpacked right now,
>> but I could, if you like.
>>
>>   
>> Kelvin: suggestion: the frontend should look for PYKDISPLAY in the
>> environment and furnish it to the player program if found, as $DISPLAY.
>>
>> Cheers,
>> -- jra
>>   
>> 
>
>   
I've found that pygame hasn't support for multiple displays so I guess the
problem have to be solved with something like os.system('DISPLAY=:0.1 ').
Unfortunately I can't figure out the point where the "database window" opens
the "lyrics window"

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Pykaraoke-discuss mailing list
Pykaraoke-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss


Re: [Pykaraoke-discuss] Show the lyrics on an other monitor

2007-08-12 Thread Floris


Jay R. Ashworth schreef:
> On Fri, Aug 10, 2007 at 08:56:31PM +0200, Floris wrote:
>   
>> I use pykaraoke for a couple of months now and I like it.
>> I have only one question and I hope it will be easy to set it up.
>> Is it possible to show the lyrics window on an other monitor?
>>
>> now I use only pycdg and I made a small script that shows the
>> lyrics on my TV
>>
>> (sample of the script)
>>
>> DISPLAY=:0.1 pycdg -w 1024 -h 768 --num-channels=2 -t "LOCUS KARAOKE" "$*"
>>
>> This works fine but I don't have the playlist and the search option of 
>> pykaraoke
>> 
>
> I suspect that what you want to do is make that DISPLAY modification at
> the point in the frontend scripting where pycdg *is called*.  Does
> that make enough sense to you?  (I don't have it unpacked right now,
> but I could, if you like.
>
>   
> Kelvin: suggestion: the frontend should look for PYKDISPLAY in the
> environment and furnish it to the player program if found, as $DISPLAY.
>
> Cheers,
> -- jra
>   


I've never wrote a python script, but the language doesn't seem
that difficult. Nevertheless all the help is welcome.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Pykaraoke-discuss mailing list
Pykaraoke-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss


Re: [Pykaraoke-discuss] Show the lyrics on an other monitor

2007-08-10 Thread Jay R. Ashworth
On Fri, Aug 10, 2007 at 08:56:31PM +0200, Floris wrote:
> I use pykaraoke for a couple of months now and I like it.
> I have only one question and I hope it will be easy to set it up.
> Is it possible to show the lyrics window on an other monitor?
> 
> now I use only pycdg and I made a small script that shows the
> lyrics on my TV
> 
> (sample of the script)
> 
> DISPLAY=:0.1 pycdg -w 1024 -h 768 --num-channels=2 -t "LOCUS KARAOKE" "$*"
> 
> This works fine but I don't have the playlist and the search option of 
> pykaraoke

I suspect that what you want to do is make that DISPLAY modification at
the point in the frontend scripting where pycdg *is called*.  Does
that make enough sense to you?  (I don't have it unpacked right now,
but I could, if you like.

Kelvin: suggestion: the frontend should look for PYKDISPLAY in the
environment and furnish it to the player program if found, as $DISPLAY.

Cheers,
-- jra
-- 
Jay R. Ashworth   Baylink  [EMAIL PROTECTED]
Designer The Things I Think   RFC 2100
Ashworth & Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA  http://photo.imageinc.us +1 727 647 1274

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Pykaraoke-discuss mailing list
Pykaraoke-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss