Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/devices/sound/cem3394.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static constexpr double EXTERNAL_VOLUME = PULSE_VOLUME;


// pulse shaping parameters
// can be enabled with set_limit_pw(true)
// can be enabled with configure_limit_pw(true)
// examples:
// hat trick - skidding ice sounds too loud if minimum width is too big
// snake pit - melody during first level too soft if minimum width is too small
Expand Down Expand Up @@ -100,7 +100,7 @@ static constexpr double EXTERNAL_VOLUME = PULSE_VOLUME;
0.0 == no resonance
+2.5 == oscillation

FILTER_FREQENCY
FILTER_FREQUENCY
-3.0 ... +4.0
-0.375 V/octave
0.0 == 1300Hz
Expand Down Expand Up @@ -610,7 +610,7 @@ void cem3394_device::set_voltage_internal(int input, double voltage)
break;

// filter frequency varies from -3.0 to +4.0, at 0.375V/octave
case FILTER_FREQENCY:
case FILTER_FREQUENCY:
m_filter_frequency = m_filter_zero_freq * pow(2.0, -voltage * (1.0 / 0.375));
LOGMASKED(LOG_CONTROL_CHANGES, "FLT_FREQ=%6.3fV -> freq=%f\n", voltage, m_filter_frequency);
break;
Expand Down Expand Up @@ -712,7 +712,7 @@ double cem3394_device::get_parameter(int input)
else
return voltage * (1.0 / 2.5);

case FILTER_FREQENCY:
case FILTER_FREQUENCY:
return m_filter_zero_freq * pow(2.0, -voltage * (1.0 / 0.375));
}
return 0.0;
Expand Down
6 changes: 4 additions & 2 deletions src/devices/sound/cem3394.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class cem3394_device : public device_t, public device_sound_interface
{
public:
// inputs
// Each of these CV inputs can either be specified with `set_voltage()`, or
// provided via a sound stream.
enum
{
AUDIO_INPUT = 0, // not valid for set_voltage()
Expand All @@ -19,7 +21,7 @@ class cem3394_device : public device_t, public device_sound_interface
PULSE_WIDTH,
MIXER_BALANCE,
FILTER_RESONANCE,
FILTER_FREQENCY,
FILTER_FREQUENCY,
FINAL_GAIN,
INPUT_COUNT
};
Expand Down Expand Up @@ -57,7 +59,7 @@ class cem3394_device : public device_t, public device_sound_interface
// PULSE_WIDTH: width fraction, from 0.0 to 1.0
// MIXER_BALANCE: balance, from -1.0 to 1.0
// FILTER_RESONANCE: resonance, from 0.0 to 1.0
// FILTER_FREQENCY: frequency, in Hz
// FILTER_FREQUENCY: frequency, in Hz
// FINAL_GAIN: gain, in dB
// Requesting a parameter associated with a streaming input will force a
// stream update.
Expand Down
6 changes: 3 additions & 3 deletions src/mame/midway/sente6vb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void sente6vb_device::update_counter_0_timer()

// if the filter resonance is high, then they're calibrating the filter frequency
if (m_cem_device[i]->get_parameter(cem3394_device::FILTER_RESONANCE) > 0.9)
tempfreq = m_cem_device[i]->get_parameter(cem3394_device::FILTER_FREQENCY);
tempfreq = m_cem_device[i]->get_parameter(cem3394_device::FILTER_FREQUENCY);

// otherwise, they're calibrating the VCO frequency
else
Expand Down Expand Up @@ -392,7 +392,7 @@ void sente6vb_device::chip_select_w(uint8_t data)
cem3394_device::VCO_FREQUENCY,
cem3394_device::FINAL_GAIN,
cem3394_device::FILTER_RESONANCE,
cem3394_device::FILTER_FREQENCY,
cem3394_device::FILTER_FREQUENCY,
cem3394_device::MIXER_BALANCE,
cem3394_device::MODULATION_AMOUNT,
cem3394_device::PULSE_WIDTH,
Expand Down Expand Up @@ -424,7 +424,7 @@ void sente6vb_device::chip_select_w(uint8_t data)
"VCO_FREQUENCY",
"FINAL_GAIN",
"FILTER_RESONANCE",
"FILTER_FREQENCY",
"FILTER_FREQUENCY",
"MIXER_BALANCE",
"MODULATION_AMOUNT",
"PULSE_WIDTH",
Expand Down
6 changes: 3 additions & 3 deletions src/mame/sequential/sixtrak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void sixtrak_state::update_cvs()
cem3394_device::VCO_FREQUENCY,
cem3394_device::FINAL_GAIN,
cem3394_device::FILTER_RESONANCE,
cem3394_device::FILTER_FREQENCY,
cem3394_device::FILTER_FREQUENCY,
cem3394_device::MIXER_BALANCE,
cem3394_device::MODULATION_AMOUNT,
cem3394_device::PULSE_WIDTH,
Expand Down Expand Up @@ -609,7 +609,7 @@ void sixtrak_state::update_tuning_timer()
bool tuning_filter = false;
if (voice->get_parameter(cem3394_device::FILTER_RESONANCE) > 0.9)
{
freq = voice->get_parameter(cem3394_device::FILTER_FREQENCY);
freq = voice->get_parameter(cem3394_device::FILTER_FREQUENCY);
tuning_filter = true;
}
else
Expand Down Expand Up @@ -901,7 +901,7 @@ void sixtrak_state::sixtrak_common(machine_config &config, device_sound_interfac
m_gain_rc[i]->add_route(0, m_voices[i], 1.0, cem3394_device::FINAL_GAIN);

VA_RC_EG(config, m_freq_rc[i]).set_r(RES_M(1));
m_freq_rc[i]->add_route(0, m_voices[i], 1.0, cem3394_device::FILTER_FREQENCY);
m_freq_rc[i]->add_route(0, m_voices[i], 1.0, cem3394_device::FILTER_FREQUENCY);

CEM3394(config, m_voices[i]);
const double c_vco = C_VCO + C_VCO * C_VCO_JITTER[i] * 0.025; // +/- 2.5%.
Expand Down
Loading