1. DJ Mix¶
from tkinter import *
import pygame.mixer
app = Tk()
app.title('DJ Mix')
app.geometry('250x100+200+100')
som = '50459_M_RED_Nephlimizer.wav'
mixer = pygame.mixer
mixer.init()
def start():
track.play(loops = -1)
def stop():
track.stop()
track = mixer.Sound(som)
start_botao = Button(app, command = start, text = 'Start')
start_botao.pack(side = LEFT)
stop_botao = Button(app, command = stop, text = 'Stop')
stop_botao.pack(side = RIGHT)
app.mainloop()
You have attempted of activities on this page