本文整理汇总了C#中Instrument.SetVolumeLength方法的典型用法代码示例。如果您正苦于以下问题:C# Instrument.SetVolumeLength方法的具体用法?C# Instrument.SetVolumeLength怎么用?C# Instrument.SetVolumeLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Instrument
的用法示例。
在下文中一共展示了Instrument.SetVolumeLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddNew
public static void AddNew(Song currentSong)
{
Instrument nuevo = new Instrument();
nuevo.SetVolumeLength(5);
nuevo.Name = WYZTracker.Core.Properties.Resources.New;
nuevo.Looped = false;
nuevo.Volumes = new byte[] { 8, 8, 8, 8, 8 };
nuevo.ID = currentSong.Instruments.GetSafeId().ToString();
currentSong.Instruments.Add(nuevo);
}
示例2: initializeSong
private void initializeSong(bool defaultValues)
{
Pattern defaultPattern;
Instrument defaultInstrument;
this.Looped = true;
if (defaultValues)
{
defaultPattern = new Pattern(this.channels);
defaultPattern.Name = WYZTracker.Core.Properties.Resources.New;
this.patterns.Add(defaultPattern);
defaultInstrument = new Instrument();
defaultInstrument.ID = "0";
defaultInstrument.Name = WYZTracker.Core.Properties.Resources.Piano;
defaultInstrument.SetVolumeLength(4);
defaultInstrument.Looped = true;
defaultInstrument.LoopStart = 3;
defaultInstrument.Volumes[0] = 8;
defaultInstrument.Volumes[1] = 7;
defaultInstrument.Volumes[2] = 6;
defaultInstrument.Volumes[3] = 5;
this.Instruments.Add(defaultInstrument);
defaultInstrument = new Instrument();
defaultInstrument.ID = "R";
defaultInstrument.Name = "Sawtooth";
defaultInstrument.Looped = false;
defaultInstrument.LoopStart = 0;
this.Instruments.Add(defaultInstrument);
this.mutedChannels = new bool[this.channels + 1];
this.ChipFrequency = (int) LibAYEmu.ChipSpeedsByMachine.MSX;
this.defaultMsxFreqs = true;
this.parameterValue = this.chipFrequency;
}
}