How to Play Audio Files (Sound Effects and Music) in Python Using Pygame (Mp3 and Others)
HTML-код
- Опубликовано: 15 окт 2024
- 💻 Get the Source Code + mp3 files and support the channel ❤️: www.buymeacoff...
⬇️ LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW) 😉💪 ⬇️
💻 My Source Codes: www.buymeacoff...
☕ Buy me a coffee: www.buymeacoff...
😍 One-off donation: www.paypal.me/...
SKILLSHARE
(Python, Web Dev, UI/UX Design, Music, Art, Animation and a lot more)
🔗 skillshare.eqc... (Affiliate)
DATACAMP
(Python, ChatGPT, SQL, Power BI, and a lot more)
🔗 datacamp.pxf.i... (Affiliate)
COURSERA PYTHON
(For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):
🔗 imp.i384100.ne... (Affiliate)
COURSERA WEB DEVELOPMENT
(Full Stack, Front-End, Back-End, Web Design and a lot more):
🔗 imp.i384100.ne... (Affiliate)
Learn how to play sounds and music with Python (Mp3, WAV and others)
If the video was helpful, let me know in the comments down below and also like the video so that other people can see it. Needles to say I really appreciate your support 💪❤️
📨 SUBSCRIBE so that you don't miss any new video:
www.youtube.co...
🤗 BIO PAGE (contacts, etc): solo.to/fabiom...
Create Your Bio Page (10% OFF Upgraded Plans 😉): solo.to/inv/ND...
🔗 RELATED CONTENT (videos, playlists, etc) 🔗
Python Playlist: • 🐍 Learn Python With Fa...
🤩 AFFILIATE LINKS 🤩
Create Your Bio Page (10% OFF Upgraded Plans): solo.to/inv/ND...
🧑🏻💻 ABOUT ME 🧑🏻💻
I'm Fabio, I started programming with Python a lot of years ago and I fell in love with this world.
I started this RUclips channel to help you during your own journey and I hope that my help can make you an amazing programmer who loves this world as I do.
Welcome on board!! 🚀
#pythonWithFabioMusanni #pythonforbeginners #python #pythontutorial #pythonprogramming #coding #programming
💻 *Source Code + mp3 Files:* www.buymeacoffee.com/fabiomusanni/e/183129
☕ *Buy me a coffee:* www.buymeacoffee.com/fabiomusanni
😍 *One-off donation:* www.paypal.me/FabioMusanni/
⬇️ *LEARN ON THE BEST LEARNING PLATFORMS* 😉💪 ⬇️
*SKILLSHARE*
_(Python, Web Dev, UI/UX Design, Music, Art, Animation and a lot more)_
🔗 skillshare.eqcm.net/5gxzD2 (Affiliate)
*DATACAMP*
_(Python, ChatGPT, SQL, Power BI, and a lot more)_
🔗 datacamp.pxf.io/vN1bDj (Affiliate)
*COURSERA PYTHON*
_(For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):_
🔗 imp.i384100.net/k0Nk60 (Affiliate)
*COURSERA WEB DEVELOPMENT*
_(Full Stack, Front-End, Back-End, Web Design and a lot more):_
🔗 imp.i384100.net/EKWxBW (Affiliate)
Thank you for the support!❤
🎥All my videos about Python: ruclips.net/p/PLs8qUrmRvaR0IT4IwJl-LSweAdACW-yLK
Thanks, for this video. Now Pygame runs very well.
Glad to hear that! 😍💪
Great Video, thanks for the help
Thank you! Glad the video helped! 💪😊
is there a way to have a sound keep repeatedly playing without having to manually enter an input?
When you call "play", there should be an option called "loops", if you set that to -1 the sound will keep looping. I think I mentioned that somewhere in the video.
how to add background music in your game?😢
Thanks for this video. Really helped me figure out what I was doing wrong.
Thank you for the comment! 😍 I'm glad the video helped you shed some light on the topic 🤗💪
Best video on yt..
the best video-instruction!!!!!!!!!!
Glad you liked it, thank you for the comment! 💪😍
my game over music keeps repeating even tho i added the loop = 0. im so stuck
Maybe you are looping the play command
don't write anything in the brackets instead of the 'loops = 0' :d
Whenever music is in my while true loop it never plays
Hello 😊
If the code is the same, it's impossible it doesn't work, check carefully the indentation and the code itself.
@@FabioMusanni I don't know why your code didn't worked for me, but it solved by doing this:
mixer.init()
sound = mixer.Sound('your_sound.mp3')
sound.play()
sleep(5)