Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ UI スレッドでするのは使うマップを決めることと画面の更

曲が終わったときの動きは `RepeatMode` の 4 つ。`None`(リストを 1 周して停止)、`Single`(その曲だけ演奏して停止)、`SingleRepeat`(その曲を繰り返す)、`All`(リストを繰り返す)。

曲ごとのお気に入り(`PlaylistItem.Rating`)で、曲送りが通る曲を絞れる(`PlayFilter`、曲順やリピートと同じくプレイヤー全体の設定)。
お気に入りはファイルのものとして扱い、星を変えると開いているほかのプレイリストの同じパスの曲も同じ状態にする(パスは大文字小文字を区別せずに比べる)。
開いていないプレイリストには届かない。
**絞り込みで外れた曲は、曲送りから見るとリストから外した曲と同じ扱いにする。**
演奏中に外れても最後まで鳴り、次は後ろの対象の曲へ進む。
外れた曲もダブルクリックすれば鳴らし、終わればリストでその後ろにある対象の曲へ進む(ランダムなら、その回でまだ鳴っていない曲へ)。
星を変えたら、演奏中のリストなら曲送りに `Rearranged` で知らせる。知らせないと、外したはずの曲が流れる。

レジューム(前回の曲の途中から再開する機能)は作らない。技術的な障害は無い。
作らないのは、機能として採らないと決めたため。

Expand Down Expand Up @@ -106,7 +114,7 @@ UI スレッドでするのは使うマップを決めることと画面の更

Avalonia + CommunityToolkit.Mvvm。出力までの鎖は `PlayerService` が持ち、ビューモデルはそれを操作するだけにしてある。

画面に出しているのは**曲名・再生時間・再生コントロール・表示器**だけ。曲順 / リピート / ポートマップは**設定メニューの下の選択メニュー**に移した。演奏中に何度も触るものではなく、常時出しておくと画面がそれらで埋まるため。
画面に出しているのは**曲名・再生時間・再生コントロール・表示器**だけ。曲順 / リピート / 再生する曲 / ポートマップは**設定メニューの下の選択メニュー**に移した。演奏中に何度も触るものではなく、常時出しておくと画面がそれらで埋まるため。

音源が書くテキストは一度に 1 行で、Roland は 16 桁、XG は 32 桁。16×2 の表示器では Roland は上の行だけを使い、XG は下の行へ折り返す。

Expand Down
4 changes: 4 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ TMIDI Player の定義ファイルを読み込むと、TMIDI Player と同じ**
- 複数のプレイリストをタブで開けます。
タブや曲を右クリックすると、プレイリストや曲の操作が出ます。
- ほかの場所のプレイリストファイルは **ファイル → プレイリストを開く...** で開きます。
- 曲の左の星をクリックすると、お気に入り(★)、好みでない(斜線の入った星)、なし(☆)の順に切り替わります。
右クリックの **並べ替え → お気に入り順** で、お気に入りを上に、好みでない曲を下に並べられます。
- **設定 → 再生する曲** で、曲送りで演奏する曲を **すべて**・**お気に入りと未評価のみ**・**お気に入りのみ** から選べます。
外れた曲もダブルクリックすれば演奏し、その後は対象の曲へ進みます。

### 対象音源

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ Which map is used is chosen in **Settings → Port Map**. "Auto" picks one for e

- Several playlists can be open in tabs. Right-click a tab or a song for what can be done with it.
- Playlist files kept elsewhere are opened with **File → Open Playlist...**.
- Clicking the star to the left of a song cycles it through favorite (★), disliked (a star with a slash) and none (☆). **Sort → By Favorite** in the right-click menu puts favorites at the top and disliked songs at the bottom.
- **Settings → Songs to Play** chooses which songs the player goes through: **All Songs**, **Favorites and Unrated Only** or **Favorites Only**. A song left out still plays when double-clicked, and the player then goes on to the songs it takes.

