private void checkBoxFlanger_CheckedChanged(object sender, System.EventArgs e) { if (_StreamFX == 0) { return; } if (this.checkBoxFlanger.Checked) { // and add a DSP here as well... _flangerFX = Bass.BASS_ChannelSetFX(_StreamFX, BASSFXType.BASS_FX_BFX_FLANGER, -4); BASS_BFX_FLANGER flanger = new BASS_BFX_FLANGER(); flanger.Preset_Default(); Bass.BASS_FXSetParameters(_flangerFX, flanger); // just to demo how to get BASS_BFX_FLANGER f = new BASS_BFX_FLANGER(); Bass.BASS_FXGetParameters(_flangerFX, f); } else { // remove the DSP Bass.BASS_ChannelRemoveFX(_StreamFX, _flangerFX); _flangerFX = 0; } }
public void UpdateEQBass(int band, float gain) { try { BASS_BFX_PEAKEQ eq = new BASS_BFX_PEAKEQ(); ArrBandValue[band].Gain = gain; if (m_bandValue.Handle == -1) { // AppSettings.Set("AudioEQBand" + band, gain.ToString()); return; } //m_bandValue.Gain = gain; // get values of the selected band eq.lBand = band; Bass.BASS_FXGetParameters(m_bandValue.Handle, eq); eq.fGain = gain / 10; Bass.BASS_FXSetParameters(m_bandValue.Handle, eq); Console.WriteLine(m_bandValue.Handle + " : " + eq.fCenter + " : " + eq.fGain + " : " + ArrBandValue[band].Gain); //AppSettings.Set("AudioEQBand" + band, gain.ToString("0.0")); } catch (Exception ex) { Logger.LogFile(ex.Message, "", "UpdateEQBass", ex.LineNumber(), "Equalizer Class"); } }
private void UpdateEQ(int band, float gain) { BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ(); if (Bass.BASS_FXGetParameters(_fxEQ[band], eq)) { eq.fGain = gain; Bass.BASS_FXSetParameters(_fxEQ[band], eq); } }
public float GetEqualizerPosition(int freq) { var par = new BASS_DX8_PARAMEQ(); if (Bass.BASS_FXGetParameters(GetFXHandle(freq), par)) { return(par.fGain); } return(0); }
public static void UpdateEq(int band, double gain) { Eq[band] = gain; var eq = new BASS_DX8_PARAMEQ(); if (Bass.BASS_FXGetParameters(FxEq[band], eq)) { eq.fGain = (float)gain; Bass.BASS_FXSetParameters(FxEq[band], eq); } }
//public void SetReverb(int progress) //{ // BASS_DX8_REVERB p = new BASS_DX8_REVERB(); // Bass.BASS_FXGetParameters(fxReverb, p); // p.fReverbMix = (float)(progress > 15 ? Math.Log((double)progress / 20.0) * 20.0 : -96.0); // Bass.BASS_FXSetParameters(fxReverb, p); //} public void UpdateEQ(int band, float gain) { BASS_DX8_PARAMEQ p = new BASS_DX8_PARAMEQ(); if (Bass.BASS_FXGetParameters(fxBands[band], p)) { gains[band] = gain; p.fGain = gain; Bass.BASS_FXSetParameters(fxBands[band], p); } }
private void UpdateEQ(int band, float gain) { try { BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ(); if (Bass.BASS_FXGetParameters(Player.PlayController.bassEng._fxEQ[band], eq)) { eq.fGain = gain; Bass.BASS_FXSetParameters(Player.PlayController.bassEng._fxEQ[band], eq); } } catch { } }
public void SetEQ(int index, float gain) { BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ(); if (fxEQ.Length > 0) { if (Bass.BASS_FXGetParameters(fxEQ[index], eq)) { eq.fGain = gain; Bass.BASS_FXSetParameters(fxEQ[index], eq); } } }
private void distAmount_Scroll(object sender, EventArgs e) { if (fxStream != 0) { // Изменение драйва и вета дисторшена BASS_BFX_DISTORTION dist = new BASS_BFX_DISTORTION(); Bass.BASS_FXGetParameters(distortion, dist); dist.fDrive = distAmount.Value; dist.fWetMix = distAmount.Value / 3.0f; Bass.BASS_FXSetParameters(distortion, dist); } }
private void buttonEchoApply_Click(object sender, System.EventArgs e) { if (_StreamFX == 0) { return; } BASS_BFX_ECHO3 echo = new BASS_BFX_ECHO3(); // get the current Bass.BASS_FXGetParameters(_echoFX, echo); echo.fDelay = float.Parse(this.textBoxEchoDelay.Text); // set the new values Bass.BASS_FXSetParameters(_echoFX, echo); }
private void buttonFlangerApply_Click(object sender, System.EventArgs e) { if (_StreamFX == 0) { return; } BASS_BFX_FLANGER flanger = new BASS_BFX_FLANGER(); // get the current Bass.BASS_FXGetParameters(_flangerFX, flanger); flanger.fSpeed = float.Parse(this.textBoxFlangerSpeed.Text); // set the new values Bass.BASS_FXSetParameters(_flangerFX, flanger); }
private void bassAmount_Scroll(object sender, EventArgs e) { if (fxStream != 0) { // Изменения гейна эквалайзеров BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ(); Bass.BASS_FXGetParameters(bassboost, eq); eq.fGain = bassAmount.Value; Bass.BASS_FXSetParameters(bassboost, eq); Bass.BASS_FXSetParameters(bassboost2, eq); // Делаем кол-во Ы в лейбле равным бусту bassAmountLabel.Text = "БасЫ"; for (int i = 1; i <= bassAmount.Value; i++) { bassAmountLabel.Text += "ы"; } } }
/// <summary> /// 更新EQ,使EQ设置生效 /// </summary> /// <returns></returns> public bool UpdateEQ() { BASS_DX8_PARAMEQ eq = new BASS_DX8_PARAMEQ(); for (int i = 0; i < 10; i++) { if (Bass.BASS_FXGetParameters(fxEQ[i], eq)) { eq.fGain = MyEQ[i]; if (!Bass.BASS_FXSetParameters(fxEQ[i], eq)) { return(false); } } else { return(false); } } return(true); }