41 lines
1 KiB
C#
41 lines
1 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace JD.Serialization
|
|
{
|
|
partial class KaraokeTrack
|
|
{
|
|
public KaraokeTrack()
|
|
{
|
|
Height = 20;
|
|
}
|
|
|
|
public override IEnumerable<System.Type> ClipTypes()
|
|
{
|
|
yield return typeof(KaraokeClip);
|
|
}
|
|
|
|
partial void OnContentTypeChanged()
|
|
{
|
|
switch (ContentType)
|
|
{
|
|
case ContentType_Enum.KaraokeContent_LyricsOnly:
|
|
Height = 60;
|
|
break;
|
|
case ContentType_Enum.KaraokeContent_Rap:
|
|
Height = 20;
|
|
break;
|
|
case ContentType_Enum.KaraokeContent_Singing:
|
|
Height = 20;
|
|
break;
|
|
}
|
|
}
|
|
|
|
[Range(0, 127)]
|
|
public int MidiNote
|
|
{
|
|
get { return MidiUtils.FrequencyToMidi(Pitch); }
|
|
set { Pitch = MidiUtils.MidiToFrequency(value); }
|
|
}
|
|
}
|
|
}
|