| Hi Art,
The rainbow-daemon is the security system for Sugar/OLPC. It is very
restrictive, so things that usually work on other systems require
certain changes to work on Sugar. Since you are already using python,
I would recommend taking a look at how things are done in TamTam,
which also receives keyboard events and passes them to csound. They
grab the keyboard events in python (from the main Activity subclass):
http://git.sugarlabs.org/projects/tamtam-branch/repos/mainline/blobs/master/TamTamMini.activity/TamTamMini.py#line53
and then pass the to csound via the software bus:
http://git.sugarlabs.org/projects/tamtam-branch/repos/mainline/blobs/master/TamTamMini.activity/Mini/miniTamTamMain.py#line552
Cheers,
Andrés
On Tue, May 5, 2009 at 1:02 PM, Art Hunkins wrote:
> There is definately a problem with sensekey being run in Sugar. Apparently
> it has to do with X windows, as this is what the log file indicates.
>
> The attached test csd runs fine from the console on the OLPC, including
> printing out the ASCII characters as struck on the keyboard (which is the
> expected behavior).
>
> In Sugar, however, the run aborts immediately; the log file carries on about
> an X window system error. (The other attached file is the simplest possible
> Python GUI.)
>
> When kasc is initialized to 0, and this line substituted for sensekey (only
> the single line is changed, as indicated in the csd), the 10-second file
> runs fine - except, of course, there is no alternation of pitches when
> pressing ASCII keys. Obviously the problem involves sensekey and X windows.
>
> Can one of the developers investigate (Victor, Brian, Andres, or anyone else
> involved with OLPCsound), or indicate where I should turn?
>
> I've 4 csd's in my current OLPC Activity project; the two using MIDI
> controllers are working fine in Sugar, the two using ASCII keystrokes as a
> control mechanism (through sensekey) are hanging me up completely.
>
> The two attached files are intended to be inserted into Victor's Wave
> activity - in the Waves.activity directory. The attached waves.py replaces
> Victor's of the same name. As mentioned above, the sensekey.csd runs fine
> from the console and command line: csound sensekey.csd (from wherever
> sensekey.csd is located).
>
> I really hope this sensekey issue can be sorted, and made to work in Sugar.
> 50% of my project depends on it.
>
> As always, I much appreciate the help.
>
> Art Hunkins
>
> ----- Original Message ----- From: "Art Hunkins"
> To:
> Sent: Friday, May 01, 2009 9:57 PM
> Subject: Re: [Csnd] sensekey and Sugar (OLPC)
>
>
>> A followup:
>>
>> A similar sensekey/ASCII-based csd issues two slightly different error
>> messages (with the same run abort):
>>
>> rainbow-daemon: Fatal IO error 0 (Success) on X server :0.0
>> or
>> rainbow-daemon: Fatal IO error 11 (Resource temporarily unavailable) on X
>> server :0.0
>>
>> Sometimes the run returns to Sugar, sometimes not.
>>
>> The scripting seems to be right, and nearly identical for the two csd's.
>>
>> Art Hunkins
>>
>> ----- Original Message ----- From: "Art Hunkins"
>> To:
>> Sent: Friday, May 01, 2009 9:28 PM
>> Subject: [Csnd] sensekey and Sugar (OLPC)
>>
>>
>>> I have a csd that runs impeccably from the XO console, but fails in Sugar
>>> (a Python script is running as an XO project; I've been making progress).
>>> I'm fairly certain the problem is sensekey, or the way in which Sugar is (or
>>> isn't) dealing with ASCII keystrokes.
>>>
>>> The Sugar error occurs precisely at the first ASCII keystroke (prior to
>>> that, the run is fine). With the keystroke, the run aborts and exits to
>>> Sugar.
>>>
>>> The log shows the error message to be:
>>> rainbow-daemon: Fatal IO error 12 (Cannot allocate memory) on X server
>>> :0.0
>>> then a bit later:
>>> Csound tidy up: Segmentation fault
>>>
>>> What do I need to change?
>>>
>>> Art Hunkins
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
--
Andrés
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |