Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 5447 additions and 2416 deletions
This diff is collapsed.
/*div.tabs li#current {
color: #f00;
}
*/
.sm {
position:relative;
z-index:9999
}
.sm, .sm ul, .sm li {
display:block;
list-style:none;
margin:0;
padding:0;
line-height:normal;
direction:ltr;
text-align:left;
/*-webkit-tap-highlight-color:rgba(0,0,0,0)*/
}
.sm-rtl, .sm-rtl ul, .sm-rtl li {
direction:rtl;
text-align:right
}
.sm > li > h1, .sm > li > h2, .sm > li > h3, .sm > li > h4, .sm > li > h5, .sm > li > h6 {
margin:0;padding:0
}
.sm ul {
display:none
}
.sm li, .sm a {
position:relative
}
.sm a {
display:block
}
.sm a.disabled {
cursor:not-allowed
}
.sm:after {
content:"\00a0";
display:block;
height:0;
font:0/0 serif;
clear:both;
visibility:hidden;
overflow:hidden
}
.sm, .sm *, .sm *:before, .sm *:after {
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box
}
/*
#doc-content {
overflow:auto;
display:block;
padding:0;
margin:0;
margin-top: 200px;
-webkit-overflow-scrolling:touch
}
*/
/*
THIS IS WHERE YOU CHANGE THE APPEARANCE OF TABS !!!
*/
.sm-dox {
background-color: #fff;
}
.sm-dox a, .sm-dox a:focus, .sm-dox a:hover, .sm-dox a:active {
/*padding: 0 12px;*/
/*padding-right: 43px;*/
/*font-family: "Lucida Grande","Geneva","Helvetica",Arial,sans-serif;*/
/*font-size: 13px;*/
font-size: 0.875rem;
/*font-weight: bold;*/
font-weight: 400;
/*line-height: 36px;*/
line-height: 1.5;
text-decoration: none;
/*text-shadow:0 1px 1px rgba(255,255,255,0.9);*/
/*color:#283a5d;*/
/*color: #aaa;*/
color: #000;
outline: 0;
}
.sm-dox a:hover {
/*background-image:url("tab_a.png");*/
/*background-repeat:repeat-x;*/
background-image: none;
color: #aaa;
/*color:white;*/
/*text-shadow:0 1px 1px black*/
}
.sm-dox a.current {
/*color:#d23600*/
}
.sm-dox a.disabled {
/*color:#bbb*/
}
.sm-dox a span.sub-arrow {
position:absolute;
top:50%;
margin-top:-14px;
left:auto;
right:3px;
width:28px;
height:28px;
overflow:hidden;
font:bold 12px/28px monospace!important;
text-align:center;
text-shadow:none;
background:rgba(255,255,255,0.5);
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px
}
.sm-dox a.highlighted span.sub-arrow:before {
display:block;
content:'-'
}
.sm-dox > li:first-child > a, .sm-dox > li:first-child > :not(ul) a {
-moz-border-radius:5px 5px 0 0;
-webkit-border-radius:5px;
border-radius:5px 5px 0 0
}
.sm-dox > li:last-child > a,
.sm-dox > li:last-child > *:not(ul) a,
.sm-dox > li:last-child > ul,
.sm-dox > li:last-child > ul > li:last-child > a,
.sm-dox > li:last-child > ul > li:last-child > *:not(ul) a,
.sm-dox > li:last-child > ul > li:last-child > ul,
.sm-dox > li:last-child > ul > li:last-child > ul > li:last-child > a,
.sm-dox > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a,
.sm-dox > li:last-child > ul > li:last-child > ul > li:last-child > ul,
.sm-dox > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul {
-moz-border-radius:0 0 5px 5px;
-webkit-border-radius:0;
border-radius:0 0 5px 5px
}
.sm-dox>li:last-child>a.highlighted,
.sm-dox>li:last-child>*:not(ul) a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,
.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted {
-moz-border-radius:0;
-webkit-border-radius:0;
border-radius:0
}
.sm-dox ul {
background:rgba(162,162,162,0.1)
}
.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active {
font-size:12px;
border-left:8px solid transparent;
line-height:36px;
text-shadow:none;
background-color:white;
background-image:none
}
.sm-dox ul a:hover {
/*background-image:url("tab_a.png");*/
/*background-repeat:repeat-x;*/
background-image: none;
/*color:white;*/
/*text-shadow:0 1px 1px black*/
}
.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active {
border-left:16px solid transparent
}
.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active {
border-left:24px solid transparent
}
.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active {
border-left:32px solid transparent
}
.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active {
border-left:40px solid transparent
}
@media(min-width:768px) {
.sm-dox ul {
position:absolute;
width:12em
}
.sm-dox li {
float:left
}
.sm-dox.sm-rtl li {
float:right
}
.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li {
float:none
}
.sm-dox a {
white-space:nowrap
}
.sm-dox ul a,.sm-dox.sm-vertical a {
white-space:normal
}
.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a {
white-space:nowrap
}
.sm-dox {
padding:0 10px;
/*background-image:url("tab_b.png");*/
background-image: none;
line-height:36px
}
.sm-dox a span.sub-arrow {
top:50%;
margin-top:-2px;
right:12px;
width:0;
height:0;
border-width:4px;
border-style:solid dashed dashed dashed;
border-color:#283a5d transparent transparent transparent;
background:transparent;
-moz-border-radius:0;
-webkit-border-radius:0;
border-radius:0
}
.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted {
padding:0 12px;
/*background-image:url("tab_s.png");*/
/*background-repeat:no-repeat;*/
background-image: none;
background-position:right;
-moz-border-radius:0!important;
-webkit-border-radius:0;border-radius:0!important
}
.sm-dox a:hover {
/*background-image:url("tab_a.png");*/
/*background-repeat:repeat-x;*/
background-image: none;
/*color:white;*/
/*text-shadow:0 1px 1px black*/
}
.sm-dox a:hover span.sub-arrow {
border-color:white transparent transparent transparent
}
.sm-dox a.has-submenu {
padding-right:24px
}
.sm-dox li {
border-top:0
}
.sm-dox>li>ul:before,.sm-dox>li>ul:after {
content:'';
position:absolute;
top:-18px;
left:30px;
width:0;
height:0;
overflow:hidden;
border-width:9px;
border-style:dashed dashed solid dashed;
border-color:transparent transparent #bbb transparent
}
.sm-dox>li>ul:after {
top:-16px;
left:31px;
border-width:8px;
border-color:transparent transparent #fff transparent
}
.sm-dox ul {
border:1px solid #bbb;
padding:5px 0;
background:#fff;
-moz-border-radius:5px!important;
-webkit-border-radius:5px;
border-radius:5px!important;
-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);
-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);
box-shadow:0 5px 9px rgba(0,0,0,0.2)
}
.sm-dox ul a span.sub-arrow {
right:8px;
top:50%;
margin-top:-5px;
border-width:5px;
border-color:transparent transparent transparent #555;
border-style:dashed dashed dashed solid
}
.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted {
color:#555;
background-image:none;
border:0!important;
color:#555;
background-image:none
}
.sm-dox ul a:hover {
/*background-image:url("tab_a.png");*/
/*background-repeat:repeat-x;*/
background-image:none;
color:white;
/*text-shadow:0 1px 1px black*/
}
.sm-dox ul a:hover span.sub-arrow {
border-color:transparent transparent transparent white
}
.sm-dox span.scroll-up,.sm-dox span.scroll-down {
position:absolute;
display:none;
visibility:hidden;
overflow:hidden;
background:#fff;
height:36px
}
.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover {
background:#eee
}
.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow {
border-color:transparent transparent #d23600 transparent
}
.sm-dox span.scroll-down:hover span.scroll-down-arrow {
border-color:#d23600 transparent transparent transparent
}
.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow {
position:absolute;
top:0;
left:50%;
margin-left:-6px;
width:0;
height:0;
overflow:hidden;
border-width:6px;
border-style:dashed dashed solid dashed;
border-color:transparent transparent #555 transparent
}
.sm-dox span.scroll-down-arrow {
top:8px;
border-style:solid dashed dashed dashed;
border-color:#555 transparent transparent transparent
}
.sm-dox.sm-rtl a.has-submenu {
padding-right:12px;
padding-left:24px
}
.sm-dox.sm-rtl a span.sub-arrow {
right:auto;
left:12px
}
.sm-dox.sm-rtl.sm-vertical a.has-submenu {
padding:10px 20px
}
.sm-dox.sm-rtl.sm-vertical a span.sub-arrow {
right:auto;
left:8px;
border-style:dashed solid dashed dashed;
border-color:transparent #555 transparent transparent
}
.sm-dox.sm-rtl>li>ul:before {
left:auto;
right:30px
}
.sm-dox.sm-rtl>li>ul:after {
left:auto;
right:31px
}
.sm-dox.sm-rtl ul a.has-submenu {
padding:10px 20px!important
}
.sm-dox.sm-rtl ul a span.sub-arrow {
right:auto;
left:8px;
border-style:dashed solid dashed dashed;
border-color:transparent #555 transparent transparent
}
.sm-dox.sm-vertical {
padding:10px 0;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px
}
.sm-dox.sm-vertical a {
padding:10px 20px
}
.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted {
background:#fff
}
.sm-dox.sm-vertical a.disabled {
/*background-image:url("tab_b.png")*/
background-image:none;
}
.sm-dox.sm-vertical a span.sub-arrow {
right:8px;
top:50%;
margin-top:-5px;
border-width:5px;
border-style:dashed dashed dashed solid;
border-color:transparent transparent transparent #555
}
.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after {
display:none
}
.sm-dox.sm-vertical ul a {
padding:10px 20px
}
.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted {
background:#eee
}
.sm-dox.sm-vertical ul a.disabled {
background:#fff
}
}
\ No newline at end of file
This diff is collapsed.
docs/rapidmix_banner.png

