Re: [pygame] Re: p4a development activity?

2011-12-02 Thread Sean Wolfe
Hey Tom, do you think it might be possible to post this on the ps4a
forum? There are a few of us posting around these days and I think
some of them aren't on the pygame list.


On Thu, Dec 1, 2011 at 3:51 PM, Tom Rothamel  wrote:
> Pgs4a development is limited by several factors.
>
> The biggest is that PGS4A is using an unofficial port of SDL to Android.
> There's a version of SDL 1.3 for Android, but SDL 1.3 hasn't been released
> yet. I also don't know if Pygame runs on SDL 1.3 - I don't think it does. I
> don't want to get into a situation where I'm spending a lot of time
> modifying SDL, only to have to do it again when the new version comes out.
>
> Right now, my plan is for the next release of pgs4a to sync up with the next
> release of Ren'Py. The focus will be on making it easier to set up a
> development environment to create packages - that will be an outgrowth of
> Ren'Py's new launcher tool.



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Sean Wolfe
I did a scrape through the pygame.org pages> I made changes on the following:

http://www.pygame.org/wiki/FrequentlyAskedQuestions
http://www.pygame.org/wiki/CookBook
http://www.pygame.org/wiki/resources
http://www.pygame.org/wiki/cvs
http://pygame.org/wiki/about

The last two were particularly nasty. The /wiki/about page, under the
More Information section, I'm not 100% sure about ... are we missing
some links or is someo f that spam?

Anyhow ... we have less now at least... I scraped probably 100 of
those little b*stards.


On Fri, Dec 2, 2011 at 2:34 PM, Sean Wolfe  wrote:
> Let me parse everything and I'll take a look. Right now I don't have a
> problem working through the website interface.
>
>
> On Fri, Dec 2, 2011 at 2:24 PM, René Dudfield  wrote:
>> Hi,
>>
>> If you want to start at the top, I can start at the bottom.
>>     http://www.pygame.org/wiki/map.php
>>
>> Also, do you have a bitbucket user name?  I'll give you permission to the hg
>> repository... otherwise you would have to do all the changes through the
>> web.  So if you just want to do it through the website, that is fine too.
>>
>>
>> cheers,
>>
>>
>>
>> On Fri, Dec 2, 2011 at 6:17 PM, René Dudfield  wrote:
>>>
>>> cool, thanks :)
>>>
>>> Here is the wiki map of all the pages:
>>>     http://www.pygame.org/wiki/map.php
>>>
>>> I wrote "Wiki migration work in progress...
>>> https://bitbucket.org/pygame/pygame/wiki/patchesandbugs " on the page... but
>>> I guess we don't need to do that.  That's just extra work.
>>>
>>> I find it easy to go to the history page, find an old version without
>>> spam, and click the revert link.
>>>
>>>
>>> hg clone https://bitbucket.org/pygame/pygame/wiki
>>>
>>>
>>> There is a script in there wiki2bitbucket.py which downloads the pygame
>>> wiki source, then converts it to creole.
>>>
>>> python wiki2bitbucket.py patchesandbugs
>>>
>>> That creates a patchesandbugs.wiki file.   Which you then need to do a:
>>>     hg add patchesandbugs.wiki && hg commit patchesandbugs.wiki -m
>>> "importing old wiki" && hg push
>>>
>>>
>>>
>>> Let me know if that is clear or if it works for you?
>>>
>>>
>>> cheers,
>>>
>>>
>>> On Fri, Dec 2, 2011 at 6:04 PM, Sean Wolfe  wrote:

 I'd like to help with the cleanup if I can ... I just dug up my
 userinfo and logged into the site.

 Do I need to coordinate anything with anybody?

 On Fri, Dec 2, 2011 at 1:58 PM, René Dudfield  wrote:
 > Hi,
 >
 > The bitbucket wiki has anti spam measures, so I hope those will work ok
 > once
 > the migration is complete.
 >
 > cheers,
 >
 >
 > On Fri, Dec 2, 2011 at 5:56 PM, Sean Wolfe  wrote:
 >>
 >> let's do it! If that's all it takes, then we can implement it and
 >> manually clean out all the crap. I'm happy to help manually clean if
 >> we have a reasonable chance of it not happening all the time.
 >>
 >>
 >> On Fri, Dec 2, 2011 at 1:54 PM, James Paige 
 >> wrote:
 >> > I have suggested this before, but it bears repeating. Anonymous
 >> > users,
 >> > and new users should just not be allowed to make any edit that
 >> > contains
 >> > a url.
 >> >
 >> > ---
 >> > James Paige
 >> >
 >> > On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
 >> >>    The wiki is full of them. I tried in the past to edit those, but
 >> >> a
 >> >> few
 >> >>    days later the spammers re edit the page.
 >> >>
 >> >>    El dic 2, 2011 11:49 a.m., "Sean Wolfe" 
 >> >> escribio:
 >> >>
 >> >>      Hey I was just poking around the pygame.org site and found
 >> >> some
 >> >> spam
 >> >>      hackness... looks like this page has a lot of hidden links to
 >> >> jokes
 >> >>      pages, plus some 'diet pills' links etc etc.
 >> >>
 >> >>      http://pygame.org/wiki/patchesandbugs
 >> >>
 >> >>      aach!
 >> >>
 >> >>      --
 >> >>      A musician must make music, an artist must paint, a poet must
 >> >> write,
 >> >>      if he is to be ultimately at peace with himself.
 >> >>      - Abraham Maslow
 >>
 >>
 >>
 >> --
 >> A musician must make music, an artist must paint, a poet must write,
 >> if he is to be ultimately at peace with himself.
 >> - Abraham Maslow
 >
 >



 --
 A musician must make music, an artist must paint, a poet must write,
 if he is to be ultimately at peace with himself.
 - Abraham Maslow
