<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Architecture on Orpheus</title><link>https://docs.artur-rios.tech/orpheus/docs/architecture/</link><description>Recent content in Architecture on Orpheus</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://docs.artur-rios.tech/orpheus/docs/architecture/index.xml" rel="self" type="application/rss+xml"/><item><title>Finding a track's words</title><link>https://docs.artur-rios.tech/orpheus/docs/architecture/lyrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.artur-rios.tech/orpheus/docs/architecture/lyrics/</guid><description>&lt;h2 id="the-order-is-the-feature"&gt;The order is the feature&lt;/h2&gt;&#10;&lt;p&gt;It never varies, and every part of it is a rule written down in the&#10;specifications rather than a decision made in code:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;What this machine holds.&lt;/strong&gt; A &lt;code&gt;.lrc&lt;/code&gt; beside the track, then the track&amp;rsquo;s ID3&#10;&lt;code&gt;SYLT&lt;/code&gt; frame, then its lyrics text tag. Whatever these hold is the answer,&#10;and nothing else is asked.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Only then, a lookup&lt;/strong&gt; — and only if the owner has left it on.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;A sheet that came back is written beside the track&lt;/strong&gt; as a &lt;code&gt;.lrc&lt;/code&gt;, so the&#10;next launch finds it at step 1 and asks nobody anything.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The sidecar outranks both tags deliberately: it is the one of the three an owner&#10;can write, correct and delete with a text editor and no help from this&#10;application. Of the two tags, the timed frame outranks the text one, because a&#10;file carrying both was written by somebody who put the timed copy in &lt;code&gt;SYLT&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Scanning a library</title><link>https://docs.artur-rios.tech/orpheus/docs/architecture/library/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.artur-rios.tech/orpheus/docs/architecture/library/</guid><description>&lt;h2 id="what-a-scan-is"&gt;What a scan is&lt;/h2&gt;&#10;&lt;p&gt;A scan walks the folders the owner registered, reads the tags out of every audio&#10;file it finds, extracts cover art, and writes the result as a single JSON&#10;document beside the settings. That document is the library: it is read once at&#10;launch and held in memory for the run.&lt;/p&gt;&#10;&lt;p&gt;Everything expensive about that is avoided wherever it can be, because on a&#10;library of eleven thousand tracks the naive version makes every launch stutter.&lt;/p&gt;</description></item><item><title>Playing something</title><link>https://docs.artur-rios.tech/orpheus/docs/architecture/playback/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.artur-rios.tech/orpheus/docs/architecture/playback/</guid><description>&lt;h2 id="the-queue"&gt;The queue&lt;/h2&gt;&#10;&lt;p&gt;Anything playable produces a queue: a track, a record, an artist, or the whole&#10;library shuffled. The queue knows what kind of thing it came from, which is what&#10;lets the player say &lt;em&gt;what&lt;/em&gt; is playing rather than only which file.&lt;/p&gt;&#10;&lt;pre class="mermaid"&gt;classDiagram&#10; class PlaybackQueue {&#10; &amp;#43;List~AudioFile~ tracks&#10; &amp;#43;QueueKind kind&#10; &amp;#43;String? label&#10; &amp;#43;int index&#10; }&#10; class QueueKind {&#10; &amp;lt;&amp;lt;enumeration&amp;gt;&amp;gt;&#10; track&#10; album&#10; artist&#10; playlist&#10; }&#10; class QueueRepeat {&#10; &amp;lt;&amp;lt;enumeration&amp;gt;&amp;gt;&#10; off&#10; all&#10; one&#10; &amp;#43;next() QueueRepeat&#10; }&#10; class AudioPlaybackState {&#10; &amp;#43;PlaybackQueue queue&#10; &amp;#43;AudioStage stage&#10; &amp;#43;PlaybackStatus status&#10; &amp;#43;QueueRepeat repeat&#10; }&#10;&#10; AudioPlaybackState *-- PlaybackQueue&#10; AudioPlaybackState *-- QueueRepeat&#10; PlaybackQueue *-- QueueKind&lt;/pre&gt;&#10;&lt;p&gt;&lt;code&gt;label&lt;/code&gt; is carried but never worded here. The domain has no localized strings,&#10;so what an unnamed record is &lt;em&gt;called&lt;/em&gt; is a presentation decision made once, on&#10;the way to the screen.&lt;/p&gt;</description></item></channel></rss>