Hacking
float calculateLogicalDuration ( SingleNote singleNote ) {; float ratio = 1f; // Die folgende Anweisung muss dynamisiert werden denn es muss ja kein 4/4 Takt sein ratio = (float)((float)singleNote . numericalDuration / (float)(divisionPerQuarternote * 4)); globalController . errorMessages += „duration ratio = “ + ratio + „\n“; if (ratio == 1) // ganze Note { singleNote . logicalDuration = „whole“; globalController . errorMessages += „new logical Duration = whole\n“; } if (ratio == 0 . 9375) // 15 Sechzehntel = dreifach punktierte Halbe { singleNote . logicalDuration = „half“; singleNote . dot = true; singleNote . dot2 = true; singleNote . dot3 = true; globalController . errorMessages += „new logical Duration = half dot dot dot\n“; } if (ratio == 0 . 875) // 7 Achtel = doppelt punktierte Halbe { singleNote . logicalDuration = „half“; singleNote . dot = true; singleNote . dot2 = true; globalController . errorMessages += „new logical Duration = half dot dot\n“; } if (ratio == 0 . 75) // punktierte halbe Note { singleNote . logicalDuration = „half“; singleNote . dot = true; globalController . errorMessages += „new logical Duration = half dot\n“; } if (ratio == 0 . 5) // halbe Note { singleNote . logicalDuration = „half“; globalController . errorMessages += „new logical Duration = half\n“; } if (ratio == 0 . 46875) // 15 32-tel = dreifach punktierte Viertel { singleNote . logicalDuration = „quarter“; singleNote . dot = true; singleNote . dot2 = true; singleNote . dot3 = true; globalController . errorMessages += „new logical Duration = quarter dot dot dot\n“; } if (ratio == 0 . 4375) // 7 Sechzehntel = doppelte punktierte Viertel { singleNote . logicalDuration = „quarter“; singleNote . dot = true; singleNote . dot2 = true; globalController . errorMessages += „new logical Duration = quarter dot dot\n“; } if (ratio == 0 . 375) // punktierte Viertel { singleNote . logicalDuration = „quarter“; singleNote . dot = true; globalController . errorMessages += „new logical Duration = quarter dot\n“; } if (ratio == 0 . 25) // Viertel { singleNote . logicalDuration = „quarter“; globalController . errorMessages += „new logical Duration = quarter\n“; } if (ratio == 0 . 21875) // doppelte punktierte Achtel // Achtel + 16th + 32nd { singleNote . logicalDuration = „eighth“; singleNote . dot = true; singleNote . dot2 = true; globalController . errorMessages += „new logical Duration = eighth dot dot\n“; } if (ratio == 0 . 1875) // punktierte Achtel { singleNote . logicalDuration = „eighth“; singleNote . dot = true; globalController . errorMessages += „new logical Duration = eighth dot\n“; } if (ratio == 0 . 125) // Achtel { singleNote . logicalDuration = „eighth“; globalController . errorMessages += „new logical Duration = eighth\n“; } if (ratio == 0 . 09375) // punktierte Sechzehntel { singleNote . logicalDuration = „16th“; singleNote . dot = true; globalController . errorMessages += „new logical Duration = 16th dot\n“; } if (ratio == 0 . 0625) // Sechzehntel { singleNote . logicalDuration = „16th“; globalController . errorMessages += „new logical Duration = 16th\n“; } if (ratio == 0 . 03125) // 32-tel { singleNote . logicalDuration = „32nd“; globalController . errorMessages += „new logical Duration = 32nd\n“; } return ratio; }