>>>
>>>
>>
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Alec Bennett
I think it would depend on what sort of look and feel you're going for.
Pygame would probably be great for making something simple and highly
graphical, like a bunch of graphical buttons.

But if you want something more complicated than that (menubars, toolbars,
child windows, even groups of buttons, etc.), or something that
automatically adjusts to the look and feel of the OS its running on, you
probably want wxPython. I personally think its worthwhile to learn to write
wxPython guis directly, though there is a learning curve. But lots of
people say good things about Boa Constructor and similar packages too.




On Fri, Dec 2, 2011 at 1:28 PM, Zack Baker  wrote:

> I think tkinter is great but it's not OOP at all so of that's what you
> after I'd hit up wx
>
> -Zack
>
>
> On Dec 2, 2011, at 4:14 PM, Sean Wolfe  wrote:
>
> > also tkinter right?
> >
> > On Fri, Dec 2, 2011 at 5:45 PM, Ryan Hope  wrote:
> >> PySide + QT is really nice too. But more back to the point of staying
> >> within pygame. A simple widget set for PyGame would be quite nice.
> >>
> >> On Fri, Dec 2, 2011 at 2:02 PM, Ian Mallett 
> wrote:
> >>> You can use wxPython, if you like learning curves and nice graphics.
> >>
> >>
> >>
> >> --
> >> Ryan Hope, M.S.
> >> CogWorks Lab
> >> Department of Cognitive Science
> >> Rensselaer Polytechnic Institute
> >
> >
> >
> > --
> > A musician must make music, an artist must paint, a poet must write,
> > if he is to be ultimately at peace with himself.
> > - Abraham Maslow
>


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Zack Baker
I think tkinter is great but it's not OOP at all so of that's what you after 
I'd hit up wx

-Zack


On Dec 2, 2011, at 4:14 PM, Sean Wolfe  wrote:

> also tkinter right?
> 
> On Fri, Dec 2, 2011 at 5:45 PM, Ryan Hope  wrote:
>> PySide + QT is really nice too. But more back to the point of staying
>> within pygame. A simple widget set for PyGame would be quite nice.
>> 
>> On Fri, Dec 2, 2011 at 2:02 PM, Ian Mallett  wrote:
>>> You can use wxPython, if you like learning curves and nice graphics.
>> 
>> 
>> 
>> --
>> Ryan Hope, M.S.
>> CogWorks Lab
>> Department of Cognitive Science
>> Rensselaer Polytechnic Institute
> 
> 
> 
> -- 
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow


Re: [pygame] way to control window startup position?

2011-12-02 Thread Sean Wolfe
sweet thanks Ian =)

On Fri, Dec 2, 2011 at 6:21 PM, Ian Mallett  wrote:
> Look at the wiki FAQ:
> os.environ['SDL_VIDEO_WINDOW_POS'] = str(position)
> and
> os.environ['SDL_VIDEO_CENTERED'] = '1'
>
> Ian



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] way to control window startup position?

2011-12-02 Thread Ian Mallett
Look at the wiki FAQ :
os.environ['SDL_VIDEO_WINDOW_POS'] = str(position)
and
os.environ['SDL_VIDEO_CENTERED'] = '1'

Ian


[pygame] way to control window startup position?

2011-12-02 Thread Sean Wolfe
Do we have a way of specifiying where on the desktop the pygame screen spawns?

I'm digging through pygame display docs but set_mode() doesn't seem to
have what I'm looking for ...


-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Sean Wolfe
also tkinter right?

On Fri, Dec 2, 2011 at 5:45 PM, Ryan Hope  wrote:
> PySide + QT is really nice too. But more back to the point of staying
> within pygame. A simple widget set for PyGame would be quite nice.
>
> On Fri, Dec 2, 2011 at 2:02 PM, Ian Mallett  wrote:
>> You can use wxPython, if you like learning curves and nice graphics.
>
>
>
> --
> Ryan Hope, M.S.
> CogWorks Lab
> Department of Cognitive Science
> Rensselaer Polytechnic Institute



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Ryan Hope
PySide + QT is really nice too. But more back to the point of staying
within pygame. A simple widget set for PyGame would be quite nice.

On Fri, Dec 2, 2011 at 2:02 PM, Ian Mallett  wrote:
> You can use wxPython, if you like learning curves and nice graphics.



-- 
Ryan Hope, M.S.
CogWorks Lab
Department of Cognitive Science
Rensselaer Polytechnic Institute


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Ian Mallett
You can use wxPython, if you like learning curves and nice graphics.


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Sean Wolfe
Hey Anthony, you should be able to to this combining surfaces, mouse,
events and the rect.collidepos() method to see what's been clicked.

The beginning tutorials should get you started
http://pygame.org/wiki/tutorials

If you're new to python, the python.org website has great stuff and I
also recommend this site:
http://www.swaroopch.com/notes/Python

Is that what you had in mind?




On Fri, Dec 2, 2011 at 3:02 PM, Nick Arnoeyts  wrote:
> I don't know how you would do this in pygame, but when I used Slick I did it
> by drawing rounded rectangles as windows.
> Try to be creative using the primitives pygame gives.
>
> 2011/12/2 Anthony Palomba 
>>
>> Hy folks,
>>
>> I want to use pygame to create a simple interface. Ideally I want to be
>> able to create buttons, and handle key as well as mouse input.
>>
>> Are there examples some where that implement something like this?
>> Any advice would be welcome.
>>
>>
>>
>> Thanks,
>> Anthony
>
>



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Using pygame to create interface...

2011-12-02 Thread Nick Arnoeyts
I don't know how you would do this in pygame, but when I used Slick I did
it by drawing rounded rectangles as windows.
Try to be creative using the primitives pygame gives.

2011/12/2 Anthony Palomba 

> Hy folks,
>
> I want to use pygame to create a simple interface. Ideally I want to be
> able to create buttons, and handle key as well as mouse input.
>
> Are there examples some where that implement something like this?
> Any advice would be welcome.
>
>
>
> Thanks,
> Anthony
>


