Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'tutorial': 0.03; 'wednesday,': 0.07; 'seemed': 0.09; 'snippet': 0.09; 'wrote': 0.14; '>>': 0.16; 'jacob': 0.16; 'pygame': 0.16; 'pygame,': 0.16; 'subject:effect': 0.16; 'wrote:': 0.18; 'module': 0.19; 'trying': 0.19; 'memory': 0.22; 'import': 0.22; 'email addr:gmail.com>': 0.22; 'load': 0.23; 'compilation': 0.24; 'skip:n 60': 0.24; '>': 0.26; 'skip:p 30': 0.29; 'errors': 0.30; 'url:mailman': 0.30; 'code': 0.31; '>>>>': 0.31; 'file': 0.32; 'url:python': 0.33; 'december': 0.35; 'something': 0.35; 'but': 0.35; 'subject:Simple': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'being': 0.38; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'channel': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'space': 0.40; 'url:mail': 0.40; 'simple': 0.61; 'sound': 0.68; 'received:41': 0.70; 'song': 0.84 From: "Jacob Kruger" To: Subject: RE: Simple background sound effect playback Date: Sat, 20 Dec 2014 16:02:51 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006A_01D01C6E.687765E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609 X-Spam-Score: -1.1 (-) X-Spam-Report: BAYES_00=-1.9, FSL_HELO_NON_FQDN_1=0.001, HTML_MESSAGE=0.001, RDNS_NONE=0.793, * 0.0 FSL_HELO_NON_FQDN_1 No description available. * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0001] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 132 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1419084197 news.xs4all.nl 2897 [2001:888:2000:d::a6]:54997 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 7685 X-Received-Body-CRC: 3511521479 Xref: csiph.com comp.lang.python:82697 This is a multi-part message in MIME format. ------=_NextPart_000_006A_01D01C6E.687765E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ok, thanks - the following seemed to work perfectly: #start code import pygame, time pygame.mixer.init(frequency=3D22050, size=3D-16, channels=3D2, = buffer=3D4096) song =3D pygame.mixer.Sound("bird.ogg") channel =3D pygame.mixer.Sound.play(song) channel.set_volume(0, 1) time.sleep(1) channel.set_volume(1, 0) channel =3D pygame.mixer.Sound.play(song) time.sleep(1) #end code Will now just have to double-check/test compilation of something = including something like this, using something like cx_freeze, etc., = but, thanks again. Stay well Jacob Kruger Blind Biker Skype: BlindZA ...Roger Wilco wants to welcome you, to the space janitor's closet... ---original message--- wrote in message = news:e5f211da-d16a-4351-8094-55ba9d2d35a8@googlegroups.com... > See this : >=20 >>>> pygame.mixer.init(frequency=3D22050, size=3D-16, channels=3D2, = buffer=3D4096) >>>> song =3D pygame.mixer.Sound("bird.ogg") >>>> pygame.mixer.Sound.play(song) > and then use the=20 >>>> channel.set_volume(0, 1) >>>> time.sleep(1) >=20 >=20 > On Wednesday, December 17, 2014 10:02:30 PM UTC+2, Jacob Kruger wrote: >>=20 >>=20 >> Ok, trying simple code from a pygame tutorial=20 >> snippet - nothing happens - just silent, but with no errors being=20 >> returned: >> # import the pygame module >> import pygame >> # start pygame >> pygame.init() >> # load a sound file into memory >> sound =3D pygame.mixer.Sound("bird.ogg") >> channel =3D sound.play() > --=20 > https://mail.python.org/mailman/listinfo/python-list > ------=_NextPart_000_006A_01D01C6E.687765E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Ok, thanks - the following seemed to work perfectly:
 
#start code
import pygame, = time
pygame.mixer.init(frequency=3D22050,=20 size=3D-16, channels=3D2, buffer=3D4096)
song =3D=20 pygame.mixer.Sound("bird.ogg")
channel =3D=20 pygame.mixer.Sound.play(song)
channel.set_volume(0,=20 1)
time.sleep(1)
channel.set_volume(1, 0)
channel =3D=20 pygame.mixer.Sound.play(song)
time.sleep(1)
#end code
 
Will now just have to double-check/test compilation of something = including=20 something like this, using something like cx_freeze, etc., but, thanks=20 again.
 
Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
...Roger Wilco = wants=20 to welcome you, to the space janitor's closet...
---original = message---
<catalinfest@gmail.com>=20 wrote in message news:e5f211d= a-d16a-4351-8094-55ba9d2d35a8@googlegroups.com...
>=20 See this :
>
>>>> = pygame.mixer.init(frequency=3D22050,=20 size=3D-16, channels=3D2, buffer=3D4096)
>>>> song =3D=20 pygame.mixer.Sound("bird.ogg")
>>>>=20 pygame.mixer.Sound.play(song)
> and then use the =
>>>>=20 channel.set_volume(0, 1)
>>>> time.sleep(1)
> =
>=20
> On Wednesday, December 17, 2014 10:02:30 PM UTC+2, Jacob Kruger = wrote:
>>
>>
>> Ok, trying simple code from = a=20 pygame tutorial
>> snippet - nothing happens - just silent, = but with=20 no errors being
>> returned:
>> # import the pygame=20 module
>> import  pygame
>> # start = pygame
>>=20 pygame.init()
>> # load a sound file into memory
>> = sound =3D=20 pygame.mixer.Sound("bird.ogg")
>> channel =3D = sound.play()
> --=20
> https://mail.pytho= n.org/mailman/listinfo/python-list
>
= ------=_NextPart_000_006A_01D01C6E.687765E0--