Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
pygame.mixer
- Page 1
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 = …
Re: pygame.mixer, no sound
Programming
Software Development
13 Years Ago
by mack00234
According to what I have read about
pygame
, it usually isn't compatible with other modules unless they have been specially developed to work with it.
Re: pygame.mixer, no sound
Programming
Software Development
13 Years Ago
by mack00234
According to what I have read about
pygame
, it usually is not compatible with other modules unless they have been specially developed to work with it.
Re: pygame.mixer, no sound
Programming
Software Development
13 Years Ago
by SgtMe
yeah, but surely there is no issue, as Tk and
pygame
are not interacting. I have used both together before.
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
13 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__ "…
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: 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
…
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.
Re: Pygame
Programming
Software Development
12 Years Ago
by Tech B
predator78 is right. Also, I don't know if it's the website, your IDE, or format errors from copying and pasting; most of your object methods are spaced which will throw exceptions. I.E.: [code] #your code
pygame
. display . flip() #should be
pygame
.display.flip() [/code] That goes for most all of it.
Re: pygame help
Programming
Software Development
14 Years Ago
by snippsat
… write to open the
pygame
window is it import
pygame
?[/QUOTE] No "import
pygame
" you only make
pygame
libary available This code…/bin/env python import
pygame
screen =
pygame
.display.set_mode((640, 400)) while True: event =
pygame
.event.poll() if event.type ==
pygame
.QUIT: break [/CODE…
Re: pygame help
Programming
Software Development
14 Years Ago
by srk619
dint work anyway what code should i write to open the
pygame
window is it import
pygame
?
Re: pygame help
Programming
Software Development
14 Years Ago
by jlm699
[QUOTE=srk619;1023357]dint work anyway what code should i write to open the
pygame
window is it import
pygame
?[/QUOTE] What "dint work"?
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.
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