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

[project-s] ノートを選択できるようにする+位置を移動できるようにする+長さを変更できるようにする #1114

Closed
9 tasks done
romot-co opened this issue Jan 17, 2023 · 3 comments
Assignees

Comments

@romot-co
Copy link
Contributor

romot-co commented Jan 17, 2023

内容

  • ノートをクリックで選択できるようにする
  • ノートをカーソルキーで移動できるようにする
  • ノートをドラッグで移動できるようにする
  • ノートの左右部ドラッグで長さを変更できるようにする
  • ノートの重なりは許容しない(すぐ可能であれば)
  • ノート追加後そのままドラッグできるようにする(すぐ可能であれば)

Pros 良くなる点

  • ノートを選択状態にできる
  • ノートの長さが変更できる
  • ノートがマウスドラッグまたはキーボードで移動できる

Cons 悪くなる点

実現方法

クリックでバーを選択状態にする(複数選択がありうるためstateとしてはArrayで持つ)
ノート左右にドラッグハンドル要素を置きmousedown``mousemove``mouseupで制御
複数ノートがあり得るため考慮

  • ノートのバー部分をコンポーネントとして分割
  • ノートクリックで選択できる
  • ノートの追加・削除にあわせ選択状態を維持する
  • シーケンサクリックで選択解除できる
  • ドラッグで移動できる
  • カーソルキーで位置移動できる(複数にかかわるキー操作の確認と準備)
  • ドラッグハンドル(透明)をノート左右に追加
  • ドラッグでノートの長さが可変するようにする
  • 前後に重なった要素がある場合はその手前までしか長さを伸ばせないようにする

VOICEVOXのバージョン

project-s

OSの種類/ディストリ/バージョン

  • macOS Montereyで動作確認予定

その他

@romot-co romot-co self-assigned this Jan 17, 2023
@romot-co romot-co changed the title [project-s] ノートの長さを変更できるようにする [project-s] ノートを選択できるようにする+長さを変更できるようにする Jan 18, 2023
@romot-co romot-co changed the title [project-s] ノートを選択できるようにする+長さを変更できるようにする [project-s] ノートを選択できるようにする+位置を移動できるようにする+長さを変更できるようにする Jan 20, 2023
romot-co pushed a commit that referenced this issue Jan 20, 2023
romot-co pushed a commit that referenced this issue Feb 2, 2023
romot-co pushed a commit that referenced this issue Feb 3, 2023
@romot-co
Copy link
Contributor Author

romot-co commented Feb 3, 2023

[メモ]

問題洗い出し試行・動作確認

  • 複数ノート選択の場合を考慮する必要がある(noteにuuidなどでidつけてもいいかもしれない)
  • 実装上、マウス操作はNoteではなく親のSequencer側で行う点が多そう
  • 重いなどは今のところなし
test-seq.mov

@romot-co
Copy link
Contributor Author

[メモ]
複数選択+ドラッグで長さ変更+ドラッグで位置移動+ドラッグ範囲選択までは可能そうです。
問題点ふくめだいたい洗い出せたため、リファクタ・調整いたします。
(プルリクとして大きくなりすぎそうなため、限定いたします)
https://user-images.githubusercontent.com/9082140/218063583-7f0d8022-5b0b-4a47-8afd-8d1500bcdbe4.mp4

romot-co pushed a commit that referenced this issue Mar 18, 2023
romot-co pushed a commit that referenced this issue Mar 18, 2023
romot-co pushed a commit that referenced this issue Mar 19, 2023
romot-co pushed a commit that referenced this issue Mar 19, 2023
romot-co pushed a commit that referenced this issue Jul 1, 2023
romot-co pushed a commit that referenced this issue Jul 2, 2023
@Hiroshiba
Copy link
Member

Hiroshiba commented Aug 24, 2024

たぶんこちらのissueは達成されているのでクローズします!実装ありがとうございました!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants