commit 295e8892f239e57377ee44c4b9f61f7998160149
parent 827ecd3f5865fdbe0597e069b1eed6ec071d4b9f
Author: paulnasca <paulnasca>
Date: Sat, 19 Feb 2005 10:05:23 +0000
*** empty log message ***
Diffstat:
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -763,6 +763,8 @@
- Adaugata posibilitatea de a mari sau micsora cu un parametru detune-ul vocilor de la ADnote
17 Feb 2005 - Corectate cateva erori la PADsynth care faceau ca sa se citeasca date din zone de memorie nealocata
- Corectata o eroare la Bank care facea ca uneori sa crape programul cand umblam mult cu bankuri
+19 Feb 2005 - Corectata o eroare care facea ca uneori sa fie calculata frecventa la ADnote=nan si programul sa crape pentru ca era folosit parametrul bandwidthDetuneMultiplier inainte de a fi calculat
+
\ No newline at end of file
diff --git a/src/Input/ALSAMidiIn.C b/src/Input/ALSAMidiIn.C
@@ -61,7 +61,8 @@ void ALSAMidiIn::getmidicmd(MidiCmdType &cmdtype,unsigned char &cmdchan,int *cmd
return;
};
- snd_seq_event_input(midi_handle,&midievent);
+// snd_seq_event_input(midi_handle,&midievent);
+ usleep(1000000);
if (midievent==NULL) return;
switch (midievent->type){
diff --git a/src/Params/ADnoteParameters.C b/src/Params/ADnoteParameters.C
@@ -182,8 +182,6 @@ void ADnoteParameters::EnableVoice(int nvoice){
REALTYPE ADnoteParameters::getBandwidthDetuneMultiplier(){
REALTYPE bw=(GlobalPar.PBandwidth-64.0)/64.0;
bw=pow(2.0,bw*pow(fabs(bw),0.2)*5.0);
-// bw*=35;
-// printf("%g\n",bw);
return(bw);
};
diff --git a/src/Synth/ADnote.C b/src/Synth/ADnote.C
@@ -49,6 +49,7 @@ ADnote::ADnote(ADnoteParameters *pars,Controller *ctl_,REALTYPE freq,REALTYPE ve
NoteGlobalPar.Detune=getdetune(pars->GlobalPar.PDetuneType
,pars->GlobalPar.PCoarseDetune,pars->GlobalPar.PDetune);
+ bandwidthDetuneMultiplier=pars->getBandwidthDetuneMultiplier();
if (pars->GlobalPar.PPanning==0) NoteGlobalPar.Panning=RND;
else NoteGlobalPar.Panning=pars->GlobalPar.PPanning/128.0;
@@ -173,8 +174,6 @@ ADnote::ADnote(ADnoteParameters *pars,Controller *ctl_,REALTYPE freq,REALTYPE ve
NoteVoicePar[nvoice].DelayTicks=(int)((exp(pars->VoicePar[nvoice].PDelay/127.0*log(50.0))-1.0)/SOUND_BUFFER_SIZE/10.0*SAMPLE_RATE);
};
- bandwidthDetuneMultiplier=pars->getBandwidthDetuneMultiplier();
-
initparameters();
ready=1;
};
@@ -412,6 +411,7 @@ REALTYPE ADnote::getvoicebasefreq(int nvoice){
REALTYPE detune=NoteVoicePar[nvoice].Detune/100.0+
NoteVoicePar[nvoice].FineDetune/100.0*ctl->bandwidth.relbw*bandwidthDetuneMultiplier+
NoteGlobalPar.Detune/100.0;
+
if (NoteVoicePar[nvoice].fixedfreq==0) return(this->basefreq*pow(2,detune/12.0));
else {//the fixed freq is enabled
REALTYPE fixedfreq=440.0;