zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit c609bc463aa81274489f0391ece0b34c1e48095d
parent a3841ecb3c665aa5e746a7056c215a4d6e102b2e
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Thu, 10 Dec 2009 16:05:27 -0500

Merge branch 'master' into yoshimi

Conflicts:
	ChangeLog

Diffstat:
MAUTHORS.txt | 2+-
MChangeLog | 12++++++++++++
Msrc/Params/PADnoteParameters.h | 1+
Msrc/Synth/ADnote.cpp | 27+++++++++++----------------
Msrc/UI/EffUI.fl | 12+++++++-----
Msrc/UI/VirKeyboard.fl | 2+-
6 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/AUTHORS.txt b/AUTHORS.txt @@ -13,7 +13,7 @@ Contributors: Achim Settelmeier (QUERTZ keyboard layout for virtual keyboard) Jérémie Andréi (AZERTY keyboard layout, Array index fix, OSS failsafe) Alexis Ballier (const char* <-> string mismatch, NULLMidi prototype fix) - Tobias Doerffel (static vs instance variables alteration) + Tobias Doerffel (static-instance variables fix, missing include fix) James Morris (Memory leaks in FLTK GUI) Alan Calvert (Portions of New IO) diff --git a/ChangeLog b/ChangeLog @@ -828,6 +828,8 @@ - Codul de recorder wav a fost rescris - Adaugata functia de export la sample-urile din PADsynth +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + 20 Feb 2009 (Mark McCurry) - Made several functions accept 'constant char' over 'char' to prevent warnings @@ -958,5 +960,15 @@ 09 Oct 2009 (Mark McCurry) - Restylized codebase with uncrustify +28 Oct 2009 (Paul Nasca) + - Disable "bw" control on Reverb when Bandwidth mode is not enabled + 30 Oct 2009 (Mark McCurry) - Commited first stage of Nio (New IO) WIP + +18 Nov 2009 (Mark McCurry) + - Fixed segfault in VirKeyBoard + +02 Dec 2009 (Paul Nasca) + - Fixed a small typo on Virtual Keyboard + diff --git a/src/Params/PADnoteParameters.h b/src/Params/PADnoteParameters.h @@ -35,6 +35,7 @@ #include "FilterParams.h" #include "Presets.h" #include <string> +#include <pthread.h> class PADnoteParameters:public Presets { diff --git a/src/Synth/ADnote.cpp b/src/Synth/ADnote.cpp @@ -408,8 +408,7 @@ ADnote::ADnote(ADnoteParameters *pars, tmpwave_unison = new REALTYPE *[max_unison]; for(int k = 0; k < max_unison; k++) { tmpwave_unison[k] = new REALTYPE[SOUND_BUFFER_SIZE]; - for(int i = 0; i < SOUND_BUFFER_SIZE; i++) - tmpwave_unison[k][i] = 0.0; + memset(tmpwave_unison[k], 0, SOUND_BUFFER_SIZE * sizeof(REALTYPE)); } initparameters(); @@ -775,7 +774,7 @@ void ADnote::KillVoice(int nvoice) if(NoteVoicePar[nvoice].VoiceOut != NULL) memset(NoteVoicePar[nvoice].VoiceOut, 0, SOUND_BUFFER_SIZE - * sizeof(REALTYPE)); //do not delete, yet: perhaps is used by another voice + * sizeof(REALTYPE));//do not delete, yet: perhaps is used by another voice NoteVoicePar[nvoice].Enabled = OFF; } @@ -1010,8 +1009,7 @@ void ADnote::initparameters() } ; if(NoteVoicePar[nvoice].VoiceOut != NULL) - for(i = 0; i < SOUND_BUFFER_SIZE; i++) - NoteVoicePar[nvoice].VoiceOut[i] = 0.0; + memset(NoteVoicePar[nvoice].VoiceOut, 0, SOUND_BUFFER_SIZE * sizeof(REALTYPE)); } } @@ -1469,8 +1467,8 @@ inline void ADnote::ComputeVoiceOscillatorFrequencyModulation(int nvoice, //if I use VoiceOut[] as modulator for(int k = 0; k < unison_size[nvoice]; k++) { REALTYPE *tw = tmpwave_unison[k]; - for(i = 0; i < SOUND_BUFFER_SIZE; i++) - tw[i] = NoteVoicePar[NoteVoicePar[nvoice].FMVoice].VoiceOut[i]; + memcpy(tw, NoteVoicePar[NoteVoicePar[nvoice].FMVoice].VoiceOut, + SOUND_BUFFER_SIZE * sizeof(REALTYPE)); } } else { @@ -1654,11 +1652,9 @@ int ADnote::noteout(REALTYPE *outl, REALTYPE *outr) //mix subvoices into voice - for(i = 0; i < SOUND_BUFFER_SIZE; i++) - tmpwavel[i] = 0.0; + memset(tmpwavel, 0, SOUND_BUFFER_SIZE * sizeof(REALTYPE)); if(stereo) - for(i = 0; i < SOUND_BUFFER_SIZE; i++) - tmpwaver[i] = 0.0; + memset(tmpwaver, 0, SOUND_BUFFER_SIZE * sizeof(REALTYPE)); for(int k = 0; k < unison_size[nvoice]; k++) { REALTYPE *tw = tmpwave_unison[k]; if(stereo) { @@ -1825,11 +1821,10 @@ int ADnote::noteout(REALTYPE *outl, REALTYPE *outr) //Processing Global parameters NoteGlobalPar.GlobalFilterL->filterout(&outl[0]); - if(stereo == 0) - for(i = 0; i < SOUND_BUFFER_SIZE; i++) { //set the right channel=left channel - outr[i] = outl[i]; - bypassr[i] = bypassl[i]; - } + if(stereo == 0) { //set the right channel=left channel + memcpy(outr, outl, SOUND_BUFFER_SIZE * sizeof(REALTYPE)); + memcpy(bypassr, bypassl, SOUND_BUFFER_SIZE * sizeof(REALTYPE)); + } else NoteGlobalPar.GlobalFilterR->filterout(&outr[0]); diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl @@ -260,7 +260,9 @@ refresh(eff);} } Fl_Choice revp10 { label Type - callback {eff->seteffectpar(10,(int) o->value());} open + callback {eff->seteffectpar(10,(int) o->value()); +if (eff->geteffectpar(10)==2) revp12->activate(); + else revp12->deactivate();} xywh {110 15 85 15} down_box BORDER_BOX color 14 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { @@ -309,7 +311,8 @@ refresh(eff);} Fl_Dial revp12 { label bw callback {eff->seteffectpar(12,(int) o->value());} - xywh {200 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 when 4 maximum 127 + xywh {200 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 when 4 maximum 127 deactivate + code0 {if (eff->geteffectpar(10)==2) o->activate();} class WidgetPDial } Fl_Dial revp6 { @@ -341,7 +344,7 @@ refresh(eff);} callback {int x=64; if (Fl::event_button1()) x=(int)o->value(); else o->value(x); -eff->seteffectpar(11,x);} +eff->seteffectpar(11,x);} selected tooltip RoomSize xywh {200 10 25 25} box ROUND_UP_BOX labelfont 1 labelsize 8 align 8 minimum 1 maximum 127 step 1 class WidgetPDial } @@ -1417,8 +1420,7 @@ switch(eff->geteffect()){ break; }; -this->show();} {selected - } +this->show();} {} } Function {refresh()} {} { code {refresh(eff);} {} diff --git a/src/UI/VirKeyboard.fl b/src/UI/VirKeyboard.fl @@ -138,7 +138,7 @@ if ((event==FL_PUSH)||(event==FL_DRAG)||(event==FL_RELEASE)){ }; }; - if (((event==FL_PUSH)||(event==FL_DRAG))&& + if ((kpos!=-1)&&((event==FL_PUSH)||(event==FL_DRAG))&& (Fl::event_shift()==0)) { presskey(kpos,1,1); };