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AChIAg5Vuc+9NSDPuHxPLuLDILZDHRu7e8Ge+WPevU7Mgqpzqvxx
MHFu5KafjrHkUlJMM+AQxyIh4YSUa1LzFL+fRrsgrTU87oh0LSt+sgU+qP5K
QvHqw5UKGQiAYy+.CkqriA
-----------end_max5_patcher-----------
</code></pre>
the chord splitter js function is here
Code: Select all
var splitter = {
voiceNumber : 3
,chord : []
,addStatus : false
}
splitter.newNote = function(note){
// if note velocity different of 0 add note otherwise remove
note[1] ? this.addNote(note) : this.delNote(note);
}
splitter.addNote = function(note){
this.chord.push(note);
this.chord = this.chord.sort(function(a,b){
return a[0] - b[0];
});
for (i = 1; i <= this.chord.length; i++){
this.chord[i-1][1] = i;
}
if(this.voiceNumber == this.chord.length){
this.output42();
}
}
splitter.delNote = function(note){
var chordArray = this.chord.concat();
for (i = 0; i < chordArray.length; i++)
{
if(chordArray[i][0] === note[0])
{
outlet(0, [chordArray[i][0], 0]);
this.chord.splice(i, 1);
}
}
}
splitter.reset = function()
{
for (i = 0; i< this.chord.length; i++)
{
outlet(0, [this.chord[i][0], 0]);
}
this.chord = [];
}
splitter.output42 = function(){
for (i = 0; i < this.chord.length; i++){
outlet(0, [this.chord[i][0], this.chord[i][1]]);
}
}
/* MAIN */
inlets = 2; // number of inlets
outlets = 1; // number of outlets
function note(note, vel)
{
splitter.newNote([note, vel, false]);
}
function list(info, note, vel)
{
splitter.newNote([note, vel, false]);
}
function reset()
{
splitter.reset();
}
function msg_int(i){
splitter.voiceNumber = i;
}
created a from scratch video about, maybe can be interesting for non AL, Max users (what can be done in AL in 5mins)
(hope u not miss the sound too much
I'm quite qurious about what would be the best/simplest solution for this, the original idea comes from https://github.com/HerrmuttLobby/chord-splitter but it can't be use with Nora, don't need sophisticated algorithm (with overlapping etc. notes ) just a quick and dirty one which can work with any chord note number like the one above


