Hack #4: turbopuffer · turbopuffer
16 Apr, 12:17
Underscore turns a filmmaker's creative corpus into a grounded film score — no generic stock music, no guesswork. Upload your scripts, director's notes, subtitles, and moodboards. Every document is parsed, chunked, and embedded using Google's Gemini gemini-embedding-001 (768-dimensional vectors). Both prose chunks and sonic signature cross-embeddings are indexed into Turbopuffer — a serverless vector database — across two per-project namespaces. When you describe a scene, Underscore runs 4 parallel retrieval queries against Turbopuffer: cosine vector search, BM25 full-text search, director-notes-filtered vector search, and a sonic namespace query. Results are fused using Reciprocal Rank Fusion (RRF) to surface the most relevant evidence across all query types. Claude (Anthropic) reads the top retrieved chunks and synthesizes a cue brief — mood, tempo, instrumentation, key themes — grounded entirely in your own materials. It also outputs 3 music prompts (fast burst, cinematic, voice-weighted) and 2 SFX descriptions tuned to complement the scene. ElevenLabs Music (composeDetailed) generates all 3 score variants and a separate 120-second title track cue in parallel. ElevenLabsSound Effects (textToSoundEffects) converts Claude's SFX descriptions into physical, environment-matched audio clips. All generated audio is stored in Vercel Blob (private access) and served via a proxy route. Auto scene extraction uses Claude to identify 3 dramatic moments from the indexed corpus, pre-filling the score generation workflow so filmmakers can start generating immediately after upload. The result: music and sound that actually know your film. PS - The docs/ folder contains a ready-made corpus for the short film The River — use it to test the full pipeline immediately.
