@@ -102,11 +102,11 @@ void SoundSynthesizerEffects::linearInterpolation(SoundEmojiSynthesizer *synth,
102
102
void SoundSynthesizerEffects::logarithmicInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
103
103
{
104
104
// Original frequency gen here, for reference. -John
105
- // synth->frequency = synth->effect->frequency+(log10 (context->step)*(context->parameter[0]-synth->effect->frequency)/1.95);
105
+ // synth->frequency = synth->effect->frequency+(log10f (context->step)*(context->parameter[0]-synth->effect->frequency)/1.95);
106
106
107
- synth->frequency = synth->effect ->frequency +(log10 (
107
+ synth->frequency = synth->effect ->frequency +(log10f (
108
108
( context->step ==0 ? 1 : context->step ) // This is a hack, to prevent step==0 from jumping this to extreme values. -John
109
- )*(context->parameter [0 ]-synth->effect ->frequency )/1.95 );
109
+ )*(context->parameter [0 ]-synth->effect ->frequency )/1 .95f );
110
110
111
111
// This is a bit of a hack, but will protect the synth for now until the math here can be fixed properly. -John
112
112
if ( synth->frequency < 0 )
@@ -117,39 +117,39 @@ void SoundSynthesizerEffects::logarithmicInterpolation(SoundEmojiSynthesizer *sy
117
117
// parameter[0]: end frequency
118
118
void SoundSynthesizerEffects::curveInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
119
119
{
120
- synth->frequency = (sin (context->step *3 .12159f /180 .0f )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
120
+ synth->frequency = (sinf (context->step *3 .12159f /180 .0f )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
121
121
}
122
122
123
123
// Cosine interpolate function
124
124
// parameter[0]: end frequency
125
125
void SoundSynthesizerEffects::slowVibratoInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context){
126
- synth->frequency = sin (context->step /10 )*context->parameter [0 ]+synth->effect ->frequency ;
126
+ synth->frequency = sinf (context->step /10 )*context->parameter [0 ]+synth->effect ->frequency ;
127
127
}
128
128
129
129
// warble function
130
130
// parameter[0]: end frequency
131
131
void SoundSynthesizerEffects::warbleInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
132
132
{
133
- synth->frequency = (sin (context->step )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
133
+ synth->frequency = (sinf (context->step )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
134
134
}
135
135
136
136
// Vibrato function
137
137
// parameter[0]: end frequency
138
138
void SoundSynthesizerEffects::vibratoInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context){
139
- synth->frequency = synth->effect ->frequency + sin (context->step )*context->parameter [0 ];
139
+ synth->frequency = synth->effect ->frequency + sinf (context->step )*context->parameter [0 ];
140
140
}
141
141
142
142
// Exponential rising function
143
143
// parameter[0]: end frequency
144
144
void SoundSynthesizerEffects::exponentialRisingInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
145
145
{
146
- synth->frequency = synth->effect ->frequency + sin (0 .01745329f *context->step )*context->parameter [0 ];
146
+ synth->frequency = synth->effect ->frequency + sinf (0 .01745329f *context->step )*context->parameter [0 ];
147
147
}
148
148
149
149
// Exponential falling function
150
150
void SoundSynthesizerEffects::exponentialFallingInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
151
151
{
152
- synth->frequency = synth->effect ->frequency + cos (0 .01745329f *context->step )*context->parameter [0 ];
152
+ synth->frequency = synth->effect ->frequency + cosf (0 .01745329f *context->step )*context->parameter [0 ];
153
153
}
154
154
155
155
// Argeppio functions
0 commit comments