A downloadable asset pack

Buy Now$12.99 USD or more

The music room for your game, drawn from your own soundtrack. Every cover is shaped by the audio of its own track.

Canticle composes the soundtrack gallery a game shows its players: a header with the soundtrack's name, its track count and its total run time, then shelves of record sleeves, one generated cover per track. Each cover is drawn from the loudness of the clip it belongs to, so a slow-building theme and a boss loop look as different as they sound. Locked tracks stay as closed sleeves until the player earns them, the track that is playing glows, and the sleeves the player plays most wear with use.

Hand it a soundtrack (a name, the tracks and their clips, which ones are unlocked, how often each was played, and which one is playing) and it hands back an ordinary Texture2D. Nothing on the page is an imported image: every cover, sleeve, shelf and letter is drawn by the C# in the package, and the package ships no font and no audio file.

Ten cover families, seven pressings

  • 10 hand-authored cover families: Horizon (a ridge line from the track's loudness), Pulse (a bar meter), Halo (a radiant burst), Groove (a record whose groove widths follow the track), Tide (layered waves), Grid (a field of discs), Contour (map contours), Stripes (a sunset over a road), Stars (a constellation through the loudest moments) and Monogram (a title card).
  • 7 pressings set the look of the whole shelf: Vinyl, Cassette, Chrome, Neon, Parchment, Chip and Noir.
  • The volume is the product: the family is authored, the picture comes from the clip, so two tracks in one family are two different covers.

What your data does to the page

  • The soundtrack's name picks the pressing, whole-word: "Lofi Tapes" is Cassette, "Legends of the Vale" is Parchment, "Harbour Nights" is Neon. An unknown name gets a stable pressing from a hash of itself, or set one by hand.
  • Each track's title picks its cover family: "Boss Battle" is Pulse, "Harbour at Dusk" is Tide, "Main Theme" is Monogram. An optional mood word ("calm", "eerie") chooses when the title names nothing; with neither, a stable hash of the title does.
  • Each clip shapes its cover: Envelope.Extract reads 64 loudness values across the track on the main thread. A track with no readable clip gets a stable shape from its title, and the editor window says which route every cover took.
  • Run time sets how many grooves, bars or bands a cover draws, and is printed under the sleeve.
  • Play counts wear the sleeves, measured against the player's own favourite. Locked tracks are closed sleeves with a padlock. Now playing gets a glow and an outline.

Built to be recomposed

  • MusicRoom.Bake touches no Unity object, so it runs off the main thread (the Readme's recipe uses Task.Run); ToTexture uploads the result.
  • Cover tiles are cached: playing a track and composing again redraws the sleeves, not the covers.
  • Covers are drawn on worker threads. The pixels are identical either way, and the tests compare them byte for byte.
  • Long soundtracks are paged, and the default page is the one holding the track that is playing.
var ost = new Soundtrack { Name = "Harbour Nights", Subtitle = "Original Soundtrack", NowPlaying = 1 };
ost.Tracks.Add(new SoundtrackEntry("Main Theme") { Clip = mainThemeClip });
ost.Tracks.Add(new SoundtrackEntry("Boss Battle", 184f, plays: 12) { Clip = bossClip });
ost.Tracks.Add(new SoundtrackEntry("Secret Ending", 240f, unlocked: false));
Envelope.Extract(ost);   // main thread, once
RoomBake bake = await Task.Run(() => MusicRoom.Bake(ost, new RoomOptions { Width = 1920, Height = 1080 }));
myRawImage.texture = MusicRoom.ToTexture(bake);

Demo scene and editor window

Assets/CSAF/Canticle/Demo/Scenes/CanticleDemo.unity: press Play. Its three sample soundtracks use clips the demo synthesises at runtime, so every cover you see was drawn from real audio. LEFT and RIGHT change soundtrack, UP and DOWN change page, P plays the next track (you hear it, and its sleeve wears) and U unlocks the next locked track. Assets > Create > CSAF > Canticle > Soundtrack makes a soundtrack you fill in the Inspector with your own clips, and Window > CSAF > Canticle composes it, pages through it, lists every cover with the word that chose it and whether its shape came from its audio, and saves a PNG.

Compatibility

  • Unity 2022.3 and newer, including Unity 6. Built and tested against 6000.5.7f1.
  • Render pipeline agnostic: Built-in, URP and HDRP. The page is rasterised on the CPU into a texture.
  • Clips must be readable for their audio to shape a cover: set the clip's Load Type to Decompress On Load. Streaming clips fall back to their titles.
  • Three named assembly definitions (Runtime, Editor, Demo). No Resources folder, no shaders, no images, no fonts, no audio files, no network calls, no third-party packages.
  • Full, readable C# source: 16 scripts. The same soundtrack composes to the same pixels on every machine.

Performance, measured

In a blank project on an AMD Ryzen 7 5825U, a new 1920x1080 page took 4.3 to 4.5 s at the default cover antialiasing and 3.1 to 3.5 s at CoverSamples = 2. Recomposing the same page after a play took 2.0 to 2.2 s, with every cover served from the cache. That is a span on one machine, not a ceiling, and it scales with pixels: compose when the soundtrack, the unlocks or the play counts change, off the main thread for anything a player opens, and never per frame.

Limitations, stated plainly

  • The drawn letterforms cover Latin capitals, the figures and a small set of marks. A title outside that set is left empty rather than printed as boxes; set it in your own UI.
  • One composition draws one page of one soundtrack.
  • Canticle draws the music room. It does not play music, track unlocks or save play counts; your game already does that and hands Canticle the result.

Documentation: the full guide, also included in the package.

AI disclosure

Code: yes. Graphics: yes, because the code that draws the music room was AI-written; there is no image model anywhere in the art path the buyer runs, and every page is rasterised by the shipped code from hand-authored geometry shaped by your own audio. The store cover uses a generated illustration as its background. Sounds: no, the package contains no audio; the demo's sample clips are synthesised procedurally by its own code. Text and dialog: no.

Purchase

Buy Now$12.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $12.99 USD. You will get access to the following files:

Canticle 1.0.0 for Unity (full C# source + demo scene) 168 kB
Version 1.0.0

Development log

Leave a comment

Log in with itch.io to leave a comment.