Create your own GUI Music Player using Pygame & Tkinter
Welcome to this GUI Music player course! This course assumes that you have basic knowledge of Python programming language and by the end of this project you’ll be able to apply that knowledge for building GUI projects with the help of Python modules like Tkinter and Pygame.
This course is highly practical, but it won’t neglect the theory; we’ll start with the theory part in each video and then do the practical. In the theory part, I’ll cover the explanation of code. ( And don’t worry we’ll never have any boring dry theoretical lectures ) . Now my main goal for this course is to make sure that you understand every single line of code that you wrote. I don’t wanna be just me typing the code and you following along. I’m gonna stop, I’m gonna be explaining things and I wanna make sure that after doing this course you come a with some kind of knowledge. Source code will be shared in the resources.
The course is divided into two sections:
1. Introduction: In this section, you will get to know what we’re going to create by the end of this course. You’ll see the end product of your GUI Project. You will see the working of the application (music player) that we’re going to build and also you will learn about the design or sketch of your application. This section will include two short videos.
2. Building Application: This section covers the main building part of your GUI Music Player application. This section will include 4 sub-sections.
- In the 1st section, you will learn about the python modules you need to import for building this project. You’ll learn about Pygame and Tkinter module. You will get to know which module is responsible for which function. Then you will see how to install those modules and how to import them. Then you’ll learn about how to create the window for your application and how to set the dimensions.
- In the 2nd section, you will learn how to prompt the user to choose a directory with music files, how to create a playlist in a Listbox, how to add for loop, and then how to initialize pygame and pygame.mixer for loading and playing sound.
- In the 3rd section, you will learn about buttons. You’ll learn how to define functions for the play button to play the music, the pause button to pause the playing music, the resume button to resume the music, and the stop button to stop the music.
- In the last section, you will learn how to add button widgets that are going to be responsible for the play button, pause button, resume button, and stop button. Next, you’ll learn about how to display the current song title that is being played. And finally, you’ll learn how to activate the Tkinter time frame to run the final application.