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

Add: BPM・拍子変更機能を追加 #2303

Merged
merged 138 commits into from
Dec 6, 2024

Conversation

sevenc-nanashi
Copy link
Member

@sevenc-nanashi sevenc-nanashi commented Oct 18, 2024

内容

タイトル通りです。

関連 Issue

スクリーンショット・動画など

image

その他

現時点でもダイアログの挙動自体はStorybookから確認出来ます。

() => lastTimeSignature.value.measureNumber === currentMeasure.value,
);

const contextMenuHeader = computed(() => `${currentMeasure.value}小節目`);
Copy link
Member Author

Choose a reason for hiding this comment

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

ここは #2306 の形式で出そうかな~って思ってます。

@sevenc-nanashi sevenc-nanashi marked this pull request as ready for review October 19, 2024 16:16
@sevenc-nanashi sevenc-nanashi requested a review from a team as a code owner October 19, 2024 16:16
@sevenc-nanashi sevenc-nanashi requested review from Hiroshiba and removed request for a team October 19, 2024 16:16

Choose a reason for hiding this comment

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

Copilot reviewed 35 out of 49 changed files in this pull request and generated no suggestions.

Files not reviewed (14)
  • package.json: Language not supported
  • src/components/Sing/SequencerPitch.vue: Evaluated as low risk
  • src/components/Sing/ChangeValueDialog/CommonDialog.vue: Evaluated as low risk
  • src/components/Sing/ToolBar/ToolBar.vue: Evaluated as low risk
  • src/components/Sing/ChangeValueDialog/TempoChangeDialog.vue: Evaluated as low risk
  • src/components/Menu/ContextMenu/Presentation.vue: Evaluated as low risk
  • src/components/Sing/ChangeValueDialog/TimeSignatureChangeDialog.vue: Evaluated as low risk
  • src/components/Sing/SequencerGrid/Presentation.vue: Evaluated as low risk
  • src/components/Sing/SequencerRuler/Container.vue: Evaluated as low risk
  • src/components/Sing/ChangeValueDialog/TimeSignatureChangeDialog.stories.ts: Evaluated as low risk
  • src/components/Sing/ChangeValueDialog/TempoChangeDialog.stories.ts: Evaluated as low risk
  • src/store/singing.ts: Evaluated as low risk
  • src/sing/domain.ts: Evaluated as low risk
  • src/components/Sing/SequencerGrid/index.stories.ts: Evaluated as low risk
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です!!! もう少し!!!

src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
) => {
const ticks = valueChange.position;
playheadTicks.value = ticks;
contextMenu.value?.show(event);
Copy link
Member

Choose a reason for hiding this comment

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

ちょっと挙動をどうするか迷っていますが、やっぱりクリックは編集開始のが良いかも。
トークのテキスト欄やトラックがこの感じ。
左クリックでメニュー展開は他にないはず?(=統一感が薄れる)

まあでもこのPRではどちらでも良さそう!(まだ議論されてないので)

src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
Comment on lines +299 to +305
const maybeTimeSignature = timeSignatures.value.findLast(
(_timeSignature, i) => tsPositions.value[i] <= playheadTicks.value,
);
if (!maybeTimeSignature) {
throw new UnreachableError("assert: at least one time signature exists");
}
return maybeTimeSignature;
Copy link
Member

Choose a reason for hiding this comment

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

(ただのコメントです)

こういうのもgetOrThrowみたいな便利関数作っても良いかもですね!
maybeという名前を省けるのでぱっと見やすくなりそう)

src/components/Sing/ToolBar/ToolBar.vue Show resolved Hide resolved
return tickToBaseX(beatTicks, tpqn) * sequencerZoomX;
};

export const useSequencerGrid = ({
Copy link
Member

Choose a reason for hiding this comment

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

(ただのコメントです)

た〜ぶんこれを各々のコンポーネントが呼ぶのではなく、親が計算して渡すのが計算量的にも良いかもしれない。

src/helpers/textWidth.ts Show resolved Hide resolved
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.

2点だけコメントしました!

あとはちょっともう1回全コード長め直して問題なければLGTMです!!!

src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
@Hiroshiba
Copy link
Member

あれ、なぜか[update snapshots]が働いてない・・・?
ちょっとこっちでコミット出してみたいと思います。

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なんですが、スナップショット更新がエラーになってる気が・・・!

スナップショットの数が合ってるかを確かめるテストが落ちちゃう感じ・・・?

src/components/Sing/SequencerRuler/Presentation.vue Outdated Show resolved Hide resolved
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!!!

長いやり取りありがとうございました!!!

ちょっと後半かなりレビューが大変だった・・・ということはそんなにないのですが、やり取りの回数が変更量に相関して多くなるので、途中でコンフリクトが入ったりあと見逃しが発生したりでうまくいかない場合も増えてくると思います。
実装がやりやすい形で、かつOSSとしてかっこいい形を見つけて進行していきたいところですね。

僕はレビュー視点しかほとんど持ってないので、エンジニア視点でこうしたら良かったかもみたいなのあればぜひ知りたいです 🙏

Comment on lines 162 to +163
git add --intent-to-add --all tests/
git diff --binary --cached tests/ > patch-${{ matrix.os }}.diff
git diff --binary HEAD tests/ > patch-${{ matrix.os }}.diff
Copy link
Member

Choose a reason for hiding this comment

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

(ただのコメントです)

! これで行けるということは、たぶんgit addの方いらない気がしますね!

@Hiroshiba
Copy link
Member

マージします!!!

@Hiroshiba Hiroshiba merged commit 34c670c into VOICEVOX:main Dec 6, 2024
11 checks passed
@Hiroshiba
Copy link
Member

Hiroshiba commented Dec 6, 2024

こんな感じで明日の15時ごろにポストしたいと思います!

#VOICEVOX開発状況 
ピアノロールの途中でBPMや拍子を変えられるようになりました 🎉(今後のアップデートで実装されます。)
【開発者:@sevenc_nanashi】
https://github.com/VOICEVOX/voicevox/pull/2303

スクショを撮ろうと頑張ったんですが、何が表示されているかわかりやすいスクショが撮れなそうだったので断念しました・・・

(↓ルーラーのとこだけスクショすると、どこの画像かわからない)
image

代わりにGithubのサマリーが展開されて、このGithub PRページのプレビューが表示されるはず!

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.

ソング:小節追加の挙動を良い感じにする
4 participants