Logo Search packages:      
Sourcecode: cadencii version File versions  Download package

void org::kbinani::cadencii::FormMain::editNoteVibratoProperty (  ) [inline]

選択されている音符のビブラートを編集するためのダイアログを起動し、編集を行います。

Definition at line 5056 of file FormMain.cs.

References org::kbinani::vsq::VsqEvent::clone(), org::kbinani::cadencii::AppManager::editHistory, org::kbinani::cadencii::AppManager::editorConfig, org::kbinani::vsq::VsqCommand::generateCommandEventChangeIDContaints(), org::kbinani::cadencii::AppManager::getSelected(), org::kbinani::cadencii::VsqFileEx::getTrackRendererKind(), org::kbinani::cadencii::FormVibratoConfig::getVibratoHandle(), org::kbinani::cadencii::AppManager::getVsqFile(), org::kbinani::vsq::VsqEvent::InternalID, org::kbinani::cadencii::AppManager::itemSelection, org::kbinani::cadencii::SelectedEventEntry::original, org::kbinani::cadencii::EditHistoryModel::register(), org::kbinani::cadencii::AppManager::showModalDialog(), org::kbinani::vsq::VsqFile::Track, and org::kbinani::cadencii::EditorConfig::UseUserDefinedAutoVibratoType.

        {
            SelectedEventEntry item = AppManager.itemSelection.getLastEvent();
            if ( item == null ) {
                return;
            }

            VsqEvent ev = item.original;
            int selected = AppManager.getSelected();
            VsqFileEx vsq = AppManager.getVsqFile();
            RendererKind kind = VsqFileEx.getTrackRendererKind( vsq.Track.get( selected ) );
            SynthesizerType type = SynthesizerType.VOCALOID2;
            if ( kind == RendererKind.VOCALOID1 ) {
                type = SynthesizerType.VOCALOID1;
            }
            FormVibratoConfig dlg = null;
            try {
                dlg = new FormVibratoConfig(
                    ev.ID.VibratoHandle,
                    ev.ID.getLength(),
                    AppManager.editorConfig.DefaultVibratoLength,
                    type,
                    AppManager.editorConfig.UseUserDefinedAutoVibratoType );
                dlg.setLocation( getFormPreferedLocation( dlg ) );
                BDialogResult dr = AppManager.showModalDialog( dlg, this );
                if ( dlg.getDialogResult() == BDialogResult.OK ) {
                    VsqEvent edited = (VsqEvent)ev.clone();
                    if ( dlg.getVibratoHandle() != null ) {
                        edited.ID.VibratoHandle = (VibratoHandle)dlg.getVibratoHandle().clone();
                        //edited.ID.VibratoHandle.setStartDepth( AppManager.editorConfig.DefaultVibratoDepth );
                        //edited.ID.VibratoHandle.setStartRate( AppManager.editorConfig.DefaultVibratoRate );
                        edited.ID.VibratoDelay = ev.ID.getLength() - dlg.getVibratoHandle().getLength();
                    } else {
                        edited.ID.VibratoHandle = null;
                    }
                    CadenciiCommand run = new CadenciiCommand(
                        VsqCommand.generateCommandEventChangeIDContaints( selected, ev.InternalID, edited.ID ) );
                    AppManager.editHistory.register( vsq.executeCommand( run ) );
                    setEdited( true );
                    refreshScreen();
                }
            } catch ( Exception ex ) {
                Logger.write( typeof( FormMain ) + ".editNoteVibratoProperty; ex=" + ex + "\n" );
            } finally {
                if ( dlg != null ) {
                    try {
                        dlg.close();
                    } catch ( Exception ex2 ) {
                        Logger.write( typeof( FormMain ) + ".editNoteVibratoProperty; ex=" + ex2 + "\n" );
                    }
                }
            }
        }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index