< More writing

Generating Storyclocks

12-14-2023

Andy Crouch describes technology as a development that promises one of two things:

  1. It will give you the ability to do something you've never done.
  2. It will automate away a task you previously had to do.

When technology does (1), it gives us this feeling of wielding power we hadn't yet predicted possible. He also suggests we should be mindful of which things we automate away when technology does (2), because many of these tasks that we automate away are useful in our formation of understanding.

I've recently been able to put out https://chronostory.net that is inspired by Plot Device's Storyclock Notebook. The Storyclock Notebook has been a fun way for me to engage a story more and study how the greats craft a story structure in film. I think it has applications for all types of prepared time-dependent storytelling (speaking, films, music, presentation, etc.). Bringing this into a format that clocks your moments for you has been a fun development problem working with SVGs and React performance. I've been putting it in front of friends and others that are interested in film, and it's been fun to think critically how to make Chronostory better.

When OpenAI had their DevDay a couple weeks ago, I was really drawn to the simple use case of JSON mode. I'd tried a few prompts with GPT-3.5 in ChatGPT that ask to list story beats in a given film, and the results were pretty mixed. JSON mode got me interested enough to grab some credits and test the python API with GPT-4. I just simply asking it to give 10 significant moments in the film, and defined the assistant as a professor teaching about story structure.

But how should I ask it to estimate a timestamp? Well, at first I just asked it to estimate what percentage into the movie that each moment occurred. I tried it out with Star Wars and a couple other movies, and it's estimates were really great. So then I asked it to estimate how many seconds had elapsed in the film.

python-call-open-ai

Well, the seconds-elapsed estimates weren't exact, but they weren't any worse than the percentage estimations, and I could use these estimates and turn them into timestamps. So now we're in business, because I can use these numbers for a decent storyclock.

So then I employed JSON mode to get this into Chronostory. This would need to be in TypeScript inside my Next.js app.

typescript-server-component

So now I give GPT-4 the film's title and film's total runtime to give a more educated estimate. Now we're using something Chronostory can use to create the storyclock.

Alright, so let's check out an example: here's Chronostory asking OpenAI to generate moments for O Brother, Where Art Thou?

openai-demo

Now we have a storyclock. And Chronostory gives you the ability to modify from there, but we have a good template to start with.

So that brings us back up to Andy Crouch. The process gave us a comparatively fast template, but the manual storyclocking process is supposed to get you thinking about which moments are significant, and that manual process is important! It isn't the end goal to automate away this practice of highlighting what's personally important in a film. I can still see generation being a useful tool if you want to generate a couple movies and quickly compare the timing between movies. But the dopamine that kicks in because I prompted a full storyclock shouldn't ever completely replace the process of studying a film.

< More writing