Ejemplo n.º 1
0
 public TuneInfo PickSoloLeaderNote(Bands bands, FrequencyChart chart, int harmonics = 1)
 {
     return(chart.OrderByDescending(k => k.Level)
            .Skip(harmonics - 1)
            .Select(k => bands.NoteByFreq(k.Frequency))
            .First());
 }
Ejemplo n.º 2
0
 public string PickNoteWithVoting(Bands bands, FrequencyChart chart)
 {
     return(chart.OrderByDescending(k => k.Level)
            .Take(15)
            .Select(k => bands.NoteByFreq(k.Frequency))
            .GroupBy(k => k.Note.NoteName)
            .Select(k => new { note = k.Key, count = k.Count() })
            .OrderByDescending(k => k.count)
            .First().note);
 }
Ejemplo n.º 3
0
 public string StringForBand(Bands bands, FrequencyChart freq, int noteCount = 1)
 {
     if (freq.Any())
     {
         var nt = "";
         for (int i = 0; i < noteCount; i++)
         {
             var maxFrequency = Math.Round(freq.OrderByDescending(k => k.Level).Skip(i).First().Frequency, 1);
             nt += bands.NoteByFreq(maxFrequency) + " (" + maxFrequency + ")    ";
         }
         return(nt + "\n");
     }
     else
     {
         return("   -(-)  ");
     }
 }