About the Project
How Was This Project Made?
This project is composed of two primary python files:
A file that pulls Lorde's song lyrics from the Genius API and downloads the lyrics for each song into an individual json file
A file that extracts 20 lines of lyrics from the individual json files and randomly assembles the lines into a new text file.
The new text file ('generated_song_#.txt') is a custom song generated from the previously pulled lyrics. Users can run the program as many times as they would like to "create"/"write" as many songs as they would like.
For the purposes of this project, only 20 Lorde songs were extracted through the Genius API. Users can edit the code to pull more songs. Live versions and official remixes of songs were excluded. Every generated song consists of 20 lines to reflect an average song length. All project materials were uploaded to GitHub.
Behind the Scenes
Step 1: Run the Lyric Code
Step 2: Run the Download Code
Further Development
The scope of this project is quite narrow but the applications used to create this work provide solid scaffolding for expansion. For this project, only one artist was selected and only a selection of 20 songs were analyzed. The work of this project could be expanded to include more artists and a larger swath of song data from which to pull from. This would expand the variety of results produced. The coding used for this project is rather extensible and would certainly allow for these more expansive considerations should any intrepid user wish to expand the parameters of this work.
Project Resources