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 5077 additions and 3173 deletions
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<!--BEGIN !GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END !GENERATE_TREEVIEW-->
<!--BEGIN GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$generatedby
<!-- &#160; -->
<a href="http://www.doxygen.org/index.html">
<!-- <img class="footer" src="$relpath^doxygen.png" alt="doxygen"/> -->
doxygen
</a>
$doxygenversion
</small></address>
<!--END GENERATE_TREEVIEW-->
</body>
</html>
/**
* @defgroup machinelearning Machine learning
*/
/**
* @defgroup signalprocessing Signal processing
*
* @brief The Signal processing API is composed of :
* <ul>
* <li>
* a main header file : @ref signalProcessing.h
* </li>
* <li>
* a list of submodules based on PiPo and RapidStream
* </li>
* </ul>
*/
<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
<!-- $treeview -->
<!-- $search -->
<!-- $mathjax -->
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.14 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Home"/>
<!-- <tab type="pages" visible="no" title="" intro=""/>
<tab type="modules" visible="no" title="" intro=""/>
<tab type="namespaces" visible="no" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
-->
<!-- http://www.matthewtyler.io/adding-tabs-in-doxygen/ -->
<tab type="user" url="@ref machinelearning" visible="yes" title="Machine learning"/>
<tab type="user" url="@ref signalprocessing" visible="yes" title="Signal processing"/>
<!-- <tab type="classes" visible="yes" title="Classes"> -->
<tab type="classlist" visible="yes" title="Classes" intro=""/>
<!-- <tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
-->
<!-- <tab type="files" visible="yes" title="Files"> -->
<tab type="filelist" visible="yes" title="Files" intro=""/>
<!-- <tab type="globals" visible="yes" title="" intro=""/>
</tab>
-->
<tab type="classindex" visible="yes" title="Reference" intro=""/>
<tab type="examples" visible="no" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<detaileddescription title=""/>
<!-- <briefdescription visible="no"/> -->
<!-- <groupgraph visible="$GROUP_GRAPHS"/> -->
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>
window.onload = function() {
var contents = document.querySelector('#doc-content');
// console.log(contents);
};
\ No newline at end of file
/*---------------- Search Box */
#FSearchBox {
float: left;
}
#MSearchBox {
white-space : nowrap;
float: none;
/*margin-top: 8px;*/
margin-top: 7px;
right: 0px;
width: 170px;
height: 24px;
z-index: 102;
border: 1px #333 solid;
border-radius: 12px;
}
#MSearchBox .left
{
display:block;
/*display: none;*/
position:absolute;
/*left:10px;*/
/*width:20px;*/
left: 0px;
width: 0px;
height:19px;
/*background:url('search_l.png') no-repeat;*/
background:none;
background-position:right;
}
#MSearchSelect {
/*display:block;*/
display:none;
position:absolute;
/*width:20px;*/
height:19px;
}
.left #MSearchSelect {
left:4px;
}
.right #MSearchSelect {
right:5px;
}
#MSearchField {
display:block;
position:absolute;
height:19px;
/*background:url('search_m.png') repeat-x;*/
background:none;
border:none;
/*width:115px;*/
width:140px;
/*margin-left:20px;*/
margin-left:0px;
/*padding-left:4px;*/
padding-left: 10px;
/*color: #909090;*/
color: #aaa;
outline: none;
font: 9pt Arial, Verdana, sans-serif;
-webkit-border-radius: 0px;
}
#FSearchBox #MSearchField {
margin-left:15px;
}
#MSearchBox .right {
display:block;
position:absolute;
right:10px;
top:8px;
width:20px;
height:19px;
/*background:url('search_r.png') no-repeat;*/
background:none;
background-position:left;
}
#MSearchClose {
display: none;
position: absolute;
top: 4px;
background : none;
border: none;
margin: 0px 4px 0px 0px;
padding: 0px 0px;
outline: none;
}
.left #MSearchClose {
left: 6px;
}
.right #MSearchClose {
right: 2px;
}
#MSearchCloseImg {
content:unset;
}
#MSearchCloseImg:before {
position:absolute;
content:'X';
}
.MSearchBoxActive #MSearchField {
/*color: #000000;*/
color: #fff;
}
/*---------------- Search filter selection */
#MSearchSelectWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #90A5CE;
background-color: #F9FAFC;
z-index: 10001;
padding-top: 4px;
padding-bottom: 4px;
-moz-border-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
.SelectItem {
font: 8pt Arial, Verdana, sans-serif;
padding-left: 2px;
padding-right: 12px;
border: 0px;
}
span.SelectionMark {
margin-right: 4px;
font-family: monospace;
outline-style: none;
text-decoration: none;
}
a.SelectItem {
display: block;
outline-style: none;
color: #000000;
text-decoration: none;
padding-left: 6px;
padding-right: 12px;
}
a.SelectItem:focus,
a.SelectItem:active {
color: #000000;
outline-style: none;
text-decoration: none;
}
a.SelectItem:hover {
color: #FFFFFF;
background-color: #3D578C;
outline-style: none;
text-decoration: none;
cursor: pointer;
display: block;
}
/*---------------- Search results window */
iframe#MSearchResults {
width: 60ex;
height: 15em;
}
#MSearchResultsWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #000;
background-color: #EEF1F7;
z-index:10000;
}
/* ----------------------------------- */
#SRIndex {
clear:both;
padding-bottom: 15px;
}
.SREntry {
font-size: 10pt;
padding-left: 1ex;
}
.SRPage .SREntry {
font-size: 8pt;
padding: 1px 5px;
}
body.SRPage {
margin: 5px 2px;
}
.SRChildren {
padding-left: 3ex; padding-bottom: .5em
}
.SRPage .SRChildren {
display: none;
}
.SRSymbol {
font-weight: bold;
color: #425E97;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRScope {
display: block;
color: #425E97;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
text-decoration: underline;
}
span.SRScope {
padding-left: 4px;
}
.SRPage .SRStatus {
padding: 2px 5px;
font-size: 8pt;
font-style: italic;
}
.SRResult {
display: none;
}
DIV.searchresults {
margin-left: 10px;
margin-right: 10px;
}
/*---------------- External search page results */
.searchresult {
background-color: #F0F3F8;
}
.pages b {
color: white;
padding: 5px 5px 3px 5px;
/*background-image: url("../tab_a.png");*/
background-image: none;
background-repeat: repeat-x;
text-shadow: 0 1px 1px #000000;
}
.pages {
line-height: 17px;
margin-left: 4px;
text-decoration: none;
}
.hl {
font-weight: bold;
}
#searchresults {
margin-bottom: 20px;
}
.searchpages {
margin-top: 10px;
}
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

