/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;

import java.util.ArrayList;

/**
 *
 * @author Tom
 */
public class MIDIPartData {
    private int instrument = -1;
    private ArrayList<MultiBeat> almb = new ArrayList<>();
    
    public MIDIPartData(int instrument, ArrayList<MultiBeat> almb) {
        this.instrument = instrument;
        this.almb = almb;
    }

    public int getInstrument() {
        return instrument;
    }

    public void setInstrument(int instrument) {
        this.instrument = instrument;
    }

    public ArrayList<MultiBeat> getMultiBeats() {
        return almb;
    }
    
    public void addMultiBeat(MultiBeat mb){
        almb.add(mb);
    }
    
    public void setMultiBeat(ArrayList<MultiBeat> almb){
        this.almb = almb;
    }
    
    @Override
    public MIDIPartData clone(){
        ArrayList<MultiBeat> a = new ArrayList<>();
        for (MultiBeat mb : almb){
            a.add(mb.clone());
        }
        MIDIPartData m = new MIDIPartData(instrument, a);
        return m;
    }
}
