DMSWC - Final Megalog - JLyricgen


FULLSCREEN SKETCH P5 EDITOR

I usually approach each of these devlogs the same way whenever I write them so for the final, I’d like to simplify my writing so that this isn’t a crazy long page comparatively.

[there aren’t many] GUIDELINES:

  • Project must involve procedural generation
  • Should be a compelling work and complete on its own
  • Must produce different, meaningful results ea. time it’s run
  • Can be a game, story, art toy or other digital media

My Idea:

  • Lyric Generator
  • Lyrics are sourced from bands from the early 2000s NYC scene (ie. Interpol, The Strokes, LCD Soundsystem, etc.)
  • On the canvas, lyrics are located underneath a half handcrafted and half procedurally generated album cover (I will design individual quadrants in Photoshop)
  • An individual handcrafted drum loop [out of 10] recorded off of Strudel will play with every run of the sketch
  • Essentially, this is a personal art toy. I want to use it as songwriting inspiration

Rules:

  • The length of the song’s lyrics changes upon each generation
  • Songs will have a verse > chorus > verse > chorus format. Super simple
  • Lyrics are to be organized in segments depending on this song format: start > middle > ends (of phrases). Also super simple. Will look something like:
{
  "verse": ["#v_beginning#\n#v_middle#\n#v_end#"],
  "v_beginning": [ /*verse openings*/ ],
  "v_middle":    [ /*verse middle sections*/ ],
  "v_end":       [ /*verse ends*/ ]
}

FIRST STEP - GATHER LYRICS I am going to spend the next long while of my life collecting a long lyric sheet and organizing it. I will meet back up with you here for Step Two! For you, it will only take a slight glance downward. Interesting stuff, I know. I’m collecting everything in a Google Doc so I’ll link that here.

SECOND STEP - MAKE A SMALL DEMO First, I need to organize my lyrics into the format I’ve established above. I’ll just take one song from each album–probably my favorite–and format them as such. I’ll paste the JSON code below. Then, I will begin making a procedural lyric generator with Tracery. This doesn’t look pretty, but here is an example of what one of my JSON files looks like:

P5 Tracery Time!

I am going to be building JLyricgen off of this sketch by Professor Tusman–thank you so much for helping me integrate Tracery into p5js. You’re a lifesaver!

My first approach is going to be rewriting the JSON file included in the original sketch. I need to change all of the information within it to match my verse > chorus format. Here is what I am going to be editing (I removed a large sum of the original donkey names):

{
  "description": "A list of donkey breeds",
   "donkeys":[
      "Abkhazskaya",
      "Abyssinian Donkey",
      "Algerian",
      "American Mammoth Jack",
      "Zamorano-Leonés"
   ],
  "greeting":["Hello!","Top of the morning to ya!","The best part of waking up is Folger's in your cup,"],
"person":["stranger","sailor","mom"],
"occurrence":["talking to a #person#"],
"origin": ["#greeting# #person.capitalize#. I couldn't help but notice you #occurrence# riding the breed of #donkeys#."]
}

AND here is what I have after my tinkering:

{
  "description": "A collection of many, many song lyrics",
   "verse_beg":[
    "You said you couldn't stay",
	"No harm, he's armed",
	"When I find out",
	"Believe me, this is a chance",
	"Let's see what is for sale",
	"The signals don't seem right",
	"I wish I could eat the salt off",
	"We can cap the old times",
	"We can cap the old lines",
	"And we can find new ways of living",
	"Walking up to me expecting",
	"Walking up to me",
	"Present company excepted",
	"And living proof",
	"Killing it with close inspection",
	"Present company accepting",
	"Presently we all expect the worst",
	"Don't you want me to wake you?",
	"Arguments are made for make ups",
	"We've got to bring our resources",
	"Forget your string of divorces",
	"I miss the way the night goes",
	"This basement has a cold glow",
	"So go and dance yourself clean",
	"Every night's a different story",
	"Everybody's getting younger",
	"Break me into bigger pieces",
	"We can miss the best things to do",
	"Wish you'd try a little harder",
	"Every day's a different warning"
   ],
  
  "verse_mid":[
    "You've seen it all before, I know",
	"And sold you on their way",
	"Settin' off all your alarms",
	"And store fronts rarely change",
	"At least I'm on my own again",
	"He's trying not to give his job a chance",
	"It lasts for just one night and then",
	"I'm sorry that I said",
	"Of your lost faded lips",
	"Make playing only logical harm",
	"And we can top the old times",
	"Expecting words",
	"Present company",
	"Talking like a jerk",
	"Except you are an actual jerk",
	"Just laugh it off",
	"It sort of makes it breathe",
	"Excluded in the night",
	"Included in the fight",
	"So give it just a little more time",
	"I wanna play it 'til the time comes",
	"It's late",
	"With friends who always make it feel good",
	"Though it's better than a bunch of others",
	"So some of me is home with you",
	"Wait until the weekend",
	"In the tedious march of the few"
   ],
  "verse_end":[
    "Oh, honey, that's ok",
	"I hope it's you who set this trap",
	"Instead of anywhere with you",
	"Oh, tell me it's all the same",
	"Oh, it's never gonna be",
	"It's sad, but I agree",
	"That we were just good friends",
	"Make playing only logical harm",
	"Make playing that nothing else will change",
	"She can read, she's bad",
	"Oh, she's bad",
	"Clay making that nothing else will change",
	"It happens all the time",
	"Accept the worst",
	"It happens every night",
	"Excluded every time",
	"Sometimes friends are mean",
	"It's better than it seems",
	"Makes me wanna stay",
	"Killing it can only make it worse",
	"It works just like a need",
	"Then give me just a bit of your time",
	"Just go and throw your little hands up",
	"Their little arguments to pieces",
	"It's a thirty car pile-up with you",
	"It's the end of an era, it's true",
	"And we can make our bad dreams come true",
	"There's a part of me hoping it's true"
   ],
  "chorus_beg":[
    "And I've lost my page again",
	"Oh, this life is on my side",
	"Oh, I am your one",
	"But it's different now that I'm poor and aging",
	"Her stories are boring and stuff",
	"She puts the weights into my little heart",
	"It's in the way that she walks"
   ],
  "chorus_mid":[
    "I know this is surreal",
	"I'll never see this face again",
	"It's in the way that she posed",
	"It's in the things that she puts in my head",
	"She gets in my room and she takes it apart",
	"Her Heaven is never enough"
   ],
  "chorus_end":[
    "But I'll try my luck with you",
	"Believe me, this is a chance",
	"You go stabbing yourself in the neck",
	"She's always calling my bluff",
	"She packs it away"
   ],
"origin": ["#verse_beg#\n#verse_mid#\n#verse_mid#\n#verse_end#\n\n#chorus_beg#\n#chorus_mid#\n#chorus_mid#\n#chorus_end#"]
}

