as i said in the title, in the synth book it's written that it's possible to select the sample path with the "initwithuserwavfile() function".
it seem that is for .wav file. so for single sample.
But what about loading multisamples (a folder so) with open dialog box ?
i use a load/save function in minisynth for creating/loading presets with a variation of the function above. but it always ask a single file with an extension, not a folder.
Anyone know how implement in digisynth a way to open/choose multisamples folder instead of harcoding the path (as it could be in the original digisynth constructor) ?
thanks in advance.
after reflection I do not try to give access to the folder for users.
as Will wrote in the synth book it is better to leave it "invisible".
what I'm looking for is having multiple multisamples, but with the same oscillator.
currently each multisample path is associated with 1 oscillator. if you have 300 multisamples you have to parameter 300 oscillators.
so what I want is hardcoder the paths of each file, but give them access to 1 oscillator via a controller UINT (kind m_uFolders)
what do I need to change for that?
thank you in advance.
It sounds like you just need an array of paths. Nowadays, I would do this with a std::vector of std::string items, but you could also do it the old way with char*s:
// ------- FOR MULTI SAMPLES ------- //
char* pPath0 = addStrings(getMyDLLDirectory(),"\\MultiSamples\\Heaver");
char* pPath1 = addStrings(getMyDLLDirectory(),"\\MultiSamples\\OldFlatty");
// --- array of paths
paths = pPath0;
paths = pPath1;
// --- this would be set with a GUI control or...
UINT pathChoice = 1;
// to speed up sample loading, init the first voice here
// --- init false, false = NOT single-sample, NOT pitchless sample
if(!m_pVoiceArray->initOscWithFolderPath(0, paths[pathChoice], false, false))
How you get the pathChoice from the user is your problem.
Another thing to remember is that loading those arrays of samples is time consuming, in part due to the fact that the WAV file needs to be parsed, but also because with multisamples, there could be dozens of files per folder. You will need to figure out how to unload the old multisamples, and then load new ones based on the pathChoice from the user. Of course if the user is playing the synth while making the change, you would need to shut off all voices and disallow MIDI input until the new samples were loaded into the oscillator objects.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:duo.dirtykidz, Paul, Reakenzo, jflo, dan_1, phlub, josh, bmarx, Tom Helvey, Ludovic
Moderators: W Pirkle: 555
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 555, VariableCook: 3