### Target modules

Expand Down
3 changes: 3 additions & 0 deletions src/Glosa.App/Controls/EnumLabelConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public sealed class EnumLabelConverter : IValueConverter
[PlayOrder.Random] = Strings.OrderRandom,
[PlayOrder.FileName] = Strings.OrderFileName,
[PlayOrder.Title] = Strings.OrderTitle,
[PlayFilter.All] = Strings.FilterAll,
[PlayFilter.NotDisliked] = Strings.FilterNotDisliked,
[PlayFilter.FavoritesOnly] = Strings.FilterFavoritesOnly,
[MatchPosition.First] = Strings.DetectionFirst,
[MatchPosition.Last] = Strings.DetectionLast,
[PlaybackPriority.Low] = Strings.PriorityLow,
Expand Down
3 changes: 3 additions & 0 deletions src/Glosa.App/Services/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ public sealed class AppSettings
/// <summary>What happens when a song ends.</summary>
public RepeatMode Repeat { get; set; } = RepeatMode.None;

/// <summary>Which songs the playlist is played through, by how they are rated.</summary>
public PlayFilter PlayFilter { get; set; } = PlayFilter.All;

/// <summary>
/// Whether the display gets room of its own instead of taking the height of the
/// transport beside it. Off to begin with: the compact one lines the window up.
Expand Down
72 changes: 72 additions & 0 deletions src/Glosa.App/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions src/Glosa.App/Strings.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,15 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
<data name="FileTypeSongs" xml:space="preserve">
<value>MIDI・圧縮ファイル</value>
</data>
<data name="FilterAll" xml:space="preserve">
<value>すべて</value>
</data>
<data name="FilterFavoritesOnly" xml:space="preserve">
<value>お気に入りのみ</value>
</data>
<data name="FilterNotDisliked" xml:space="preserve">
<value>お気に入りと未評価のみ</value>
</data>
<data name="LanguageSystem" xml:space="preserve">
<value>OSに合わせる</value>
</data>
Expand Down Expand Up @@ -401,6 +410,9 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
<data name="MenuOrder" xml:space="preserve">
<value>曲順</value>
</data>
<data name="MenuPlayFilter" xml:space="preserve">
<value>再生する曲</value>
</data>
<data name="MenuPortMap" xml:space="preserve">
<value>ポートマップ</value>
</data>
Expand Down Expand Up @@ -797,6 +809,15 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
<data name="RateUnlimited" xml:space="preserve">
<value>無制限</value>
</data>
<data name="RatingDisliked" xml:space="preserve">
<value>好みでない</value>
</data>
<data name="RatingFavorite" xml:space="preserve">
<value>お気に入り</value>
</data>
<data name="RatingNone" xml:space="preserve">
<value>なし</value>
</data>
<data name="RenamePlaylist" xml:space="preserve">
<value>プレイリスト名の変更</value>
</data>
Expand Down Expand Up @@ -980,6 +1001,9 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
<data name="SortPath" xml:space="preserve">
<value>パス順</value>
</data>
<data name="SortRating" xml:space="preserve">
<value>お気に入り順</value>
</data>
<data name="SortTitle" xml:space="preserve">
<value>タイトル順</value>
</data>
Expand Down
24 changes: 24 additions & 0 deletions src/Glosa.App/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,15 @@ Fix or delete define.override.yaml, and restart Glosa.</value>
<data name="FileTypeSongs" xml:space="preserve">
<value>MIDI and archive files</value>
</data>
<data name="FilterAll" xml:space="preserve">
<value>All Songs</value>
</data>
<data name="FilterFavoritesOnly" xml:space="preserve">
<value>Favorites Only</value>
</data>
<data name="FilterNotDisliked" xml:space="preserve">
<value>Favorites and Unrated Only</value>
</data>
<data name="LanguageSystem" xml:space="preserve">
<value>System default</value>
</data>
Expand Down Expand Up @@ -404,6 +413,9 @@ Fix or delete define.override.yaml, and restart Glosa.</value>
<data name="MenuOrder" xml:space="preserve">
<value>Play Order</value>
</data>
<data name="MenuPlayFilter" xml:space="preserve">
<value>Songs to Play</value>
</data>
<data name="MenuPortMap" xml:space="preserve">
<value>Port Map</value>
</data>
Expand Down Expand Up @@ -800,6 +812,15 @@ Fix or delete define.override.yaml, and restart Glosa.</value>
<data name="RateUnlimited" xml:space="preserve">
<value>Unlimited</value>
</data>
<data name="RatingDisliked" xml:space="preserve">
<value>Disliked</value>
</data>
<data name="RatingFavorite" xml:space="preserve">
<value>Favorite</value>
</data>
<data name="RatingNone" xml:space="preserve">
<value>Not Rated</value>
</data>
<data name="RenamePlaylist" xml:space="preserve">
<value>Rename Playlist</value>
</data>
Expand Down Expand Up @@ -983,6 +1004,9 @@ Fix or delete define.override.yaml, and restart Glosa.</value>
<data name="SortPath" xml:space="preserve">
<value>By Path</value>
</data>
<data name="SortRating" xml:space="preserve">
<value>By Favorite</value>
</data>
<data name="SortTitle" xml:space="preserve">
<value>By Title</value>
</data>
Expand Down
39 changes: 39 additions & 0 deletions src/Glosa.App/Themes/Dark.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,45 @@
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForeground}" />
</Style>

