}
edlFile = new EDLFile(dataDirectory + slash + dataBaseName + "_using_" +
chunkDBFeaturesNameShort + ".edl");
FeatFile chunkDBFile = new FeatFile(chunkDBFeaturesNameFull);
if (!(new File(chunkDBFeaturesNameFull).exists()))
{
GUIUtils.ShowDialog("MashupComposer: Please select a chunk database features file!", GUIUtils.MESSAGE, meapsoftGUI.jframe);
return -1;
}
composer = new MashupComposer(featFile, chunkDBFile, edlFile);
}
else if (selectedComposer.equals("MeapaeMComposer"))
{
composer = new MeapaeMComposer(featFile, edlFile);
}
else if (selectedComposer.equals("IntraChunkShuffleComposer"))
{
int numSubChunks = 4;
try
{
numSubChunks = new Integer(intraChunkShuffleNumChunksField.getText()).intValue();
}
catch (Exception e)
{
GUIUtils.ShowDialog("The number of sub chunks must be >= 2.", GUIUtils.MESSAGE, meapsoftGUI.jframe);
return -1;
}
composer = new IntraChunkShuffleComposer(featFile, edlFile, numSubChunks);
}
else if (selectedComposer.equals("HeadBangComposer"))
{
composer = new HeadBangComposer(featFile, edlFile, headbangBinSlider.getValue(), headbangLengthSlider.getValue());
}
else if (selectedComposer.equals("ThresholdComposer"))
{
double top = new Double(thresholdTopField.getText()).doubleValue();
double bottom = new Double(thresholdBottomField.getText()).doubleValue();
composer = new ThresholdComposer(featFile, edlFile, top, bottom, insideThresholdButton.isSelected());
}
else if (selectedComposer.equals("RotComposer"))
{
int bpm = new Integer(rotBeatsPerMeasureField.getText()).intValue();
int positions = new Integer(rotNumPositionsField.getText()).intValue();
composer = new RotComposer(featFile, edlFile, bpm, positions, rotLeftButton.isSelected());
}
else if (selectedComposer.equals("EDLComposer"))
{
EDLFile input = new EDLFile(inputEDLFileNameFull);
composer = new EDLComposer(input, edlFile);
}
else if (selectedComposer.equals("VQComposer"))
{
composer = new VQComposer(featFile, edlFile);
VQComposer vqc = (VQComposer)composer;
vqc.setCodebookSize(vqNumCodewords.getValue());
vqc.setBeatsPerCodeword(vqBeatsPerCW.getValue());
if(vqFeaturesNameFull != null)
{
if (!(new File(vqFeaturesNameFull).exists()))
{
GUIUtils.ShowDialog("VQComposer: Please select a valid feature file!",
GUIUtils.MESSAGE, meapsoftGUI.jframe);
return -1;
}
else
vqc.setFeatsToQuantize(new FeatFile(vqFeaturesNameFull));
}
if(vqQuantizeTrainingFile.isSelected())
vqc.setFeatsToQuantize(featFile);
}