public static FrameOptions GetIntervallTime(int optionNumber) { double timeDuration = MusicalStorage.SongDurationInMS(); double physDuration = MusicalStorage.CalculateSongDuration(); double delta = physDuration / timeDuration; if (optionNumber == 0) { double interval = 1.0 / delta; var options = new FrameOptions(); options.frameInterval = interval; options.numberOfPixels = 1; return(options); } else if (optionNumber == 1) { var options = new FrameOptions(); options.frameInterval = 1; options.numberOfPixels = delta; return(options); } else { throw new Exception("invalid optionNumber"); } }
public static string SerializeCSS() { string css = string.Empty; //Opening css += "." + ClassName + "{\n"; //Properties css += "position: absolute;\n"; css += "left: 0px;\n"; css += "top: " + (StyleOptions.HeaderLength + 1) + "px;\n"; css += "height: " + StyleOptions.ContentLength + "px;\n"; css += "width: " + (MusicalStorage.CalculateSongDuration() + StyleOptions.TabInfoSize) + "px;\n"; //Closing css += "}\n"; //Generate the css that is needed for the tags inside the tabulator css += CSS_MusicalNote.SerializeCSS(); css += CSS_MusicalStroke.SerializeCSS(); css += CSS_AllStrings.SerializeCSS(); css += CSS_RythmInfo.SerializeCSS(); css += MusicalStorage.SerializeMelodieToCSS(); return(css); }
public static int GetAnimationStoppingPoint() { double length = MusicalStorage.CalculateSongDuration() + StyleOptions.TabInfoSize; length = length - StyleOptions.TabInfoSize; length = length - (StyleOptions.PreTabSize / 2); double correctedLength = Math.Ceiling(length); double negatedLength = -correctedLength; return(Convert.ToInt32(negatedLength)); }
public static string SerializeCSS() { string css = string.Empty; //Opening css += "." + ClassName + "{\n"; //Properties css += "height: 0px;\n"; css += "width: " + MusicalStorage.CalculateSongDuration() + "px;\n"; css += "border: solid 1px lightgray;\n"; css += "position: absolute;\n"; css += "left: " + StyleOptions.TabInfoSize + "px;\n"; css += "top: " + ClassicalGuitar.A.CalculateTop(6) + "px;\n"; //Closing css += "}\n"; return(css); }
public static string SerializeCSS() { string css = string.Empty; //Opening css += "." + ClassName + "{\n"; //Properties css += "position: absolute;\n"; css += "left: 0px;\n"; css += "top: 0px;\n"; css += "z-index: 0;\n"; css += "width: " + (MusicalStorage.CalculateSongDuration() + StyleOptions.TabInfoSize) + "px;\n"; css += "height: " + StyleOptions.ContentLength + "px;\n"; //Closing css += "}\n"; return(css); }