Advertisement
moneymaz

NEWPROJECT

Dec 14th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. # python code
  2. # script_name:
  3. #
  4. # author:
  5. # description:
  6. #
  7.  
  8. from earsketch import *
  9.  
  10. init()
  11. setTempo(120) #tempo of song
  12. #defining all audio loops
  13. sectionA1 = Y07_DRUM_SAMPLE
  14. sectionA2 = RD_RNB_808SOLODRUMS_14
  15. sectionB1 = HIPHOP_BASSSUB_002
  16. sectionB2 = ELECTRO_ANALOGUE_BASS_004
  17. verse = HIPHOP_MUTED_GUITAR_001
  18. chorus = YG_NEW_HIP_HOP_CHOIR_2
  19. verse2 = Y03_DRUMS_SAMPLE_1
  20. bridge =YG_NEW_HIP_HOP_CHOIR_1
  21. beat = HIPHOP_FUNKBEAT_004
  22. beat2 = HIPHOP_FUNKBEAT_005
  23. #beat schyme
  24. mybeat= "0++0--00+0+++"
  25.  
  26. #calling tracks using fitMedia
  27. #playing on (audio loop,track __, measure star and measure end)
  28. fitMedia(verse,1,1,8)
  29. fitMedia(verse2,2,12,19)
  30. fitMedia(bridge,3,23,26)
  31. fitMedia(chorus, 4,8,12)
  32. fitMedia(chorus,4, 19, 23)
  33. fitMedia(chorus,5,26,30)
  34. for measure in range(1,22,2):
  35. #(audio loop, track number, constant , your beatsring)
  36. makeBeat(beat,5,measure,mybeat)
  37.  
  38.  
  39. # for loops allows the computer to execute the code
  40. # (where to start, to end, what to count by)
  41. for measure in range(1, 25, 2):
  42. if measure % 2 == 0: #if remainder is equal to 0
  43. #(audio loop, track number, constant , your beatsring)
  44. makeBeat(beat2, 5, measure, mybeat)
  45. # effect (track, what effect you want to use, increase or decrease)
  46. setEffect(5,VOLUME,GAIN)
  47.  
  48. # A Form
  49. def sectionA(startMeasure, endMeasure):
  50. fitMedia(sectionA1,6,startMeasure, endMeasure)
  51. fitMedia(sectionA2,7,startMeasure, endMeasure)
  52. # B FORM
  53. def sectionB(startMeasure, endMeasure):
  54. fitMedia(sectionB1, 6, startMeasure, endMeasure)
  55. fitMedia(sectionB2, 8, startMeasure, endMeasure)
  56. return measure
  57. #keeps measure in the system
  58. #calling ABA format
  59. sectionA(5,9)
  60. sectionB(9,13)
  61. sectionA(13,17)
  62.  
  63. finish()
  64.  
  65.  
  66. print measure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement