volume_slider = ttk.Scale(wnd, from_=0, to=1, orient=HORIZONTAL, value=1, length=150, command=set_volume) volume_slider.pack(side=RIGHT, pady=20, padx=10) def set_volume(val): pygame.mixer.music.set_volume(volume_slider.get()) # to get the current volume current_volume = pygame.mixer.music.get_volume() time_field.config(text=current_volume)