Skip to content

Commit

Permalink
Changed the behavior of DrawPitchTool (RE) (#748)
Browse files Browse the repository at this point in the history
* Changed the behavior of DrawPitchTool

* miner fix

* Fix strings

* fix ust tempo parsing

* Add a dialog when installing .dll phonemizers

* Revert "fix ust tempo parsing"

This reverts commit 31e6d96.

---------

Co-authored-by: StAkira <[email protected]>
Co-authored-by: oxygen-dioxide <[email protected]>
  • Loading branch information
3 people authored Jun 17, 2023
1 parent 4e771a6 commit 900f259
Show file tree
Hide file tree
Showing 18 changed files with 76 additions and 8 deletions.
3 changes: 2 additions & 1 deletion OpenUtau/Strings/Strings.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ Warning: this option removes custom presets.</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)
Left click to draw
Right click to reset
Hold Ctrl to smoothen</system:String>
Hold Ctrl to select
Hold Alt to smoothen</system:String>
<system:String x:Key="pianoroll.tool.eraser">Eraser Tool (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Knife Tool (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Pen Plus Tool (Ctrl + 2)
Expand Down
6 changes: 5 additions & 1 deletion OpenUtau/Strings/Strings.es-ES.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ Warning: this option removes custom presets.</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.tone">Toggle Note Tone (Y)</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.vibrato">View Vibrato (U)</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.waveform">View Waveform (W)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)
Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<!--<system:String x:Key="pianoroll.tool.eraser">Eraser Tool (3)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.knife">Knife Tool (5)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.penplus">Pen Plus Tool (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.es-MX.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Advertencia: Esta opción eliminará las bases personalizadas.</system:String>
<system:String x:Key="pianoroll.toggle.vibrato">Ver vibratos (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Ver formas de onda (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Dibujar en tono avanzado (4)</system:String>
<!-- Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Goma (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Cuchillo (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Lápiz avanzado (Ctrl + 2)
Expand Down
6 changes: 5 additions & 1 deletion OpenUtau/Strings/Strings.fi-FI.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ Warning: this option removes custom presets.</system:String>-->
<system:String x:Key="pianoroll.toggle.tone">Aktivoi opasääni (Y)</system:String>
<system:String x:Key="pianoroll.toggle.vibrato">Näytä vibrato (U)</system:String>
<!--<system:String x:Key="pianoroll.toggle.waveform">View Waveform (W)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)
Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Pyyhekumityökalu (3)</system:String>
<!--<system:String x:Key="pianoroll.tool.knife">Knife Tool (5)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.penplus">Pen Plus Tool (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.fr-FR.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@
<system:String x:Key="pianoroll.toggle.vibrato">Voir les Vibratos (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Voir la forme d'onde (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Outil traçage du pitch (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Gomme (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Couteau (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Crayon Plus (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.id-ID.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Peringatan: opsi ini menghapus prasetel khusus.</system:String>
<system:String x:Key="pianoroll.toggle.vibrato">Perlihatkan Vibrato (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Perlihatkan Waveform (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Alat Penggambar Pitch (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Alat Penghapus (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Alat Pisau (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Alat Pena Plus (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.it-IT.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Attenzione: questa opzione rimuove tutti i preset salvati.</system:String>
<system:String x:Key="pianoroll.toggle.vibrato">Mostra Vibrato (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Mostra Waveform (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Strumento Disegna Pitch (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Strumento Gommma (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Strumento Coltello (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Strumento Penna Plus (Ctrl + 2)
Expand Down
4 changes: 3 additions & 1 deletion OpenUtau/Strings/Strings.ja-JP.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
<system:String x:Key="pianoroll.menu.part">パート</system:String>
<system:String x:Key="pianoroll.menu.part.legacypluginexp">従来のプラグイン (試験中)</system:String>
<system:String x:Key="pianoroll.toggle.finalpitch">最終的なピッチを表示 (R)</system:String>
<system:String x:Key="pianoroll.toggle.noteparams">音符のパラメータを表示 (\)</system:String>
<system:String x:Key="pianoroll.toggle.phoneme">音素を表示 (O)</system:String>
<system:String x:Key="pianoroll.toggle.pitch">ピッチ曲線を表示 (I)</system:String>
<system:String x:Key="pianoroll.toggle.snap">スナップを有効化 (P)</system:String>
Expand All @@ -224,7 +225,8 @@
<system:String x:Key="pianoroll.tool.drawpitch">ピッチ描画ツール (4)
左クリックで描画
右クリックでリセット
Ctrl長押しで線をなめらかにする</system:String>
Ctrl長押しで選択
Alt長押しで線をなめらかにする</system:String>
<system:String x:Key="pianoroll.tool.eraser">消しゴムツール (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">ナイフツール (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">ペン+ツール (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.ko-KR.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@
<system:String x:Key="pianoroll.toggle.vibrato">비브라토 보기 (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">파형 보기 (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">피치 그리기 툴 (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">삭제 툴 (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">잘라내기 툴 (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">팬+ 툴 (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.nl-NL.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Waarschuwing: deze optie verwijdert aangepaste voorinstellingen.</system:String>
<system:String x:Key="pianoroll.toggle.vibrato">Vibrato weergeven (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Golfvorm weergeven (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">toonhoogte tekenen (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Gummetje (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Mess (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Pen Plus gereedschap (Ctrl + 2)
Expand Down
6 changes: 5 additions & 1 deletion OpenUtau/Strings/Strings.pl-PL.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ Warning: this option removes custom presets.</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.tone">Toggle Note Tone (Y)</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.vibrato">View Vibrato (U)</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.waveform">View Waveform (W)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.drawpitch">Draw Pitch Tool (4)
Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<!--<system:String x:Key="pianoroll.tool.eraser">Eraser Tool (3)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.knife">Knife Tool (5)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.penplus">Pen Plus Tool (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.pt-BR.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Aviso: esta opção remove predefinições personalizadas.</system:String>
<system:String x:Key="pianoroll.toggle.vibrato">Ver Vibrato (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Ver Waveform (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Ferramenta Desenhar Tom (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Ferramenta Borracha (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Ferramenta Faca (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Ferramenta Lapis+ (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.ru-RU.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@
<system:String x:Key="pianoroll.toggle.vibrato">Отображать вибрато (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Отображать волну (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Инструмент рисовки питча (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Ластик (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Нож (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Карандаж Plus (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.th-TH.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@
<system:String x:Key="pianoroll.toggle.vibrato">แสดงผลไวบราโต (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">แสดงผล Waveform (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">เครื่องมือวาด Pitch (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">ยางลบ (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">มีด (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">ปากกาอัจฉริยะ (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.vi-VN.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Lưu ý: tuỳ chọn này cũng sẽ xoá các preset của bạn.</system:Stri
<system:String x:Key="pianoroll.toggle.vibrato">Hiện đường rung giọng (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">Hiện Waveform (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">Vẽ tự do đường luyến giọng (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">Xoá nốt (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">Cắt nốt (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">Viết nốt PLUS (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.zh-CN.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@
<system:String x:Key="pianoroll.toggle.vibrato">显示颤音 (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">显示波形 (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">绘制音高线工具 (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">橡皮工具 (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">分割工具 (5)</system:String>
<system:String x:Key="pianoroll.tool.penplus">笔(增强)工具 (Ctrl + 2)
Expand Down
4 changes: 4 additions & 0 deletions OpenUtau/Strings/Strings.zh-TW.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@
<system:String x:Key="pianoroll.toggle.vibrato">顯示顫音 (U)</system:String>
<system:String x:Key="pianoroll.toggle.waveform">顯示波形 (W)</system:String>
<system:String x:Key="pianoroll.tool.drawpitch">音高繪製工具 (4)</system:String>
<!--Left click to draw
Right click to reset
Hold Ctrl to select
Hold Alt to smoothen</system:String>-->
<system:String x:Key="pianoroll.tool.eraser">橡皮擦工具 (3)</system:String>
<system:String x:Key="pianoroll.tool.knife">剪刀工具 (5)</system:String>
<!--<system:String x:Key="pianoroll.tool.penplus">Pen Plus Tool (Ctrl + 2)
Expand Down
11 changes: 8 additions & 3 deletions OpenUtau/Views/PianoRollWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ public void NotesCanvasPointerPressed(object sender, PointerPressedEventArgs arg
private void NotesCanvasLeftPointerPressed(Control control, PointerPoint point, PointerPressedEventArgs args) {
if (ViewModel.NotesViewModel.DrawPitchTool) {
ViewModel.NotesViewModel.DeselectNotes();
if (args.KeyModifiers == cmdKey) {
if (args.KeyModifiers == KeyModifiers.Alt) {
editState = new SmoothenPitchState(control, ViewModel, this);
return;
} else {
} else if (args.KeyModifiers != cmdKey) {
editState = new DrawPitchState(control, ViewModel, this);
return;
}
Expand Down Expand Up @@ -325,7 +325,8 @@ private void NotesCanvasLeftPointerPressed(Control control, PointerPoint point,
}
if (ViewModel.NotesViewModel.CursorTool ||
ViewModel.NotesViewModel.PenTool && args.KeyModifiers == cmdKey ||
ViewModel.NotesViewModel.PenPlusTool && args.KeyModifiers == cmdKey) {
ViewModel.NotesViewModel.PenPlusTool && args.KeyModifiers == cmdKey ||
ViewModel.NotesViewModel.DrawPitchTool && args.KeyModifiers == cmdKey) {
if (args.KeyModifiers == KeyModifiers.None) {
// New selection.
ViewModel.NotesViewModel.DeselectNotes();
Expand Down Expand Up @@ -459,6 +460,10 @@ public void NotesCanvasPointerMoved(object sender, PointerEventArgs args) {
if (ViewModel?.NotesViewModel?.HitTest == null) {
return;
}
if((ViewModel.NotesViewModel.DrawPitchTool && args.KeyModifiers != cmdKey) || ViewModel.NotesViewModel.EraserTool) {
Cursor = null;
return;
}
var pitHitInfo = ViewModel.NotesViewModel.HitTest.HitTestPitchPoint(point.Position);
if (pitHitInfo.Note != null) {
Cursor = ViewConstants.cursorHand;
Expand Down

0 comments on commit 900f259

Please sign in to comment.