[pygame] Using pygame to create interface...

2011-12-02 Thread Anthony Palomba
Hy folks,

I want to use pygame to create a simple interface. Ideally I want to be
able to create buttons, and handle key as well as mouse input.

Are there examples some where that implement something like this?
Any advice would be welcome.



Thanks,
Anthony


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Sean Wolfe
Let me parse everything and I'll take a look. Right now I don't have a
problem working through the website interface.


On Fri, Dec 2, 2011 at 2:24 PM, René Dudfield  wrote:
> Hi,
>
> If you want to start at the top, I can start at the bottom.
>     http://www.pygame.org/wiki/map.php
>
> Also, do you have a bitbucket user name?  I'll give you permission to the hg
> repository... otherwise you would have to do all the changes through the
> web.  So if you just want to do it through the website, that is fine too.
>
>
> cheers,
>
>
>
> On Fri, Dec 2, 2011 at 6:17 PM, René Dudfield  wrote:
>>
>> cool, thanks :)
>>
>> Here is the wiki map of all the pages:
>>     http://www.pygame.org/wiki/map.php
>>
>> I wrote "Wiki migration work in progress...
>> https://bitbucket.org/pygame/pygame/wiki/patchesandbugs " on the page... but
>> I guess we don't need to do that.  That's just extra work.
>>
>> I find it easy to go to the history page, find an old version without
>> spam, and click the revert link.
>>
>>
>> hg clone https://bitbucket.org/pygame/pygame/wiki
>>
>>
>> There is a script in there wiki2bitbucket.py which downloads the pygame
>> wiki source, then converts it to creole.
>>
>> python wiki2bitbucket.py patchesandbugs
>>
>> That creates a patchesandbugs.wiki file.   Which you then need to do a:
>>     hg add patchesandbugs.wiki && hg commit patchesandbugs.wiki -m
>> "importing old wiki" && hg push
>>
>>
>>
>> Let me know if that is clear or if it works for you?
>>
>>
>> cheers,
>>
>>
>> On Fri, Dec 2, 2011 at 6:04 PM, Sean Wolfe  wrote:
>>>
>>> I'd like to help with the cleanup if I can ... I just dug up my
>>> userinfo and logged into the site.
>>>
>>> Do I need to coordinate anything with anybody?
>>>
>>> On Fri, Dec 2, 2011 at 1:58 PM, René Dudfield  wrote:
>>> > Hi,
>>> >
>>> > The bitbucket wiki has anti spam measures, so I hope those will work ok
>>> > once
>>> > the migration is complete.
>>> >
>>> > cheers,
>>> >
>>> >
>>> > On Fri, Dec 2, 2011 at 5:56 PM, Sean Wolfe  wrote:
>>> >>
>>> >> let's do it! If that's all it takes, then we can implement it and
>>> >> manually clean out all the crap. I'm happy to help manually clean if
>>> >> we have a reasonable chance of it not happening all the time.
>>> >>
>>> >>
>>> >> On Fri, Dec 2, 2011 at 1:54 PM, James Paige 
>>> >> wrote:
>>> >> > I have suggested this before, but it bears repeating. Anonymous
>>> >> > users,
>>> >> > and new users should just not be allowed to make any edit that
>>> >> > contains
>>> >> > a url.
>>> >> >
>>> >> > ---
>>> >> > James Paige
>>> >> >
>>> >> > On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
>>> >> >>    The wiki is full of them. I tried in the past to edit those, but
>>> >> >> a
>>> >> >> few
>>> >> >>    days later the spammers re edit the page.
>>> >> >>
>>> >> >>    El dic 2, 2011 11:49 a.m., "Sean Wolfe" 
>>> >> >> escribio:
>>> >> >>
>>> >> >>      Hey I was just poking around the pygame.org site and found
>>> >> >> some
>>> >> >> spam
>>> >> >>      hackness... looks like this page has a lot of hidden links to
>>> >> >> jokes
>>> >> >>      pages, plus some 'diet pills' links etc etc.
>>> >> >>
>>> >> >>      http://pygame.org/wiki/patchesandbugs
>>> >> >>
>>> >> >>      aach!
>>> >> >>
>>> >> >>      --
>>> >> >>      A musician must make music, an artist must paint, a poet must
>>> >> >> write,
>>> >> >>      if he is to be ultimately at peace with himself.
>>> >> >>      - Abraham Maslow
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> A musician must make music, an artist must paint, a poet must write,
>>> >> if he is to be ultimately at peace with himself.
>>> >> - Abraham Maslow
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> A musician must make music, an artist must paint, a poet must write,
>>> if he is to be ultimately at peace with himself.
>>> - Abraham Maslow
>>
>>
>



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread René Dudfield
Hi,

If you want to start at the top, I can start at the bottom.
http://www.pygame.org/wiki/map.php

Also, do you have a bitbucket user name?  I'll give you permission to the
hg repository... otherwise you would have to do all the changes through the
web.  So if you just want to do it through the website, that is fine too.


cheers,


On Fri, Dec 2, 2011 at 6:17 PM, René Dudfield  wrote:

