Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert(note, modifier):
- notes = ["do","do#","re","re#","mi","fa","fa#","sol","sol#","la","la#","si"]
- bonuslist = ["-","m","+","2","4","5","6","7"]
- mybonus = ""
- if(note[-1] in bonuslist):
- mybonus = note[-1]
- nofiteraction = int(modifier*2)
- index = notes.index(note)
- maxindex = len(notes) -1
- while(nofiteraction != 0):
- if index == maxindex:
- index = 0
- else:
- index +=1
- nofiteraction -=1
- return notes[index] + mybonus
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement