New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual device #41

Merged
merged 122 commits into from Oct 2, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+14 −3
Diff settings

Always

Just for now

Viewing a subset of changes. View all

vegas mode: improve jam mapping, minor cleanups

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
  • Loading branch information...
harryhaaren committed Oct 1, 2017
commit c147afa154b66b9d1988fb6de61be280dd1c9fc6
View
@@ -6,6 +6,9 @@
#include "ctlra.h"
#include "devices/ni_maschine_jam.h"
static int chan;
const char *patch_name;
void jam_update_state(struct ctlra_dev_t *dev, void *ud)
{
struct dummy_data *d = ud;
@@ -38,7 +41,15 @@ void jam_func(struct ctlra_dev_t* dev,
break;
case CTLRA_EVENT_ENCODER:
printf("encoder\n");
if(e->encoder.delta > 0)
chan++;
else
chan--;
if(chan < 0) chan = 0;
if(chan > 127) chan = 127;
soffa_set_patch(d->soffa, 0, 0, chan, &patch_name);
printf("maschine: patch switched to %s (%d)\n",
patch_name, chan);
break;
case CTLRA_EVENT_SLIDER:
@@ -7,7 +7,6 @@
#include "devices/ni_maschine_mikro_mk2.h"
static int chan;
const char *patch_name;
const char modes[] = {
@@ -90,12 +90,13 @@ int main(int argc, char** argv)
int num_devs = ctlra_probe(ctlra, accept_dev_func, &dummy);
printf("vegas_mode: connected devices: %d\n", num_devs);
/*
int ret = ctlra_dev_virtualize(ctlra, "Native Instruments", "Maschine Mikro Mk2");
if(ret) {
printf("failed to virtualize dev\n");
exit(0);
}
*/
audio_init(&dummy);
ProTip! Use n and p to navigate between commits in a pull request.