public void AllocView(IntPtr ObjectPtr) { if (Alloced) { Track_PitchView.setPartsObjectPtr(ObjectPtr); Track_NoteView.setPartsObjectPtr(ObjectPtr); Global_ActionView.setPartsObjectPtr(ObjectPtr); Param_PitchView.setPartsObjectPtr(ObjectPtr); Param_DynamicView.setPartsObjectPtr(ObjectPtr); Track_NoteView.setSingerDataFinder(SingerDataFinders); } else { Track_NoteView = new NoteView(ObjectPtr, this.PianoWindow); Track_NoteView.setSingerDataFinder(SingerDataFinders); Track_PitchView = new PitchView(ObjectPtr, this.PianoWindow); Param_PitchView = new PITParamView(ObjectPtr, this.ParamWindow); Param_DynamicView = new DYNParamView(ObjectPtr, this.ParamWindow); Global_ActionView = new ActionView(ObjectPtr, this.PianoWindow, this.ParamWindow); CopyPasteController = new CopyPaste(ref Track_NoteView, ref Track_PitchView); CopyPasteController.NoteCopyMemoryChanged += CopyPasteController_NoteCopyMemoryChanged; Track_NoteView.NoteActionBegin += Track_NoteView_NoteActionBegin; Track_NoteView.NoteActionEnd += Track_NoteView_NoteActionEnd; Track_NoteView.NoteSelecting += Track_NoteView_NoteSelecting; Track_PitchView.PitchActionBegin += Track_PitchView_PitchActionBegin; Track_PitchView.PitchActionEnd += Track_PitchView_PitchActionEnd; Param_DynamicView.DynActionBegin += Param_DynamicView_DynActionBegin; Param_DynamicView.DynActionEnd += Param_DynamicView_DynActionEnd; Param_PitchView.PitchActionBegin += Param_PitchView_PitchActionBegin; Param_PitchView.PitchActionEnd += Param_PitchView_PitchActionEnd; Global_ActionView.TickPosChange += Global_ActionView_TickPosChange; Track_NoteView.NoteSelectListChange += Track_NoteView_NoteSelectListChange; Alloced = true; SetNoteViewTool(NoteView.NoteToolsType.Select); SetParamGraphicTool(PitchView.PitchDragingType.DrawGraphS); SwitchParamView(ParamViewType.Dynamic); } try { ParamWindow.RedrawPiano(); PianoWindow.RedrawPiano(); LastSelectIndex = -1; } catch {; } }
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null) { base.OnPropertyChanged(propertyName); if (PitchProperty.PropertyName.Equals(propertyName)) { PitchView.RotateTo(Pitch, 100, Easing.CubicInOut); } else if (YawProperty.PropertyName.Equals(propertyName)) { YawView.RotateTo(Yaw, 100, Easing.CubicInOut); } else if (RollProperty.PropertyName.Equals(propertyName)) { RollView.RotateTo(Roll, 100, Easing.CubicInOut); } }
private void Form1_Load(object sender, EventArgs e) { ProjectObject poj = LoadUST(@"D:\VocalUtau\VocalUtau.DebugExampleFiles\DemoUSTS\Sakurane2.Tracks\Track-4b158252-eb7f-4223-b7b0-d78f32e044ec.ust"); OAC.ReAlloc(poj.TrackerList[1].PartList[0]); NV = new NoteView(OAC.IntPtr, this.pianoRollWindow1); PV = new PitchView(OAC.IntPtr, this.pianoRollWindow1); PitV = new PITParamView(OAC.IntPtr, this.paramCurveWindow1); DynV = new DYNParamView(OAC.IntPtr, this.paramCurveWindow1); UAU = new UndoAbleUtils <PartsObject>(); AV = new ActionView(OAC.IntPtr, this.pianoRollWindow1, this.paramCurveWindow1); NV.HandleEvents = false; PV.HandleEvents = true; PV.EarseModeV2 = true; PitV.HandleEvents = false; DynV.HandleEvents = true; btn_DYN.BackColor = DynV.HandleEvents ? System.Drawing.SystemColors.ControlDark : System.Drawing.SystemColors.Control; btn_PIT.BackColor = PitV.HandleEvents ? System.Drawing.SystemColors.ControlDark : System.Drawing.SystemColors.Control; NV.NoteActionEnd += NV_NoteActionEnd; PV.PitchActionEnd += PV_PitchActionEnd; PitV.PitchActionEnd += PitV_PitchActionEnd; DynV.DynActionEnd += DynV_DynActionEnd; NV.NoteActionBegin += NV_NoteActionBegin; PV.PitchActionBegin += PV_PitchActionBegin; PitV.PitchActionBegin += PitV_PitchActionBegin; DynV.DynActionBegin += DynV_DynActionBegin; this.pianoRollWindow1.TrackPaint += TrackPaint; InitEventAction(); AV.TickPos = 480; }
public CopyPaste(ref NoteView nNV, ref PitchView pPV) { this.NV = nNV; this.PV = pPV; }