コード例 #1
0
        public void AnalyzeSong(string fileDirectory)
        {
            visualFacade.SetProgress("Loading Song...", 0.0f);

            SongFile songFile = MyAudioFileReader.ReadAudioFile(fileDirectory);

            visualFacade.SetSongFile(songFile);

            List <SongPropertyValues> songPropertyValuesList = new List <SongPropertyValues>();

            visualFacade.SetProgress("Analyze...", 0.1f);

            AudioAnalyzer audioAnalyzer = new AudioAnalyzer();

            audioAnalyzer.LoadAudioFromFile(fileDirectory);

            audioAnalyzer.Analyze();

            songPropertyValuesList.Add(GetSingleBeatsSPV(audioAnalyzer.SongElements));
            songPropertyValuesList.Add(GetHeldNoteSPV(audioAnalyzer.SongElements));

            visualFacade.PlotSongPropertyValues(songPropertyValuesList);

            visualFacade.SetProgress("done :)", 1);
        }
コード例 #2
0
        public static SongPropertyValues GetSongPropertyValues(string fileDirectory, float vth, float msqe)
        {
            //RectangleDetection.TEST_MAXIMUM_SQUARED_ERROR = msqe;
            FrequencyBand.ValueThreshold = vth;

            Console.WriteLine(vth + " / " + msqe);

            AudioAnalyzer audioAnalyzer = new AudioAnalyzer();

            audioAnalyzer.LoadAudioFromFile(fileDirectory);
            audioAnalyzer.Analyze();

            SongPropertyValues spv = GetHeldNoteSPV(audioAnalyzer.SongElements);

            spv.Normalize();

            return(spv);
        }
コード例 #3
0
 private async Task <AudioAnalysis> Analyze(string audioURL) => await audioAnalyzer.Analyze(audioURL);