> cool, thanks :)
>
> Here is the wiki map of all the pages:
> http://www.pygame.org/wiki/map.php
>
> I wrote "Wiki migration work in progress...
> https://bitbucket.org/pygame/pygame/wiki/patchesandbugs " on the page...
> but I guess we don't need to do that.  That's just extra work.
>
> I find it easy to go to the history page, find an old version without
> spam, and click the revert link.
>
>
> hg clone https://bitbucket.org/pygame/pygame/wiki
>
>
> There is a script in there wiki2bitbucket.py which downloads the pygame
> wiki source, then converts it to creole.
>
> python wiki2bitbucket.py patchesandbugs
>
> That creates a patchesandbugs.wiki file.   Which you then need to do a:
> hg add patchesandbugs.wiki && hg commit patchesandbugs.wiki -m
> "importing old wiki" && hg push
>
>
>
> Let me know if that is clear or if it works for you?
>
>
> cheers,
>
>
> On Fri, Dec 2, 2011 at 6:04 PM, Sean Wolfe  wrote:
>
>> I'd like to help with the cleanup if I can ... I just dug up my
>> userinfo and logged into the site.
>>
>> Do I need to coordinate anything with anybody?
>>
>> On Fri, Dec 2, 2011 at 1:58 PM, René Dudfield  wrote:
>> > Hi,
>> >
>> > The bitbucket wiki has anti spam measures, so I hope those will work ok
>> once
>> > the migration is complete.
>> >
>> > cheers,
>> >
>> >
>> > On Fri, Dec 2, 2011 at 5:56 PM, Sean Wolfe  wrote:
>> >>
>> >> let's do it! If that's all it takes, then we can implement it and
>> >> manually clean out all the crap. I'm happy to help manually clean if
>> >> we have a reasonable chance of it not happening all the time.
>> >>
>> >>
>> >> On Fri, Dec 2, 2011 at 1:54 PM, James Paige 
>> >> wrote:
>> >> > I have suggested this before, but it bears repeating. Anonymous
>> users,
>> >> > and new users should just not be allowed to make any edit that
>> contains
>> >> > a url.
>> >> >
>> >> > ---
>> >> > James Paige
>> >> >
>> >> > On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
>> >> >>The wiki is full of them. I tried in the past to edit those, but
>> a
>> >> >> few
>> >> >>days later the spammers re edit the page.
>> >> >>
>> >> >>El dic 2, 2011 11:49 a.m., "Sean Wolfe" 
>> >> >> escribio:
>> >> >>
>> >> >>  Hey I was just poking around the pygame.org site and found
>> some
>> >> >> spam
>> >> >>  hackness... looks like this page has a lot of hidden links to
>> >> >> jokes
>> >> >>  pages, plus some 'diet pills' links etc etc.
>> >> >>
>> >> >>  http://pygame.org/wiki/patchesandbugs
>> >> >>
>> >> >>  aach!
>> >> >>
>> >> >>  --
>> >> >>  A musician must make music, an artist must paint, a poet must
>> >> >> write,
>> >> >>  if he is to be ultimately at peace with himself.
>> >> >>  - Abraham Maslow
>> >>
>> >>
>> >>
>> >> --
>> >> A musician must make music, an artist must paint, a poet must write,
>> >> if he is to be ultimately at peace with himself.
>> >> - Abraham Maslow
>> >
>> >
>>
>>
>>
>> --
>> A musician must make music, an artist must paint, a poet must write,
>> if he is to be ultimately at peace with himself.
>> - Abraham Maslow
>>
>
>


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread René Dudfield
cool, thanks :)

Here is the wiki map of all the pages:
http://www.pygame.org/wiki/map.php

I wrote "Wiki migration work in progress...
https://bitbucket.org/pygame/pygame/wiki/patchesandbugs " on the page...
but I guess we don't need to do that.  That's just extra work.

I find it easy to go to the history page, find an old version without spam,
and click the revert link.


hg clone https://bitbucket.org/pygame/pygame/wiki


There is a script in there wiki2bitbucket.py which downloads the pygame
wiki source, then converts it to creole.

python wiki2bitbucket.py patchesandbugs

That creates a patchesandbugs.wiki file.   Which you then need to do a:
hg add patchesandbugs.wiki && hg commit patchesandbugs.wiki -m
"importing old wiki" && hg push



Let me know if that is clear or if it works for you?


cheers,

On Fri, Dec 2, 2011 at 6:04 PM, Sean Wolfe  wrote:

> I'd like to help with the cleanup if I can ... I just dug up my
> userinfo and logged into the site.
>
> Do I need to coordinate anything with anybody?
>
> On Fri, Dec 2, 2011 at 1:58 PM, René Dudfield  wrote:
> > Hi,
> >
> > The bitbucket wiki has anti spam measures, so I hope those will work ok
> once
> > the migration is complete.
> >
> > cheers,
> >
> >
> > On Fri, Dec 2, 2011 at 5:56 PM, Sean Wolfe  wrote:
> >>
> >> let's do it! If that's all it takes, then we can implement it and
> >> manually clean out all the crap. I'm happy to help manually clean if
> >> we have a reasonable chance of it not happening all the time.
> >>
> >>
> >> On Fri, Dec 2, 2011 at 1:54 PM, James Paige 
> >> wrote:
> >> > I have suggested this before, but it bears repeating. Anonymous users,
> >> > and new users should just not be allowed to make any edit that
> contains
> >> > a url.
> >> >
> >> > ---
> >> > James Paige
> >> >
> >> > On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
> >> >>The wiki is full of them. I tried in the past to edit those, but a
> >> >> few
> >> >>days later the spammers re edit the page.
> >> >>
> >> >>El dic 2, 2011 11:49 a.m., "Sean Wolfe" 
> >> >> escribio:
> >> >>
> >> >>  Hey I was just poking around the pygame.org site and found some
> >> >> spam
> >> >>  hackness... looks like this page has a lot of hidden links to
> >> >> jokes
> >> >>  pages, plus some 'diet pills' links etc etc.
> >> >>
> >> >>  http://pygame.org/wiki/patchesandbugs
> >> >>
> >> >>  aach!
> >> >>
> >> >>  --
> >> >>  A musician must make music, an artist must paint, a poet must
> >> >> write,
> >> >>  if he is to be ultimately at peace with himself.
> >> >>  - Abraham Maslow
> >>
> >>
> >>
> >> --
> >> A musician must make music, an artist must paint, a poet must write,
> >> if he is to be ultimately at peace with himself.
> >> - Abraham Maslow
> >
> >
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow
>


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Sean Wolfe
I'd like to help with the cleanup if I can ... I just dug up my
userinfo and logged into the site.

