@@ -55,7 +55,7 @@ void synth_init(const FmChannel* initialPreset)
55
55
write_special_mode_reg ();
56
56
for (u8 chan = 0 ; chan < MAX_FM_CHANS ; chan ++ ) {
57
57
volumes [chan ] = MAX_VOLUME ;
58
- synth_noteOff (chan );
58
+ synth_note_off (chan );
59
59
memcpy (& fmChannels [chan ], initialPreset , sizeof (FmChannel ));
60
60
update_channel (chan );
61
61
}
@@ -86,13 +86,13 @@ static void init_global(void)
86
86
global .dacEnable = false;
87
87
}
88
88
89
- void synth_noteOn (u8 channel )
89
+ void synth_note_on (u8 channel )
90
90
{
91
91
write_reg_safe (0 , YM_KEY_ON_OFF , 0xF0 + key_on_off_reg_offset (channel ));
92
92
SET_BIT (noteOn , channel );
93
93
}
94
94
95
- void synth_noteOff (u8 channel )
95
+ void synth_note_off (u8 channel )
96
96
{
97
97
write_reg_safe (0 , YM_KEY_ON_OFF , key_on_off_reg_offset (channel ));
98
98
CLEAR_BIT (noteOn , channel );
@@ -138,7 +138,7 @@ void synth_feedback(u8 channel, u8 feedback)
138
138
channel_parameter_updated (channel );
139
139
}
140
140
141
- void synth_operatorTotalLevel (u8 channel , u8 op , u8 totalLevel )
141
+ void synth_operator_total_level (u8 channel , u8 op , u8 totalLevel )
142
142
{
143
143
Operator * oper = get_operator (channel , op );
144
144
if (oper -> totalLevel == totalLevel ) {
@@ -149,84 +149,84 @@ void synth_operatorTotalLevel(u8 channel, u8 op, u8 totalLevel)
149
149
channel_parameter_updated (channel );
150
150
}
151
151
152
- void synth_operatorMultiple (u8 channel , u8 op , u8 multiple )
152
+ void synth_operator_multiple (u8 channel , u8 op , u8 multiple )
153
153
{
154
154
get_operator (channel , op )-> multiple = multiple ;
155
155
write_operator_multiple_and_detune (channel , op );
156
156
channel_parameter_updated (channel );
157
157
}
158
158
159
- void synth_operatorDetune (u8 channel , u8 op , u8 detune )
159
+ void synth_operator_detune (u8 channel , u8 op , u8 detune )
160
160
{
161
161
get_operator (channel , op )-> detune = detune ;
162
162
write_operator_multiple_and_detune (channel , op );
163
163
channel_parameter_updated (channel );
164
164
}
165
165
166
- void synth_operatorRateScaling (u8 channel , u8 op , u8 rateScaling )
166
+ void synth_operator_rate_scaling (u8 channel , u8 op , u8 rateScaling )
167
167
{
168
168
get_operator (channel , op )-> rateScaling = rateScaling ;
169
169
write_operator_rate_scaling_and_attack_rate (channel , op );
170
170
channel_parameter_updated (channel );
171
171
}
172
172
173
- void synth_operatorAttackRate (u8 channel , u8 op , u8 attackRate )
173
+ void synth_operator_attack_rate (u8 channel , u8 op , u8 attackRate )
174
174
{
175
175
get_operator (channel , op )-> attackRate = attackRate ;
176
176
write_operator_rate_scaling_and_attack_rate (channel , op );
177
177
channel_parameter_updated (channel );
178
178
}
179
179
180
- void synth_operatorSustainRate (u8 channel , u8 op , u8 sustainRate )
180
+ void synth_operator_sustain_rate (u8 channel , u8 op , u8 sustainRate )
181
181
{
182
182
get_operator (channel , op )-> sustainRate = sustainRate ;
183
183
write_operator_sustain_rate (channel , op );
184
184
channel_parameter_updated (channel );
185
185
}
186
186
187
- void synth_operatorReleaseRate (u8 channel , u8 op , u8 releaseRate )
187
+ void synth_operator_release_rate (u8 channel , u8 op , u8 releaseRate )
188
188
{
189
189
get_operator (channel , op )-> releaseRate = releaseRate ;
190
190
write_operator_release_rate_and_sustain_level (channel , op );
191
191
channel_parameter_updated (channel );
192
192
}
193
193
194
- void synth_operatorSsgEg (u8 channel , u8 op , u8 ssgEg )
194
+ void synth_operator_ssg_eg (u8 channel , u8 op , u8 ssgEg )
195
195
{
196
196
get_operator (channel , op )-> ssgEg = ssgEg ;
197
197
write_operator_ssg_eg (channel , op );
198
198
channel_parameter_updated (channel );
199
199
}
200
200
201
- void synth_operatorSustainLevel (u8 channel , u8 op , u8 sustainLevel )
201
+ void synth_operator_sustain_level (u8 channel , u8 op , u8 sustainLevel )
202
202
{
203
203
get_operator (channel , op )-> sustainLevel = sustainLevel ;
204
204
write_operator_release_rate_and_sustain_level (channel , op );
205
205
channel_parameter_updated (channel );
206
206
}
207
207
208
- void synth_operatorDecayRate (u8 channel , u8 op , u8 decayRate )
208
+ void synth_operator_decay_rate (u8 channel , u8 op , u8 decayRate )
209
209
{
210
210
get_operator (channel , op )-> decayRate = decayRate ;
211
211
write_operator_amplitude_modulation_and_decay_rate (channel , op );
212
212
channel_parameter_updated (channel );
213
213
}
214
214
215
- void synth_operatorAmplitudeModulation (u8 channel , u8 op , u8 amplitudeModulation )
215
+ void synth_operator_amplitude_modulation (u8 channel , u8 op , u8 amplitudeModulation )
216
216
{
217
217
get_operator (channel , op )-> amplitudeModulation = amplitudeModulation ;
218
218
write_operator_amplitude_modulation_and_decay_rate (channel , op );
219
219
channel_parameter_updated (channel );
220
220
}
221
221
222
- void synth_enableLfo (u8 enable )
222
+ void synth_enable_lfo (u8 enable )
223
223
{
224
224
global .lfoEnable = enable ;
225
225
write_global_lfo ();
226
226
other_parameter_updated (0 , Lfo );
227
227
}
228
228
229
- void synth_globalLfoFrequency (u8 freq )
229
+ void synth_global_lfo_frequency (u8 freq )
230
230
{
231
231
global .lfoFrequency = freq ;
232
232
write_global_lfo ();
@@ -408,17 +408,17 @@ static u8 volume_adjusted_total_level(u8 channel, u8 totalLevel)
408
408
return 0x7F - inverseNewTotalLevel ;
409
409
}
410
410
411
- const FmChannel * synth_channelParameters (u8 channel )
411
+ const FmChannel * synth_channel_parameters (u8 channel )
412
412
{
413
413
return & fmChannels [channel ];
414
414
}
415
415
416
- const Global * synth_globalParameters ()
416
+ const Global * synth_global_parameters ()
417
417
{
418
418
return & global ;
419
419
}
420
420
421
- void synth_setParameterUpdateCallback (ParameterUpdatedCallback * cb )
421
+ void synth_set_parameter_update_callback (ParameterUpdatedCallback * cb )
422
422
{
423
423
parameterUpdatedCallback = cb ;
424
424
}
@@ -428,21 +428,21 @@ static void write_special_mode_reg(void)
428
428
write_reg_safe (0 , YM_CH3_MODE , global .specialMode << 6 );
429
429
}
430
430
431
- void synth_setSpecialMode (bool enable )
431
+ void synth_set_special_mode (bool enable )
432
432
{
433
433
global .specialMode = enable ;
434
434
write_special_mode_reg ();
435
435
other_parameter_updated (0 , SpecialMode );
436
436
}
437
437
438
- void synth_specialModePitch (u8 op , u8 octave , u16 freqNumber )
438
+ void synth_special_mode_pitch (u8 op , u8 octave , u16 freqNumber )
439
439
{
440
440
u8 offset = (op + 1 ) % 3 ;
441
441
write_reg_safe (0 , YM_CH3SM_BASE_FREQ_MSB_BLK + offset , (freqNumber >> 8 ) | (octave << 3 ));
442
442
write_reg_safe (0 , YM_CH3SM_BASE_FREQ_LSB + offset , freqNumber );
443
443
}
444
444
445
- void synth_specialModeVolume (u8 operator , u8 volume )
445
+ void synth_special_mode_volume (u8 operator , u8 volume )
446
446
{
447
447
Operator * op = get_operator (CH3_SPECIAL_MODE , operator );
448
448
if (!is_output_operator (fmChannels [CH3_SPECIAL_MODE ].algorithm , operator )) {
@@ -458,12 +458,12 @@ void synth_specialModeVolume(u8 operator, u8 volume)
458
458
effective_total_level (CH3_SPECIAL_MODE , operator , newTotalLevel ));
459
459
}
460
460
461
- void synth_directWriteYm2612 (u8 part , u8 reg , u8 data )
461
+ void synth_direct_write_ym2612 (u8 part , u8 reg , u8 data )
462
462
{
463
463
write_reg_safe (part , reg , data );
464
464
}
465
465
466
- void synth_enableDac (bool enable )
466
+ void synth_enable_dac (bool enable )
467
467
{
468
468
global .dacEnable = enable ;
469
469
write_dac_reg ();
0 commit comments