Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Sound Gen concept in python <<ehl>>
- # First ver: Imperative
- import os
- x = ""
- def fileOpen(fileopened):
- global f
- f = open(fileopened, "r")
- def soundGen(sound = ""):
- global x
- sound = x
- if sound == "":
- # Causes a rest in default soundGen()
- # ex: soundGen() makes no sound
- pass
- else:
- fileOpen(sound)
- f.read()
- def rest()
- global x
- x = ""
- def aSharp()
- global x
- x = "A/A_sharp.mp3"
- def bFlat():
- global x
- x = "B/B_flat.mp3"
- while True:
- rest()
- soundGen()
- aSharp()
- soundGen()
- rest()
- soundGen()
- bFlat()
- soundGen()
- rest()
Advertisement
Add Comment
Please, Sign In to add comment