Do I need to coordinate anything with anybody?

On Fri, Dec 2, 2011 at 1:58 PM, René Dudfield  wrote:
> Hi,
>
> The bitbucket wiki has anti spam measures, so I hope those will work ok once
> the migration is complete.
>
> cheers,
>
>
> On Fri, Dec 2, 2011 at 5:56 PM, Sean Wolfe  wrote:
>>
>> let's do it! If that's all it takes, then we can implement it and
>> manually clean out all the crap. I'm happy to help manually clean if
>> we have a reasonable chance of it not happening all the time.
>>
>>
>> On Fri, Dec 2, 2011 at 1:54 PM, James Paige 
>> wrote:
>> > I have suggested this before, but it bears repeating. Anonymous users,
>> > and new users should just not be allowed to make any edit that contains
>> > a url.
>> >
>> > ---
>> > James Paige
>> >
>> > On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
>> >>    The wiki is full of them. I tried in the past to edit those, but a
>> >> few
>> >>    days later the spammers re edit the page.
>> >>
>> >>    El dic 2, 2011 11:49 a.m., "Sean Wolfe" 
>> >> escribio:
>> >>
>> >>      Hey I was just poking around the pygame.org site and found some
>> >> spam
>> >>      hackness... looks like this page has a lot of hidden links to
>> >> jokes
>> >>      pages, plus some 'diet pills' links etc etc.
>> >>
>> >>      http://pygame.org/wiki/patchesandbugs
>> >>
>> >>      aach!
>> >>
>> >>      --
>> >>      A musician must make music, an artist must paint, a poet must
>> >> write,
>> >>      if he is to be ultimately at peace with himself.
>> >>      - Abraham Maslow
>>
>>
>>
>> --
>> A musician must make music, an artist must paint, a poet must write,
>> if he is to be ultimately at peace with himself.
>> - Abraham Maslow
>
>



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread René Dudfield
Hi,

The bitbucket wiki has anti spam measures, so I hope those will work ok
once the migration is complete.

cheers,

On Fri, Dec 2, 2011 at 5:56 PM, Sean Wolfe  wrote:

> let's do it! If that's all it takes, then we can implement it and
> manually clean out all the crap. I'm happy to help manually clean if
> we have a reasonable chance of it not happening all the time.
>
>
> On Fri, Dec 2, 2011 at 1:54 PM, James Paige 
> wrote:
> > I have suggested this before, but it bears repeating. Anonymous users,
> > and new users should just not be allowed to make any edit that contains
> > a url.
> >
> > ---
> > James Paige
> >
> > On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
> >>The wiki is full of them. I tried in the past to edit those, but a
> few
> >>days later the spammers re edit the page.
> >>
> >>El dic 2, 2011 11:49 a.m., "Sean Wolfe" 
> escribio:
> >>
> >>  Hey I was just poking around the pygame.org site and found some
> spam
> >>  hackness... looks like this page has a lot of hidden links to jokes
> >>  pages, plus some 'diet pills' links etc etc.
> >>
> >>  http://pygame.org/wiki/patchesandbugs
> >>
> >>  aach!
> >>
> >>  --
> >>  A musician must make music, an artist must paint, a poet must
> write,
> >>  if he is to be ultimately at peace with himself.
> >>  - Abraham Maslow
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow
>


Re: [pygame] setting + modifying a variable for use across the entire application

2011-12-02 Thread Sean Wolfe
ah hold on I misunderstood. I thought mutated was a python keyword or
some reserved function as in __dir__ or something.

But no, you're just creating a new piece of the module.

Sheot why didn't I think of that ...

On Fri, Dec 2, 2011 at 1:22 PM, Sean Wolfe  wrote:
> ooh 'mutated' ?? that is cool man.
>
> On Fri, Dec 2, 2011 at 1:16 PM, René Dudfield  wrote:
>> Arg... one more time with bug fixed.
>>
>>
>>
>> # config.py
>> someconfigvar = "hello"
>>
>>
>> #Then in each module you can just do...
>>
>>
>> # file1.py
>> import config
>> config.mutated = 1
>>
>>
>> #file2.py
>> import config
>> x = config.mutated
>>
>>
>> #file3.py
>> import file1
>> import file2
>>
>> print (file2.x) # should print 1
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread René Dudfield
Hi,


I'm moving wiki pages to the bitbucket wiki, and am migrating wiki pages
over to start with.

The new wiki takes creole markup, and I've asked the bitbucket people if
they will support more formats... but they said they have no plans to... so
the html that we have needs to be moved into creole.

Here's the patches and bugs page on the bitbucket wiki...
https://bitbucket.org/pygame/pygame/wiki/patchesandbugs


Below is the little script I made to help with the conversion.

I need to go through all the pages and make sure they are spam free, and
then do the conversion.  However, then I need to check each page to make
sure it converts ok and has no spam.

The final step is to redo the website pages so that it pulls the data from
the bitbucket hg wiki, and then renders the page.  Also the edit buttons
will go to the bit bucket page.




# pip install python-creole
# pip install BeautifulSoup

from creole import html2creole
from BeautifulSoup import BeautifulSoup
import urllib

pages = ["patchesandbugs"]
for page in pages:
url = "http://www.pygame.org/wiki/%s?action=source"; % page
html = urllib.urlopen(url).read()
creole_version = html2creole(unicode(BeautifulSoup(html)))
f = open("%s.wiki" % page, "w")
f.write(creole_version)
f.close()


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Sean Wolfe
let's do it! If that's all it takes, then we can implement it and
manually clean out all the crap. I'm happy to help manually clean if
we have a reasonable chance of it not happening all the time.