84.8 KiB

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
//
// main.cpp
// HelloRapidMix
//
// Created by mzed on 23/05/2017.
// Copyright © 2017 Goldsmiths. All rights reserved.
//
#include <iostream>
#include "rapidmix.h"
int main(int argc, const char * argv[]) {
//Machine Learning
rapidmix::staticRegression mtofRegression; //Create a machine learning object
rapidmix::trainingData myData; //Create a place to hold training Data
//Setting up the first element of training data
std::vector<double> input { 48 };
std::vector<double> output { 130.81 };
myData.recordSingleElement(input, output);
//More elements
input = { 54 };
output = { 185.00 };
myData.recordSingleElement(input, output);
input = { 60 };
output = { 261.63 };
myData.recordSingleElement(input, output);
input = { 66 };
output = { 369.994 };
myData.recordSingleElement(input, output);
input = { 72 };
output = { 523.25 };
myData.recordSingleElement(input, output);
//Train the machine learning model with the data
mtofRegression.train(myData);
//Get some user input
int newNote = 0;
std::cout << "Type a MIDI note number.\n"; std::cin >> newNote;
//Run the trained model on the user input
std::vector<double> inputVec = { double(newNote) };
double freqHz = mtofRegression.run(inputVec)[0];
std::cout << "MIDI note " << newNote << " is " << freqHz << " Hertz" << std::endl;
return 0;
}
\ No newline at end of file
Copyright (c) 2016, Goldsmiths Creative Computing (UK, London)
All rights reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Neither the name of Goldsmiths nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
/*
==============================================================================
This file was auto-generated!
It contains the basic startup code for a Juce application.
==============================================================================
*/
#include "../JuceLibraryCode/JuceHeader.h"
Component* createMainContentComponent();
//==============================================================================
class RAPID_JUCEApplication : public JUCEApplication
{
public:
//==============================================================================
RAPID_JUCEApplication() {}
const String getApplicationName() override { return ProjectInfo::projectName; }
const String getApplicationVersion() override { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed() override { return true; }
//==============================================================================
void initialise (const String& commandLine) override
{
// This method is where you should put your application's initialisation code..
mainWindow = new MainWindow (getApplicationName());
}
void shutdown() override
{
// Add your application's shutdown code here..
mainWindow = nullptr; // (deletes our window)
}
//==============================================================================
void systemRequestedQuit() override
{
// This is called when the app is being asked to quit: you can ignore this
// request and let the app carry on running, or call quit() to allow the app to close.
quit();
}
void anotherInstanceStarted (const String& commandLine) override
{
// When another instance of the app is launched while this one is running,
// this method is invoked, and the commandLine parameter tells you what
// the other instance's command-line arguments were.
}
//==============================================================================
/*
This class implements the desktop window that contains an instance of
our MainContentComponent class.
*/
class MainWindow : public DocumentWindow
{
public:
MainWindow (String name) : DocumentWindow (name,
Colours::lightgrey,
DocumentWindow::allButtons)
{
setUsingNativeTitleBar (true);
setContentOwned (createMainContentComponent(), true);
setResizable (true, true);
centreWithSize (getWidth(), getHeight());
setVisible (true);
}
void closeButtonPressed() override
{
// This is called when the user tries to close this window. Here, we'll just
// ask the app to quit when this happens, but you can change this to do
// whatever you need.
JUCEApplication::getInstance()->systemRequestedQuit();
}
/* Note: Be careful if you override any DocumentWindow methods - the base
class uses a lot of them, so by overriding you might break its functionality.
It's best to do all your work in your content component instead, but if
you really have to override any DocumentWindow methods, make sure your
subclass also calls the superclass's method.
*/
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
};
private:
ScopedPointer<MainWindow> mainWindow;
};
//==============================================================================
// This macro generates the main() routine that launches the app.
START_JUCE_APPLICATION (RAPID_JUCEApplication)
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="Zh7kpS" name="regression_synth" projectType="guiapp" version="1.0.0"
bundleIdentifier="com.goldsmiths.rapidmix" includeBinaryInAppConfig="1"
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">
<FILE id="h0SFJ1" name="fft.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/libs/fft.cpp"/>
<FILE id="pYguvb" name="fft.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/fft.h"/>
<FILE id="QKNTAJ" name="maxiAtoms.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/libs/maxiAtoms.cpp"/>
<FILE id="FFoUBX" name="maxiAtoms.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/maxiAtoms.h"/>
<FILE id="iwzAfI" name="maxiBark.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/libs/maxiBark.cpp"/>
<FILE id="yMdl88" name="maxiBark.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/maxiBark.h"/>
<FILE id="xngR2q" name="maxiFFT.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/libs/maxiFFT.cpp"/>
<FILE id="A78B6e" name="maxiFFT.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/maxiFFT.h"/>
<FILE id="I4uKZC" name="maxiGrains.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/libs/maxiGrains.cpp"/>
<FILE id="iWeaAV" name="maxiGrains.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/maxiGrains.h"/>
<FILE id="Zhejq6" name="maxim.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/maxim.h"/>
<FILE id="sYsKW9" name="maxiMFCC.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/libs/maxiMFCC.cpp"/>
<FILE id="mCQV3j" name="maxiMFCC.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/maxiMFCC.h"/>
<FILE id="u3TFe0" name="sineTable.h" compile="0" resource="0" file="../../../dependencies/Maximilian/libs/sineTable.h"/>
</GROUP>
<FILE id="m2Fbmi" name="maximilian.h" compile="0" resource="0" file="../../../dependencies/Maximilian/maximilian.h"/>
<FILE id="R5ZjoZ" name="maximilian.cpp" compile="1" resource="0" file="../../../dependencies/Maximilian/maximilian.cpp"/>
</GROUP>
<GROUP id="{D5573091-5DD2-23C2-72F7-033E80306961}" name="RapidLib">
<GROUP id="{9F227387-ED1A-B17B-AAF3-0B2D43546269}" name="src">
<GROUP id="{A3EB9FB3-AE6F-6CA1-169C-0FF061BD4B0C}" name="emscripten">
<FILE id="o0rrsi" name="classificationEmbindings.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/emscripten/classificationEmbindings.h"/>
<FILE id="K95sXr" name="knnEmbindings.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/emscripten/knnEmbindings.h"/>
<FILE id="BMqYkg" name="modelSetEmbindings.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/emscripten/modelSetEmbindings.h"/>
<FILE id="jEjfUj" name="nnEmbindings.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/emscripten/nnEmbindings.h"/>
<FILE id="gjnhIh" name="nodeEnv.js" compile="0" resource="1" file="../../../dependencies/RapidLib/src/emscripten/nodeEnv.js"/>
<FILE id="iRFc6d" name="rapidLibPost.js" compile="0" resource="1" file="../../../dependencies/RapidLib/src/emscripten/rapidLibPost.js"/>
<FILE id="PzNivx" name="rapidStreamEmbindings.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/emscripten/rapidStreamEmbindings.h"/>
<FILE id="GHQaRa" name="regressionEmbindings.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/emscripten/regressionEmbindings.h"/>
<FILE id="PivhZh" name="seriesClassificationEmbindings.h" compile="0"
resource="0" file="../../../dependencies/RapidLib/src/emscripten/seriesClassificationEmbindings.h"/>
<FILE id="Q4hJHG" name="svmEmbindings.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/emscripten/svmEmbindings.h"/>
</GROUP>
<FILE id="VDnAfe" name="baseModel.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/baseModel.h"/>
<FILE id="x2NkmO" name="classification.cpp" compile="1" resource="1"
file="../../../dependencies/RapidLib/src/classification.cpp"/>
<FILE id="iQdC88" name="classification.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/classification.h"/>
<FILE id="otvyPe" name="dtw.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/src/dtw.cpp"/>
<FILE id="zh6JH2" name="dtw.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/dtw.h"/>
<FILE id="gg80D5" name="fastDTW.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/src/fastDTW.cpp"/>
<FILE id="Ga8ett" name="fastDTW.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/fastDTW.h"/>
<FILE id="d3LgeL" name="knnClassification.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/src/knnClassification.cpp"/>
<FILE id="G5zqzw" name="knnClassification.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/knnClassification.h"/>
<FILE id="eEEUwv" name="modelSet.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/src/modelSet.cpp"/>
<FILE id="ieo9qs" name="modelSet.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/modelSet.h"/>
<FILE id="BLEyMT" name="neuralNetwork.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/src/neuralNetwork.cpp"/>
<FILE id="MEILfO" name="neuralNetwork.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/neuralNetwork.h"/>
<FILE id="x3ZMq1" name="rapidStream.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/src/rapidStream.cpp"/>
<FILE id="C7Nz0H" name="rapidStream.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/rapidStream.h"/>
<FILE id="wJpnuO" name="regression.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/src/regression.cpp"/>
<FILE id="ny9hho" name="regression.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/regression.h"/>
<FILE id="QwAPCf" name="searchWindow.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/src/searchWindow.cpp"/>
<FILE id="hRP4uS" name="searchWindow.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/searchWindow.h"/>
<FILE id="INKhcY" name="seriesClassification.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/src/seriesClassification.cpp"/>
<FILE id="B0c8F3" name="seriesClassification.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/seriesClassification.h"/>
<FILE id="T74lKl" name="svmClassification.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/src/svmClassification.cpp"/>
<FILE id="cVqdZA" name="svmClassification.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/svmClassification.h"/>
<FILE id="lKTpTj" name="trainingExample.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/src/trainingExample.h"/>
<FILE id="DtjqOn" name="warpPath.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/src/warpPath.cpp"/>
<FILE id="JjHvke" name="warpPath.h" compile="0" resource="0" file="../../../dependencies/RapidLib/src/warpPath.h"/>
</GROUP>
<GROUP id="{C5C7E07C-213F-8ECA-B1B6-B6BE04D35EAF}" name="dependencies">
<GROUP id="{E2AB2F69-E9EC-0A7F-8492-228002C6DB3D}" name="json">
<FILE id="vuXt8e" name="json-forwards.h" compile="0" resource="0" file="../../../dependencies/RapidLib/dependencies/json/json-forwards.h"/>
<FILE id="pVNxcf" name="json.h" compile="0" resource="0" file="../../../dependencies/RapidLib/dependencies/json/json.h"/>
</GROUP>
<GROUP id="{5C2C9ACC-885E-978B-0183-576F0DD3DA61}" name="libsvm">
<FILE id="Hh1DiU" name="libsvm.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/dependencies/libsvm/libsvm.cpp"/>
<FILE id="f5D4KB" name="libsvm.h" compile="0" resource="0" file="../../../dependencies/RapidLib/dependencies/libsvm/libsvm.h"/>
</GROUP>
<GROUP id="{655D6BCB-6FC6-1A2E-B6D7-C9170D46D415}" name="src">
<FILE id="YiXjKj" name="BayesianFilter.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/dependencies/bayesfilter/src/BayesianFilter.cpp"/>
<FILE id="Y6sxtQ" name="BayesianFilter.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/dependencies/bayesfilter/src/BayesianFilter.h"/>
<FILE id="z3J9mx" name="filter_utilities.cpp" compile="1" resource="0"
file="../../../dependencies/RapidLib/dependencies/bayesfilter/src/filter_utilities.cpp"/>
<FILE id="GT07wW" name="filter_utilities.h" compile="0" resource="0"
file="../../../dependencies/RapidLib/dependencies/bayesfilter/src/filter_utilities.h"/>
</GROUP>
<FILE id="ibbler" name="jsoncpp.cpp" compile="1" resource="0" file="../../../dependencies/RapidLib/dependencies/jsoncpp.cpp"/>
</GROUP>
</GROUP>
<GROUP id="{24ED27E9-EF99-2FF0-3FAC-40EF82C0F046}" name="Source">
<FILE id="KK8sNt" name="MainComponent.cpp" compile="1" resource="0"
file="Source/MainComponent.cpp"/>
<FILE id="vn82oj" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
<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/"
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="0"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
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"/>
<MODULEPATH id="juce_events" path="../JUCE/modules"/>
<MODULEPATH id="juce_graphics" path="../JUCE/modules"/>
<MODULEPATH id="juce_data_structures" path="../JUCE/modules"/>
<MODULEPATH id="juce_gui_basics" path="../JUCE/modules"/>
<MODULEPATH id="juce_gui_extra" path="../JUCE/modules"/>
<MODULEPATH id="juce_cryptography" path="../JUCE/modules"/>
<MODULEPATH id="juce_video" path="../JUCE/modules"/>
<MODULEPATH id="juce_opengl" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_basics" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_devices" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_formats" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_processors" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_utils" path="../JUCE/modules"/>
</MODULEPATHS>
</VS2015>
<XCODE_MAC targetFolder="Builds/MacOSX">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="regression_synth"
headerPath="../../../../dependencies/Maximilian" enablePluginBinaryCopyStep="1"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="regression_synth"
headerPath="../../../../dependencies/Maximilian" enablePluginBinaryCopyStep="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../JUCE/modules"/>
<MODULEPATH id="juce_opengl" path="../JUCE/modules"/>
<MODULEPATH id="juce_gui_extra" path="../JUCE/modules"/>
<MODULEPATH id="juce_gui_basics" path="../JUCE/modules"/>
<MODULEPATH id="juce_graphics" path="../JUCE/modules"/>
<MODULEPATH id="juce_events" path="../JUCE/modules"/>
<MODULEPATH id="juce_data_structures" path="../JUCE/modules"/>
<MODULEPATH id="juce_cryptography" path="../JUCE/modules"/>
<MODULEPATH id="juce_core" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_utils" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_processors" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_formats" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_devices" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_basics" path="../JUCE/modules"/>
</MODULEPATHS>
</XCODE_MAC>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="regression_synth"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="regression_synth"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../JUCE/modules"/>
<MODULEPATH id="juce_opengl" path="../JUCE/modules"/>
<MODULEPATH id="juce_gui_extra" path="../JUCE/modules"/>
<MODULEPATH id="juce_gui_basics" path="../JUCE/modules"/>
<MODULEPATH id="juce_graphics" path="../JUCE/modules"/>
<MODULEPATH id="juce_events" path="../JUCE/modules"/>
<MODULEPATH id="juce_data_structures" path="../JUCE/modules"/>
<MODULEPATH id="juce_cryptography" path="../JUCE/modules"/>
<MODULEPATH id="juce_core" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_utils" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_processors" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_formats" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_devices" path="../JUCE/modules"/>
<MODULEPATH id="juce_audio_basics" path="../JUCE/modules"/>
</MODULEPATHS>
</LINUX_MAKE>
</EXPORTFORMATS>
<MODULES>
<MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_core" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_cryptography" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_events" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_opengl" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_video" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
</MODULES>
<JUCEOPTIONS/>
<LIVE_SETTINGS>
<WINDOWS/>
</LIVE_SETTINGS>
</JUCERPROJECT>
# BitalinoRapidMix
Implementation of Bitalino EMG and a regression model powered by RapidMix in openframeworks with maximillian for audio for interesting synthesizer control / ( recursive ) mapping.
You can find the machine learning parts in `BITSequencerThread.cpp` and `RapidMixThread.h`
//
// BarChart.hpp
// RapidVisualizerOSC
//
// Created by James on 09/11/2017.
//
//
#ifndef BarChart_hpp
#define BarChart_hpp
#include <stdio.h>
#include "RealTimeGraph.hpp"
class BarChart : public RealTimeGraph
{
public:
BarChart ( GraphState* state ) : RealTimeGraph (state)
{
//
}
~BarChart ( void )
{
//
}
void updateRep ( void )
{
//
}
void drawSubGraph ( std::string subLabel, DataContainer<std::vector<double>>& data, ofRectangle subLabelRect )
{
double
minIn = 0,
minOut = 0,
maxOut = -subLabelRect.height,
startPosY = subLabelRect.height,
barSize = subLabelRect.width/data.labelData.size(),
separation = barSize/16,
halfSeparation = separation/2;
bool drawZeroSep = false;
if (data.minValue < 0)
{ // Add negative part
startPosY = subLabelRect.height/2;
minIn = -data.maxValue;
minOut = subLabelRect.height/2;
maxOut /= 2;
drawZeroSep = true;
}
for (uint32_t i = 0; i < data.labelData.size(); ++i)
{
double output = mapVals(data.labelData[i], minIn, data.maxValue, minOut, maxOut );
ofSetColor (graphColor);
ofFill();
ofDrawRectangle(subLabelRect.x + barSize * i + halfSeparation, subLabelRect.y + startPosY, barSize - separation, output );
}
if (drawZeroSep)
{
ofSetLineWidth(1.25);
ofSetColor (175,150,150);
ofDrawLine(subLabelRect.x, subLabelRect.y + startPosY,
subLabelRect.x + subLabelRect.width, subLabelRect.y + startPosY);
}
}
void update ( void )
{
//
}
};
#endif /* BarChart_hpp */
//
// Graph.hpp
// RapidVisualizerOSC
//
// Created by James on 09/11/2017.
//
//
#ifndef Graph_h
#define Graph_h
#include <string>
#include <vector>
#include <list>
#include "ofMain.h"
#include "ofxGui.h"
// TODO: add namespace, move funcs and struct to other header(s)
enum class TextAlignment {
LEFT,
CENTER,
RIGHT
};
static inline void drawTextLabel ( std::string label, ofVec2f position, ofColor labelBackgroundColor, ofColor stringColor, TextAlignment alignment, bool drawAbove )
{
uint32_t strLenPix = label.length()*8;
switch (alignment) {
case TextAlignment::LEFT:
// No exception
break;
case TextAlignment::CENTER:
position.x -= strLenPix / 2;
break;
case TextAlignment::RIGHT:
position.x -= strLenPix;
break;
default:
break;
}
ofSetColor (labelBackgroundColor);
ofRectangle bmpStringRect(position.x - 2,
position.y + ((drawAbove) ? -4 : 12) + 2,
strLenPix + 4, -12);
ofDrawRectangle(bmpStringRect);
ofSetColor (stringColor);
ofDrawBitmapString(label, position.x, position.y + ((drawAbove) ? -4 : 12));
}
static inline double mapVals ( double x, double in_min, double in_max, double out_min, double out_max )
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
template <typename T>
struct DataContainer {
T labelData;
double minValue = 0.0;
double maxValue = 1.0;
uint32_t iteratorPos = 0;
//ofColor graphColor;
void updateMinMax ( void )
{
auto mm = std::minmax_element(labelData.begin(), labelData.end());
double min = labelData[std::distance(labelData.begin(), mm.first)];
double max = labelData[std::distance(labelData.begin(), mm.second)];
if (min < minValue)
minValue = min;
if (max > maxValue)
maxValue = max;
if (fabs(min) > maxValue)
maxValue = fabs(min);
}
};
class Graph {
public:
enum graphLayout {
GRAPHS_STACKED,
GRAPHS_VERTICAL
};
struct GraphState {
std::string label;
graphLayout layout = graphLayout::GRAPHS_STACKED;
bool hasHistory = false;
ofRectangle positionAndSize;
uint32_t historySize;
};
Graph ( GraphState* state )
: state(state)
{
graphColor = ofColor(24, 219, 92);
textColor = ofColor(255, 157, 117);
}
virtual ~Graph ( void )
{
}
virtual void updateRep ( void ) = 0; // update representation
virtual void addData ( std::string subLabel, std::vector<double>& data ) = 0;
virtual void reset ( void ) = 0;
virtual void update ( void ) = 0;
virtual void draw ( void ) = 0;
virtual uint32_t getNumSubGraphs ( void ) const = 0;
protected:
GraphState *state = nullptr;
ofColor graphColor;
ofColor textColor;
};
#endif /* Graph_h */
This diff is collapsed.