HUZZAH! It’s looking good. Admittedly, I am going to need to add in over 25 more songs worth of lyrics, but just getting it to work for the moment is all I need. I’ll also have to add another verse and chorus block, and make their generations either 4 or 8 lines long per each run. I think that will give us a pretty cool song structure each time–basic, but definitely a good foundation. I am going to make these changes next. Here, I’ve got my generator now adhering to the format perfectly. Still haven’t added in all of the remaining lyrics, that will come next. It’s going to be a real grind so wish me luck.

UPDATE: I successfully input all 30+ songs worth of lyrics into my JSON file. It took forever. I’ve also found 10 free drum loops and inserted them into my sketch so that whenever the lyric generator is ran, a random drum loop will accompany it to hopefully inspire the songwriting process.

THE LAST thing to add now is the randomly generated album art. I’ve got 12 pngs, each of which are a different quadrant of an overall album art. To get this generation to work, I will separate my pngs into 4 groups, being which quadrant they are located in. File names will look like: “TR_01,” for example.

GOT IT! Getting the images to load properly took a lot of tinkering. Even after deleting old images/entire folders, p5 still remembers them in its cache so despite me tweaking code around, no substantial change was being made since I was still loading the wrong assets. That was a hard problem to diagnose. I’ve got it all working now, though! : I quite like the approach of hardcoding the lyric generator’s dimensions–both canvas and images. It made aligning each png quadrant far easier.

LAST THING - A BUTTON I neglected to remember that fullscreen generations of p5js will not automatically start with sound. Thus, I needed to create a splash screen for users to get the full experience.

It isn’t anything fancy, I want this generator to be as aesthetically simple as possible–not because it is a cop-out for doing less work, but because I would like for the focus to remain on using it as a songwriting tool. Minimal distractions is paramount. With this, my project is now finally complete!

.
.
.
**QUESTIONS FROM ARTICLES**

Q1: How will you avoid the '10,000 bowls of oatmeal' problem?
A: With this final project, I aim to make each generation unique and (relatively) meaningful by having a large library of lyrics to pull from. However, if I find my generations to be a little lackluster, perhaps what I will do is instead choose upwards of 5 songs only and nitpick their lyrics into specific moods and themes. Furthermore, using some premade Photoshop album art excerpts, I hope to introduce a visual element to the project that accentuates the feeling established by the procedurally generated lyrics. I believe that how an album looks truly dictates how it ultimately sounds.


McCormack (picked at random order):
Q1: Can a machine originate anything? That is, can it generate something new, meaningful, surprising and of value: a poem, an artwork, a useful idea, a solution to a long-standing problem? 
A: Certainly it can. While its source material is comprised of man-made art or discoveries, the ultimate output is a unique amalgamation of this info. Despite the conversation in McCormack's *Ten Questions* being about how, "...generative art involves procedures (rules, formal instructions, algorithms) created by the artist" and therefore, the art is not original, I believe that such an output could potentially be the same if the artist were to follow their own formula. If all it takes for people to discount generated art is the brush changing hands from man to machine, then a lot of *original* artwork involving related processes are to be discounted as well.

Q2: What characterizes good generative art?
A: On the surface level, good generative art is unsuspected of being anything but man-made. It should pass for an organic creation rather than simply being mechanized output. Delving deeper, perhaps good generative art can be any machine-assisted piece of work that can invoke a feeling within its viewer. Since the definition for what constitutes 'good' art is so subjective, I think if we simply boil 'good' generative art down to the baseline of whether or not it can make you feel something, we better understand why perhaps we can value such art so highly. It sort of feels perverse in a way to do so, however, some art is just undeniable. 

Q3: What can we learn about art from generative art? > **For example, can the art world be considered a complex generative system?**
A: I'm sort of stringing these two questions together because I find the second, bolder question to be a more interesting discussion regarding this topic. I am in agreement with Driessens & Verstappen in saying that yes, it can because I can certainly see it occurring in real time. Cultural shifts and the popularity of particular aesthetics certainly could behave similarly to the rules and algorithms of generative art. I mean, likely modern aesthetic booms are occurring because of social media algorithms themselves. Thus, with this weird, omnipotent influence, art is generated by a bunch of people all seeing the same thing at once and getting inspired in the same ways. I know McCormack touched upon games and digital music, and I believe the best reflection of this discussion exists in the nostalgic return to VHS aesthetics in the mainstream.

Get Drawing, Moving and Seeing with Code - Spring 2025

Leave a comment

Log in with itch.io to leave a comment.