On Fri, Dec 2, 2011 at 1:54 PM, James Paige  wrote:
> I have suggested this before, but it bears repeating. Anonymous users,
> and new users should just not be allowed to make any edit that contains
> a url.
>
> ---
> James Paige
>
> On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
>>    The wiki is full of them. I tried in the past to edit those, but a few
>>    days later the spammers re edit the page.
>>
>>    El dic 2, 2011 11:49 a.m., "Sean Wolfe"  escribio:
>>
>>      Hey I was just poking around the pygame.org site and found some spam
>>      hackness... looks like this page has a lot of hidden links to jokes
>>      pages, plus some 'diet pills' links etc etc.
>>
>>      http://pygame.org/wiki/patchesandbugs
>>
>>      aach!
>>
>>      --
>>      A musician must make music, an artist must paint, a poet must write,
>>      if he is to be ultimately at peace with himself.
>>      - Abraham Maslow



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread James Paige
I have suggested this before, but it bears repeating. Anonymous users, 
and new users should just not be allowed to make any edit that contains 
a url.

---
James Paige

On Fri, Dec 02, 2011 at 11:56:01AM -0430, Ciro Duran wrote:
>The wiki is full of them. I tried in the past to edit those, but a few
>days later the spammers re edit the page.
> 
>El dic 2, 2011 11:49 a.m., "Sean Wolfe"  escribio:
> 
>  Hey I was just poking around the pygame.org site and found some spam
>  hackness... looks like this page has a lot of hidden links to jokes
>  pages, plus some 'diet pills' links etc etc.
> 
>  http://pygame.org/wiki/patchesandbugs
> 
>  aach!
> 
>  --
>  A musician must make music, an artist must paint, a poet must write,
>  if he is to be ultimately at peace with himself.
>  - Abraham Maslow


Re: [pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Ciro Duran
The wiki is full of them. I tried in the past to edit those, but a few days
later the spammers re edit the page.
El dic 2, 2011 11:49 a.m., "Sean Wolfe"  escribió:

> Hey I was just poking around the pygame.org site and found some spam
> hackness... looks like this page has a lot of hidden links to jokes
> pages, plus some 'diet pills' links etc etc.
>
> http://pygame.org/wiki/patchesandbugs
>
> aach!
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow
>


[pygame] Re: spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Sean Wolfe
Sorry I meant to say, is there anything we/I can do to help?


On Fri, Dec 2, 2011 at 1:19 PM, Sean Wolfe  wrote:
> Hey I was just poking around the pygame.org site and found some spam
> hackness... looks like this page has a lot of hidden links to jokes
> pages, plus some 'diet pills' links etc etc.
>
> http://pygame.org/wiki/patchesandbugs
>
> aach!
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] setting + modifying a variable for use across the entire application

2011-12-02 Thread Sean Wolfe
ooh 'mutated' ?? that is cool man.

On Fri, Dec 2, 2011 at 1:16 PM, René Dudfield  wrote:
> Arg... one more time with bug fixed.
>
>
>
> # config.py
> someconfigvar = "hello"
>
>
> #Then in each module you can just do...
>
>
> # file1.py
> import config
> config.mutated = 1
>
>
> #file2.py
> import config
> x = config.mutated
>
>
> #file3.py
> import file1
> import file2
>
> print (file2.x) # should print 1



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


[pygame] spammity spam on /wiki/patchesandbugs

2011-12-02 Thread Sean Wolfe
Hey I was just poking around the pygame.org site and found some spam
hackness... looks like this page has a lot of hidden links to jokes
pages, plus some 'diet pills' links etc etc.

http://pygame.org/wiki/patchesandbugs

aach!



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] setting + modifying a variable for use across the entire application

2011-12-02 Thread René Dudfield
Arg... one more time with bug fixed.



# config.py
someconfigvar = "hello"


#Then in each module you can just do...

# file1.py
import config
config.mutated = 1


#file2.py
import config
x = config.mutated


#file3.py
import file1
import file2

print (file2.x) # should print 1


Re: [pygame] setting + modifying a variable for use across the entire application

2011-12-02 Thread René Dudfield
Yeah, just putting it in a module is easy enough.

filename: config.py

Then in each module you can just do...

# file1.py
import config
config.mutated = 1


#file2.py
import config
x = config.mutated


#file3.py
import file1
import file2

print (file2.mutated) # should print 1





On Fri, Dec 2, 2011 at 4:15 PM, Sean Wolfe  wrote:

> Hey everybody,
>
> Upon initialization I'd like to set an assets path, which will be
> different depending on platform. I'd like to set it one time upon
> startup, and then have every module import it automatically with the
> changed value. However since modules are loaded once and persisted in
> their original state, I can't get the new value in the new module,
> even if I reload(settings) .
>
> The best option I can think of is actually creating a new module as a
> new file, then importing that new module in every subsequent piece
> that needs it. But I was hoping to do something a little more elegant
> than that. Do we have any sort of application-level variables which
> are muteable? Like an application-level memory space?
>
>
> --
> main.py:
> import settings
>
> if android:
>settings.assets = './assets'
> else:
>settings.assets = 'c:/my/sources/in/development/bla/bla'
>
>
> then in a future module something like this:
>
> --
> gameloop.py:
> import settings
>
> ASSETS_DIRECTORY = settings.assets
> player_img = pygame.image.load(ASSETS_DIRECTORY + 'player.png')
>
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow
>


Re: [pygame] Re: p4a development activity?

2011-12-02 Thread René Dudfield
Hi,

pygame currently does not support SDL 1.3... since it still is not finished.

I have started planning a port though, and maybe it's time to start the
work.  Maybe a rough port could be done quickly... but a good port should
support both SDL 1.2 and 1.3 if possible... since SDL 1.2 is going to be
around for ages.


cheers,


On Thu, Dec 1, 2011 at 7:51 PM, Tom Rothamel  wrote:

