Greetings All,
I am trying to write a JavaScript program using pdjs that allows me to send messages with commas to a synth. Something like this:
| 60, 64, 67 (
|
I have a string synthesizer and when I send these three MIDI values I get a C chord. This works as expected. I have tried to emulate this in many different ways in a pdjs JavaScript file. Please see attached. If I run the first line where I send the three values one after another things work as expected. I have tried a number of different ways to create a message with commas as above, with no luck. I am probably missing something easy and would appreciate any pointers in the right direction.
inlets = 1;
outlets = 1;
function bang() {
// if send individually works fine...
messnamed("notes", 60); messnamed("notes", 64); messnamed("notes", 67); //<-works!
// none of these work
messnamed("notes", ["60", "64", "67"]); //<-no method for '60'
messnamed("notes", [60, 64, 67]); //<-plays only first note
messnamed("notes", "60, 64, 67"); //<-no method for '60, 64, 67'
messnamed("notes", 60, 64, 67); //<-plays only first note
messnamed("notes", "60", "64", "67"); //<-no method for '60'
messnamed("notes", "60, "addcomma", 64", "addcomma", "67"); //<-won't compile
messnamed("notes", ["list", 60, 64, 67]); //<-plays only first note
messnamed("notes", ["list", 60, "list", 64, "list", 67]); //<-plays only first note
messnamed("notes", ["list", "60", "64", "67"]); //<-does nothing
}
Thanks in advance for your help.!