Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17261 > unrolled thread
| Started by | yeet <y.turgut@gmail.com> |
|---|---|
| First post | 2011-12-15 02:59 -0800 |
| Last post | 2011-12-15 06:40 -0800 |
| Articles | 8 — 6 participants |
Back to article view | Back to comp.lang.python
Screen Control Fullscreen ON/OFF yeet <y.turgut@gmail.com> - 2011-12-15 02:59 -0800
Re: Screen Control Fullscreen ON/OFF yeet <y.turgut@gmail.com> - 2011-12-15 03:12 -0800
Re: Screen Control Fullscreen ON/OFF Nizamov Shawkat <nizamov.shawkat@gmail.com> - 2011-12-15 12:44 +0100
Re: Screen Control Fullscreen ON/OFF Grant Edwards <invalid@invalid.invalid> - 2011-12-15 19:50 +0000
Re: Screen Control Fullscreen ON/OFF Nizamov Shawkat <nizamov.shawkat@gmail.com> - 2011-12-15 13:18 +0100
Re: Screen Control Fullscreen ON/OFF Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-12-15 15:19 +0100
Re: Screen Control Fullscreen ON/OFF Yigit Turgut <y.turgut@gmail.com> - 2011-12-15 08:57 -0800
Re: Screen Control Fullscreen ON/OFF 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-15 06:40 -0800
| From | yeet <y.turgut@gmail.com> |
|---|---|
| Date | 2011-12-15 02:59 -0800 |
| Subject | Screen Control Fullscreen ON/OFF |
| Message-ID | <d9c2e86d-eef1-4c5b-b5e0-d3c67e29368f@q16g2000yqn.googlegroups.com> |
Hi all, I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second) will be input manually which is between 1-40Hz. Any idea where to start ? Can Python perform such fast thing ?
[toc] | [next] | [standalone]
| From | yeet <y.turgut@gmail.com> |
|---|---|
| Date | 2011-12-15 03:12 -0800 |
| Message-ID | <376e5d38-4384-4453-9719-302150827c58@a17g2000yqj.googlegroups.com> |
| In reply to | #17261 |
On Dec 15, 12:59 pm, yeet <y.tur...@gmail.com> wrote: > Hi all, > > I would like to make fullscreen white and fullscreen black using > Python on Linux. With in the specs of the LCD, I want to be able to > display fullscreen white and black approximately at 30Hz. Frequency > (on/off per second) will be input manually which is between 1-40Hz. > Any idea where to start ? Can Python perform such fast thing ? Forgot to mention and sorry for the pollution ; My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ OFF (white/black) thus seems to fit my 1-40Hz range. I am not asking or looking for a fully working code, I just need some directions.
[toc] | [prev] | [next] | [standalone]
| From | Nizamov Shawkat <nizamov.shawkat@gmail.com> |
|---|---|
| Date | 2011-12-15 12:44 +0100 |
| Message-ID | <mailman.3668.1323949489.27778.python-list@python.org> |
| In reply to | #17264 |
>> >> I would like to make fullscreen white and fullscreen black using >> Python on Linux. With in the specs of the LCD, I want to be able to >> display fullscreen white and black approximately at 30Hz. Frequency >> (on/off per second) will be input manually which is between 1-40Hz. >> Any idea where to start ? Can Python perform such fast thing ? > > Forgot to mention and sorry for the pollution ; > > My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ > OFF (white/black) thus seems to fit my 1-40Hz range. I am not asking > or looking for a fully working code, I just need some directions. It depends on whether you want sync to vblank or not. If not, that is pretty easy - use sleep() or something similar. If you have to use sync (screen is always either black or white, never partly black and white) then it is much much more difficult. Actually I do not know of any way to sync to it. Once upon a time I had a P-3/500 linux box with homemade python program that would wait for RTC interrupts (which was set to 8192 Hz frequency) and performed different combinations of ADC/DAC/Digital-IO at required timesteps . It worked really very well and with submillisecond resolution. Hope it helps, S.Nizamov
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2011-12-15 19:50 +0000 |
| Message-ID | <jcdj23$cr7$1@reader1.panix.com> |
| In reply to | #17265 |
On 2011-12-15, Nizamov Shawkat <nizamov.shawkat@gmail.com> wrote:
>>>
>>> I would like to make fullscreen white and fullscreen black using
>>> Python on Linux. With in the specs of the LCD, I want to be able to
>>> display fullscreen white and black approximately at 30Hz. Frequency
>>> (on/off per second) will be input manually which is between 1-40Hz.
>>> Any idea where to start ? Can Python perform such fast thing ?
>>
>> Forgot to mention and sorry for the pollution ;
>>
>> My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/
>> OFF (white/black) thus seems to fit my 1-40Hz range. I am not asking
>> or looking for a fully working code, I just need some directions.
>
>
> It depends on whether you want sync to vblank or not. If not, that is
> pretty easy - use sleep() or something similar. If you have to use
> sync (screen is always either black or white, never partly black and
> white) then it is much much more difficult. Actually I do not know of
> any way to sync to it.
I'm _guessing_ the results won't be acceptible unless you switch
during the veritical blanking period. (_is_ there a vertical blanking
period with a DVI or HDMI output?).
I have vague recollections that I think opengl has methods to do that.
If there is an easy way to do it, it'll probably be using pygame:
http://pygame.org/news.html
If pygame can't do it, try pyopengl:
http://pyopengl.sourceforge.net/
Here's a thread on how to do it on OSX:
http://www.idevgames.com/forums/thread-2974.html
--
Grant Edwards grant.b.edwards Yow! My face is new, my
at license is expired, and I'm
gmail.com under a doctor's care!!!!
[toc] | [prev] | [next] | [standalone]
| From | Nizamov Shawkat <nizamov.shawkat@gmail.com> |
|---|---|
| Date | 2011-12-15 13:18 +0100 |
| Message-ID | <mailman.3669.1323951493.27778.python-list@python.org> |
| In reply to | #17264 |
> It depends on whether you want sync to vblank or not. If not, that is > pretty easy - use sleep() or something similar. If you have to use > sync (screen is always either black or white, never partly black and > white) then it is much much more difficult. Actually I do not know of > any way to sync to it. But you do not have to sync to vblank anyway. So you can turn on vblank sync for the videocard and then you will have either completely black or completely white screen at each single time point, but this will be delayed in regard to what you set in python. Hope this helps, S.Nizamov
[toc] | [prev] | [next] | [standalone]
| From | Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> |
|---|---|
| Date | 2011-12-15 15:19 +0100 |
| Message-ID | <28cpr8-rt.ln1@satorlaser.homedns.org> |
| In reply to | #17264 |
Am 15.12.2011 12:12, schrieb yeet: > My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ > OFF (white/black) thus seems to fit my 1-40Hz range. You might want to ask Santa for a new calculator, as in my book a response time of 2ms would be enough for 250Hz (period = 2 * 2ms). Reminds me of a hack that used a special pattern on a CRT to emit DCF77 signals, reprogramming any suitable radio-controlled clock in range. What are you trying to do, just out of curiosity? (c: Uli
[toc] | [prev] | [next] | [standalone]
| From | Yigit Turgut <y.turgut@gmail.com> |
|---|---|
| Date | 2011-12-15 08:57 -0800 |
| Message-ID | <bd1a7007-54e7-4bc2-9af3-5cfef4ef5c58@z17g2000vbe.googlegroups.com> |
| In reply to | #17274 |
On Dec 15, 4:19 pm, Ulrich Eckhardt <ulrich.eckha...@dominolaser.com> wrote: > Am 15.12.2011 12:12, schrieb yeet: > > > My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ > > OFF (white/black) thus seems to fit my 1-40Hz range. > > You might want to ask Santa for a new calculator, as in my book a > response time of 2ms would be enough for 250Hz (period = 2 * 2ms). > > Reminds me of a hack that used a special pattern on a CRT to emit DCF77 > signals, reprogramming any suitable radio-controlled clock in range. > What are you trying to do, just out of curiosity? > > (c: > > Uli Yes that's correct, 50Hz limit is the limit of NVIDIA CUDA Linux drivers limit. Screen can go higher rates on sucky windows. I am trying to generate a visual stimulus that will be used for fNIR and EEG captures. On Dec 15, 2:18 pm, Nizamov Shawkat <nizamov.shaw...@gmail.com> wrote: > > It depends on whether you want sync to vblank or not. If not, that is > > pretty easy - use sleep() or something similar. If you have to use > > sync (screen is always either black or white, never partly black and > > white) then it is much much more difficult. Actually I do not know of > > any way to sync to it. > > But you do not have to sync to vblank anyway. So you can turn on > vblank sync for the videocard and then you will have either completely > black or completely white screen at each single time point, but this > will be delayed in regard to what you set in python. > > Hope this helps, > S.Nizamov It's not easy to do this basing on time, I think doing per frames is a much better option. It's sounded like a very simple task at first but I realize it's not that easy.Maybe I should write the screen blinker in C or Assembly then call it from Python.
[toc] | [prev] | [next] | [standalone]
| From | 88888 Dihedral <dihedral88888@googlemail.com> |
|---|---|
| Date | 2011-12-15 06:40 -0800 |
| Message-ID | <20668600.306.1323960057492.JavaMail.geo-discussion-forums@pruu23> |
| In reply to | #17261 |
On Thursday, December 15, 2011 6:59:04 PM UTC+8, yeet wrote: > Hi all, > > I would like to make fullscreen white and fullscreen black using > Python on Linux. With in the specs of the LCD, I want to be able to > display fullscreen white and black approximately at 30Hz. Frequency > (on/off per second) will be input manually which is between 1-40Hz. > Any idea where to start ? Can Python perform such fast thing ? Check pygame, pyimg and sdllib and wxpython. Python is a high level language that was not bound to hardware. One of the major strengths of Python is very easy to be supported by programs in other languages, especially in C, Pascal and Fortran. Also programs in Python are easy to debug and maintain.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web