> Pgs4a development is limited by several factors.
>
> The biggest is that PGS4A is using an unofficial port of SDL to Android.
> There's a version of SDL 1.3 for Android, but SDL 1.3 hasn't been released
> yet. I also don't know if Pygame runs on SDL 1.3 - I don't think it does. I
> don't want to get into a situation where I'm spending a lot of time
> modifying SDL, only to have to do it again when the new version comes out.
>
> Right now, my plan is for the next release of pgs4a to sync up with the
> next release of Ren'Py. The focus will be on making it easier to set up a
> development environment to create packages - that will be an outgrowth of
> Ren'Py's new launcher tool.
>


Re: [pygame] Re: p4a development activity?

2011-12-02 Thread Ryan Hope
SDL 1.3 brings multitouch support, I know that webOS and Android are
both using modified versions of 1.3 which rely on this :D I am also
hoping it has improved OSX support.

On Fri, Dec 2, 2011 at 10:20 AM, Sean Wolfe  wrote:
> Interesting Tom thanks for the reply and I understand much better now.
>
> Do we get anything exciting with SDL1.3 ? Should I be really excited?
>
> Hell I'm going to poke around the sdl site a bit now and see...
>
>
>
> On Thu, Dec 1, 2011 at 3:51 PM, Tom Rothamel  wrote:
>> Pgs4a development is limited by several factors.
>>
>> The biggest is that PGS4A is using an unofficial port of SDL to Android.
>> There's a version of SDL 1.3 for Android, but SDL 1.3 hasn't been released
>> yet. I also don't know if Pygame runs on SDL 1.3 - I don't think it does. I
>> don't want to get into a situation where I'm spending a lot of time
>> modifying SDL, only to have to do it again when the new version comes out.
>>
>> Right now, my plan is for the next release of pgs4a to sync up with the next
>> release of Ren'Py. The focus will be on making it easier to set up a
>> development environment to create packages - that will be an outgrowth of
>> Ren'Py's new launcher tool.
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow
>



-- 
Ryan Hope, M.S.
CogWorks Lab
Department of Cognitive Science
Rensselaer Polytechnic Institute


Re: [pygame] setting + modifying a variable for use across the entire application

2011-12-02 Thread Ryan Hope
If your project (game I am assuming) is written in an OOP way then you
could just read in the settings/path in your main class and then pass
on a reference to that main class as an argument when ever you
instantiate a new object.


On Fri, Dec 2, 2011 at 10:15 AM, Sean Wolfe  wrote:
> Hey everybody,
>
> Upon initialization I'd like to set an assets path, which will be
> different depending on platform. I'd like to set it one time upon
> startup, and then have every module import it automatically with the
> changed value. However since modules are loaded once and persisted in
> their original state, I can't get the new value in the new module,
> even if I reload(settings) .
>
> The best option I can think of is actually creating a new module as a
> new file, then importing that new module in every subsequent piece
> that needs it. But I was hoping to do something a little more elegant
> than that. Do we have any sort of application-level variables which
> are muteable? Like an application-level memory space?
>
>
> --
> main.py:
> import settings
>
> if android:
>    settings.assets = './assets'
> else:
>    settings.assets = 'c:/my/sources/in/development/bla/bla'
>
>
> then in a future module something like this:
>
> --
> gameloop.py:
> import settings
>
> ASSETS_DIRECTORY = settings.assets
> player_img = pygame.image.load(ASSETS_DIRECTORY + 'player.png')
>
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow
>



-- 
Ryan Hope, M.S.
CogWorks Lab
Department of Cognitive Science
Rensselaer Polytechnic Institute


Re: [pygame] Re: p4a development activity?

2011-12-02 Thread Sean Wolfe
Interesting Tom thanks for the reply and I understand much better now.

Do we get anything exciting with SDL1.3 ? Should I be really excited?

Hell I'm going to poke around the sdl site a bit now and see...



On Thu, Dec 1, 2011 at 3:51 PM, Tom Rothamel  wrote:
> Pgs4a development is limited by several factors.
>
> The biggest is that PGS4A is using an unofficial port of SDL to Android.
> There's a version of SDL 1.3 for Android, but SDL 1.3 hasn't been released
> yet. I also don't know if Pygame runs on SDL 1.3 - I don't think it does. I
> don't want to get into a situation where I'm spending a lot of time
> modifying SDL, only to have to do it again when the new version comes out.
>
> Right now, my plan is for the next release of pgs4a to sync up with the next
> release of Ren'Py. The focus will be on making it easier to set up a
> development environment to create packages - that will be an outgrowth of
> Ren'Py's new launcher tool.



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


[pygame] setting + modifying a variable for use across the entire application

2011-12-02 Thread Sean Wolfe
Hey everybody,

Upon initialization I'd like to set an assets path, which will be
different depending on platform. I'd like to set it one time upon
startup, and then have every module import it automatically with the
changed value. However since modules are loaded once and persisted in
their original state, I can't get the new value in the new module,
even if I reload(settings) .

The best option I can think of is actually creating a new module as a
new file, then importing that new module in every subsequent piece
that needs it. But I was hoping to do something a little more elegant
than that. Do we have any sort of application-level variables which
are muteable? Like an application-level memory space?


--
main.py:
import settings

if android:
settings.assets = './assets'
else:
settings.assets = 'c:/my/sources/in/development/bla/bla'


then in a future module something like this:

--
gameloop.py:
import settings

ASSETS_DIRECTORY = settings.assets
player_img = pygame.image.load(ASSETS_DIRECTORY + 'player.png')




-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Creating a stereo sound from an array doubles frequency

2011-12-02 Thread Marcel Stimberg
Hi Ian, hi Mark,

thanks for the feedback. pre_init and init works for me, as does your
variant. But your error message (that was apparently added after 1.9.1
was released) provided the necessary clue: pygame makes the assumption
that the argument of make_sound is in C-Order. I can reproduce my
"double frequency" problem with your code if I replace:
   sound = pygame.sndarray.make_sound(buf)
