Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script will take user defined midi notes and velocities outside of the script and run a color change pattern on each note while a specified DMX address is active
- -- Declare some local vars for later use
- local getDMX = gma.show.getdmx
- local colorChange = {note81, note82};
- function colorChange.note81()
- gma.echo("This is the return color for note 81");
- end
- function colorChange.note82()
- gma.echo("This is the return color for note 82");
- end
- function getDmxOfNote(note)
- local universe = 24;
- local channels = 512;
- local address = ((universe - 1) * channels) + note;
- return address;
- end
- function verifyDmxHasValue(address, note, velocity)
- -- change the value of this below once you go to deploy
- if(getDMX(address) == 0) then
- gma.echo("working")
- colorChange.note81()
- end
- end
- function getMidiNote(note, velocity)
- local address = getDmxOfNote(note);
- verifyDmxHasValue(address, note, velocity);
- end
- return getMidiNote
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement