示例#1
0
        /// <summary>
        /// このインスタンスと指定したアイテムが,歌声合成の観点から等しいかどうかを調べます
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public bool equalsForSynth(UstEvent item)
        {
            if (item == null)
            {
                return(false);
            }
            bool ret = true;

            // モジュレーション・先行発声・スタート位置・オーバーラップのみチェック.
            // ほかに有効な値でかつ VsqEvent で比較できないものは何かあったか
            if (this.getModuration() != item.getModuration())
            {
                ret = false;
            }
            else if (this.getPreUtterance() != item.getPreUtterance())
            {
                ret = false;
            }
            else if (this.getStartPoint() != item.getStartPoint())
            {
                ret = false;
            }
            else if (this.getVoiceOverlap() != item.getVoiceOverlap())
            {
                ret = false;
            }
            return(ret);
        }
示例#2
0
 private void writeCor(ITextWriter writer, List <string> print_targets)
 {
     writer.writeLine("[ID#" + PortUtil.formatDecimal("0000", ID.value) + "]");
     writer.writeLine("Type=" + ID.type);
     if (ID.type == VsqIDType.Anote)
     {
         if (print_targets.Contains("Length"))
         {
             writer.writeLine("Length=" + ID.getLength());
         }
         if (print_targets.Contains("Note#"))
         {
             writer.writeLine("Note#=" + ID.Note);
         }
         if (print_targets.Contains("Dynamics"))
         {
             writer.writeLine("Dynamics=" + ID.Dynamics);
         }
         if (print_targets.Contains("PMBendDepth"))
         {
             writer.writeLine("PMBendDepth=" + ID.PMBendDepth);
         }
         if (print_targets.Contains("PMBendLength"))
         {
             writer.writeLine("PMBendLength=" + ID.PMBendLength);
         }
         if (print_targets.Contains("PMbPortamentoUse"))
         {
             writer.writeLine("PMbPortamentoUse=" + ID.PMbPortamentoUse);
         }
         if (print_targets.Contains("DEMdecGainRate"))
         {
             writer.writeLine("DEMdecGainRate=" + ID.DEMdecGainRate);
         }
         if (print_targets.Contains("DEMaccent"))
         {
             writer.writeLine("DEMaccent=" + ID.DEMaccent);
         }
         if (print_targets.Contains("PreUtterance"))
         {
             writer.writeLine("PreUtterance=" + UstEvent.getPreUtterance());
         }
         if (print_targets.Contains("VoiceOverlap"))
         {
             writer.writeLine("VoiceOverlap=" + UstEvent.getVoiceOverlap());
         }
         if (ID.LyricHandle != null)
         {
             writer.writeLine("LyricHandle=h#" + PortUtil.formatDecimal("0000", ID.LyricHandle_index));
         }
         if (ID.VibratoHandle != null)
         {
             writer.writeLine("VibratoHandle=h#" + PortUtil.formatDecimal("0000", ID.VibratoHandle_index));
             writer.writeLine("VibratoDelay=" + ID.VibratoDelay);
         }
         if (ID.NoteHeadHandle != null)
         {
             writer.writeLine("NoteHeadHandle=h#" + PortUtil.formatDecimal("0000", ID.NoteHeadHandle_index));
         }
     }
     else if (ID.type == VsqIDType.Singer)
     {
         writer.writeLine("IconHandle=h#" + PortUtil.formatDecimal("0000", ID.IconHandle_index));
     }
     else if (ID.type == VsqIDType.Aicon)
     {
         writer.writeLine("IconHandle=h#" + PortUtil.formatDecimal("0000", ID.IconHandle_index));
         writer.writeLine("Note#=" + ID.Note);
     }
 }