Just started working on my own version of the Omnichord—looking for a little assistance
I'm new to Max and I've started on what I hope will end up being a more fully-featured version of the Omnichord (more chords, full chromatic range, etc.)
For some reason the js isn't pushing out the correct integers—that is, the integers aren't changing depending on which button gets pushed. If anybody feels like taking a look and thinks they might be able to spot where I'm going wrong I'd be eternally grateful.
I figured I'd try reaching out on a Max forum first, rather than a pure js-related forum as I'm not 100% where the problem lies.
The relevant section of the patch:
The script for the Test.js object:
inlets = 1;
outlets = 5;
function jsTest (a) {
var input1 = a;
//Cmin
if (input1 = 1) {
input1 = 60;
outlet(0, input1);
outlet(1, input1 + 3);
outlet(2, input1 + 7);
outlet(3, input1 * 0);
outlet(4, input1 * 0);
}
//CMaj
else if (input1 = 2) {
input1 = 60;
outlet(0, input1);
outlet(1, input1 + 4);
outlet(2, input1 + 7);
outlet(3, input1 * 0);
outlet(4, input1 * 0);
}
//CMaj7
else if (input1 = 3) {
input1 = 60;
outlet(0, input1);
outlet(1, input1 + 4);
outlet(2, input1 + 7);
outlet(3, input1 + 11);
outlet(4, input1 * 0);
}
}
if (a == b) { c = d;}
== vs =
Thanks,
I actually realized my mistake shortly after making this post. Hopefully, anyone else who runs into the same issue as me will find this post.