Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Digisynth = open file dialog for FOLDER (not .wav) ?
September 20, 2017 - 12:34 pm
Member Since: November 1, 2016
Forum Posts: 32
sp_UserOfflineSmall Offline

Hello !

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.



September 23, 2017 - 10:23 am
Member Since: November 1, 2016
Forum Posts: 32
sp_UserOfflineSmall Offline

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.


W Pirkle
September 26, 2017 - 11:40 am
Member Since: January 28, 2017
Forum Posts: 555
sp_UserOfflineSmall Offline

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

char* paths[2];

paths[0] = pPath0;

paths[1] = 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[0]->initOscWithFolderPath(0, paths[pathChoice], false, false))

     return 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. 

- Will

September 27, 2017 - 6:47 am
Member Since: November 1, 2016
Forum Posts: 32
sp_UserOfflineSmall Offline

it seem that is exactly what i want 😀

tested and : yes, it is.

So for now i must work on the GUI control setting for pathChoice (nedd some hard work for me). it will be done till weeks 🙂


you quasi did the job, i must work a little too ... 😉



October 2, 2017 - 11:43 am
Member Since: November 1, 2016
Forum Posts: 32
sp_UserOfflineSmall Offline

I am blocked.
I tried by all means.
I do not know if it is really possible.
I'm going to have to do something else. never mind.

🙁 🙁 🙁

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 51

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

jim: 34

JimmyM: 33

Gwen: 32

Member Stats:

Guest Posters: 1

Members: 684

Moderators: 1

Admins: 5

Forum Stats:

Groups: 13

Forums: 41

Topics: 747

Posts: 2853

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