Commit 1d6e4534 authored by mzed's avatar mzed

small cleanup

parent f3cd4a65
......@@ -231,7 +231,7 @@ public:
const double centreFrequencyDelta = (localTargetCentreFrequency != centreFrequency) ? (targetCentreFrequency - centreFrequency) / bufferToFill.numSamples : 0;
const double resonanceDelta = (localTargetResonance != resonance) ? (targetResonance - resonance) / bufferToFill.numSamples : 0;
// Create our FM Maximilian noises and send the mixed output to the channels
// Create our PWM Maximilian noises and send the mixed output to the channels
for (int sample = 0; sample < bufferToFill.numSamples; ++sample)
{
modulationFrequency += modulationFrequencyDelta;
......
......@@ -2,8 +2,9 @@
<JUCERPROJECT id="Zh7kpS" name="regression_synth" projectType="guiapp" version="1.0.0"
bundleIdentifier="com.goldsmiths.rapidmix" includeBinaryInAppConfig="1"
jucerVersion="5.1.2" displaySplashScreen="1" reportAppUsage="1"
splashScreenColour="Dark" cppLanguageStandard="11" companyWebsite="rapidmixapi.com">
jucerVersion="5.2.0" displaySplashScreen="1" reportAppUsage="1"
splashScreenColour="Dark" cppLanguageStandard="11" companyWebsite="rapidmixapi.com"
companyCopyright="">
<MAINGROUP id="g6MNSM" name="regression_synth">
<GROUP id="{EEA5B7C1-BCCC-64B0-259E-056090611E46}" name="Maximilian">
<GROUP id="{E20267E7-DDC5-EF6E-1EAE-C4B745764568}" name="libs">
......@@ -104,9 +105,12 @@
<VS2015 targetFolder="Builds/VisualStudio2015">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="regression_synth" headerPath="../../../../dependencies/Maximilian/"/>
isDebug="1" optimisation="1" targetName="regression_synth" headerPath="../../../../dependencies/Maximilian/"
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="0"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="3" targetName="regression_synth" headerPath="../../../../dependencies/Maximilian"/>
isDebug="0" optimisation="3" targetName="regression_synth" headerPath="../../../../dependencies/Maximilian"
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="0"
linkTimeOptimisation="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../JUCE/modules"/>
......@@ -128,9 +132,9 @@
<XCODE_MAC targetFolder="Builds/MacOSX">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="regression_synth"
headerPath="../../../../dependencies/Maximilian"/>
headerPath="../../../../dependencies/Maximilian" enablePluginBinaryCopyStep="1"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="regression_synth"
headerPath="../../../../dependencies/Maximilian"/>
headerPath="../../../../dependencies/Maximilian" enablePluginBinaryCopyStep="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../JUCE/modules"/>
......
......@@ -15,7 +15,6 @@ namespace rapidmix {
bool machineLearning<MachineLearningModule>::train(const trainingData &newTrainingData) {
return MachineLearningModule::train(newTrainingData);
}
/////////////////////////////////////////////////////////////////////// RapidLib specializations
......@@ -47,6 +46,12 @@ namespace rapidmix {
return classification::train(trainingSet);
}
template<>
std::string machineLearning<classification>::run(const std::vector<double> &inputVector, const std::string &label) {
int classIndex = classification::run(inputVector)[0];
return labels[classIndex];
};
/////////////////////////////////////////////////////////////////////// RapidLib regression
template<>
bool machineLearning<regression>::train(const trainingData &newTrainingData) {
......@@ -70,12 +75,6 @@ namespace rapidmix {
return seriesClassification::train(seriesSet);
}
template<>
std::string machineLearning<classification>::run(const std::vector<double> &inputVector, const std::string &label) {
int classIndex = classification::run(inputVector)[0];
return labels[classIndex];
};
template<>
std::string machineLearning<seriesClassification>::run(const std::vector<std::vector<double> > &inputSeries) {
return seriesClassification::run(inputSeries);
......@@ -87,5 +86,4 @@ namespace rapidmix {
bool machineLearning<rapidGVF>::train(const trainingData &newTrainingData) {
return rapidGVF::train(newTrainingData);
}
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
#ifndef machineLearning_h
#define machineLearning_h
#include <vector>
#include "../rapidmix.h"
////////// Include all of the machine learning algorithms here
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment