[Python code debugging version] here comes daughter love: quietly ask the holy monk, is your daughter beautiful? (great for my Python)

Posted by kitcorsa on Mon, 10 Jan 2022 00:09:01 +0100


”If there is an afterlife, long songs sing in pairs, the beauty snuggles up beside her, thin clothes and long years. “    

When I was young, I always liked to see the clips of subduing demons and eliminating demons in journey to the West. I looked forward to it.

The four masters and disciples were able to overcome difficulties and dangers and get the Sutra. When they saw the episode of the kingdom of daughters, they felt insipid

It was even fortunate that the female king did not stop the way to get the Scriptures. Later, she learned that the difficulty of "9981" in journey to the West was the most difficult

"Ask the holy monk quietly, is your daughter beautiful?" Is the most beautiful love word in the world!

This pure music "daughter love" made of Python version code mode is given to you! I hope you like it~

Everything can be changed! Hahaha, music, games, sketches and other codes can be completed. There are more functions waiting for you to learn and keep up

My footsteps 👇👇



First of all, remember to prepare the music score first! (more on this part)

1, Environmental preparation

Python 3, pychar, numpy, cv2 and other materials for making pictures are free to choose. We won't show them here. We'll give them later

Let's randomly find several groups of effects!

Installation of third-party library: pip  install +If there is a problem with the module name, you can directly find my private letter

2, Code demonstration

import os
import pygame
import sys
import re
from pygame.locals import*

scale_name=[]#The whole process of syllable
scale_time=[]#The duration of the stored tone, 8 diaeresis, 4...
scale_volume=[]#Storage volume
scale_rh=[]#Type of stored syllable
music_turn=[]#Play music
music_1=music#Manual translation

for i in music_1:

for filename in os.listdir(r'./scale3'):
    #if not os.path.isdir(filename): 

# for i in scale_name:
#     time=re.findall('.*?_(.*?).wav',i)#Get a fraction of time
#     scale_time.append(time)
#     a1=re.findall('(.*?)_.*?.wav',i)
#     scale_volume.append(a1[0])
#     scale_rh.append(a1[1])
#     print(time)

def get_vol(name):#Get pitch
    a1 = re.findall('(.*?)_.*?.wav', i.decode('utf-8'))
    return a1[0]

def get_rh(name):#Get the note name
    a1 = re.findall('(.*?)_.*?.wav', i.decode('utf-8'))
    return a1[1]

def get_time(name):#Get the duration of this sound
    fen = re.findall('.*?_(.*?).wav',i)
    return dict1[fen]

# # bool1=pygame.mixer.music.get_busy()
# # print(bool1)
# for i in scale_list:
#     index1=scale_list.index(i)
#     name=scale_name[index1]#The name of this syllable
#     print(name)
#     print(type(name))
#     i.play()
#     pygame.time.delay(int(dict1[name[3]])-5)
#     print(pygame.mixer.music.get_busy())
for name in music_n:
    index1 = scale_name.index(name)

3, Effect display

1) Video effect display

Python version of "daughter love" is coming! Quietly ask the holy monk, is your daughter beautiful?

The screenshot shows no effect, because the words of music can't be reflected! So don't show the screenshot!


Python version of daughter love also has a different flavor! Hahaha, you have to play your own music! Clean hands!

Complete material, etc.: didi I acridine!

There are more source code waiting for you to lead the area!

Article summary——

Summary: Python article collection | (Introduction to actual combat, games, Turtle, cases, etc.)

Topics: Python Mini Program pygame