private static Conductor ToConductor(EventConductorData conductorData) { var conductor = new Conductor(); // MLTD tick is divided by 8. conductor.Ticks = conductorData.Tick * (NoteBase.TicksPerBeat / 8); conductor.Measure = conductorData.Measure - 1; conductor.Beat = conductorData.Beat - 1; conductor.Tempo = conductorData.Tempo; conductor.SignatureNumerator = conductorData.SignatureNumerator; conductor.SignatureDenominator = conductorData.SignatureDenominator; return(conductor); }
private static EventConductorData[] ReadEventConductorDataList([NotNull] string[] lines, ref int index) { index += 2; var cc = lines[index++].ConvInt32(12); var result = new EventConductorData[cc]; for (var i = 0; i < cc; ++i) { result[i] = ReadEventConductorData(lines, ref index); } return(result); }
private static EventConductorData ReadEventConductorData([NotNull] string[] lines, ref int index) { index += 2; var result = new EventConductorData(); result.absTime = lines[index++].ConvDouble(20); result.selected = lines[index++].ConvBoolean(20); result.tick = lines[index++].ConvInt64(17); result.measure = lines[index++].ConvInt32(17); result.beat = lines[index++].ConvInt32(14); result.track = lines[index++].ConvInt32(15); result.tempo = lines[index++].ConvDouble(18); result.tsigNumerator = lines[index++].ConvInt32(23); result.tsigDemoninator = lines[index++].ConvInt32(25); index++; result.marker = string.Empty; return(result); }