public void AutoMlPredictor_GetPredictionWithBorderDetection_Sweet() { var predictor = new AutoMlPredictor("./Resources/20200730032502S400L0.175406C0.043894.model"); var(sampleRate, samples) = Chords.Profiling.Profiling.GetSamples("./Resources/sweet improved.mp3"); var chords = predictor.GetPredictionWithBorderDetection(samples, sampleRate, 500, 250, new Progress <int>()); var a = String.Join(" ", chords.Select(chord => chord.Name)); Assert.IsTrue(false); // Test not fully implemented yet }
public void AutoMlPredictor_GetPredictionWithBorderDetection_Combined() { var predictor = new AutoMlPredictor(); var(sampleRate, samples) = Chords.Profiling.Profiling.GetSamples("./Resources/combined.wav"); var chords = predictor.GetPredictionWithBorderDetection(samples, sampleRate, 500, 100, new Progress <int>()); var totalSampleLength = chords.Select(chord => chord.Samples.Length).Aggregate((acc, val) => acc + val); Assert.AreEqual(samples.Length, totalSampleLength); Assert.AreEqual(chords.Length, 2); Assert.AreEqual(chords[0].Name, "C"); Assert.AreEqual(chords[1].Name, "G"); }
public void AutoMlPredictor_GetPredictionWithBorderDetection() { var predictor = new AutoMlPredictor(); var(sampleRate, samples) = Chords.Profiling.Profiling.GetSamples("./Resources/wind_of_change.wav"); var chords = predictor.GetPredictionWithBorderDetection(samples, sampleRate, 500, 100, new Progress <int>()); var totalSampleLength = chords.Select(chord => chord.Samples.Length).Aggregate((acc, val) => acc + val); Assert.AreEqual(samples.Length, totalSampleLength); Assert.AreEqual(chords.Length, 9); Assert.AreEqual(chords[0].Name, "F"); Assert.AreEqual(chords[1].Name, "Dm"); Assert.AreEqual(chords[2].Name, "F"); Assert.AreEqual(chords[3].Name, "Dm"); Assert.AreEqual(chords[4].Name, "Am"); Assert.AreEqual(chords[5].Name, "Dm"); Assert.AreEqual(chords[6].Name, "Am"); Assert.AreEqual(chords[7].Name, "G"); Assert.AreEqual(chords[8].Name, "Em"); }