Tales from the jar side: AI-generated opera, NotebookLM podcasts, Shohei Ohtani, the Indian chess teams win, and the usual tweets and toots
I know why they call me a grown up. I groan every time I get up. (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of September 15 - 22, 2024. This week I taught O’Reilly Learning Platform courses on Spring in 3 Weeks and Functional Java, as well as my regular Trinity courses.
Regular readers of, listeners to, and video viewers of this newsletter are affectionately known as jarheads, and are far more intelligent, sophisticated, and attractive than the average newsletter reader or listener or viewer. If you wish to become a jarhead, please subscribe.
As a reminder, when this message is truncated in email, click on the title to open it in a browser tab formatted properly for both the web and mobile.
AI-Generated Opera
A few issues ago I wrote about my rather silly attempt to create a cooperative AI application where two separate tools — GPT-4o and Claude 3 Sonnet — took turns writing scenes for an opera libretto. The suggested title was Whispers of the Lost Hartford, and the result was, shall we say, unusual.
This week I wrote up that effort and published it in my regular blog, which I have a tendency to underuse. The new post is called Creating an AI-generated Opera with LangChain4j and describes the process, and provides a link to the resulting libretto.
As a reminder, the process involved:
Using LangChain4j to access the two AI models.
Adding a message with the overall setting and basic characters.
Asking each AI tool to take turns writing the next scene.
Once the libretto was finished, I fed each scene into DALL-E 3 and had it generate illustrations, the quality and suitability of which varied wildly.
The new part, which I didn’t talk about in my earlier newsletter, is that I then went to Suno AI, which is a music generator. I took the beginning of the first scene and fed it into the website, with the hint that I wanted the result to be in the “opera” category.
Here’s the text I added:
### Scene 2: The Heart of the Jungle
> **Author: OpenAiChatModel**
![](scene_2_illustration.png)
*The curtain rises to reveal a lush, overgrown jungle setting. The sound of exotic birds and distant waterfalls fills the air. In the middle of the stage, a clearing is visible with ancient, vine-covered ruins hinting at the lost city of Hartford. The soprano, **Elena**, dressed in rugged explorer's attire, is carefully examining an old map. The tenor, **Rafael**, barefoot and adorned with natural elements, is composing music on a makeshift wooden instrument. They are completely absorbed in their tasks.*
**Elena**: *(Singing, with a sense of determination and curiosity)*
In this verdant maze, we seek the past,
Where whispers of a city long have cast
Their shadows on our hearts and dreams,
In Hartford's ruins, find what seems.
**Rafael**: *(Responding, with a poetic and melodic air)*
Oh Elena, your courage lights the way,
Through tangled vines and night and day.
In sonnets, I have penned this quest,
To find the city where our hearts may rest.
*They join hands and sing together, their voices blending in harmony.*
**Elena & Rafael**: *(Duet)*
Together, we shall brave the wild,
With love and hope, our hearts are mild.
In Hartford's ancient, hidden halls,
We'll write our story on its walls.
This is the resulting music. You can judge for yourself whether it fit the instructions or not.
I think the quality of Suno music generation has improved markedly, though I don’t think it has a clue about opera. Still, I used that site a year ago, in version 1, to generate the Tftjs theme song, and got decent results. The sound quality this time (we’re up to version 3.5 now) has dramatically improved, plus it generated over 2 1/2 minutes of music rather than 30 seconds that cut off abruptly at the end.
I have no plans to continue this silliness, but you’re welcome to play with that site if you like. The free tier lets you generate as many as five songs a day. The application doesn’t have a programmatic API, however, so I have to do all the work directly on that site myself.
NotebookLM Podcasts
Some time ago I heard about Google’s answer to custom GPTs, which is a website they call NotebookLM. The idea is you create a notebook, add any relevant files, and then you can ask questions about them using their Gemini AI product.
I found it okay at the time, but nothing I planned to use often. But they changed it recently. I made a new notebook, added the generated libretto discussed above, and clicked on the Notebook Guide link. This is what you see:
In case you can’t read it, the Summary section says:
“The provided text is a script for a musical opera titled "libretto.md." This opera tells the story of Elena and Rafael, two lovers on a quest to uncover the lost city of Hartford. Their journey is fraught with obstacles, including the antagonist, Agent Victor, who seeks to prevent them from achieving their goal. Throughout the story, Elena and Rafael are guided by the Spirit of the Jungle and eventually find Hartford, where they encounter the city's spirit. Ultimately, they unveil Hartford’s history and secrets, promising to share this knowledge with the world.”
Pretty heady stuff, which takes the text far more seriously than I ever intended.
The generated suggested questions are:
What is the significance of the lost city of Hartford and what is its connection to love and art?
What are the main obstacles that Elena, Rafael, and Victor encounter, and how do they overcome them?
How does the spirit of the jungle and the spirit of Hartford guide the protagonists and reveal the true nature of Hartford’s legacy?
Wow. But the best part — the real reason I tried this — is the Audio Overview button. It takes time to generate, but I’m simply boggled by the results:
Yup, it generated a podcast interview between a man and a woman discussing the libretto in some detail. But the conversation had me staring at it, slack-jawed, pretty much the whole time. Remember, this is a trivial bit of AI-generated fluff, and they treated it like the most profound, deep, moving experience they’d had in a long time. I really am blown away.
Let’s be clear about this: the generated libretto is, at best, ridiculous, and at worst, insane. Our heroes are in the jungle searching for a Lost City (freakin’ Hartford, the Insurance Capital of the World, your totally average, mid-size New England city), pursued by a government agent with a flying robot. They defeat the robot by having the soprano distract the agent by singing an aria while the tenor climbs a vine, swings down, and grabs the remote control (remote control?) for the robot out of his hand and shutting down the robot. They (the agent is so moved he joins them, because of course he does) find the city together, and they encounter the Spirit of Hartford (seriously), which has its own message to impart.
Really, that’s the basic plot. And I couldn’t manufacture the generated podcast conversation in a million years. You simply have to listen to at least the beginning to see how it goes. It took Google about five minutes to generate the WAV file, which I’ve embedded here.
I realized the one character I left out of this entire process was a critic. I needed someone to add at least some perspective to the process, and that person needed to be Anton Ego from Ratatouille:
I therefore added code to my system to do so:
This time I used Google’s gemini-1.5-flash AI tool, figuring it wasn’t right to let the same AI tools that wrote the libretto also critique it.
The result, however, was not what I expected:
Whispers of the Lost Hartford" presents a compelling operatic journey through time and love, weaving together elements of adventure, romance, and historical mystery. The libretto, skillfully crafted by OpenAI ChatModel and Anthropic ChatModel, effectively draws the audience into a captivating story while showcasing the power of music and the enduring spirit of love.
It went on and on in that vein, finishing with:
Overall, "Whispers of the Lost Hartford" is a promising operatic work with a strong narrative, engaging characters, and compelling musical themes. The libretto's exploration of love, discovery, and the enduring power of human spirit offers a compelling and thought-provoking journey for both the audience and the characters, making it a worthwhile addition to the operatic repertoire.
If Anton Ego had been a real character and died, the spinning he would do in his grave would change Earth’s orbit. If he wasn’t dead, this would have killed him.
So what’s the real lesson here? Don’t believe any AI evaluations of anything, especially if they’re positive. I mean, oh my goodness.
Finally, I must say I’m a bit disappointed that none of the AI tools made the connection between the lost city of Hartford and the real Hartford in any way, shape, or form. But I sure did, and my eyes still haven’t stopped rolling since.
On the other hand, what a ride. :)
The Shohei Kid
That title is probably an age check, since it’s trying to compare the brilliant baseball player Shohei Ohtani to Willie Mays, who they used to call the Say Hey, Kid. Or maybe it’s just not as clever a title as I was hoping.
For those who don’t pay much attention to baseball, Shohei Ohtani was a star in Japan, came to the Los Angeles Angels in 2017, won Rookie of the Year the next year, and finally escaped that disaster of a team when he joined the Dodgers. He was the first two-way Major League player in decades, and was brilliant at both pitching and hitting until he hurt his arm and required surgery at the end of last year.
This year was supposed to be a rehab year. That’s true, in the sense that he hasn’t pitched all year, but he’s been focusing instead on hitting and steals. The 30/30 club is composed of players who hit 30 home runs and steal 30 bases in a season. The 40/40 club adds 10 to each, and only six players have ever done that (Jose Canseco, Barry Bonds, Alex Rodriguez, Alfonso Soriano, Ronald Acuña Jr. and, this year, Shohei Ohtani). Nobody has ever gotten to 50/50, which is a ridiculous number.
Last Thursday, Ohtani was sitting at 48 home runs and 49 steals when he had a game for the ages:
He finished with six hits, of which three were home runs, two were doubles, and one single. One of the doubles was very nearly a triple, where he barely got thrown out at third, or he would have hit for the cycle, too. Add in two more steals, and at the end of the game he was the first ever member of the 51/51 club. After Friday night, he was up to 52/52.
As of this writing, he’s up to 52/54, with still another week left in the regular season. I would love to say 60/60 is possible, but it’s not. It can’t be. Seriously, no way, right? Nobody could possibly do that.
(But … how cool would that be?)
Incidentally, last year in the World Baseball Classic, played before his arm surgery, he pitched for Japan in the finals and struck out Mike Trout in the bottom of the ninth to clinch the title for his home country.
For an incredible power hitter who can also pitch, the comparisons to Babe Ruth are inevitable. But consider:
Ruth never played a night game.
Ruth never had to travel west of the Mississippi, as there were no teams on the west coast yet.
Most significant, Ruth never had to play in an integrated league.
Ruth truly dominated his era, even with those caveats, but the game is open to the world now. Remember, this is supposed to be his rehab year. Ohtani is, without a doubt, the greatest player ever to play the game.
He also was the greatest current player never to have made the playoffs, but that changes this year. You might consider tuning in to see a legend at work.
The Indian Kids Are All Right
That title is another reach, but let’s go with it for a moment. After Viswanathan “Vishy” Anand became World Chess Champion in the 2000s, he set off a chess boom throughout his home country. We’re seeing the fruits of that now, as an entire generation of brilliant Indian grandmasters, both men and women, have come to the forefront of the game. I’ve mentioned some of them before, like Gukesh (the challenger for the title), Praggananadha, Erigaisi, and Vishali, but their accomplishments took another leap this week.
Every two years the chess world holds an Olympiad, where teams from all over the world compete. The 45th Chess Olympiad completed today, and the Indian men and the Indian women both took the gold medals.
Gukesh is only 18 (!), Pragg is 19, Erigaisi is 21, and the other two members are older but still young. This team is going to dominate the chess world for years to come.
Significantly, along the way India was scheduled to play China, whose first board was supposed to feature current World Champion Ding Liren. The Chinese decided to rest him that day, only verifying that Ding has been mired in a slump for months now. His confidence is shot, practically since he won the challengers tournament. It’s incredible to think that Gukesh will be the favorite in their match this fall, but that’s where we are now.
The full list of the players on the Indian teams is here if you want to check them out.
(For those who might care, the US finished with the silver in the Open tournament and the bronze in the Women’s tournament. When the US played India, the youngest member of the US team was older than the oldest Indian player.)
Tweets and Toots
Bad pun alert
That joke was so bad I nearly used it for the subtitle of this newsletter.
Writing advice
Some of those are very old, but still clever. I try to never split an infinitive, for example. Or I try to boldly split infinitives that have never been split before, or something like that.
I guess I could use AI to come up with them
One of my password characters hopes someday to be a key for the NSA. Another would rather decrypt or die trying. Two more list their modulus relationship as “it’s complicated.”
But I don’t wanna
You can hear the theme music in your head, right? Or is it just me?
A tale of two references
Reminds me of one of my favorite jokes. Heisenberg gets pulled over for speeding.
Cop: Do you have any idea how fast you were going?
Heisenberg: No, but I know exactly where I am.
Cop: You were going 90 miles an hour!
Heisenberg: Oh no! Now I’m lost!Cop tells him to pop the trunk and looks inside.
Cop: There’s a dead cat in here!
Schrödinger: Oh sure, there is now.
Gotta be a Tesla
Yeah, looks about right.
Yesterday on the road I saw my first CyberTruck, going the other way. Goofy looking thing, even in person.
Goth phase
I never had a Goth phase. I wasn’t emo, either, though I really liked My Chemical Romance’s Welcome to the Black Parade album after my son introduced me to it back in the 90s. I think if I had a goth phase at my age people would worry I was diagnosed with something. Any statement or irony would be lost. I guess I’ll stay the nerd I’ve always been.
Questionable taste, but…
I laughed. Oh well. Amazing how quickly that whole situation came and went. I’ll send thoughts and prayers.
The variation of this gag I heard was, “Actually, it was the third assassination, after Taylor Swift.”
Speaking of whom:
Tay Tay
Not me. In this house, we loves the Tay Tay. I still think that Kelce missed an opportunity, though, to ask her to get married during the Super Bowl. That would have been epic, even if she said no.
The definitive language for AI
Now you know.
Finally:
I hope he pronounced yakuza correctly
Definitely rimshot needed.
Have a great week, everybody!
Last week:
Week 1 of my Spring in 3 Weeks course, on the O’Reilly Learning Platform
Functional Java, same
My regular Trinity College schedule
This week:
Week 2 of my Spring in 3 Weeks course, on the O’Reilly Learning Platform
Deep Dive into Spring, an NFJS Virtual Workshop
My regular Trinity College schedule