Projects
Tri-beat Theory | May 2025
For my final project in Music Computing at Brooklyn College (Spring 2025), I used Python in EarSketch to code a track that blends hip hop, Latin, and funk vibes. I programmed different sounds, loops, and effects to bring the beat to life. It was a fun way to explore how coding and music can come together to create something original.
Click to see the Python code
```python
# My final EarSketch project code
from random import randint
from earsketch import *
init()
setTempo(75, 1, 75, 21)
setTempo(120, 21, 120, 45)
setTempo(110, 45, 110, 53)
# Your code goes here
def hiphopA(start, end):
fitMedia(YG_TRAP_STRINGS_1, 1, start, end)
fitMedia(Y44_ORGAN_2, 2, start, end)
fitMedia(Y44_BASS_1, 3, start, end)
def hiphopEnd(start, end):
fitMedia(Y24_ELECTRO_2, 12, start, end)
fitMedia(Y44_ORGAN_1, 13, start, end)
fitMedia(YG_TRAP_STRINGS_1, 1, 5, 9)
hiphopA(9, 17.01)
fitMedia(AK_UNDOG_SFX_1, 4, 8, 9.03)
fitMedia(AK_UNDOG_SFX_1, 4, 20, 21.03)
fitMedia(RD_WORLD_PERCUSSION_WINDCHIMESFX_1, 5, 4, 6)
fitMedia(DKBEAR_FREE_TALK_MUST_DO, 6, 12, 13)
fitMedia(Y24_HORN_1, 7, 7, 9 )
hiphopEnd(17, 21)
piano = YG_NEW_HIP_HOP_PIANO_5
funky_strings = YG_NEW_FUNK_STRINGS_2
insertMedia(piano, 8 , 1)
r = randint(1, 4)
if r == 1:
insertMedia(funky_strings, 9, 1)
for x in range(6):
setEffect(x, REVERB, REVERB_TIME, 0.01)
setEffect(x, REVERB, MIX, 0)
beatString1 = "0+++------0+++--0+++------0+++--0+++------0+++--0+++------0+++--"
beatString2 = "00000000000000++00000000000000++00000000000000++00000000000000++"
beatString3 = "--------------0+--------------0+--------------0+--------------0+"
makeBeat(BOYKINZ_NIGHT_BEAT_HATS_FAST, 11, 17, beatString3)
makeBeat(MILKNSIZZ_LAFRIKA_MAIN_KICK, 9, 13, beatString1)
makeBeat(MILKNSIZZ_LAFRIKA_MAIN_KICK, 9, 17, beatString1)
makeBeat(BOYKINZ_NIGHT_BEAT_HATS_SLOW_4, 10, 17.0, beatString2)
fitMedia(IRCA_BOMBA_CONJUNTOS_SICA_CORTIJO, 1, 21, 45.01)
fitMedia(IRCA_BOMBA_HOLANDE_ELEC_GUITAR_PRI, 2, 25, 45)
fitMedia(IRCA_BOMBA_HOLANDE_BAJO_1, 3, 29, 45)
fitMedia(IRCA_BOMBA_HOLANDE_ELEC_PIANO, 4, 33, 45)
fitMedia(IRCA_BOMBA_SICA_CORTIJO_MARACA, 5, 21, 45)
def funkAllin(start, end):
fitMedia(YG_FUNK_SHAKER_1, 1, start, end)
fitMedia(YG_FUNK_CLAPS_1, 2, start, end)
fitMedia(YG_FUNK_FUNK_GUITAR_1, 4, start, end)
def funkEnding(start, end):
fitMedia(YG_FUNK_ELECTRIC_PIANO_3, 5, start, end)
fitMedia(YG_FUNK_BRASS_4, 6, start, end)
fitMedia(YG_FUNK_SHAKER_1, 1, 45, 52.75)
fitMedia(YG_FUNK_CLAPS_1, 2, 49, 52.75)
fitMedia(YG_FUNK_FUNK_GUITAR_1, 4, 49, 52.75)
funkAllin(53,69)
fitMedia(YG_FUNK_BASS_1, 3, 52.75, 69)
funkEnding(61, 69)
endCymbal = ENTREP_PERC_CYMBAL
voice = DKBEAR_FREE_TALK_MUST_DO
insertMedia(endCymbal, 7 , 69)
r = randint(1, 4)
if r == 1:
insertMedia(voice, 6, 69)
setEffect(7, VOLUME, GAIN, 10, 69, 10, 70)
finish()
Mystery | March 2023

