Skip to content
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

MidiFx #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions MusicBeam/Effect.pde
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public abstract class Effect
stg = controller.stage;
frameRate = stg.frameRate;

int posy = 115+(i*50);
int posy = 115+(i*45);

controlGroup = cp5.addGroup(getName()+"SettingsGroup").hide().setPosition(10,195).setWidth(395).setHeight(30);
controlGroup.disableCollapse();
Expand All @@ -46,7 +46,7 @@ public abstract class Effect
ctrl.activeEffect.addItem("("+triggeredByKey() + ") " + getName(),i);
ctrl.activeSetting.addItem("settings"+getName(),i);

randomToggle = cp5.addToggle("random"+getName()).setSize(45, 45).setPosition(670, posy);
randomToggle = cp5.addToggle("random"+getName()).setSize(45, 40).setPosition(670, posy);
randomToggle.getCaptionLabel().set("RND").align(ControlP5.CENTER, ControlP5.CENTER);
randomToggle.setState(true);
}
Expand Down Expand Up @@ -157,4 +157,13 @@ public abstract class Effect
if (key == 't')
effect_manual_triggered = false;
}
}

void midiMessage(MidiMessage message, long timestamp, String bus_name) {
int msg = (int)(message.getMessage()[0] & 0xFF) ;
int note = (int)(message.getMessage()[1] & 0xFF) ;
int vel = (int)(message.getMessage()[2] & 0xFF);

// println("Effect midi: Bus " + bus_name + ": Msg: " + msg + " Note "+ note + ", vel " + vel);

}
}
Loading