midi ui experiments

This commit is contained in:
Sebastian
2024-10-20 01:17:18 +02:00
parent ee8d50fc0a
commit 32462a6574
4 changed files with 65 additions and 58 deletions
+15 -18
View File
@@ -2,7 +2,7 @@
#include <cmath>
#include <math.h>
#include "libremidi/libremidi.hpp"
enum Distribution {ROUNDROBIN, RANDOM};
@@ -125,20 +125,17 @@ Vec2D<T> operator*(const Vec2D<T>& left, T scalar){
return Vec2D<T>(left.x * scalar, left.y * scalar);
};
/*template <typename T>*/
/*bool contains(T X, T Y) {*/
/* for (unsigned int i=0;i<Coords.size()-2;i+=2)*/
/* {*/
/* if (((Y-Coords[i+1])*(Coords[i+2]-Coords[i]) - (X-Coords[i])*(Coords[i+3]-Coords[i+1]))<0)*/
/* {*/
/* return (false);*/
/* }*/
/* }*/
/* //The last test is special*/
/* unsigned int j = Coords.size();*/
/* if (((Y-Coords[j-1])*(Coords[0]-Coords[j-2]) - (X-Coords[j-2])*(Coords[1]-Coords[j-1]))<0)*/
/* {*/
/* return (false);*/
/* }*/
/* return (true);*/
/*}*/
// MIDI
struct MidiOutPort{
libremidi::output_port port;
int number;
bool enabled;
};
struct MidiOut{
libremidi::midi_out out;
int number;
};