with
   sound = pygame.sndarray.make_sound(buf.copy(order='F'))

(Conversely, the problem dissappears in my script if I do
samples.copy(order='C'))

The above code will apparently trigger an error on pygame 1.9.2pre but
with 1.9.1release will result in the odd behaviour I described. The
details of whether the array ends up in Fortran order may also depend
on numpy version, architecture, etc. as a colleague could not
reproduce my problem with pygame1.9.1 under Windows.

Thanks again, best
  Marcel


Re: [pygame] Creating a stereo sound from an array doubles frequency

2011-12-02 Thread Mark Wexler
Hello. On my system (Win 7 Pro, 64 bits, Python 2.7, pygame 1.9.2pre),
your program doesn't produce any sound at all. For it work, I have to
replace pg.mixer.pre_init(...); pg.init() by pg.mixer.init(...). (I
discovered this a while back, and put a comment about it in the
documentation. If you open a window, then pg.mixer.pre_init(...);
pg.init() works.)

If I put nchannels = 2, then make_sound() gives the following error:
ValueError: ndarray is not C-contiguous

Here's a simple script to synthesize stereo sound, that does work on
my system (and that doesn't double frequency, AFAICT):

import pygame, numpy, math

duration = 1.0  # in seconds
sample_rate = 44100
bits = 16

try:
pygame.mixer.init(frequency = sample_rate, size = -bits, channels = 2)
n_samples = int(round(duration*sample_rate))
buf = numpy.zeros((n_samples, 2), dtype = numpy.int16)
max_sample = 2**(bits - 1) - 1
for s in range(n_samples):
t = float(s)/sample_rate# time in seconds
buf[s][0] = int(round(max_sample*math.sin(2*math.pi*440*t)))
 # left
buf[s][1] =
int(round(max_sample*0.5*math.sin(2*math.pi*440*t)))# right
sound = pygame.sndarray.make_sound(buf)
sound.play()
pygame.time.wait(int(round(1000*duration)))

finally:
pygame.mixer.quit()


Mark




On Fri, Dec 2, 2011 at 9:24 AM, Ian Mallett  wrote:
> On Fri, Dec 2, 2011 at 12:59 AM, Marcel Stimberg
>  wrote:
>>
>> Hi list,
>>
>> I'm having trouble playing sounds (generated from arrays) as stereo
>> sounds. Creating a sound and copying it to two channels seems to
>> double the frequency.
>>
>> The following script (see also here: http://pastebin.com/qqZbJavf )
>> should make it more clear. It constructs a simple 400Hz sine wave and
>> plays it as a mono sound (nchannels = 1) or duplicates the array and
>> plays it as a stereo sound (nchannels = 2). In the second case,
>> however, the tone that is played is an 800Hz tone instead of a 400Hz
>> one... This seems not to happen on Windows, I encountered the problem
>> on ArchLinux and Ubuntu 11.10 (both having pygame 1.9.1).
>>
>> import numpy as np
>> import pygame as pg
>> import time
>>
>> frequency, samplerate, duration = 400, 44100, 2
>> nchannels = 1 # change to 2 for stereo
>> pg.mixer.pre_init(channels=nchannels, frequency=samplerate)
>> pg.init()
>>
>> sinusoid = (2**15 - 1) * np.sin(2.0 * np.pi * frequency * \
>>                   np.arange(0, duration) / float(samplerate))
>> samples = np.array(sinusoid, dtype=np.int16)
>> if nchannels > 1: #copy mono signal to two channels
>>       samples = np.tile(samples, (nchannels, 1)).T
>> sound = pg.sndarray.make_sound(samples)
>> sound.play()
>>
>> time.sleep(duration/float(samplerate))
>
> Hi,
>
> I can reproduce the sound doubling effect on Windows 7 Professional, 32 bit.
>
> Thanks,
> Ian



-- 
Mark Wexler
Laboratoire Psychologie de la Perception
CNRS - Université Paris Descartes
45, rue des Saints-Pères
75006 Paris, France
http://wexler.free.fr


Re: [pygame] Creating a stereo sound from an array doubles frequency

2011-12-02 Thread Ian Mallett
On Fri, Dec 2, 2011 at 12:59 AM, Marcel Stimberg <
stimb...@users.sourceforge.net> wrote:

> Hi list,
>
> I'm having trouble playing sounds (generated from arrays) as stereo
> sounds. Creating a sound and copying it to two channels seems to
> double the frequency.
>
> The following script (see also here: http://pastebin.com/qqZbJavf )
> should make it more clear. It constructs a simple 400Hz sine wave and
> plays it as a mono sound (nchannels = 1) or duplicates the array and
> plays it as a stereo sound (nchannels = 2). In the second case,
> however, the tone that is played is an 800Hz tone instead of a 400Hz
> one... This seems not to happen on Windows, I encountered the problem
> on ArchLinux and Ubuntu 11.10 (both having pygame 1.9.1).
>
> import numpy as np
> import pygame as pg
> import time
>
> frequency, samplerate, duration = 400, 44100, 2
> nchannels = 1 # change to 2 for stereo
> pg.mixer.pre_init(channels=nchannels, frequency=samplerate)
> pg.init()
>
> sinusoid = (2**15 - 1) * np.sin(2.0 * np.pi * frequency * \
>   np.arange(0, duration) / float(samplerate))
> samples = np.array(sinusoid, dtype=np.int16)
> if nchannels > 1: #copy mono signal to two channels
>   samples = np.tile(samples, (nchannels, 1)).T
> sound = pg.sndarray.make_sound(samples)
> sound.play()
>
> time.sleep(duration/float(samplerate))
>
Hi,

I can reproduce the sound doubling effect on Windows 7 Professional, 32 bit.

Thanks,
Ian