Oh I forgot to link the repo. U can find it here
The Easiest way to generate a cylinder with your favorite Melody is to let AI(or SI ; )) genrate it for you.
Paste this prompt into an AI chat with web browsing, code execution and file downloads. Replace [MELODY NAME] with your favorite melody, or up to five titles separated by semicolons. The AI will research the notes and generate its best arrangement; a MIDI file is optional for later refinement.
Model testing: Testing to date covered higher-tier reasoning models. Free, non-reasoning models have not been tested.
"
Create and attach a playable binary glTF 2.0 music-box cylinder named my-cylinder.glb for the Crescendo simulator. Write and RUN Python or JavaScript to build the file, then provide its download link. The final deliverable must be the actual GLB file. If you cannot run code or attach files, tell me that this task needs those capabilities; do not invent a download link.
Melodies: [MELODY NAME]
Treat semicolon-separated titles as separate melodies, with one indexed turn per melody (maximum 5). Arrange each into a recognizable 30–90 second music-box passage, preserving its main melody and rhythm with gentle, sparse accompaniment.
RESEARCH AND BEST-EFFORT GENERATION
Search the internet for each requested melody's notes and rhythm before arranging it. Look for matching sheet music, MusicXML, ABC notation, MIDI files, or documented note transcriptions. Prefer clearly identified sources and compare versions when possible. If a title is ambiguous, choose the most likely well-known version and state which one you used.
Use the musical information you actually find. If it is incomplete or uncertain, combine it with your musical knowledge and infer missing details as reasonably as you can. Still generate and attach your best playable GLB in this response, clearly identifying any approximations.
Do not pause generation to request a MIDI file, note sequence, or clarification, and do not make user-supplied files a prerequisite. Complete the first arrangement with the information available.
In the delivery summary, link the sources you consulted and briefly identify uncertain passages or inferred details. Do not invent sources or claim an approximation is an exact transcription.
After attaching the GLB, if any melody remains uncertain, offer an optional follow-up: "If you have a MIDI file for this melody, send it and I can refine the cylinder for more accurate notes and timing." Do not wait for that file before delivering the first GLB.
MUSIC AND TIMING
Use 72 teeth tuned to integer MIDI notes 36 through 107 inclusive (C2–B7; middle C is 60). Tooth index i = midi - 36.
Choose one common duration T in seconds PER TURN, long enough for every arrangement, between 2 and 600 seconds. The full programme lasts T * N, where N is the number of melodies (1–5).
Each pluck has a MIDI pitch, a time t satisfying 0 <= t < T, a zero-based turn k from 0 to N-1, and a velocity greater than 0 and at most 1. Restart times at 0 for every turn. Chords are simultaneous pins; no note-length field is needed.
Include every note of the arrangement, with at most 6,000 pins total and no duplicate pitch/time/turn events.
REAL 3D PIN GEOMETRY
The app reads music from physical pin positions. Build a brass barrel and real, separate radial pin mesh nodes; melody metadata alone does not produce music.
Use metres and glTF coordinates. Center the barrel on the origin with its long axis along X, length 0.214 m and radius 0.024 m. Name its mesh node cylinder_body.
Use one shared, low-poly pin mesh: a symmetric cylinder centered on its local origin, long axis along local Y, length 0.0015 m, radius 0.00023 m, with 6–8 sides. Keep its mean vertex position at the local origin.
For each pluck, compute these values using radians:
theta = 2.0 - 2 * pi * t / T
x = -0.099 + i * 0.198 / 71 + k * 0.00055
y = 0.02475 * cos(theta)
z = 0.02475 * sin(theta)
Create one node per pin, named pin_00000, pin_00001, and so on, each referencing the shared pin mesh with a single triangle primitive. Set translation to [x, y, z] and rotation to the glTF quaternion [sin(theta/2), 0, 0, cos(theta/2)]. Put its velocity in node.extras.velocity.
Put the barrel and all pins under one root node named MusicCylinder. Keep the root transform at identity. The 0.00055 m turn offset is essential for indexed melodies.
Use uncompressed triangle meshes with FLOAT POSITION/NORMAL accessors and unsigned integer triangle indices, plus a brass PBR material. Keep the expanded vertex count across all instances below 700,000 and the file below 35 MB.
REQUIRED METADATA
Set MusicCylinder.extras.musicBox to an object with these fields:
schema: "crescendo-cylinder/v1"
title: the requested melody or collection title
composer: the original composer or songwriter
secondsPerTurn: T
turns: N
tunes: exactly N objects with title and composer, in the requested order
tuning: the complete array of all 72 integers from 36 to 107 inclusive
axis: "X"; units: "metres"
length: 0.214; radius: 0.024; minX: -0.099; maxX: 0.099
pinLength: 0.0015; pinRadius: 0.00023; contactAngle: 2.0; indexStep: 0.00055
Do not put a hidden note/time array or audio recording in the GLB. The separate pin meshes are the score.
PACKAGING AND VALIDATION
Write a self-contained, uncompressed GLB 2.0 with one embedded binary buffer, a default scene referencing MusicCylinder, valid accessors and POSITION min/max bounds. Use no external files, sparse accessors, Draco, Meshopt, or quantization extensions.
Use the little-endian GLB header (magic 0x46546C67, version 2, correct total byte length), followed by JSON and BIN chunks. Align buffer views and chunks to 4 bytes; pad the JSON chunk with spaces and the BIN chunk with zero bytes. buffers[0].byteLength must match the buffer payload.
Reopen the written file and check every chunk, accessor, node reference, pin count, and metadata value. Compute each pin's center from its transformed mesh vertices. Recover pitch/turn by matching X against all tooth/turn lane combinations, and recover time from atan2(z, y). Check these against the arrangement, accounting for the time wrap at 0/T.
Attach the verified my-cylinder.glb file with a short summary of the melodies, seconds per turn, research sources, and any approximations. Include the optional MIDI refinement offer after the download link when needed.