···24 async connectedCallback() {
25 // Broadcast if needed
26 if (this.hasAttribute("group")) {
027 this.broadcast(this.nameWithGroup, {});
28 }
29
···24 async connectedCallback() {
25 // Broadcast if needed
26 if (this.hasAttribute("group")) {
27+ // TODO: Replicate state (repeat & shuffle)
28 this.broadcast(this.nameWithGroup, {});
29 }
30
src/fonts/CommitMonoVariable.woff2
This is a binary file and will not be displayed.
+47-31
src/index.vto
···33 title: "Blur / Artwork controller"
34 desc: >
35 Audio playback controller with artwork display.
36- - title: "Loader"
037 desc: >
38 **A constituent that loads other constituents!** Load a constituent from a URL, text snippet or from your user data output.
39 todo: true
···173# DEFINITIONS
174175definitions:
0000176 - title: "Output / Favourites"
177- desc: "Indicate a user's favourite audio. Not a property of a track because tracks are associated with a specific source. Favourites may match with multiple tracks. Specified using the audio's title and artist."
0178 todo: true
179 - title: "Output / Playlist"
180- desc: "Just like favourites, does not refer to specific tracks. Unlike favourites, must also specify the album. Can also be considered a collection which is basically an unordered playlist."
0181 todo: true
182 - title: "Output / Progress"
183- desc: "Used to track progress of (long) audio playback."
00000184 todo: true
185 - title: "Output / Tracks"
186- desc: "Represents audio that can be played, or a placeholder for a source of tracks. Contains a URI that will resolve to the audio. This object may be cached if convenient."
0187 url: "definitions/output/tracks.json"
188189---
190191<header>
192- <h1>
193- {{ await comp.diffuse.logo() }}
194- </h1>
195- <p class="construct dither-mask">
196- Construct your audio player.
197- </p>
198- <p>
199- Diffuse is a collection of components and software that make it possible to listen to audio from various sources on your devices and the web, and to create the ideal digital
200- audio listening experience for you.
201- </p>
202- <p style="align-items: center; display: flex; gap: var(--space-2xs); opacity: 0.55;">
203- <i class="ph-fill ph-crane"></i>
204- <strong style="font-weight: 700;">WORK IN PROGRESS</strong>
205- </p>
206- <ul class="table-of-contents">
207- <li><a href="#usage">Usage</a></li>
208- <li><a href="#demo">Demo</a></li>
209- <li><a href="#themes">Themes</a></li>
210- <li><a href="#constituents">Constituents</a></li>
211- <li><a href="#take-control">Take control</a></li>
212- <li><a href="#elements">Elements</a></li>
213- <li><a href="#definitions">Definitions</a></li>
214- </ul>
215- <p>
216- <small>Built by <a href="https://tokono.ma">tokono.ma</a></small>
217- </p>
000218</header>
219<main>
220 <div class="columns">
···33 title: "Blur / Artwork controller"
34 desc: >
35 Audio playback controller with artwork display.
36+ - url: "themes/loader/constituent/"
37+ title: "Loader"
38 desc: >
39 **A constituent that loads other constituents!** Load a constituent from a URL, text snippet or from your user data output.
40 todo: true
···174# DEFINITIONS
175176definitions:
177+ - title: "Output / Constituent"
178+ desc: >
179+ Custom constituents to keep around.
180+ todo: true
181 - title: "Output / Favourites"
182+ desc: >
183+ Indicate a user's favourite audio. Not a property of a track because tracks are associated with a specific source. Favourites may match with multiple tracks. Specified using the audio's title and artist.
184 todo: true
185 - title: "Output / Playlist"
186+ desc: >
187+ Just like favourites, does not refer to specific tracks. Unlike favourites, must also specify the album. Can also be considered a collection which is basically an unordered playlist.
188 todo: true
189 - title: "Output / Progress"
190+ desc: >
191+ Used to track progress of (long) audio playback.
192+ todo: true
193+ - title: "Output / Theme"
194+ desc: >
195+ Custom theme to keep around.
196 todo: true
197 - title: "Output / Tracks"
198+ desc: >
199+ Represents audio that can be played, or a placeholder for a source of tracks. Contains a URI that will resolve to the audio. This object may be cached if convenient.
200 url: "definitions/output/tracks.json"
201202---
203204<header>
205+ <div>
206+ <h1 class="diffuse-logo">
207+ {{ await comp.diffuse.logo() }}
208+ </h1>
209+ <p class="construct dither-mask">
210+ Construct your audio player.
211+ </p>
212+ <p>
213+ Diffuse is a collection of components and software that make it possible to listen to audio from various sources on your devices and the web, and to create the ideal digital
214+ audio listening experience for you.
215+ </p>
216+ <p style="align-items: center; display: flex; gap: var(--space-2xs); opacity: 0.55;">
217+ <i class="ph-fill ph-crane"></i>
218+ <strong style="font-weight: 700;">WORK IN PROGRESS</strong>
219+ </p>
220+ <ul class="table-of-contents">
221+ <li><a href="#usage">Usage</a></li>
222+ <li><a href="#demo">Demo</a></li>
223+ <li><a href="#themes">Themes</a></li>
224+ <li><a href="#constituents">Constituents</a></li>
225+ <li><a href="#take-control">Take control</a></li>
226+ <li><a href="#elements">Elements</a></li>
227+ <li><a href="#definitions">Definitions</a></li>
228+ </ul>
229+ <p>
230+ <small>Built by <a href="https://tokono.ma">tokono.ma</a></small>
231+ </p>
232+ </div>
233+ <div class="dither-mask filler"></div>
234</header>
235<main>
236 <div class="columns">
···1+---
2+layout: layouts/constituent.vto
3+base: ../../../
4+5+styles:
6+ - styles/base.css
7+ - styles/diffuse/page.css
8+ - styles/vendor/phosphor/fill/style.css
9+10+scripts:
11+ - index.js
12+---
13+14+<header>
15+ <div>
16+ <div>
17+ <a class="diffuse-logo" href="./" style="display: inline-block;">
18+ {{ await comp.diffuse.logo() }}
19+ </a>
20+ </div>
21+ <p class="construct dither-mask" style="margin-top: 0;">
22+ Constituent loader ❈
23+ </p>
24+ <p>
25+ This tool allows you to load a custom <a href="#constituents">constituent</a> besides the <a href="#constituents">existing ones</a>. <strong>If you're missing a feature in Diffuse, this is the place to be!</strong>
26+ </p>
27+ </div>
28+ <div class="dither-mask filler"></div>
29+</header>
30+<main>
31+ <!-- COMMUNITY -->
32+ <div class="columns">
33+ <section>
34+ <h2 id="generate">Generate</h2>
35+ <p>
36+ TODO: Explain how to instruct AI to generate a constituent for you. For example, "I want a nice album overview grouped by the month they were added to my collection"
37+ </p>
38+ </section>
39+40+ <section>
41+ <h2 id="community">Community</h2>
42+ <p>
43+ Check out some constituents from the community and load them here.
44+ </p>
45+ <p>
46+ <small><i class="ph-fill ph-info"></i> Nothing here yet, we're still in alpha.</small>
47+ </p>
48+ </section>
49+ </div>
50+51+ <!-- CONSTRUCT -->
52+ <section>
53+ <h2 id="construct">Build it yourself</h2>
54+ <!--<p></p>-->
55+56+ <div class="columns">
57+ <div class="flex">
58+ <p style="margin-top: 0; max-width: 100%;">
59+ If you know a bit of HTML & Javascript, you can write your own or plug in some code you found elsewhere (be careful what to copy/paste though):
60+ </p>
61+62+ <form>
63+ <textarea class="monospace-font" placeholder="<code>goes here</code>"></textarea>
64+ </form>
65+ </div>
66+67+ <div class="flex">
68+ <p style="margin-top: 0">
69+ Your code here builds on the <a href="themes/loader/constituent/#foundation">foundation</a> listed below, it'll be injected into a <code><body></code> element.
70+ </p>
71+ <p style="margin-bottom: 0;">
72+ <small>Some tips:</small>
73+ </p>
74+ <ul style="margin-top: var(--space-3xs);">
75+ <li><small>Use <code>type="module"</code> when writing scripts.</small></li>
76+ </ul>
77+ <p>
78+ <span class="button-row">
79+ <button disabled>Save</button>
80+ <button disabled>Preview</button>
81+ <button disabled>Open in new tab</button>
82+ </span>
83+ </p>
84+ <p>
85+ Add dependencies for:
86+ </p>
87+ <form>
88+ <select>
89+ <option>Playing audio</option>
90+ <option>Adding items to the queue</option>
91+ <option>Browsing collection</option>
92+ </select>
93+ </form>
94+ <p>
95+ <span class="button-row">
96+ <button disabled>Add code</button>
97+ </span>
98+ </p>
99+ </div>
100+ </div>
101+ </section>
102+103+ <!-- FOUNDATION -->
104+ <section>
105+ <h2 id="foundation">Foundation</h2>
106+ <p>
107+ The default configuration for constituents includes the following elements which are loaded automatically:
108+ </p>
109+ <ul>
110+ <li>orchestrator / input</li>
111+ <li>orchestrator / output</li>
112+ <li>orchestrator / process-tracks <small>(process on launch)</small></li>
113+ <li>processor / metadata</li>
114+ </ul>
115+ <p>
116+ Besides this the foundation provides most other elements preconfigured. These are lazy loaded so you do need to call the method in order to load it. For example:
117+ </p>
118+ <pre><code>{{-
119+ "import defaults from \"@common/constituents/default/config.js\"\ndefaults.lazy.engine.audio()"
120+ }}</code></pre>
121+ </section>
122+</main>