private void printCor(ITextWriter writer, int start_clock, string header) { writer.writeLine(header); int lastvalue = defaultValue; bool value_at_start_written = false; for (int i = 0; i < length; i++) { int key = clocks[i]; if (start_clock == key) { writer.writeLine(key + "=" + items[i].value); value_at_start_written = true; } else if (start_clock < key) { if (!value_at_start_written && lastvalue != defaultValue) { writer.writeLine(start_clock + "=" + lastvalue); value_at_start_written = true; } int val = items[i].value; writer.writeLine(key + "=" + val); } else { lastvalue = items[i].value; } } if (!value_at_start_written && lastvalue != defaultValue) { writer.writeLine(start_clock + "=" + lastvalue); } }
private List <VsqHandle> writeEventListCor(ITextWriter writer, int eos) { List <VsqHandle> handles = buildHandleList(); writer.writeLine("[EventList]"); List <VsqEvent> temp = new List <VsqEvent>(); foreach (var @event in Events.iterator()) { temp.Add(@event); } temp.Sort(); int i = 0; while (i < temp.Count) { VsqEvent item = temp[i]; if (!item.ID.Equals(VsqID.EOS)) { string ids = "ID#" + PortUtil.formatDecimal("0000", item.ID.value); int clock = temp[i].Clock; while (i + 1 < temp.Count && clock == temp[i + 1].Clock) { i++; ids += ",ID#" + PortUtil.formatDecimal("0000", temp[i].ID.value); } writer.writeLine(clock + "=" + ids); } i++; } writer.writeLine(eos + "=EOS"); return(handles); }
/// <summary> /// このインスタンスをテキストファイルに出力します /// </summary> /// <param name="sw">出力対象</param> public void write(ITextWriter sw) { sw.writeLine("[Mixer]"); sw.writeLine("MasterFeder=" + MasterFeder); sw.writeLine("MasterPanpot=" + MasterPanpot); sw.writeLine("MasterMute=" + MasterMute); sw.writeLine("OutputMode=" + OutputMode); int count = Slave.Count; sw.writeLine("Tracks=" + count); for (int i = 0; i < count; i++) { VsqMixerEntry item = Slave[i]; sw.writeLine("Feder" + i + "=" + item.Feder); sw.writeLine("Panpot" + i + "=" + item.Panpot); sw.writeLine("Mute" + i + "=" + item.Mute); sw.writeLine("Solo" + i + "=" + item.Solo); } }
/// <summary> /// インスタンスの内容をテキストファイルに出力します /// </summary> /// <param name="sw">出力先</param> public void write(ITextWriter sw) { sw.writeLine("[Common]"); sw.writeLine("Version=" + Version); sw.writeLine("Name=" + Name); sw.writeLine("Color=" + Color); sw.writeLine("DynamicsMode=" + DynamicsMode); sw.writeLine("PlayMode=" + PlayMode); }
/// <summary> /// インスタンスの内容をテキストファイルに出力します /// </summary> /// <param name="sw">出力先</param> public void write(ITextWriter sw) { sw.writeLine("[Master]"); sw.writeLine("PreMeasure=" + PreMeasure); }
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); } }
/// <summary> /// インスタンスをストリームに書き込みます。 /// encode=trueの場合、2バイト文字をエンコードして出力します。 /// </summary> /// <param name="sw">書き込み対象</param> public void write(ITextWriter sw) { sw.writeLine(this.toString()); }