tuneframes 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +166 -166
  2. package/README.md +158 -55
  3. package/examples/example-ai-dj-chill.html +167 -0
  4. package/examples/example-ai-dj-dark.html +167 -0
  5. package/examples/example-ai-dj-energetic.html +167 -0
  6. package/examples/example-ai-dj-happy.html +167 -0
  7. package/examples/example-ai-dj.html +167 -0
  8. package/examples/example-ambient.html +63 -63
  9. package/examples/example-ambient.mp3 +0 -0
  10. package/examples/example-bass.html +47 -47
  11. package/examples/example-lofi.html +45 -45
  12. package/examples/example-lofi.mp3 +0 -0
  13. package/examples/example-minimal.html +20 -20
  14. package/examples/example-orchestral.html +67 -67
  15. package/examples/example-orchestral.mp3 +0 -0
  16. package/examples/example-piano.html +52 -52
  17. package/examples/example-piano.mp3 +0 -0
  18. package/examples/example-techno.html +69 -69
  19. package/examples/example-techno.mp3 +0 -0
  20. package/package.json +42 -37
  21. package/registry/presets/bass-electric.html +67 -0
  22. package/registry/presets/bass-saw.html +22 -0
  23. package/registry/presets/chord-progression.html +22 -0
  24. package/registry/presets/drums-808.html +85 -0
  25. package/registry/presets/drums-lofi.html +35 -0
  26. package/registry/presets/lead-piano.html +26 -0
  27. package/registry/presets/piano-salamander.html +69 -0
  28. package/registry/presets/reverb-warm.html +11 -0
  29. package/registry/samples.json +226 -0
  30. package/skills/audio-ambient/SKILL.md +141 -0
  31. package/skills/audio-ambient/example.html +113 -0
  32. package/skills/audio-boss-battle/SKILL.md +157 -0
  33. package/skills/audio-boss-battle/example.html +185 -0
  34. package/skills/audio-boss-battle/example.mp3 +0 -0
  35. package/skills/audio-chillwave/SKILL.md +142 -0
  36. package/skills/audio-chillwave/example.html +144 -0
  37. package/skills/audio-cinematic/SKILL.md +147 -0
  38. package/skills/audio-cinematic/example.html +123 -0
  39. package/skills/audio-classical/SKILL.md +138 -0
  40. package/skills/audio-classical/example.html +145 -0
  41. package/skills/audio-dnb/SKILL.md +142 -0
  42. package/skills/audio-dnb/example.html +124 -0
  43. package/skills/audio-downtempo/SKILL.md +152 -0
  44. package/skills/audio-downtempo/example.html +164 -0
  45. package/skills/audio-folk/SKILL.md +139 -0
  46. package/skills/audio-folk/example.html +132 -0
  47. package/skills/audio-funk/SKILL.md +149 -0
  48. package/skills/audio-funk/example.html +144 -0
  49. package/skills/audio-future-bass/SKILL.md +163 -0
  50. package/skills/audio-future-bass/example.html +164 -0
  51. package/skills/audio-hip-hop/SKILL.md +133 -0
  52. package/skills/audio-hip-hop/example.html +129 -0
  53. package/skills/audio-house/SKILL.md +147 -0
  54. package/skills/audio-house/example.html +128 -0
  55. package/skills/audio-indie-pop/SKILL.md +150 -0
  56. package/skills/audio-indie-pop/example.html +121 -0
  57. package/skills/audio-jazz/SKILL.md +141 -0
  58. package/skills/audio-jazz/example.html +146 -0
  59. package/skills/audio-lofi/SKILL.md +140 -0
  60. package/skills/audio-lofi/example.html +135 -0
  61. package/skills/audio-minimal/SKILL.md +155 -0
  62. package/skills/audio-minimal/example.html +118 -0
  63. package/skills/audio-orchestral/SKILL.md +156 -0
  64. package/skills/audio-orchestral/example.html +140 -0
  65. package/skills/audio-r-and-b/SKILL.md +134 -0
  66. package/skills/audio-r-and-b/example.html +154 -0
  67. package/skills/audio-r-and-b/example.mp3 +0 -0
  68. package/skills/audio-techno/SKILL.md +140 -0
  69. package/skills/audio-techno/example.html +125 -0
  70. package/skills/audio-trap/SKILL.md +123 -0
  71. package/skills/audio-trap/example.html +119 -0
  72. package/skills/render-retest/example.html +115 -0
  73. package/skills/tuneframes/SKILL.md +221 -0
  74. package/skills/tuneframes-cli/SKILL.md +46 -0
  75. package/skills/verify/example.html +104 -0
  76. package/src/cli.js +260 -151
  77. package/src/render.js +134 -7
  78. package/examples/example-bass.mp3 +0 -0
  79. package/examples/example-demo-beat.wav +0 -0
  80. package/examples/example-orchestral.wav +0 -0
