Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
pygame.mixer
- Page 1
Re: Play wave sound files with PyGame
Programming
Software Development
9 Years Ago
by juanpa_2510
pygame
.
mixer
.Sound class is ideal for short wave (.wav) files that can be used as sound effects, you can play them as much as you want.
Re: How to output a simple sound in Python 2.6
Programming
Software Development
12 Years Ago
by robert99x
…load_sound(name): class NoneSound: def play(self): pass if not
pygame
.
mixer
: return NoneSound() fullname = os.path.join('data', name) …try: sound =
pygame
.
mixer
.Sound(fullname) except
pygame
.error, message: print 'Cannot load sound:', wav raise …
Re: pygame.mixer, no sound
Programming
Software Development
13 Years Ago
by Beat_Slayer
…] And maybe switching this: [CODE]import
pygame
.
mixer
sounds =
pygame
.
mixer
[/CODE] by this: [CODE]from
pygame
import
mixer
as sounds[/CODE] but I don't…
Re: pygame.mixer, no sound
Programming
Software Development
13 Years Ago
by SgtMe
try using: [CODE] import
pygame
#and from
pygame
.locals import *[/CODE] Also use the [CODE]
pygame
.
mixer
.get_init()[/CODE] function to see if the
mixer
is working
pygame.mixer, no sound
Programming
Software Development
13 Years Ago
by lewashby
[CODE]from Tkinter import * import
pygame
.
mixer
sounds =
pygame
.
mixer
sounds.init() correct_s = sounds.Sound("Correct.wav") wrong_s = …
Problem with importing sound through Pygame.
Programming
Software Development
11 Years Ago
by sgeep
… far I have as follows: import random import
pygame
import
pygame
.
mixer
pygame
.init()
pygame
.
mixer
.init() sound =
pygame
.
mixer
.Sound('hey.wav') sound.play() MAXBLOCKS=100 MINBLOCKS…
Re: Problem with importing sound through Pygame.
Programming
Software Development
11 Years Ago
by vegaseat
Just in case you have a bum sound file. Does this work ... '''pg_sound_wav.py play a wave sound file with
pygame
''' import
pygame
pygame
.
mixer
.init() sound =
pygame
.
mixer
.Sound('hey.wav') # play the actual sound sound.play()
adding pause feature in pygame
Programming
Software Development
13 Years Ago
by bmanzana
… to do it. [CODE] import
pygame
,sys,random from
pygame
.locals import * pause=0
pygame
.init() screen=
pygame
.display.set_mode((1024,768),0,32…('ball.png').convert_alpha() stopper1=
pygame
.image.load('bar1.png').convert_alpha() stopper2=
pygame
.image.load('bar2.png').convert_alpha() sound=
pygame
.
mixer
.Sound('Laser.ogg') x…
global name 'screen' is not defined(pygame)
Programming
Software Development
13 Years Ago
by Hoff123
…; file [CODE] import sys, os import
pygame
from
pygame
.locals import * import question
pygame
.init()
pygame
.
mixer
.init() screen =
pygame
.display.set_mode((640, 400)) screen.fill… that doesn't work [CODE] import sys, os import
pygame
from
pygame
.locals import *
pygame
.init() def question(q, a, b, c, d…
Re: Possible to get Tkinter and pygame to work together?
Programming
Software Development
9 Years Ago
by vegaseat
The two different eventloops don't work very gracefully together. There is a lot of flickering. Threading might improve performance? The only thing that works reasonably well is the
pygame
.
mixer
and Tkinter to play sounds in a Tkinter application.
pygame question
Programming
Software Development
13 Years Ago
by HelloPeople1
…] #Various Declarations import
pygame
,math,sys,os,random,
pygame
.
mixer
, wx from
pygame
.locals import *
pygame
.init()
pygame
.
mixer
.init() screen =
pygame
.display.set_mode((800,600),0…,32) Font =
pygame
.font.SysFont…
Re: Pygame
Programming
Software Development
17 Years Ago
by bumsfeld
… class NoneSound: def play(self): pass if not
pygame
.
mixer
or not
pygame
.
mixer
.get_init(): return NoneSound() fullname = os.path.join('…data', name) try: sound =
pygame
.
mixer
.Sound(fullname) except
pygame
.error, message: print 'Cannot load sound:', fullname raise…
Pygame
Programming
Software Development
17 Years Ago
by chris99
… load_sound(name): class NoneSound: def play(self): pass if not
pygame
.
mixer
: return NoneSound() fullname = os.path.join('data', name) try:… sound =
pygame
.
mixer
.Sound(fullname) except
pygame
.error, message: print "Cannot load sound:", wav…
Pygame help
Programming
Software Development
15 Years Ago
by tomtetlaw
…load_sound(name): class NoneSound: def play(self): pass if not
pygame
.
mixer
: return NoneSound() fullname = os.path.join('data', name)… try: sound =
pygame
.
mixer
.Sound(fullname) except
pygame
.error, message: print 'Cannot load sound:', fullname raise …
Pygame Tron
Programming
Game Development
7 Years Ago
by Mariano_1
… event.key ==
pygame
.K_t: gameLoop() for event in
pygame
.event.get(): if event.type ==
pygame
.KEYDOWN: if event.key ==
pygame
.K_u:
pygame
.
mixer
.music.load(os…
Pygame
Programming
Software Development
13 Years Ago
by MUFC4life
…restart my game? [CODE]# -*- coding: cp1252 -*- import
pygame
,
pygame
.
mixer
, sys from
pygame
.locals import * ballimg = 'c:/Python/images/segment.png… 0, 0 speed = [0 , 1]
pygame
. init () screen =
pygame
. display . set_mode ( screen_size )
pygame
. display . set_caption ( caption ) ball =
pygame
. image . load ( ballimg ). convert …
Pygame
Programming
Software Development
12 Years Ago
by MUFC4life
…much appreciated. [CODE]# -*- coding: cp1252 -*- import
pygame
,
pygame
.
mixer
, random, sys from
pygame
.locals import * ballimg = 'c:/Python/images/segment.png….randint (0, 590), random.randint(0, 590))
pygame
. init () screen =
pygame
. display . set_mode ( screen_size )
pygame
. display . set_caption ( caption ) appleimage = Surface…
pygame help
Programming
Software Development
14 Years Ago
by srk619
… out. ive installed python 2.5 and
pygame
. the code starts like this: [CODE]import
pygame
#,
pygame
.
mixer
, sys if __name__ == "__main__ "…
Re: pygame in tkinter
Programming
Software Development
11 Years Ago
by vegaseat
You can use certain
pygame
modules like the
pygame
mixer
with Tkinter to play sounds. However, IMHO for the application you want to use the
pygame
and the Tkinter **event loops** will clash. You may have to use module **threading** to make this go.
Speeding up Pygame
Programming
Software Development
14 Years Ago
by emir_gradacac
…
pygame
, sys from
pygame
import *
pygame
.
mixer
.init()
pygame
.init() #Loading sounds... snare =
pygame
.
mixer
.Sound('Snare.wav') hihat =
pygame
.
mixer
.Sound('HiHat.wav') kick =
pygame
.
mixer
.Sound('Kick.wav') crash =
pygame
.
mixer
…
Help with a Pong game
Programming
Software Development
13 Years Ago
by redyugi
…import Text import
pygame
import
pygame
.gfxdraw as Drawing from imputwrapper import Input from
pygame
.locals import *
pygame
.init()
pygame
.
mixer
.init() os.….list_of_tracks = {} for i in list_of_tracks: self.list_of_tracks[i] =
pygame
.
mixer
.Sound(i) self.current = None def play(self, song): if…
Using pygame to get MIDI file length
Programming
Software Development
18 Years Ago
by G-Do
… To that end, I've been futzing around with the
pygame
.
mixer
and
pygame
.
mixer
.music modules. I can get MIDI files to play…and seconds) upon loading them. Can this be done within
pygame
? Does anyone out there know? I know you can use…but so far I have been unable to coax the
mixer
into converting MIDI files into Sound objects (probably because they…
Re: Using pygame to get MIDI file length
Programming
Software Development
18 Years Ago
by G-Do
… to be a real pain, though it is working now -
pygame
can play MIDI files perfectly. If you want to trade… more to do with your MIDI/OS setup, since the
pygame
code is pretty straightforward. On a more general level, I… thing to work!) I think the problem with going through
pygame
.
mixer
.Sound is that MIDI files aren't waveform data, per…
Internal pygame error
Programming
Software Development
10 Years Ago
by james.lu.75491856
…
pygame
.init()
pygame
.
mixer
.init()
pygame
.time.delay(200) font =
pygame
.font.Font(None,50) screen =
pygame
.display.set_mode((width,height)) Plants,Zombies,Projectiles =
pygame
.sprite.Group(),
pygame
…
Circle game using Pygame
Programming
Software Development
14 Years Ago
by hondros
…
pygame
from
pygame
.locals import * import random if not
pygame
.font: print 'Atention, there are no fonts.' if not
pygame
.
mixer
…: print 'Atention, there is no sound.'
pygame
.init() # The colors used here…range(0, 10) # Starting the code
pygame
.display.flip()
pygame
.key.set_repeat(1000, 100) while True:…
Tkinter Application with PyGame Sound
Programming
Software Development
17 Years Ago
by vegaseat
This little snippet combines a Tkinter GUI application with sound from the
pygame
mixer
. The snippet should do fairly well across platforms. I tested it on a Windows XP machine, but let me know your experience with other platforms.
My game starts lagging more and more after each kill
Programming
Software Development
10 Years Ago
by Necrozze
… it is: # -*- coding: cp1252 -*- import time import
pygame
from
pygame
.locals import*
pygame
.init() music =
pygame
.
mixer
.Sound('GameSoundtrack.wav') music.play(1,0,10000…
Re: problems with pygame
Programming
Software Development
15 Years Ago
by joshuabraham
…:/Python24/redhead.GIF" hero=Hero(test) villian=Villian() sound =
pygame
.
mixer
.Sound('C:/Python25/other python games/Cherry_Chat/media/woohoo.WAV…') sound1 =
pygame
.
mixer
.Sound('C:/Python25/other python games/Cherry_Chat/media/wish-you…
Re: Need help with pygame to exe
Programming
Software Development
14 Years Ago
by sinisterduke
Just a small update: I went through my code and removed all instances of font. Now I get this: (ImportError: MemoryLoadLibrary failed loading
pygame
\
mixer
.pyd)
Re: Python GUI Programming
Programming
Software Development
13 Years Ago
by vegaseat
…file with Tkinter using the module
pygame
#
pygame
is free from: http://www.
pygame
.org/ # tested with Python26,… Python31 and pygame1.9.1 vegaseat import
pygame
as pg try: # Python2 import Tkinter as tk…pg_play_sound(sound_file): """ uses the
pygame
mixer
will load the whole sound into memory before …
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC