2 ADSR envelopes in Minisynth ? | Synth Book Questions | Forum


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
2 ADSR envelopes in Minisynth ?
November 1, 2016 - 5:43 pm
Member Since: November 1, 2016
Forum Posts: 32
sp_UserOfflineSmall Offline

Hello !

i actually study the minisynth project who's really nice. But this project has only 1 ADSR envelopes for all (pitched osc, filter & DCA)

i saw that the Minisynth has already the possibility to have 4 ADSR envelopes.

So i added a second attack, sustain, decay , release section (DCA Amp ADSR) in the minisynth.cpp by adding the lines:

"// --- EG2:
m_GlobalSynthParams.eg2Params.dAttackTime_mSec = m_dAttackTime2_mSec;
m_GlobalSynthParams.eg2Params.dDecayTime_mSec = m_dDecayReleaseTime2_mSec;
etc. ..."

in the minisynthvoice.cpp, added the lines:

"// 2) --- set any component specific stuff
m_EG2.m_bOutputEG = true; // our DCA EG"

adding GUI ADSR2 implementation. ADSR 1 : actual envelope, ADSR 2: DCA envelope.

But there is a problem. The 1rst and second ADSR go in conflict with the first. If the second ADSR (the filter ADSR) is all set to zero, the first ADSR work.

i think the problem is in the voice.h, here:
"inline virtual bool isActiveVoice()
if(m_bNoteOn && m_EG1.isActive())
return true;

return false;

// we are in a state to accept a noteOff message
// WILL need to override this for FM Instrument or any parallel-osc algorithm with multiple output amp EGs
inline virtual bool canNoteOff()
if(m_bNoteOn && m_EG1.canNoteOff())
return true;

return false;

i tried to add the EG2 in it, but always the same problem.
what am i doing wrong ?


November 4, 2016 - 3:36 am
Member Since: January 29, 2016
Forum Posts: 11
sp_UserOfflineSmall Offline

Hi Gwen,

First off, welcome to the forum and nice to see you are interested in the RackAFX software.

Just so I've got an idea, you are trying to create a new envelope to control an individual part of the synth, right?

Currently minisynth uses one EG for all the aspects so you'll want to unlink EG1 from the other components that you don't want it to control then you can assign your new EG2 to what you want then it should work independently from EG1 which is your current problem of conflict.

But I don't want to detail it too much in case this isn't what you wanted to do.

November 5, 2016 - 12:50 am
Member Since: November 1, 2016
Forum Posts: 32
sp_UserOfflineSmall Offline

hello Hungryman 93 !
thanks for reply 🙂
yes my goal was to create a VCA/DCA ADSR EG. So like you wrote: disconnect DCA to EG1 (and all function like filter, osc, etc. ... directly bridged beetween EG1 and DCA output.

and that's DONE ! 😀
i forgot changing some "lines" in the voices (voice & minisynthvoice .cpp & .h) sections. Now EG1 is ADSR for osc, filter & LFO. EG2 is adsr for DCA.

So now i have a 4 piched osc + sub osc +noise osc, SVF SEM filter, 2 ADSR EG (VCF/DCF & VCA/DCA)

http://img15.hostingpics.net/pics/943743polysynth.jpgImage Enlarger

November 5, 2016 - 2:42 am
Member Since: January 29, 2016
Forum Posts: 11
sp_UserOfflineSmall Offline

Yes, that was what I was going to suggest to do next if you were still stumped.

As I was looking over the code for mini synth, not everything is just contained in the mini synth cpp although it would be possible to override the standard source and destination points using the mod matrix, as you did you can also edit them directly in the voice and minisynthvoice sections.

Well done, looks great from your pic!

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 775

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 846

Posts: 3353

Moderators: W Pirkle: 690