package/LICENSE CHANGED
@@ -1,167 +1,167 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work.
38
-
39
- "Contribution" shall mean any work of authorship, including
40
- the original version of the Work and any modifications or additions
41
- to that Work or Derivative Works thereof, that is intentionally
42
- submitted to the Licensor for inclusion in the Work by the copyright owner
43
- or by an individual or Legal Entity authorized to submit on behalf of
44
- the copyright owner. For the purposes of this definition, "submitted"
45
- means any form of electronic, verbal, or written communication sent
46
- to the Licensor or its representatives, including but not limited to
47
- communication on electronic mailing lists, source code control systems,
48
- and issue tracking systems that are managed by, or on behalf of, the
49
- Licensor for the purpose of discussing and improving the Work, but
50
- excluding communication that is conspicuously marked or otherwise
51
- designated in writing by the copyright owner as "Not a Contribution."
52
-
53
- "Contributor" shall mean Licensor and any individual or Legal Entity
54
- on behalf of whom a Contribution has been received by Licensor and
55
- subsequently incorporated within the Work.
56
-
57
- 2. Grant of Copyright License. Subject to the terms and conditions of
58
- this License, each Contributor hereby grants to You a perpetual,
59
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
60
- copyright license to reproduce, prepare Derivative Works of,
61
- publicly display, publicly perform, sublicense, and distribute the
62
- Work and such Derivative Works in Source or Object form.
63
-
64
- 3. Grant of Patent License. Subject to the terms and conditions of
65
- this License, each Contributor hereby grants to You a perpetual,
66
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
67
- (except as stated in this section) patent license to make, have made,
68
- use, offer to sell, sell, import, and otherwise transfer the Work,
69
- where such license applies only to those patent claims licensable
70
- by such Contributor that are necessarily infringed by their
71
- Contribution(s) alone or by combination of their Contribution(s)
72
- with the Work to which such Contribution(s) was submitted. If You
73
- institute patent litigation against any entity (including a
74
- cross-claim or counterclaim in a lawsuit) alleging that the Work
75
- or a Contribution incorporated within the Work constitutes direct
76
- or contributory patent infringement, then any patent licenses
77
- granted to You under this License for that Work shall terminate
78
- as of the date such litigation is filed.
79
-
80
- 4. Redistribution. You may reproduce and distribute copies of the
81
- Work or Derivative Works thereof in any medium, with or without
82
- modifications, and in Source or Object form, provided that You
83
- meet the following conditions:
84
-
85
- (a) You must give any other recipients of the Work or
86
- Derivative Works a copy of this License; and
87
-
88
- (b) You must cause any modified files to carry prominent notices
89
- stating that You changed the files; and
90
-
91
- (c) You must retain, in the Source form of any Derivative Works
92
- that You distribute, all copyright, patent, trademark, and
93
- attribution notices from the Source form of the Work,
94
- excluding those notices that do not pertain to any part of
95
- the Derivative Works; and
96
-
97
- (d) If the Work includes a "NOTICE" text file as part of its
98
- distribution, then any Derivative Works that You distribute must
99
- include a readable copy of the attribution notices contained
100
- within such NOTICE file, excluding those notices that do not
101
- pertain to any part of the Derivative Works, in at least one
102
- of the following places: within a NOTICE text file distributed
103
- as part of the Derivative Works; within the Source form or
104
- documentation, if provided along with the Derivative Works; or,
105
- within a display generated by the Derivative Works, if and
106
- wherever such third-party notices normally appear. The contents
107
- of the NOTICE file are for informational purposes only and
108
- do not modify the License. You may add Your own attribution
109
- notices within Derivative Works that You distribute, alongside
110
- or as an addendum to the NOTICE text from the Work, provided
111
- that such additional attribution notices cannot be construed
112
- as modifying the License.
113
-
114
- You may add Your own copyright statement to Your modifications and
115
- may provide additional or different license terms and conditions
116
- for use, reproduction, or distribution of Your modifications, or
117
- for any such Derivative Works as a whole, provided Your use,
118
- reproduction, and distribution of the Work otherwise complies with
119
- the conditions stated in this License.
120
-
121
- 5. Submission of Contributions. Unless You explicitly state otherwise,
122
- any Contribution intentionally submitted for inclusion in the Work
123
- by You to the Licensor shall be under the terms and conditions of
124
- this License, without any additional terms or conditions.
125
- Notwithstanding the above, nothing herein shall supersede or modify
126
- the terms of any separate license agreement you may have executed
127
- with Licensor regarding such Contributions.
128
-
129
- 6. Trademarks. This License does not grant permission to use the trade
130
- names, trademarks, service marks, or product names of the Licensor,
131
- except as required for reasonable and customary use in describing the
132
- origin of the Work and reproducing the content of the NOTICE file.
133
-
134
- 7. Disclaimer of Warranty. Unless required by applicable law or
135
- agreed to in writing, Licensor provides the Work (and each
136
- Contributor provides its Contributions) on an "AS IS" BASIS,
137
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
138
- implied, including, without limitation, any warranties or conditions
139
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
140
- PARTICULAR PURPOSE. You are solely responsible for determining the
141
- appropriateness of using or redistributing the Work and assume any
142
- risks associated with Your exercise of permissions under this License.
143
-
144
- 8. Limitation of Liability. In no event and under no legal theory,
145
- whether in tort (including negligence), contract, or otherwise,
146
- unless required by applicable law (such as deliberate and grossly
147
- negligent acts) or agreed to in writing, shall any Contributor be
148
- liable to You for damages, including any direct, indirect, special,
149
- incidental, or consequential damages of any character arising as a
150
- result of this License or out of the use or inability to use the
151
- Work (including but not limited to damages for loss of goodwill,
152
- work stoppage, computer failure or malfunction, or any and all
153
- other commercial damages or losses), even if such Contributor
154
- has been advised of the possibility of such damages.
155
-
156
- 9. Accepting Warranty or Additional Liability. While redistributing
157
- the Work or Derivative Works thereof, You may choose to offer,
158
- and charge a fee for, acceptance of support, warranty, indemnity,
159
- or other liability obligations and/or rights consistent with this
160
- License. However, in accepting such obligations, You may act only
161
- on Your own behalf and on Your sole responsibility, not on behalf
162
- of any other Contributor, and only if You agree to indemnify,
163
- defend, and hold each Contributor harmless for any liability
164
- incurred by, or claims asserted against, such Contributor by reason
165
- of your accepting any such warranty or additional liability.
166
-
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Contribution" shall mean any work of authorship, including
40
+ the original version of the Work and any modifications or additions
41
+ to that Work or Derivative Works thereof, that is intentionally
42
+ submitted to the Licensor for inclusion in the Work by the copyright owner
43
+ or by an individual or Legal Entity authorized to submit on behalf of
44
+ the copyright owner. For the purposes of this definition, "submitted"
45
+ means any form of electronic, verbal, or written communication sent
46
+ to the Licensor or its representatives, including but not limited to
47
+ communication on electronic mailing lists, source code control systems,
48
+ and issue tracking systems that are managed by, or on behalf of, the
49
+ Licensor for the purpose of discussing and improving the Work, but
50
+ excluding communication that is conspicuously marked or otherwise
51
+ designated in writing by the copyright owner as "Not a Contribution."
52
+
53
+ "Contributor" shall mean Licensor and any individual or Legal Entity
54
+ on behalf of whom a Contribution has been received by Licensor and
55
+ subsequently incorporated within the Work.
56
+
57
+ 2. Grant of Copyright License. Subject to the terms and conditions of
58
+ this License, each Contributor hereby grants to You a perpetual,
59
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
60
+ copyright license to reproduce, prepare Derivative Works of,
61
+ publicly display, publicly perform, sublicense, and distribute the
62
+ Work and such Derivative Works in Source or Object form.
63
+
64
+ 3. Grant of Patent License. Subject to the terms and conditions of
65
+ this License, each Contributor hereby grants to You a perpetual,
66
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
67
+ (except as stated in this section) patent license to make, have made,
68
+ use, offer to sell, sell, import, and otherwise transfer the Work,
69
+ where such license applies only to those patent claims licensable
70
+ by such Contributor that are necessarily infringed by their
71
+ Contribution(s) alone or by combination of their Contribution(s)
72
+ with the Work to which such Contribution(s) was submitted. If You
73
+ institute patent litigation against any entity (including a
74
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
75
+ or a Contribution incorporated within the Work constitutes direct
76
+ or contributory patent infringement, then any patent licenses
77
+ granted to You under this License for that Work shall terminate
78
+ as of the date such litigation is filed.
79
+
80
+ 4. Redistribution. You may reproduce and distribute copies of the
81
+ Work or Derivative Works thereof in any medium, with or without
82
+ modifications, and in Source or Object form, provided that You
83
+ meet the following conditions:
84
+
85
+ (a) You must give any other recipients of the Work or
86
+ Derivative Works a copy of this License; and
87
+
88
+ (b) You must cause any modified files to carry prominent notices
89
+ stating that You changed the files; and
90
+
91
+ (c) You must retain, in the Source form of any Derivative Works
92
+ that You distribute, all copyright, patent, trademark, and
93
+ attribution notices from the Source form of the Work,
94
+ excluding those notices that do not pertain to any part of
95
+ the Derivative Works; and
96
+
97
+ (d) If the Work includes a "NOTICE" text file as part of its
98
+ distribution, then any Derivative Works that You distribute must
99
+ include a readable copy of the attribution notices contained
100
+ within such NOTICE file, excluding those notices that do not
101
+ pertain to any part of the Derivative Works, in at least one
102
+ of the following places: within a NOTICE text file distributed
103
+ as part of the Derivative Works; within the Source form or
104
+ documentation, if provided along with the Derivative Works; or,
105
+ within a display generated by the Derivative Works, if and
106
+ wherever such third-party notices normally appear. The contents
107
+ of the NOTICE file are for informational purposes only and
108
+ do not modify the License. You may add Your own attribution
109
+ notices within Derivative Works that You distribute, alongside
110
+ or as an addendum to the NOTICE text from the Work, provided
111
+ that such additional attribution notices cannot be construed
112
+ as modifying the License.
113
+
114
+ You may add Your own copyright statement to Your modifications and
115
+ may provide additional or different license terms and conditions
116
+ for use, reproduction, or distribution of Your modifications, or
117
+ for any such Derivative Works as a whole, provided Your use,
118
+ reproduction, and distribution of the Work otherwise complies with
119
+ the conditions stated in this License.
120
+
121
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
122
+ any Contribution intentionally submitted for inclusion in the Work
123
+ by You to the Licensor shall be under the terms and conditions of
124
+ this License, without any additional terms or conditions.
125
+ Notwithstanding the above, nothing herein shall supersede or modify
126
+ the terms of any separate license agreement you may have executed
127
+ with Licensor regarding such Contributions.
128
+
129
+ 6. Trademarks. This License does not grant permission to use the trade
130
+ names, trademarks, service marks, or product names of the Licensor,
131
+ except as required for reasonable and customary use in describing the
132
+ origin of the Work and reproducing the content of the NOTICE file.
133
+
134
+ 7. Disclaimer of Warranty. Unless required by applicable law or
135
+ agreed to in writing, Licensor provides the Work (and each
136
+ Contributor provides its Contributions) on an "AS IS" BASIS,
137
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
138
+ implied, including, without limitation, any warranties or conditions
139
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
140
+ PARTICULAR PURPOSE. You are solely responsible for determining the
141
+ appropriateness of using or redistributing the Work and assume any
142
+ risks associated with Your exercise of permissions under this License.
143
+
144
+ 8. Limitation of Liability. In no event and under no legal theory,
145
+ whether in tort (including negligence), contract, or otherwise,
146
+ unless required by applicable law (such as deliberate and grossly
147
+ negligent acts) or agreed to in writing, shall any Contributor be
148
+ liable to You for damages, including any direct, indirect, special,
149
+ incidental, or consequential damages of any character arising as a
150
+ result of this License or out of the use or inability to use the
151
+ Work (including but not limited to damages for loss of goodwill,
152
+ work stoppage, computer failure or malfunction, or any and all
153
+ other commercial damages or losses), even if such Contributor
154
+ has been advised of the possibility of such damages.
155
+
156
+ 9. Accepting Warranty or Additional Liability. While redistributing
157
+ the Work or Derivative Works thereof, You may choose to offer,
158
+ and charge a fee for, acceptance of support, warranty, indemnity,
159
+ or other liability obligations and/or rights consistent with this
160
+ License. However, in accepting such obligations, You may act only
161
+ on Your own behalf and on Your sole responsibility, not on behalf
162
+ of any other Contributor, and only if You agree to indemnify,
163
+ defend, and hold each Contributor harmless for any liability
164
+ incurred by, or claims asserted against, such Contributor by reason
165
+ of your accepting any such warranty or additional liability.
166
+
167
167
  END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -1,20 +1,58 @@
1
1
  # TuneFrames
2
2
 
3
- **Agent-native music generation.**
3
+ **Agent-native music generation — for AI agents and developers.**
4
4
 
5
- Write a single HTML file with Tone.js. Render it to MP3 or WAV with one command. No per-render fees. No Suno wrapper. Your agent, your audio.
5
+ Write a single HTML file with Tone.js. Render it to MP3 with one CLI command. No per-render fees. No API keys. Fully deterministic.
6
6
 
7
+ [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white)](https://discord.gg/6VfDnxv3zC)
8
+ [![npm](https://img.shields.io/npm/dm/tuneframes?logo=npm)](https://www.npmjs.com/package/tuneframes)
9
+ [![GitHub stars](https://img.shields.io/github/stars/Shepherd217/TuneFrames)](https://github.com/Shepherd217/TuneFrames)
10
+
11
+ ---
12
+
13
+ ## What's New in v0.2.0
14
+
15
+ - **Sample instruments** — real acoustic piano, bass, strings, brass, guitar, vibraphone, flute, and choir via `Tone.Sampler` + the gleitz FluidR3_GM CDN. No extra installs.
16
+ - **22 agent skills** — 20 genre skills (lo-fi, jazz, techno, ambient, trap, D&B, classical, folk, funk, hip-hop, and more) plus the 2 core skills. Install any with `npx skills add shepherd217/tuneframes`.
17
+ - **AI DJ example** — a single HTML file that renders four different moods (`chill`, `energetic`, `dark`, `happy`) from a URL param. Drop it into any html-anything pipeline as a parameterized audio surface.
18
+
19
+ ---
20
+
21
+ ## Option 1: With an AI coding agent (recommended)
22
+
23
+ ```bash
24
+ npx skills add shepherd217/tuneframes
7
25
  ```
26
+
27
+ Then describe what you want:
28
+
29
+ ```
30
+ Create a 10-second lo-fi beat with a piano chord progression, jazz brushes, and a walking bass
31
+ ```
32
+
33
+ The agent will write an HTML file and you can render it:
34
+
35
+ ```bash
36
+ tuneframes render composition.html --output track.mp3
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Option 2: CLI only
42
+
43
+ ```bash
44
+ npm install -g tuneframes
8
45
  npx tuneframes init my-track
9
46
  cd my-track
10
- tuneframes render track.html --output my-track.mp3
47
+ # Edit composition.html, then:
48
+ tuneframes render composition.html --output my-track.mp3
11
49
  ```
12
50
 
13
51
  ---
14
52
 
15
53
  ## How it works
16
54
 
17
- 1. **Write** — Create an HTML file using [Tone.js](https://tonejs.github.io/). Tone.Offline renders the composition to an AudioBuffer with sample-accurate timing.
55
+ 1. **Write** — Create an HTML file using [Tone.js](https://tonejs.github.io/). `Tone.Offline()` renders the composition to an AudioBuffer with sample-accurate timing.
18
56
 
19
57
  2. **Render** — The `tuneframes render` command:
20
58
  - Spins up a headless browser
@@ -27,12 +65,99 @@ tuneframes render track.html --output my-track.mp3
27
65
 
28
66
  ---
29
67
 
30
- ## CLI
68
+ ## Minimal example
69
+
70
+ ```html
71
+ <div id="tuneframes" style="display:none">{"bpm":120,"duration":"4s"}</div>
72
+ <script src="https://unpkg.com/tone@14.7.77/build/Tone.js"></script>
73
+ <script>
74
+ async function main() {
75
+ await Tone.start();
76
+ const synth = new Tone.Synth().toDestination();
77
+ synth.triggerAttackRelease('C4', '2n', 0);
78
+ synth.triggerAttackRelease('E4', '2n', '2n');
79
+ synth.triggerAttackRelease('G4', '2n', '4n');
80
+ synth.triggerAttackRelease('C5', '2n', '6n');
81
+ }
82
+ </script>
83
+ ```
84
+
85
+ `tuneframes render track.html --output track.mp3` — Tone.js CDN loads automatically.
86
+
87
+ > **Note on duration:** The `"duration"` field in the metadata block uses **seconds** (`"4s"`, `"10s"`). In Tone.js time notation, `n` means "whole note fractions" — `4n` = 4 quarter notes = 2 seconds at 120 BPM. Using literal seconds in metadata avoids this confusion.
88
+
89
+ ---
90
+
91
+ ## Sample Instruments
92
+
93
+ TuneFrames v0.2.0 adds `Tone.Sampler` support via the [gleitz FluidR3_GM CDN](https://github.com/gleitz/midi-js-soundfonts) — public domain, no extra installs, loads at render time.
94
+
95
+ ### Supported instruments
96
+
97
+ | Instrument | Category | Range |
98
+ |---|---|---|
99
+ | `acoustic_grand_piano` | Piano | A0–C8 |
100
+ | `acoustic_bass` | Bass | C1–G4 |
101
+ | `string_ensemble_1` | Strings | C2–C7 |
102
+ | `brass_section` | Brass | C2–C6 |
103
+ | `acoustic_guitar_nylon` | Guitar | E2–D6 |
104
+ | `vibraphone` | Mallet | C3–C7 |
105
+ | `flute` | Woodwind | C4–A7 |
106
+ | `choir_aahs` | Choir | C3–G5 |
107
+
108
+ Full URL mappings in [`registry/samples.json`](registry/samples.json).
109
+
110
+ ### Code example
111
+
112
+ ```js
113
+ async function main() {
114
+ await Tone.start();
115
+
116
+ const piano = new Tone.Sampler({
117
+ urls: { A4: 'A4.mp3', C4: 'C4.mp3', 'F#4': 'Fs4.mp3', A5: 'A5.mp3' },
118
+ baseUrl: 'https://gleitz.github.io/midi-js-soundfonts/FluidR3_GM/acoustic_grand_piano-mp3/'
119
+ }).toDestination();
120
+
121
+ // Wait for samples to load before scheduling — this is required
122
+ await Tone.loaded();
123
+
124
+ piano.triggerAttackRelease(['C4','E4','G4'], '2n', 0);
125
+ piano.triggerAttackRelease(['F3','A3','C4'], '2n', Tone.Time('2n').toSeconds());
126
+ piano.triggerAttackRelease(['G3','B3','D4'], '2n', Tone.Time('1n').toSeconds());
127
+ piano.triggerAttackRelease(['C4','E4','G4'], '1n', Tone.Time('1n').toSeconds() + Tone.Time('2n').toSeconds());
128
+ }
129
+ ```
130
+
131
+ Ready-to-render presets: [`registry/presets/piano-salamander.html`](registry/presets/piano-salamander.html), [`registry/presets/bass-electric.html`](registry/presets/bass-electric.html).
132
+
133
+ ---
134
+
135
+ ## Skills (22 total)
136
+
137
+ Install all TuneFrames skills with one command:
31
138
 
32
139
  ```bash
33
- # Install globally
34
- npm install -g tuneframes
140
+ npx skills add shepherd217/tuneframes
141
+ ```
142
+
143
+ ### Core skills (2)
144
+
145
+ | Skill | Description |
146
+ |---|---|
147
+ | `tuneframes` | Tone.js composition patterns, instruments, common patterns, duration warning |
148
+ | `tuneframes-cli` | CLI command reference, render pipeline, output options |
149
+
150
+ ### Genre skills (20)
151
+
152
+ ambient · boss-battle · chillwave · cinematic · classical · dnb · downtempo · folk · funk · future-bass · hip-hop · house · indie-pop · jazz · lofi · minimal · orchestral · r-and-b · techno · trap
35
153
 
154
+ Each genre skill includes BPM range, characteristic progressions, drum patterns, instrument configs, and a verified example composition.
155
+
156
+ ---
157
+
158
+ ## CLI reference
159
+
160
+ ```bash
36
161
  # Render a composition
37
162
  tuneframes render my-track.html --output my-track.mp3
38
163
 
@@ -41,70 +166,48 @@ tuneframes preview my-track.html
41
166
 
42
167
  # Scaffold a new track
43
168
  tuneframes init my-track
44
- ```
45
-
46
- ---
47
-
48
- ## Example
49
169
 
50
- ```html
51
- <script src="https://unpkg.com/tone@14.7.77/build/Tone.js"></script>
52
- <script>
53
- // Define 4-bar chord progression
54
- const chords = [
55
- ['C4', 'E4', 'G4'], // C major
56
- ['A3', 'C4', 'E4'], // A minor
57
- ['F3', 'A3', 'C4'], // F major
58
- ['G3', 'B3', 'D4'], // G major
59
- ];
60
-
61
- const synth = new Tone.PolySynth(Tone.Synth).toDestination();
62
- const seq = new Tone.Sequence((time, note) => {
63
- synth.triggerAttackRelease(note, '4n', time);
64
- }, chords.flat()).start(0);
65
-
66
- Tone.Transport.start();
67
-
68
- // Render with Tone.Offline
69
- Tone.Offline(() => {
70
- new Tone.PolySynth(Tone.Synth).toDestination();
71
- new Tone.Sequence((time, note) => {
72
- synth.triggerAttackRelease(note, '4n', time);
73
- }, chords.flat()).start(0);
74
- Tone.Transport.start();
75
- }, 8).then(buffer => {
76
- const wav = audioBufferToWav(buffer);
77
- writeFile('track.wav', Buffer.from(wav));
78
- });
79
-
80
- // Expose writeFile to the browser
81
- function audioBufferToWav(buffer) { /* included by tuneframes */ }
82
- </script>
170
+ # Add a preset (reverb, drums, bass, chords, piano)
171
+ tuneframes add reverb-warm
172
+ tuneframes add drums-lofi
173
+ tuneframes add bass-saw
174
+ tuneframes add chord-progression
175
+ tuneframes add lead-piano
83
176
  ```
84
177
 
85
- See [`examples/`](examples/) for full compositions — ambient, lo-fi, techno, orchestral, piano, and bass.
178
+ See [`examples/`](examples/) for full compositions — ambient, lo-fi, techno, orchestral, piano, bass, and the AI DJ parameterized example.
86
179
 
87
180
  ---
88
181
 
89
182
  ## Requirements
90
183
 
91
184
  - Node.js 18+
92
- - FFmpeg (install via `apt install ffmpeg` or `brew install ffmpeg`)
185
+ - FFmpeg (`apt install ffmpeg` or `brew install ffmpeg`)
93
186
 
94
187
  ---
95
188
 
96
189
  ## Comparison
97
190
 
98
- | | TuneFrames | Suno API | ElevenLabs |
99
- |---|---|---|---|
100
- | Open source | ✓ | ✗ | ✗ |
101
- | Per-render fee | None | Yes | Yes |
102
- | Agent-native | ✓ | Wrapper | Wrapper |
103
- | Full audio control | ✓ | Limited | Limited |
104
- | Deterministic output | ✓ | ✗ | ✗ |
191
+ | | TuneFrames | Hyperframes | Suno API | ElevenLabs |
192
+ |---|---|---|---|---|
193
+ | Open source | ✓ | ✓ | ✗ | ✗ |
194
+ | Per-render fee | None | None | Yes | Yes |
195
+ | Agent-native | ✓ | ✓ | Wrapper | Wrapper |
196
+ | Full audio control | ✓ | ✓ | Limited | Limited |
197
+ | Deterministic output | ✓ | ✓ | ✗ | ✗ |
198
+ | Sample instruments | ✓ | N/A | N/A | N/A |
199
+ | Modality | Audio | Video | Audio | Audio |
200
+
201
+ ---
202
+
203
+ ## See Also
204
+
205
+ TuneFrames is the audio surface in the html-anything paradigm — write HTML, render anything.
206
+
207
+ - [Hyperframes](https://github.com/Shepherd217/Hyperframes) — the video counterpart: write HTML with GSAP/Three.js, render to MP4. Same model, same CLI pattern.
105
208
 
106
209
  ---
107
210
 
108
211
  ## License
109
212
 
110
- Apache 2.0
213
+ Apache 2.0