<!--
A song's rating in a playlist row: an empty star, filled when a favorite, crossed out
when disliked. The empty state is dimmed so a column of them stays quiet, and lit under
the pointer. In the row's own foreground, which a selected row keeps.
-->
<Style Selector="Button.rating">
<Setter Property="Padding" Value="1" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Opacity" Value="0.35" />
<Setter Property="Content">
<Template>
<PathIcon Width="13" Height="13" Data="{DynamicResource IconStarOutline}" />
</Template>
</Setter>
</Style>
<Style Selector="Button.rating.favorite">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="Button.rating.disliked">
<Setter Property="Opacity" Value="0.65" />
</Style>
<Style Selector="Button.rating:pointerover">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="Button.rating.favorite PathIcon">
<Setter Property="Data" Value="{DynamicResource IconStar}" />
</Style>
<Style Selector="Button.rating.disliked PathIcon">
<Setter Property="Data" Value="{DynamicResource IconStarOff}" />
</Style>
<Style Selector="Button.rating /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
</Style>

<!-- A panel: the LCD bezel, the transport, the playlist. -->
<Style Selector="Border.card">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}" />
Expand Down
4 changes: 4 additions & 0 deletions src/Glosa.App/Themes/Icons.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
<StreamGeometry x:Key="IconPlaylist">F1 M2 4.5C2.55228 4.5 3 4.05228 3 3.5C3 2.94772 2.55228 2.5 2 2.5C1.44772 2.5 1 2.94772 1 3.5C1 4.05228 1.44772 4.5 2 4.5ZM2 9C2.55228 9 3 8.55228 3 8C3 7.44772 2.55228 7 2 7C1.44772 7 1 7.44772 1 8C1 8.55228 1.44772 9 2 9ZM3 12.5C3 13.0523 2.55228 13.5 2 13.5C1.44772 13.5 1 13.0523 1 12.5C1 11.9477 1.44772 11.5 2 11.5C2.55228 11.5 3 11.9477 3 12.5ZM5.5 3C5.22386 3 5 3.22386 5 3.5C5 3.77614 5.22386 4 5.5 4H14.5C14.7761 4 15 3.77614 15 3.5C15 3.22386 14.7761 3 14.5 3H5.5ZM5 8C5 7.72386 5.22386 7.5 5.5 7.5H14.5C14.7761 7.5 15 7.72386 15 8C15 8.27614 14.7761 8.5 14.5 8.5H5.5C5.22386 8.5 5 8.27614 5 8ZM5.5 12C5.22386 12 5 12.2239 5 12.5C5 12.7761 5.22386 13 5.5 13H14.5C14.7761 13 15 12.7761 15 12.5C15 12.2239 14.7761 12 14.5 12H5.5Z</StreamGeometry>
<!-- Show (what the playlists show for each song) -->
<StreamGeometry x:Key="IconShow">F1 M2.98444 8.62471L2.98346 8.62815C2.91251 8.8948 2.63879 9.05404 2.37202 8.9833C1.94098 8.86907 2.01687 8.37186 2.01687 8.37186L2.03453 8.31047C2.03453 8.31047 2.06063 8.22636 2.08166 8.1653C2.12369 8.04329 2.18795 7.87274 2.27931 7.66977C2.46154 7.26493 2.75443 6.72477 3.19877 6.18295C4.09629 5.08851 5.60509 4 8.00017 4C10.3952 4 11.904 5.08851 12.8016 6.18295C13.2459 6.72477 13.5388 7.26493 13.721 7.66977C13.8124 7.87274 13.8766 8.04329 13.9187 8.1653C13.9397 8.22636 13.9552 8.27541 13.9658 8.31047C13.9711 8.328 13.9752 8.34204 13.9781 8.35236L13.9816 8.365L13.9827 8.36916L13.9832 8.37069L13.9835 8.37186C14.0542 8.63878 13.8952 8.91253 13.6283 8.9833C13.3618 9.05397 13.0885 8.89556 13.0172 8.62937L13.0169 8.62815L13.0159 8.62471L13.0085 8.5997C13.0014 8.57616 12.9898 8.53927 12.9732 8.49095C12.9399 8.39422 12.8866 8.25227 12.8091 8.08023C12.6538 7.73508 12.4041 7.27523 12.0283 6.81706C11.2857 5.9115 10.0445 5 8.00017 5C5.95584 5 4.71464 5.9115 3.97201 6.81706C3.59627 7.27523 3.34655 7.73508 3.19119 8.08023C3.11375 8.25227 3.06047 8.39422 3.02715 8.49095C3.01051 8.53927 2.9989 8.57616 2.99179 8.5997L2.98444 8.62471ZM8.00024 7C6.61953 7 5.50024 8.11929 5.50024 9.5C5.50024 10.8807 6.61953 12 8.00024 12C9.38096 12 10.5002 10.8807 10.5002 9.5C10.5002 8.11929 9.38096 7 8.00024 7ZM6.50024 9.5C6.50024 8.67157 7.17182 8 8.00024 8C8.82867 8 9.50024 8.67157 9.50024 9.5C9.50024 10.3284 8.82867 11 8.00024 11C7.17182 11 6.50024 10.3284 6.50024 9.5Z</StreamGeometry>
<!-- Star (regular), Star (filled) and Star Off (filled): a song's rating in a playlist row, not in a menu -->
<StreamGeometry x:Key="IconStarOutline">F1 M7.1939 2.1013C7.52403 1.43238 8.47789 1.43238 8.80802 2.1013L10.3291 5.18335L13.7304 5.67758C14.4685 5.78485 14.7633 6.69202 14.2291 7.21271L11.768 9.61175L12.349 12.9993C12.4751 13.7345 11.7034 14.2951 11.0431 13.948L8.00096 12.3487L4.95879 13.948C4.29853 14.2951 3.52684 13.7345 3.65294 12.9993L4.23394 9.61175L1.77277 7.21271C1.23861 6.69203 1.53336 5.78485 2.27156 5.67758L5.67281 5.18335L7.1939 2.1013ZM8.00096 2.72556L6.54628 5.67306C6.41519 5.93869 6.16178 6.1228 5.86864 6.1654L2.61588 6.63805L4.9696 8.93236C5.18171 9.13913 5.27851 9.43703 5.22843 9.72898L4.6728 12.9686L7.58215 11.4391C7.84434 11.3012 8.15758 11.3012 8.41977 11.4391L11.3291 12.9686L10.7735 9.72898C10.7234 9.43702 10.8202 9.13912 11.0323 8.93236L13.386 6.63805L10.1333 6.1654C9.84014 6.1228 9.58673 5.93869 9.45564 5.67306L8.00096 2.72556Z</StreamGeometry>
<StreamGeometry x:Key="IconStar">F1 M7.1939 2.1013C7.52403 1.43238 8.47789 1.43238 8.80802 2.1013L10.3291 5.18335L13.7304 5.67758C14.4685 5.78485 14.7633 6.69202 14.2291 7.21271L11.768 9.61175L12.349 12.9993C12.4751 13.7345 11.7034 14.2951 11.0431 13.948L8.00096 12.3487L4.95879 13.948C4.29853 14.2951 3.52684 13.7345 3.65294 12.9993L4.23394 9.61175L1.77277 7.21271C1.23861 6.69203 1.53336 5.78485 2.27156 5.67758L5.67281 5.18335L7.1939 2.1013Z</StreamGeometry>
<StreamGeometry x:Key="IconStarOff">F1 M12.3579 13.065L14.1464 14.8536C14.3417 15.0488 14.6583 15.0488 14.8536 14.8536C15.0488 14.6583 15.0488 14.3417 14.8536 14.1464L1.85355 1.14645C1.65829 0.951184 1.34171 0.951184 1.14645 1.14645C0.951184 1.34171 0.951184 1.65829 1.14645 1.85355L4.62842 5.33553L2.27156 5.678C1.53337 5.78526 1.23861 6.69244 1.77277 7.21312L4.23394 9.61216L3.65294 12.9997C3.52684 13.7349 4.29853 14.2955 4.95879 13.9484L8.00096 12.3491L11.0431 13.9484C11.6837 14.2852 12.4291 13.7675 12.3579 13.065ZM11.768 9.61216L11.7751 9.65369L6.21222 4.09081L7.1939 2.10171C7.52403 1.43279 8.47789 1.43279 8.80802 2.10171L10.3291 5.18377L13.7304 5.678C14.4685 5.78526 14.7633 6.69244 14.2291 7.21312L11.768 9.61216Z</StreamGeometry>
<!-- Select All -->
<StreamGeometry x:Key="IconSelectAll">F1 M9.85355 5.85355C10.0488 5.65829 10.0488 5.34171 9.85355 5.14645C9.65829 4.95118 9.34171 4.95118 9.14645 5.14645L6.5 7.79289L5.35355 6.64645C5.15829 6.45118 4.84171 6.45118 4.64645 6.64645C4.45118 6.84171 4.45118 7.15829 4.64645 7.35355L6.14645 8.85355C6.34171 9.04882 6.65829 9.04882 6.85355 8.85355L9.85355 5.85355ZM2 4.5C2 3.11929 3.11929 2 4.5 2H9.5C10.8807 2 12 3.11929 12 4.5V9.5C12 10.8807 10.8807 12 9.5 12H4.5C3.11929 12 2 10.8807 2 9.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V9.5C3 10.3284 3.67157 11 4.5 11H9.5C10.3284 11 11 10.3284 11 9.5V4.5C11 3.67157 10.3284 3 9.5 3H4.5ZM7.00018 14C6.18227 14 5.4561 13.6072 5 13H9.50018C11.4332 13 13.0002 11.433 13.0002 9.5V3.99982C13.6074 4.45592 14.0002 5.18209 14.0002 6V9.5C14.0002 11.9853 11.9855 14 9.50018 14H7.00018Z</StreamGeometry>
</ResourceDictionary>
Loading
Loading