Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

楽譜情報とsingerの持ち方を変更する #1820

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

sigprogramming
Copy link
Contributor

@sigprogramming sigprogramming commented Feb 2, 2024

内容

以下の形に変更します。

type Track = {
  singer?: Singer;
  notes: Note[];
};

type SingingStoreState = {
  tpqn: number;
  tempos: Tempo[];
  timeSignatures: TimeSignature[];
  tracks: Track[];
  ...
};

singerもトラックが持つようにします。

関連 Issue

その他

  • phrasesphraseDataなどもトラックが持つ・トラックに紐づけて持つようにした方が良いかも
    • レンダリング周りの変更が必要なので、一旦そのまま

@sigprogramming sigprogramming requested a review from a team as a code owner February 2, 2024 12:51
Copy link
Member

@y-chan y-chan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

とりあえずはこれでいいのかなと思いました...!
Score型はstoreで使われなくなったので、後でリファクタとして消せると良いかも...?(SET_SCOREとかありますが、SET_TEMPOとかに解体したほうが自然かもと思いました。)

@sigprogramming
Copy link
Contributor Author

レビューありがとうございます!
Score型は楽譜のインポート・エクスポート時にDTOとして使用するのが良いかなと思っています!
(MIDI・MusicXML ←→ Score ←→ StoreStateみたいな感じです)

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

tracksになっているけど、使っているの0番目のみで、singerを取ってくる部分とかもその0番目から取ってくるという、ちょっとワークアラウンド的な状態になっている認識です

もしかしたら実際に複数トラックにした時にデータ構造の課題点が見つかるかもですが、まあその時はその時で修正できればなと!

@romot-co スコアの持ち方が結構変わったので共有です 🙏

@Hiroshiba Hiroshiba merged commit 16cd5ac into VOICEVOX:main Feb 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants