Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # python code
- # script_name:
- #
- # author:
- # description:
- #
- from earsketch import *
- init()
- setTempo(120) #tempo of song
- #defining all audio loops
- sectionA1 = Y07_DRUM_SAMPLE
- sectionA2 = RD_RNB_808SOLODRUMS_14
- sectionB1 = HIPHOP_BASSSUB_002
- sectionB2 = ELECTRO_ANALOGUE_BASS_004
- verse = HIPHOP_MUTED_GUITAR_001
- chorus = YG_NEW_HIP_HOP_CHOIR_2
- verse2 = Y03_DRUMS_SAMPLE_1
- bridge =YG_NEW_HIP_HOP_CHOIR_1
- beat = HIPHOP_FUNKBEAT_004
- beat2 = HIPHOP_FUNKBEAT_005
- #beat schyme
- mybeat= "0++0--00+0+++"
- #calling tracks using fitMedia
- #playing on (audio loop,track __, measure star and measure end)
- fitMedia(verse,1,1,8)
- fitMedia(verse2,2,12,19)
- fitMedia(bridge,3,23,26)
- fitMedia(chorus, 4,8,12)
- fitMedia(chorus,4, 19, 23)
- fitMedia(chorus,5,26,30)
- for measure in range(1,22,2):
- #(audio loop, track number, constant , your beatsring)
- makeBeat(beat,5,measure,mybeat)
- # for loops allows the computer to execute the code
- # (where to start, to end, what to count by)
- for measure in range(1, 25, 2):
- if measure % 2 == 0: #if remainder is equal to 0
- #(audio loop, track number, constant , your beatsring)
- makeBeat(beat2, 5, measure, mybeat)
- # effect (track, what effect you want to use, increase or decrease)
- setEffect(5,VOLUME,GAIN)
- # A Form
- def sectionA(startMeasure, endMeasure):
- fitMedia(sectionA1,6,startMeasure, endMeasure)
- fitMedia(sectionA2,7,startMeasure, endMeasure)
- # B FORM
- def sectionB(startMeasure, endMeasure):
- fitMedia(sectionB1, 6, startMeasure, endMeasure)
- fitMedia(sectionB2, 8, startMeasure, endMeasure)
- return measure
- #keeps measure in the system
- #calling ABA format
- sectionA(5,9)
- sectionB(9,13)
- sectionA(13,17)
- finish()
- print measure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement