Jump to content

papiel

Member
  • Posts

    3
  • Joined

  • Last visited

papiel's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. ok so I got the rest of it, but now how do I 1. create a series of UI sliders (preferably with note names - C, C# etc.. over two octaves) 2. get the current sliders positions into an array 3. compare incoming midi notes' pitch with the arrays?
  2. thanks! I figured that's where things go wrong. I'll start by taking the UI element out of the picture and work on the algorithm first then try to incorporate the sliders.
  3. I'm trying to compare incoming notes against an array (well, eventually a bunch of arrays) which is filled by UI sliders, but something goes wrong in the "IF" line. can someone please help? var chan = 0; var PluginParameters = [ { name:'common note 1', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'common note 2', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'common note 3', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'common note 4', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group A note 1', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group A note 2', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group A note 3', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group B note 1', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group B note 2', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group B note 3', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group C note 1', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group C note 2', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48}, { name:'group C note 3', type:'lin', minValue:36, maxValue:60, numberOfSteps:24, defaultValue:48} ]; var common = ['common note 1', 'common note 2', 'common note 3', 'common note 4']; var groupA = ['group A note 1', 'group A note 2', 'group A note 3']; var groupB = ['group B note 1', 'group B note 2', 'group B note 3']; var groupC = ['group C note 1', 'group C note 2', 'group C note 3']; function HandleMIDI(event) { if (event instanceof NoteOn) { for (i=0; i < common.length; i++) { if (event.pitch == common) { event.send(); break; } } }}
×
×
  • Create New...