private static void addAlbertiBass(Measure currentMeasure, Chord currentChord) { Triad currentTriad = currentChord.getTriad(); Note[] triad = new Note[3]; triad = currentTriad.getNotes().toArray(triad); int[] noteOctaves = getNoteOctaves(triad); Beat newBeat = new Beat(); Note currentNote = new Note(triad[0].getTone().toString(), BeatDuration.Eighth); currentNote.setOctave(new Octave(noteOctaves[0])); newBeat.addNote(currentNote); currentMeasure.addBeat(newBeat); newBeat = new Beat(); currentNote = new Note(triad[2].getTone().toString(), BeatDuration.Eighth); currentNote.setOctave(new Octave(noteOctaves[2])); newBeat.addNote(currentNote); currentMeasure.addBeat(newBeat); newBeat = new Beat(); currentNote = new Note(triad[1].getTone().toString(), BeatDuration.Eighth); currentNote.setOctave(new Octave(noteOctaves[1])); newBeat.addNote(currentNote); currentMeasure.addBeat(newBeat); newBeat = new Beat(); currentNote = new Note(triad[2].getTone().toString(), BeatDuration.Eighth); currentNote.setOctave(new Octave(noteOctaves[2])); newBeat.addNote(currentNote); currentMeasure.addBeat(newBeat); }
public static Measure halfNoteRoot(Measure sustainedChords) { Measure newMeasure = new Measure(); for (Beat currentBeat : sustainedChords.getBeats()) { for (VoiceElement currentChord : currentBeat.getVoiceElements()) { addHalfNoteBass(newMeasure, (Chord) currentChord); } } return newMeasure; }
public static Measure arpegiattedBass(Measure sustainedChords) { Measure newMeasure = new Measure(); for (Beat currentBeat : sustainedChords.getBeats()) { for (VoiceElement currentChord : currentBeat.getVoiceElements()) { addArpegiattedBass(newMeasure, (Chord) currentChord); } } return newMeasure; }
public static Measure quarterNoteBass(Measure sustainedChords) { Measure newMeasure = new Measure(); for (Beat currentBeat : sustainedChords.getBeats()) { for (VoiceElement currentChord : currentBeat.getVoiceElements()) { Beat newBeat = new Beat(); newBeat.addChord(new Chord(((Chord) currentChord).getTriad(), BeatDuration.Quarter)); for (int i = 0; i < 2; i++) newMeasure.addBeat(newBeat); } } return newMeasure; }