Package instantbach.data.chord

Examples of instantbach.data.chord.Voice


     * Adds the given voice of the givne note numeric value to this template
     * @param position NotePosition
     * @param numeric int
     */
    public void addVoice(NotePosition position, int numeric) {
        Voice voice = new Voice(position, new Note(numeric));
        list.add(voice);
    }
View Full Code Here


     * @param index int
     * @return int
     */
    public int getNoteNumeric(int index) {
        if (index > -1 && index < size()) {
            Voice voice = list.get(index);
            return voice.getNoteNumeric();
        } else
            return -1;
    }
View Full Code Here

                if (i != progression.size() - 1) {
                    chordArray[i] = compareChords(allChords, chordArray[i + 1]);
                } else {

                    //create prefered last chord (For cadence)
                    Voice bassVoice = new Voice(NotePosition.ROOT, new Note("C2"));
                    Voice tenorVoice = new Voice(NotePosition.FIFTH, new Note("G2"));
                    Voice altoVoice = new Voice(NotePosition.THIRD, new Note("E3"));
                    Voice sopranoVoice = new Voice(NotePosition.ROOT, new Note("C4"));

                    //if the last chord is I....
                    if (progression.getIdentifier(i).equals("I")) {
                        chordArray[i] = new Chord("I", bassVoice, tenorVoice, altoVoice, sopranoVoice);
                        parent.appendInfo("\r\n");
View Full Code Here

        for (int i = 0; i < fullSpectrum.size(); i++) {

            //put chord members within in range into appropriate vectors
            int value = fullSpectrum.getNoteNumeric(i);

            Voice voice = fullSpectrum.getVoice(i);

            if ((value >= 4) && (value <= 24))
                bassVector.add(voice);
            if ((value >= 12) && (value <= 31))
                tenorVector.add(voice);
View Full Code Here

        //the symbol is the same for each chord in this method
        String symbol = chord.getSymbol();

        boolean proceed = true;

        Voice bass = chord.getVoice(VoiceType.BASS);
        Voice tenor = chord.getVoice(VoiceType.TENOR);
        Voice alto = chord.getVoice(VoiceType.ALTO);
        Voice soprano = chord.getVoice(VoiceType.SOPRANO);

        int root = 0;
        int third = 0;
        int fifth = 0;
        int seventh = 0;

        ArrayList<Voice> voiceList = new ArrayList<Voice>();
        voiceList.add(bass);
        voiceList.add(tenor);
        voiceList.add(alto);
        voiceList.add(soprano);

        for (int i = 0; i < voiceList.size(); i++) {
            Voice voice = voiceList.get(i);
            NotePosition position = voice.getPosition();
            switch (position) {
            case ROOT:
                root++;
                break;
            case THIRD:
View Full Code Here

TOP

Related Classes of instantbach.data.chord.Voice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.