/// <summary> /// 歌手設定のインスタンスを、VsqHandleに型キャストします。 /// </summary> /// <returns></returns> public static VsqHandle castFromIconHandle(IconHandle handle) { VsqHandle ret = new VsqHandle(); ret.m_type = VsqHandleType.Singer; ret.Caption = handle.Caption; ret.IconID = handle.IconID; ret.IDS = handle.IDS; ret.Index = handle.Index; ret.Language = handle.Language; ret.setLength(handle.getLength()); ret.Program = handle.Program; return(ret); }
public VsqHandle castToVsqHandle() { VsqHandle ret = new VsqHandle(); ret.m_type = VsqHandleType.NoteHeadHandle; ret.Index = Index; ret.IconID = IconID; ret.IDS = IDS; ret.Original = Original; ret.Caption = getCaption(); ret.setLength(getLength()); ret.Duration = getDuration(); ret.Depth = getDepth(); return(ret); }
/// <summary> /// この強弱記号設定のインスタンスを、VsqHandleに型キャストします。 /// </summary> /// <returns></returns> public VsqHandle castToVsqHandle() { VsqHandle ret = new VsqHandle(); ret.m_type = VsqHandleType.DynamicsHandle; ret.IconID = IconID; ret.IDS = IDS; ret.Original = Original; ret.Caption = getCaption(); ret.DynBP = getDynBP(); ret.EndDyn = getEndDyn(); ret.setLength(getLength()); ret.StartDyn = getStartDyn(); return(ret); }
public VsqHandle castToVsqHandle() { VsqHandle ret = new VsqHandle(); ret.m_type = VsqHandleType.Vibrato; ret.Index = Index; ret.IconID = IconID; ret.IDS = IDS; ret.Original = Original; ret.Caption = caption; ret.setLength(getLength()); ret.StartDepth = startDepth; ret.StartRate = startRate; ret.DepthBP = (VibratoBPList)depthBP.clone(); ret.RateBP = (VibratoBPList)rateBP.clone(); return(ret); }
/// <summary> /// このインスタンスから、Handleのリストを作成すると同時に、Eventsに登録されているVsqEventのvalue値および各ハンドルのvalue値を更新します /// </summary> /// <returns></returns> private List <VsqHandle> buildHandleList() { List <VsqHandle> handle = new List <VsqHandle>(); int current_id = -1; int current_handle = -1; bool add_quotation_mark = true; bool is_vocalo1 = Common.Version.StartsWith("DSB2"); bool is_vocalo2 = Common.Version.StartsWith("DSB3"); foreach (var item in Events.iterator()) { current_id++; item.ID.value = current_id; // IconHandle if (item.ID.IconHandle != null) { if (item.ID.IconHandle is IconHandle) { IconHandle ish = (IconHandle)item.ID.IconHandle; current_handle++; VsqHandle handle_item = VsqHandle.castFromIconHandle(ish); handle_item.Index = current_handle; handle.Add(handle_item); item.ID.IconHandle_index = current_handle; if (is_vocalo1) { VsqVoiceLanguage lang = VocaloSysUtil.getLanguageFromName(ish.IDS); add_quotation_mark = lang == VsqVoiceLanguage.Japanese; } else if (is_vocalo2) { VsqVoiceLanguage lang = VocaloSysUtil.getLanguageFromName(ish.IDS); add_quotation_mark = lang == VsqVoiceLanguage.Japanese; } } } // LyricHandle if (item.ID.LyricHandle != null) { current_handle++; VsqHandle handle_item = VsqHandle.castFromLyricHandle(item.ID.LyricHandle); handle_item.Index = current_handle; handle_item.addQuotationMark = add_quotation_mark; handle.Add(handle_item); item.ID.LyricHandle_index = current_handle; } // VibratoHandle if (item.ID.VibratoHandle != null) { current_handle++; VsqHandle handle_item = item.ID.VibratoHandle.castToVsqHandle(); handle_item.Index = current_handle; handle.Add(handle_item); item.ID.VibratoHandle_index = current_handle; } // NoteHeadHandle if (item.ID.NoteHeadHandle != null) { current_handle++; VsqHandle handle_item = item.ID.NoteHeadHandle.castToVsqHandle(); handle_item.Index = current_handle; handle.Add(handle_item); item.ID.NoteHeadHandle_index = current_handle; } // IconDynamicsHandle if (item.ID.IconDynamicsHandle != null) { current_handle++; VsqHandle handle_item = item.ID.IconDynamicsHandle.castToVsqHandle(); handle_item.Index = current_handle; handle_item.setLength(item.ID.getLength()); handle.Add(handle_item); item.ID.IconHandle_index = current_handle; } } return(handle); }