このページでは、Symfonium のカスタム文字列テンプレート構文と、各コンテキストで利用できるフィールド一覧を説明します。
構成は次のとおりです。
- 共通テンプレート構文: プレースホルダー、条件ブロック、条件 / 演算子、テキスト装飾、エスケープ規則、グローバルなローカライズ済み
string.*ラベル - コンテキスト別セクション:
- 再生中: 追加機能 (
\t、\o、next.フィールド、chapter.*フィールド) と再生中の全フィールド一覧 - アルバムサブタイトル: アルバムページで利用できるアルバム単位のフィールド
- アーティストサブタイトル: アーティストページで利用できるアーティスト単位のフィールド
- 再生中: 追加機能 (
共通テンプレート構文 (どこでも使用可能)
Section titled “共通テンプレート構文 (どこでも使用可能)”基本プレースホルダー
Section titled “基本プレースホルダー”構文: %fieldname%
%fieldname%をフィールド値に置き換えます。- フィールドが空または存在しない場合、何も表示されません。
例:
| テンプレート | 結果例 |
|---|---|
%title% by %artist% |
Seven Nation Army by The White Stripes |
%album% (%year%) |
Thriller (1982) |
%composer% ● %artist% |
Ludwig van Beethoven ● Berliner Philharmoniker |
%artist%%lb%%composer% |
Berliner Philharmoniker Ludwig van Beethoven |
%lb% は改行です。
条件ブロック
Section titled “条件ブロック”何かが存在する場合、または条件に一致する場合だけ、句読点やラベルを表示するにはブロックを使います。
構文: { ... }
{ ... }ブロックは、最初のプレースホルダーが次のいずれかに一致する場合だけ表示されます。- 空でないフィールド
- true の条件プレースホルダー (
%|condition%)
- 同じ
{ ... }ブロック内に複数のプレースホルダーと通常テキストを含められますが、ブロックを表示するかどうかを制御するのは最初のプレースホルダーだけです。 - 必要なスペースはブロック内に入れてください。例:
{ by %artist%}
フィールドに基づく条件ブロック
Section titled “フィールドに基づく条件ブロック”例:
| テンプレート | 結果例 | フィールドが空の場合 |
|---|---|---|
%title%{ by %artist%} |
Seven Nation Army by The White Stripes | Seven Nation Army |
%album%{ (%year%)} |
Thriller (1982) | Thriller |
{%composer% ● }%artist% |
Beethoven ● Berliner Philharmoniker | Berliner Philharmoniker |
条件に基づく条件ブロック
Section titled “条件に基づく条件ブロック”値を表示せずにブロックの表示だけを制御するには、最初のプレースホルダーとして %|condition% を使います。
例:
{%|format.samplerate>"48"% Hi-Res: %format.codec%}format.samplerate > 48 の場合だけ Hi-Res: FLAC を表示します。
{ ... } 内の改行
Section titled “{ ... } 内の改行”条件ブロック内では \n を使います。
%album%{\n(%year%)}{ ... } の外では、改行には %lb% を使うことをおすすめします。
プレースホルダー内の条件
Section titled “プレースホルダー内の条件”構文: %field|condition%
条件が true の場合だけフィールドを出力します。
比較できるもの:
- 別のフィールド名。例:
artist、composer、year - 引用符付きの文字列または数値リテラル。例:
"2012"、"Rock"、"256"
リテラルに関する注意:
trackは track フィールドを意味します。"track"は文字列trackを意味します。- 値の中に引用符を含めることもできます。リテラルが
"で始まり"で終わるようにしてください。
例:
%year|year>"2012"%%composer|composer!=artist%%composer|genre=="Classical"%| 演算子 | 意味 | 例 | 注意 |
|---|---|---|---|
== |
等しい | genre=="Classical" / artist==composer |
|
!= |
等しくない | artist!="Metallica" |
|
+= |
含む | genre+="Rock" |
リテラルまたは別フィールドで動作します |
-= |
含まない | mood-="depressing" |
|
> |
より大きい | year>"1999" |
数値リテラルには引用符を使います |
< |
より小さい | duration<"500" |
duration は秒単位です |
==empty |
空である | year==empty |
empty は予約語です |
!=empty |
空ではない | composer!=empty |
empty は予約語です |
[] |
範囲内 | bpm[]"0".."100" |
境界値を含みます |
複数条件、&& / || の混在、括弧
Section titled “複数条件、&& / || の混在、括弧”- AND には
&&を使います。 - OR には
||を使います。 - 同じ条件内で
&&と||を混在できます。 - 評価優先順位を制御するには括弧
(...)を使います。
例:
%format|format.bitdepth!=empty && (format.samplerate>"48" || format.bitdepth>"24")%これは、ビット深度が存在し、かつ次のいずれかの場合にのみ %format% を出力します。
- サンプルレートが 48 より大きい
- ビット深度が 24 より大きい
インラインテキスト装飾マークアップ
Section titled “インラインテキスト装飾マークアップ”**Bold**__Underline__~~Strike~~//Italics//^^CAPS^^ローカライズ済みラベル (string.*)
Section titled “ローカライズ済みラベル (string.*)”これらのプレースホルダーは、ユーザーのロケールで翻訳済み文字列を返します。
string.hiresstring.losslessstring.lossystring.hires.losslessstring.low.qualitystring.high.qualitystring.high.efficiencystring.time.unit.day.shortstring.time.unit.hour.shortstring.time.unit.minute.shortstring.time.unit.second.shortstring.time.unit.day.onestring.time.unit.day.otherstring.time.unit.hour.onestring.time.unit.hour.otherstring.time.unit.minute.onestring.time.unit.minute.otherstring.time.unit.second.onestring.time.unit.second.otherstring.track.onestring.track.otherstring.album.onestring.album.other
再生中 (コンパクト / 展開)
Section titled “再生中 (コンパクト / 展開)”再生中テンプレートでは次へアクセスできます。
- トラックメタデータ
- 再生状態
- キュー状態
- チャプター状態
- 音声形式
- EQ / レンダラー情報
- その他
再生中専用機能
Section titled “再生中専用機能”\t で複数セグメントに分割
Section titled “\t で複数セグメントに分割”\t を使うと、1 つのテンプレートを複数セグメントに分割できます。
例:
%player.position%\t%format%\t%player.duration%水平方向の配置が space between の場合、通常は次のように描画されます。
- 左: 位置
- 中央: 形式
- 右: 長さ
\o による選択的な保護オーバーレイ
Section titled “\o による選択的な保護オーバーレイ”文字列全体が保護されていなくても、その部分にだけ保護オーバーレイを適用するには \o を使います。
next. プレフィックス
Section titled “next. プレフィックス”次のキュー項目を参照するには、項目データフィールドの前に next. を追加します。
%next.title%チャプターフィールドでは、next.chapter.* が次のチャプターを参照します。
対応フィールド (再生中)
Section titled “対応フィールド (再生中)”トラック / アルバムメタデータ
Section titled “トラック / アルバムメタデータ”titletitle.rawcleantitle(追加されたトラック番号や explicit 記号を除いたタイトル)artistalbumalbum.rawalbum.versionalbum.type(Release Type とも呼ばれます)albumartistalbum.tagsalbum.titlealbum.title.rawalbum.title.versioncomposeryearreleasedateoriginaldatereleasedate.yearoriginaldate.yeartrackdiscdisctitledurationduration.seconds(合計秒数)duration.d(ゼロの場合に非表示にするには .nz を追加)duration.h(ゼロの場合に非表示にするには .nz を追加)duration.m(ゼロの場合に非表示にするには .nz を追加)duration.s(ゼロの場合に非表示にするには .nz を追加)duration.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)bpmgenrestylemoodoccasiongroupinglanguagecommentworkmovement.namemovement.numbermovement.number.romanmediatypeprovidernameofflinestatusexplicitfavoriteuserratingratinguserrating.5(5 つ星に正規化)rating.5(5 つ星に正規化)track.tagsoriginal.artistoriginal.albumfilepathfilenamelastplayedlastSkippedisaudiobookplaycountskipcount
再生 / プレーヤー
Section titled “再生 / プレーヤー”player.positionplayer.durationplayer.remainingplayer.position.secondsplayer.duration.secondsplayer.remaining.secondsplayer.pausedplayer.repeat.modeplayer.shuffle.modevolume.currentsleep.timersleep.timer.secondssleep.timer.eos
キュー / スマート機能
Section titled “キュー / スマート機能”queue.positionqueue.sizequeue.namesmartqueuesmartflowradio.mode(Smart Queue の場合は 1、Smart Flow の場合は 2 以上)
chapter.countchapter.indexchapter.titlechapter.positionchapter.position.secondschapter.position.d(ゼロの場合に非表示にするには .nz を追加)chapter.position.h(ゼロの場合に非表示にするには .nz を追加)chapter.position.m(ゼロの場合に非表示にするには .nz を追加)chapter.position.s(ゼロの場合に非表示にするには .nz を追加)chapter.position.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.position.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.position.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.position.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.remainingchapter.remaining.secondschapter.remaining.d(ゼロの場合に非表示にするには .nz を追加)chapter.remaining.h(ゼロの場合に非表示にするには .nz を追加)chapter.remaining.m(ゼロの場合に非表示にするには .nz を追加)chapter.remaining.s(ゼロの場合に非表示にするには .nz を追加)chapter.remaining.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.remaining.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.remaining.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.remaining.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.durationchapter.duration.secondschapter.duration.d(ゼロの場合に非表示にするには .nz を追加)chapter.duration.h(ゼロの場合に非表示にするには .nz を追加)chapter.duration.m(ゼロの場合に非表示にするには .nz を追加)chapter.duration.s(ゼロの場合に非表示にするには .nz を追加)chapter.duration.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.duration.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.duration.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.duration.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.positionchapter.all.position.secondschapter.all.position.d(ゼロの場合に非表示にするには .nz を追加)chapter.all.position.h(ゼロの場合に非表示にするには .nz を追加)chapter.all.position.m(ゼロの場合に非表示にするには .nz を追加)chapter.all.position.s(ゼロの場合に非表示にするには .nz を追加)chapter.all.position.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.position.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.position.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.position.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.remainingchapter.all.remaining.secondschapter.all.remaining.d(ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.h(ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.m(ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.s(ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.remaining.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.durationchapter.all.duration.secondschapter.all.duration.d(ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.h(ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.m(ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.s(ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)chapter.all.duration.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)
形式 / 音声情報
Section titled “形式 / 音声情報”formatformat.bitrateformat.bitrate.rawformat.samplerateformat.samplerate.rawformat.bitdepthformat.codecformat.bitandsampleformat.channels
EQ / 出力 / レンダラー
Section titled “EQ / 出力 / レンダラー”eq.profileeq.configoutput.currentrenderer.currentrenderer.type
ユーティリティ
Section titled “ユーティリティ”lb(改行)bool1bool2bool3bool4bool5
きれいな 2 行タイトルブロック
Section titled “きれいな 2 行タイトルブロック”%title%%lb%{by %artist%}year が存在する場合だけアルバム + 年
Section titled “year が存在する場合だけアルバム + 年”%album%{ (%year%)}composer が存在する場合だけ Composer ● Artist
Section titled “composer が存在する場合だけ Composer ● Artist”{%composer% ● }%artist%\t を使った 3 分割行 (位置 / 形式 / 長さ)
Section titled “\t を使った 3 分割行 (位置 / 形式 / 長さ)”%player.position%\t%format%\t%player.duration%高サンプルレートの場合だけ Hi-Res を表示
Section titled “高サンプルレートの場合だけ Hi-Res を表示”{%|format.samplerate>"48"% Hi-Res: %format.codec%}アクティブな出力端末を表示 (Android とその他レンダラー)
Section titled “アクティブな出力端末を表示 (Android とその他レンダラー)”{ %output.current|renderer.type=="Android"%}{ %renderer.current|renderer.type!="Android"%}切り替え可能な Apple 風品質インジケーター (bool1 を使用)
Section titled “切り替え可能な Apple 風品質インジケーター (bool1 を使用)”ⓘ {%format|bool1=="true"%}{Dolby Atmos %|format.channels>"2" && bool1=="false"%}{%string.high.efficiency|format.bitrate>"10" && format.bitrate<"256" && format.bitdepth==empty && bool1=="false"%}{%string.high.quality|format.bitrate>"255" && format.bitrate<"321" && format.bitdepth==empty && bool1=="false"%}{%string.lossless|format.bitdepth[]"16".."24" && format.samplerate<"49" && bool1=="false"%}{%string.hires.lossless|format.bitdepth[]"16".."32" && format.samplerate>"48" && bool1=="false"%}カスタム文字列に toggle bool1 アクションを割り当てると、次を交互に切り替えます。
bool1が true の場合は%format%を表示bool1が false の場合は Apple 風インジケーターを表示
現在の音量を表示
Section titled “現在の音量を表示”Vol %volume.current%%現在のチャプタータイトルとインデックス
Section titled “現在のチャプタータイトルとインデックス”{%chapter.index% - }%chapter.title%現在のチャプターの経過 / 残り
Section titled “現在のチャプターの経過 / 残り”%chapter.position%\t%chapter.title%\t%chapter.remaining%最初のチャプターを基準にしたオーディオブック全体の進行
Section titled “最初のチャプターを基準にしたオーディオブック全体の進行”%chapter.all.position%\t%chapter.all.duration%次のチャプタータイトル
Section titled “次のチャプタータイトル”%next.chapter.title%%format.codec% • %format.bitdepth%/%format.samplerate.raw% • %format.bitrate.raw%アルバムサブタイトル (アルバムページ)
Section titled “アルバムサブタイトル (アルバムページ)”アルバムページでは通常、キューやプレーヤー状態ではなく、アルバム単位のメタデータが公開されます。同じ共通テンプレート構文を使用できます。
対応フィールド (アルバムサブタイトル)
Section titled “対応フィールド (アルバムサブタイトル)”titletitle.rawversiontagstypestatuscomposerartistyeardurationduration.seconds(合計秒数)duration.d(ゼロの場合に非表示にするには .nz を追加)duration.h(ゼロの場合に非表示にするには .nz を追加)duration.m(ゼロの場合に非表示にするには .nz を追加)duration.s(ゼロの場合に非表示にするには .nz を追加)duration.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)genrestylemoodlanguageprovidernameofflinestatusoccasionmediatypegroupingexplicitreleasedateoriginaldatereleasedate.yearoriginaldate.yearlastplayedlastSkippeduserratingratinguserrating.5rating.5favoritesong.countplaycountskipcountdescriptionformatformat.bitrateformat.channelsformat.samplerateformat.bitdepthformat.codecformat.bitandsampleformat.bitrate.rawformat.samplerate.rawlb
アルバムサブタイトルの例
Section titled “アルバムサブタイトルの例”version が存在する場合だけアルバムタイトル + version
Section titled “version が存在する場合だけアルバムタイトル + version”%title%{ — %version%}欠けている部分をスキップする year + genre 行
Section titled “欠けている部分をスキップする year + genre 行”%year%{ • %genre%}ユーザー評価がある場合だけ評価を表示
Section titled “ユーザー評価がある場合だけ評価を表示”{★ %userrating.5%/5%|userrating!=empty%}Downloaded インジケーター
Section titled “Downloaded インジケーター”{⬇ Offline%|offlinestatus!=empty%}アーティストサブタイトル (アーティストページ)
Section titled “アーティストサブタイトル (アーティストページ)”アーティストページでは通常、アーティスト単位のメタデータとライブラリ統計が公開されます。同じ共通テンプレート構文を使用できます。
対応フィールド (アーティストサブタイトル)
Section titled “対応フィールド (アーティストサブタイトル)”titletitle.rawversiontagstypegenderdurationduration.seconds(合計秒数)duration.d(ゼロの場合に非表示にするには .nz を追加)duration.h(ゼロの場合に非表示にするには .nz を追加)duration.m(ゼロの場合に非表示にするには .nz を追加)duration.s(ゼロの場合に非表示にするには .nz を追加)duration.dd(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.hh(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.mm(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)duration.ss(ゼロ埋め。ゼロの場合に非表示にするには .nz を追加)genrestylemoodsong.countalbum.countinstrumentprovidernameofflinestatuslastplayeduserratinguserrating.5favoriteplaycountdescriptionlb
アーティストサブタイトルの例
Section titled “アーティストサブタイトルの例”ラベル付きで件数を表示
Section titled “ラベル付きで件数を表示”%song.count% songs{ • %album.count% albums}genre / style 行
Section titled “genre / style 行”%genre%{ • %style%}お気に入りの場合だけ Favorite バッジを表示
Section titled “お気に入りの場合だけ Favorite バッジを表示”{♥ Favorite%|favorite!=empty%}楽器を新しい行に表示
Section titled “楽器を新しい行に表示”%title%{\n%instrument%}