......@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:HelloRapidMix.xcodeproj">
location = "self:">
</FileRef>
</Workspace>
......@@ -16,26 +16,26 @@ int main(int argc, const char * argv[]) {
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.addElement(input, output);
std::vector<double> input { 48 };
std::vector<double> output { 130.81 };
myData.recordSingleElement(input, output);
//More elements
input = { 54 };
output = { 185.00 };
myData.addElement(input, output);
myData.recordSingleElement(input, output);
input = { 60 };
output = { 261.63 };
myData.addElement(input, output);
myData.recordSingleElement(input, output);
input = { 66 };
output = { 369.994 };
myData.addElement(input, output);
myData.recordSingleElement(input, output);
input = { 72 };
output = { 523.25 };
myData.addElement(input, output);
myData.recordSingleElement(input, output);
//Train the machine learning model with the data
mtofRegression.train(myData);
......
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 file was auto-generated!
==============================================================================
*/
#ifndef MAINCOMPONENT_H_INCLUDED
#define MAINCOMPONENT_H_INCLUDED
// It's important to call any headers that might
// include apple libs / headers before Juce's
// to prevent ambigious classes
#include "../../../../dependencies/Maximilian/maximilian.h"
#include "../../../../dependencies/RapidLib/src/regression.h"
#include <random>
#include <array>
#include "../JuceLibraryCode/JuceHeader.h"
class MainContentComponent;
//==============================================================================
class Oscilloscope : public Component,
private Timer
{
public:
Oscilloscope(MainContentComponent* _p) : parent(_p),
writePosition(0),
bufferSize(16384),
paintSize(256)
{
startTimer(40);
}
void pushBuffer(const float* _sampleData, int _numSamples)
{
for (int i = 0; i < _numSamples; ++i)
{
size_t pos = ++writePosition % buffer.size();
oldBuffer[pos] = buffer[pos];
buffer[pos] = _sampleData[i];
}
}
void paint(Graphics& _g) override
{
boundary = getLocalBounds();
_g.fillAll(juce::Colour(0xff000000));
Path path;
path.startNewSubPath(0, .5 * boundary.getHeight());
const float bufferYScale = .3f;
int paintPos = 2;
while (paintPos < buffer.size())
{
if (isZeroCrossing(paintPos))
{
break;
}
++paintPos;
}
const int posOffset = paintPos;
while (paintPos < buffer.size())
{
float bufferPoint = buffer[paintPos];//0.5 * std::abs(buffer[paintPos] - oldBuffer[paintPos]);
Point<float> point((paintPos - posOffset) * boundary.getWidth() / paintSize,
0.5 * ((bufferYScale * bufferPoint) + 1) * boundary.getHeight());
path.lineTo(point);
++paintPos;
}
_g.setColour(juce::Colour(0xff00ff00));
_g.strokePath(path, PathStrokeType(2.0f));
}
void mouseDrag(const MouseEvent& _event) override;
private:
//==========================================================================
void timerCallback() override
{
repaint();
}
bool isZeroCrossing(int i) const noexcept
{
jassert(i > 0);
return buffer[i] > buffer[i - 1] && buffer[i] > 0 && buffer[i - 1] < 0;
}
//==========================================================================
juce::Rectangle<int> boundary;
std::array<float, int((float)44100 / 83)> buffer;
std::array<float, int((float)44100 / 83)> oldBuffer;
std::size_t writePosition;
const int bufferSize;
const int paintSize;
MainContentComponent* const parent;
};
//==============================================================================
class MainContentComponent : public AudioAppComponent,
public Slider::Listener,
public Button::Listener
{
public:
//==========================================================================
/* Setup */
MainContentComponent():
modulationFrequency(4.1),
modulationDepth(.2),
centreFrequency(512),
resonance(2),
targetModulationFrequency(4.1),
targetModulationDepth(.2),
targetCentreFrequency(512),
targetResonance(2),
trained(false),
oscilloscope(this)
{
header.setColour(TextButton::buttonColourId, Colours::wheat);
header.setColour(TextButton::textColourOffId, Colours::white);
header.setEnabled(false);
header.setButtonText("RAPID-MIX API Example");
addAndMakeVisible(header);
sidebar.setColour(TextButton::buttonColourId, Colours::white);
sidebar.setColour(TextButton::textColourOffId, Colours::white);
sidebar.setEnabled(false);
addAndMakeVisible(sidebar);
train.setColour(TextButton::buttonColourId, Colours::wheat);
train.setColour(TextButton::textColourOffId, Colours::white);
train.setButtonText("Train");
train.addListener(this);
addAndMakeVisible(train);
randomise.setColour(TextButton::buttonColourId, Colours::wheat);
randomise.setColour(TextButton::textColourOffId, Colours::white);
randomise.setButtonText("Randomise!");
randomise.addListener(this);
addAndMakeVisible(randomise);
footer.setColour(TextButton::buttonColourId, Colours::wheat);
footer.setColour(TextButton::textColourOffId, Colours::white);
footer.setEnabled(false);
footer.setButtonText("Select the synth parameters you like, then move the mouse to an area and hold space to associate that space with that sound. Repeat with a few sounds");
addAndMakeVisible(footer);
modulationFrequencySlider.setRange(0, 4096);
modulationFrequencySlider.setSkewFactorFromMidPoint (500.0);
modulationFrequencySlider.setValue(modulationFrequency, dontSendNotification);
modulationFrequencySlider.addListener(this);
addAndMakeVisible(modulationFrequencySlider);
modulationFrequencyLabel.setText("Mod Frequency", dontSendNotification);
modulationFrequencyLabel.setColour(Label::ColourIds::textColourId, Colours::white);
modulationFrequencyLabel.attachToComponent(&modulationFrequencySlider, false);
addAndMakeVisible(modulationFrequencyLabel);
modulationIndexSlider.setRange(0., 1.);
modulationIndexSlider.setValue(modulationDepth, dontSendNotification);
modulationIndexSlider.addListener(this);
addAndMakeVisible(modulationIndexSlider);
modulationIndexLabel.setText("Mod Index", dontSendNotification);
modulationFrequencyLabel.setColour(Label::ColourIds::textColourId, Colours::white);
modulationIndexLabel.attachToComponent(&modulationIndexSlider, false);
addAndMakeVisible(modulationIndexLabel);
filterFrequencySlider.setRange(0.00001, 4096);
filterFrequencySlider.setColour(Label::ColourIds::textColourId, Colours::white);
filterFrequencySlider.setSkewFactorFromMidPoint (500.0);
filterFrequencySlider.setValue(centreFrequency, dontSendNotification);
filterFrequencySlider.addListener(this);
addAndMakeVisible(filterFrequencySlider);
filterFrequencyLabel.setText("Filter Frequency", dontSendNotification);
filterFrequencyLabel.setColour(Label::ColourIds::textColourId, Colours::white);
filterFrequencyLabel.attachToComponent(&filterFrequencySlider, false);
addAndMakeVisible(filterFrequencyLabel);
filterResonanceSlider.setRange(0.00001, 40);
filterResonanceSlider.setValue(resonance, dontSendNotification);
filterResonanceSlider.addListener(this);
addAndMakeVisible(filterResonanceSlider);
filterResonanceLabel.setText("Filter Resonance", dontSendNotification);
filterResonanceLabel.setColour(Label::ColourIds::textColourId, Colours::white);
filterResonanceLabel.attachToComponent(&filterResonanceSlider, false);
addAndMakeVisible(filterResonanceLabel);
addAndMakeVisible(oscilloscope);
setSize (800, 600);
// No inputs, two outputs
setAudioChannels (0, 2);
}
~MainContentComponent()
{
shutdownAudio();
}
//==========================================================================
/* Audio Methods */
void prepareToPlay (int _samplesPerBlockExpected, double _sampleRate) override
{
// Remember this is part of the audio callback so we must be careful
// not to do anything silly like allocating memory or dare I say wait
// for locks!
maxiSettings::setup(std::round(_sampleRate), 2, _samplesPerBlockExpected);
}
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override
{
int periodLength = int(maxiSettings::sampleRate / 83);
// Get the buffers for both output channels
float* const bufferL = bufferToFill.buffer->getWritePointer(0, bufferToFill.startSample);
float* const bufferR = bufferToFill.buffer->getWritePointer(1, bufferToFill.startSample);
const double localTargetModulationFrequency = targetModulationFrequency;
const double localTargetModulationDepth = targetModulationDepth;
const double localTargetCentreFrequency = targetCentreFrequency;
const double localTargetResonance = targetResonance;
const double modulationFrequencyDelta = (localTargetModulationFrequency != modulationFrequency) ? (targetModulationFrequency - modulationFrequency) / bufferToFill.numSamples : 0;
const double modulationDepthDelta = (localTargetModulationDepth != modulationDepth) ? (targetModulationDepth - modulationDepth) / bufferToFill.numSamples : 0;
const double centreFrequencyDelta = (localTargetCentreFrequency != centreFrequency) ? (targetCentreFrequency - centreFrequency) / bufferToFill.numSamples : 0;
const double resonanceDelta = (localTargetResonance != resonance) ? (targetResonance - resonance) / bufferToFill.numSamples : 0;
// Create our PWM Maximilian noises and send the mixed output to the channels
for (int sample = 0; sample < bufferToFill.numSamples; ++sample)
{
modulationFrequency += modulationFrequencyDelta;
modulationDepth += modulationDepthDelta;
centreFrequency += centreFrequencyDelta;
resonance += resonanceDelta;
const double modulatorFrame = (modulator.sinewave(modulationFrequency) + 1.0) / 2.0 * modulationDepth + (1 - modulationDepth);
const double carrierFrame = carrier.pulse(83, modulatorFrame);
const double filteredFrame = filter.lores(carrierFrame, centreFrequency, resonance);
mixer.stereo(filteredFrame, outputs, .5);
bufferL[sample] = float(outputs[0]);
bufferR[sample] = float(outputs[1]);
}
modulationFrequency = localTargetModulationFrequency;
modulationDepth = localTargetModulationDepth;
centreFrequency = localTargetCentreFrequency;
resonance = localTargetResonance;
oscilloscope.pushBuffer(bufferL, bufferToFill.numSamples);
}
void releaseResources() override {}
//==========================================================================
/* Graphics, GUI */
void paint (Graphics& _g) override
{
// (Our component is opaque, so we must completely fill the background with a solid colour)
_g.fillAll (Colour::fromRGB(40, 40, 40));
}
// This is called once at startup and then everytime the window is resized
// Essentially all the code here just subdivides the available window space
void resized() override
{
juce::Rectangle<int> area(getLocalBounds());
const int headerFooterHeight = 36;
header.setBounds(area.removeFromTop(headerFooterHeight));
footer.setBounds(area.removeFromBottom(headerFooterHeight));
const int sidebarWidth = jmax(100, area.getWidth() / 4);
juce::Rectangle<int> sidebarArea(area.removeFromLeft(sidebarWidth));
sidebar.setBounds(sidebarArea);
const int drawingWidth = area.getWidth();
drawingArea = area.removeFromRight(drawingWidth);
oscilloscope.setBounds(drawingArea.reduced(int(sidebarWidth / 4.0)));
const int sideItemHeight = 40;
const int sideItemMargin = 5;
train.setBounds(sidebarArea.removeFromTop(sideItemHeight).reduced(sideItemMargin));
randomise.setBounds(sidebarArea.removeFromBottom(sideItemHeight).reduced(sideItemMargin));
filterResonanceSlider.setBounds(sidebarArea.removeFromBottom(sideItemHeight).reduced(2.5*sideItemMargin));
filterFrequencySlider.setBounds(sidebarArea.removeFromBottom(sideItemHeight).reduced(2.5*sideItemMargin));
modulationIndexSlider.setBounds(sidebarArea.removeFromBottom(sideItemHeight).reduced(2.5*sideItemMargin));
modulationFrequencySlider.setBounds(sidebarArea.removeFromBottom(sideItemHeight).reduced(2.5*sideItemMargin));
}
//==========================================================================
/* Interaction events via mouse and keyboard */
void mouseDrag(const MouseEvent& _event) override
{
if (trained)
{
std::vector<double> input = normaliseMouseSpace(_event.position.roundToInt(), drawingArea);
std::vector<double> output = rapidRegression.run(input);
targetModulationFrequency = output[0];
targetModulationDepth = output[1];
targetCentreFrequency = output[2];
targetResonance = output[3];
modulationFrequencySlider.setValue(targetModulationFrequency, dontSendNotification);
modulationIndexSlider.setValue(targetModulationDepth, dontSendNotification);
filterFrequencySlider.setValue(targetCentreFrequency, dontSendNotification);
filterResonanceSlider.setValue(targetResonance, dontSendNotification);
}
else
{
AlertWindow::showMessageBoxAsync(AlertWindow::AlertIconType::WarningIcon, "Error", "Please train the model before trying to run it!", "ok");
}
}
void mouseMove(const MouseEvent& _event) override
{
if (KeyPress::isKeyCurrentlyDown(KeyPress::spaceKey))
{
std::vector<double> input = normaliseMouseSpace(_event.position.roundToInt(), drawingArea);
trainingExample example;
example.input = { input[0], input[1] };
example.output = { modulationFrequency, modulationDepth, centreFrequency, resonance };
trainingSet.push_back(example);
// only do once...
if (input.size() > 0)
{
footer.setButtonText("When you have finished recorded the sounds you want, press train!");
}
}
}
std::vector<double> normaliseMouseSpace(const juce::Point<int>& _position, const juce::Rectangle<int>& _area)
{
juce::Point<int> pos = _area.getConstrainedPoint(_position);
std::vector<double> temp;
temp.resize(2);
temp[0] = double(double(pos.getX() - _area.getX()) / _area.getWidth());
temp[1] = double(double(pos.getY() - _area.getY()) / _area.getHeight());
return temp;
}
void sliderValueChanged(Slider* _slider) override
{
if (_slider == &modulationFrequencySlider)
targetModulationFrequency = modulationFrequencySlider.getValue();
else if (_slider == &modulationIndexSlider)
targetModulationDepth = modulationIndexSlider.getValue();
else if (_slider == &filterFrequencySlider)
targetCentreFrequency = filterFrequencySlider.getValue();
else if (_slider == &filterResonanceSlider)
targetResonance = filterResonanceSlider.getValue();
}
void buttonClicked(Button* _button) override
{
if (_button == &train)
{
if (trainingSet.size() > 2)
{
trained = rapidRegression.train(trainingSet);
footer.setButtonText("Now just drag the mouse to play!");
}
else
{
AlertWindow::showMessageBoxAsync(AlertWindow::AlertIconType::WarningIcon, "Error", "Please record more audio and mouse coordinate examples before training!\n\nYou can add examples by choosing mouse coordinates with the current sound and holding space whilst wiggling the mouse", "ok");
}
}
else if (_button == &randomise)
{
std::random_device random;
std::default_random_engine generator(random());
std::uniform_real_distribution<double> distribution(0.0, 1.0);
targetModulationFrequency = 4096 * distribution(generator);
targetModulationDepth = distribution(generator);
targetCentreFrequency = 4096 * distribution(generator);
targetResonance = 40 * distribution(generator);
modulationFrequencySlider.setValue(targetModulationFrequency, dontSendNotification);
modulationIndexSlider.setValue(targetModulationDepth, dontSendNotification);
filterFrequencySlider.setValue(targetCentreFrequency, dontSendNotification);
filterResonanceSlider.setValue(targetResonance, dontSendNotification);
}
}
private:
//==========================================================================
/*** AUDIO ***/
// FM Synthesis private parameters
double modulationFrequency;
double modulationDepth;
double centreFrequency;
double resonance;
double targetModulationFrequency;
double targetModulationDepth;
double targetCentreFrequency;
double targetResonance;
double outputs[2];
// Maximilian objects
maxiOsc carrier;
maxiOsc modulator;
maxiFilter filter;
maxiMix mixer;
//==========================================================================
/*** MACHINE LEARNING ***/
// Rapid regression
regression rapidRegression;
std::vector<trainingExample> trainingSet;
// Program state
bool trained;
//==========================================================================
/*** GUI ***/
// Layout
TextButton header;
TextButton sidebar;
TextButton footer;
juce::Rectangle<int> drawingArea;
// Rapidmix
TextButton train;
// Maximilian
Slider modulationFrequencySlider;
Label modulationFrequencyLabel;
Slider modulationIndexSlider;
Label modulationIndexLabel;
Slider filterFrequencySlider;
Label filterFrequencyLabel;
Slider filterResonanceSlider;
Label filterResonanceLabel;
TextButton randomise;
//==========================================================================
/*** GRAPHICS ***/
Oscilloscope oscilloscope;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
};
void Oscilloscope::mouseDrag(const MouseEvent& _event)
{
parent->mouseDrag(_event);
}
// (This function is called by the app startup code to create our main component)
Component* createMainContentComponent() { return new MainContentComponent(); }
#endif // MAINCOMPONENT_H_INCLUDED
<?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 */