Jump to content

pianeiro

Member
  • Posts

    1
  • Joined

  • Last visited

pianeiro's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi guys! I need to play a undefined number of notes when a determined parameter has changed. The note pitches is storaged in a global array, from a if statemend inside a HandleMIDI function. When a determined parameter has changed, i tryed to create another array inside of ParameterChanged function that recieves the Note objects created in a loop from each pitch storage in the global array. But this code not works. Occurs a infinite loop with a lot of messages with NoteOn objects with undefined pitch numbers. For example: var key = [], // ... a lot of code supressed ... function HandleMIDI (e) { if (GetParameter("Learning") == 1) { e instanceof NoteOn ? key.push(e.pitch) : undefined; Trace(key); } // ... a lot of code supressed ... } function ParameterChanged () { if (GetParameter("Playing") == 1) { var voicings = []; for (i = 0; i = key.length; i++) { voicings[i] = new NoteOn(); voicings[i].pitch = key[i]; voicings[i].send(); } } There are a way to: 1. to store pitch notes 2. to create various NoteOn to play from the pitch notes storaged (in 1) 3. to play the notes created (2) That is my question. Thanks for help guys!!
×
×
  • Create New...