If the creator is filling parameters into a global container and the extractor is taking from the global container immediately afterward, is there a need for the identifier?
Unless, each struct is unique to each voice....then I create an array of structs like you say, and store params in structs at unique indexes and use the identifier to retrieve the structs
seb@plogue wrote:If you intend to have more than one voice going on?
That would be how to do it.
So presumably, the size of the array is governed by what, number of voices right. How would I gain that information? Or would I create a large array of structs and use a round robin counter to index through the next available slots, or index using the note number indentifier?
midiOut[0].events[midiOut[0].numEvents].bufTick = i;
midiOut[0].events[midiOut[0].numEvents].midiData[0] = (0x90 | ( ((MIDI_t) sampleIn[4][i]) & 0x0F));
midiOut[0].events[midiOut[0].numEvents].midiData[1] = ( ((MIDI_t) sampleIn[0][i]) & 0x7F);
midiOut[0].events[midiOut[0].numEvents].midiData[2] = ( ((MIDI_t) sampleIn[1][i]) & 0x7F);seb@plogue wrote:First of all when you use extern it means solve a link time, with what you have pasted here, it looks like params[] is only declared as an extern at one place and never defined at all.
#ifndef GLOBALDATA_H
#define GLOBALDATA_H
#define N_NOTES 128
struct paramData {
double param1;
double param2;
double param3;
double param4;
};
extern paramData pData [N_NOTES];
#endif#include "nc_extended.h"
#include "globaldata.h"
paramData pData;
using namespace plogue::biduleSDK;
using namespace boonier;
#include "nc_extended.h"
#include "globaldata.h"
paramData pData [N_NOTES];
using namespace plogue::biduleSDK;
using namespace boonier;The fdetune member is used mostly by the Note Creators/Extractors, the polyphonic adapter, the transposer and pretty much any internal bidules requiring to keep information on a per-note basis (actual midi note+fdetune is used as the key) and is also sent to VSTs (although there's only an handful of plugins using it...).
Users browsing this forum: No registered users and 1 guest