@Ignore @Test public void generatePotentialMix_shouldHave17Keys() { final Map<String, Double> maps = volumeLevelGenerator.generatePotentialMix(); assertThat(maps.size()).isEqualTo(17); }
public Map<String, Double> generatePotentialMix(){ Map<String, Double> potenialMix = new HashMap<>(); potenialMix.put(MixRoles.COMP_HI_FX, 18.0); potenialMix.put(MixRoles.COMP_HI_ALT_FX, 18.0); potenialMix.put(MixRoles.COMP_MID, 10.0); potenialMix.put(MixRoles.COMP_MID_ALT, 10.0); potenialMix.put(MixRoles.COMP_LOW, 14.0); potenialMix.put(MixRoles.COMP_LOW_ALT, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM_ALT, 14.0); potenialMix.put(MixRoles.COMP_AMBIENCE, 9.0); potenialMix.put(MixRoles.COMP_HARMONIC, 5.5); potenialMix.put(MixRoles.COMP_HARMONIC_ALT, 5.0); potenialMix.put(MixRoles.HITS, 14.0); potenialMix.put(MixRoles.FILLS, 14.0); potenialMix.put(MixRoles.KICK, 17.0); potenialMix.put(MixRoles.SNARE, 14.0); potenialMix.put(MixRoles.HAT, 14.0); for(int i=0; i<numOfAltMelodies; i++){ potenialMix.put(MixRoles.COMP_MELODY+i, 23.0); } return potenialMix; }
VolumeLevelGenerator { public Map<String, Double> generatePotentialMix(){ Map<String, Double> potenialMix = new HashMap<>(); potenialMix.put(MixRoles.COMP_HI_FX, 18.0); potenialMix.put(MixRoles.COMP_HI_ALT_FX, 18.0); potenialMix.put(MixRoles.COMP_MID, 10.0); potenialMix.put(MixRoles.COMP_MID_ALT, 10.0); potenialMix.put(MixRoles.COMP_LOW, 14.0); potenialMix.put(MixRoles.COMP_LOW_ALT, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM_ALT, 14.0); potenialMix.put(MixRoles.COMP_AMBIENCE, 9.0); potenialMix.put(MixRoles.COMP_HARMONIC, 5.5); potenialMix.put(MixRoles.COMP_HARMONIC_ALT, 5.0); potenialMix.put(MixRoles.HITS, 14.0); potenialMix.put(MixRoles.FILLS, 14.0); potenialMix.put(MixRoles.KICK, 17.0); potenialMix.put(MixRoles.SNARE, 14.0); potenialMix.put(MixRoles.HAT, 14.0); for(int i=0; i<numOfAltMelodies; i++){ potenialMix.put(MixRoles.COMP_MELODY+i, 23.0); } return potenialMix; } }
VolumeLevelGenerator { public Map<String, Double> generatePotentialMix(){ Map<String, Double> potenialMix = new HashMap<>(); potenialMix.put(MixRoles.COMP_HI_FX, 18.0); potenialMix.put(MixRoles.COMP_HI_ALT_FX, 18.0); potenialMix.put(MixRoles.COMP_MID, 10.0); potenialMix.put(MixRoles.COMP_MID_ALT, 10.0); potenialMix.put(MixRoles.COMP_LOW, 14.0); potenialMix.put(MixRoles.COMP_LOW_ALT, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM_ALT, 14.0); potenialMix.put(MixRoles.COMP_AMBIENCE, 9.0); potenialMix.put(MixRoles.COMP_HARMONIC, 5.5); potenialMix.put(MixRoles.COMP_HARMONIC_ALT, 5.0); potenialMix.put(MixRoles.HITS, 14.0); potenialMix.put(MixRoles.FILLS, 14.0); potenialMix.put(MixRoles.KICK, 17.0); potenialMix.put(MixRoles.SNARE, 14.0); potenialMix.put(MixRoles.HAT, 14.0); for(int i=0; i<numOfAltMelodies; i++){ potenialMix.put(MixRoles.COMP_MELODY+i, 23.0); } return potenialMix; }  }
VolumeLevelGenerator { public Map<String, Double> generatePotentialMix(){ Map<String, Double> potenialMix = new HashMap<>(); potenialMix.put(MixRoles.COMP_HI_FX, 18.0); potenialMix.put(MixRoles.COMP_HI_ALT_FX, 18.0); potenialMix.put(MixRoles.COMP_MID, 10.0); potenialMix.put(MixRoles.COMP_MID_ALT, 10.0); potenialMix.put(MixRoles.COMP_LOW, 14.0); potenialMix.put(MixRoles.COMP_LOW_ALT, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM_ALT, 14.0); potenialMix.put(MixRoles.COMP_AMBIENCE, 9.0); potenialMix.put(MixRoles.COMP_HARMONIC, 5.5); potenialMix.put(MixRoles.COMP_HARMONIC_ALT, 5.0); potenialMix.put(MixRoles.HITS, 14.0); potenialMix.put(MixRoles.FILLS, 14.0); potenialMix.put(MixRoles.KICK, 17.0); potenialMix.put(MixRoles.SNARE, 14.0); potenialMix.put(MixRoles.HAT, 14.0); for(int i=0; i<numOfAltMelodies; i++){ potenialMix.put(MixRoles.COMP_MELODY+i, 23.0); } return potenialMix; }  List<Map<String, Double>> generatePotentialMixes(); Map<String, Double> generatePotentialMix(); double generateRandomDecibleLevel(int min, int max); }
VolumeLevelGenerator { public Map<String, Double> generatePotentialMix(){ Map<String, Double> potenialMix = new HashMap<>(); potenialMix.put(MixRoles.COMP_HI_FX, 18.0); potenialMix.put(MixRoles.COMP_HI_ALT_FX, 18.0); potenialMix.put(MixRoles.COMP_MID, 10.0); potenialMix.put(MixRoles.COMP_MID_ALT, 10.0); potenialMix.put(MixRoles.COMP_LOW, 14.0); potenialMix.put(MixRoles.COMP_LOW_ALT, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM, 14.0); potenialMix.put(MixRoles.COMP_RHYTHM_ALT, 14.0); potenialMix.put(MixRoles.COMP_AMBIENCE, 9.0); potenialMix.put(MixRoles.COMP_HARMONIC, 5.5); potenialMix.put(MixRoles.COMP_HARMONIC_ALT, 5.0); potenialMix.put(MixRoles.HITS, 14.0); potenialMix.put(MixRoles.FILLS, 14.0); potenialMix.put(MixRoles.KICK, 17.0); potenialMix.put(MixRoles.SNARE, 14.0); potenialMix.put(MixRoles.HAT, 14.0); for(int i=0; i<numOfAltMelodies; i++){ potenialMix.put(MixRoles.COMP_MELODY+i, 23.0); } return potenialMix; }  List<Map<String, Double>> generatePotentialMixes(); Map<String, Double> generatePotentialMix(); double generateRandomDecibleLevel(int min, int max); final int DB_RANGE; final int NUM_OF_MIXES; }