Skip to content

Add functions to change sound effect parameters #642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Aug 6, 2021

Conversation

StrixG
Copy link
Contributor

@StrixG StrixG commented Oct 8, 2018

This pull request adds functions to manipulate the parameters of sound effects. These functions doesn't work with the player voice at the moment.

bool setSoundEffectParameter(element sound, string effectName, string effectParam, var value)
table getSoundEffectParameters(element sound, string effectName)

Effect parameters

chorus

Chorus

http://www.un4seen.com/doc/#bass/BASS_DX8_CHORUS.html

Parameter Type
wetDryMix float
depth float
feedback float
frequency float
waveform int
delay float
phase int

compressor

Compressor

http://www.un4seen.com/doc/#bass/BASS_DX8_COMPRESSOR.html

Parameter Type
gain float
attack float
release float
threshold float
ratio float
predelay float

distortion

Distortion

http://www.un4seen.com/doc/#bass/BASS_DX8_DISTORTION.html

Parameter Type
gain float
edge float
postEQCenterFrequency float
postEQBandwidth float
preLowpassCutoff float

echo

Echo

http://www.un4seen.com/doc/#bass/BASS_DX8_ECHO.html

Parameter Type
wetDryMix float
feedback float
leftDelay float
rightDelay float
panDelay bool

flanger

Flanger

http://www.un4seen.com/doc/#bass/BASS_DX8_FLANGER.html

Parameter Type
wetDryMix float
depth float
feedback float
frequency float
waveform int
delay float
phase int

gargle

Gargle

http://www.un4seen.com/doc/#bass/BASS_DX8_GARGLE.html

Parameter Type
rateHz int
waveShape int

i3dl2reverb

I3DL2 Reverb

I3DL2 (Interactive 3D Audio Level 2) reverberation effect.

http://www.un4seen.com/doc/#bass/BASS_DX8_I3DL2REVERB.html

Parameter Type
room int
roomHF int
roomRolloffFactor float
decayTime float
decayHFRatio float
reflections int
reflectionsDelay float
reverb int
reverbDelay float
diffusion float
density float
HFReference float

parameq

Param EQ

Parametric equalizer effect.

http://www.un4seen.com/doc/#bass/BASS_DX8_PARAMEQ.html

Parameter Type
center float
bandwidth float
gain float

reverb

Reverb

http://www.un4seen.com/doc/#bass/BASS_DX8_REVERB.html

Parameter Type
gain float
reverbMix float
reverbTime float
reverbTime float
highFreqRTratio float

TODO

  • Add test resource.

Demo: https://www.youtube.com/watch?v=0sTgpZjRmHQ
Issue #320

@botder botder added the enhancement New feature or request label Oct 25, 2018
@StrixG StrixG force-pushed the sound-effect-parameters branch from 04c0c31 to c9c3eab Compare February 11, 2019 16:34
@botder botder added this to the Backlog milestone Mar 4, 2019
@StrixG StrixG changed the title WIP: Changing sound effect parameters WIP: Possibility to change sound effect parameters Apr 26, 2019
@StrixG StrixG changed the title WIP: Possibility to change sound effect parameters WIP: Possibility of changing sound effect parameters Apr 26, 2019
@StrixG StrixG changed the title WIP: Possibility of changing sound effect parameters WIP: Add possibility to change sound effect parameters Apr 26, 2019
@StrixG StrixG force-pushed the sound-effect-parameters branch from 5325fb5 to 9fc58a1 Compare July 3, 2019 21:30
@qaisjp
Copy link
Contributor

qaisjp commented Jul 4, 2019

Looks good so far! Thank you so much for this PR. 🎉

@ghost
Copy link

ghost commented Apr 2, 2020

@StrixG Do you want to work more on this PR? I think it looks good enough.

@StrixG
Copy link
Contributor Author

StrixG commented Apr 2, 2020

Yes. I can't figure out how to make this work for the player voice.

@dmi7ry
Copy link

dmi7ry commented Apr 3, 2020

Yes. I can't figure out how to make this work for the player voice.

Do you think it is possible? I thought voice uses different library (not BASS)

@qaisjp
Copy link
Contributor

qaisjp commented Apr 3, 2020

I believe voice is recorded via BASS and then encoded (for transmission) using Opus.

@qaisjp qaisjp marked this pull request as draft April 9, 2020 16:09
@qaisjp qaisjp changed the title WIP: Add possibility to change sound effect parameters Add possibility to change sound effect parameters Apr 9, 2020
@qaisjp
Copy link
Contributor

qaisjp commented Apr 9, 2020

No, we don't use BASS for recording. According to #895 we use portaudio.

@qaisjp qaisjp self-requested a review April 10, 2020 00:38
@StrixG StrixG modified the milestones: Backlog, 1.6 May 16, 2020
@StrixG StrixG linked an issue May 16, 2020 that may be closed by this pull request
@qaisjp qaisjp removed this from the Confirmed Issues milestone Dec 7, 2020
@Pirulax
Copy link
Contributor

Pirulax commented Apr 9, 2021

There seems to be some issue with reverb, but I doubt it's from your side.
Test resource SoundEffectsTest.zip

@Pirulax Pirulax marked this pull request as ready for review April 9, 2021 06:03
@Pirulax

This comment has been minimized.

@StrixG StrixG removed the request for review from qaisjp April 9, 2021 11:33
Copy link
Contributor

@Pirulax Pirulax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrikjuvonen patrikjuvonen self-requested a review August 4, 2021 21:49
@patrikjuvonen patrikjuvonen added this to the Backlog milestone Aug 4, 2021
Copy link
Contributor

@patrikjuvonen patrikjuvonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tested lightly and seems to be working fine 👍

Co-authored-by: Sarrum <thesarrum@gmail.com>
@patrikjuvonen
Copy link
Contributor

patrikjuvonen commented Aug 4, 2021

@StrixG All ready? Let's merge this, please create a new issue for the player voice part and create the Wiki pages. Thank you!

Apologies for the long wait.

@StrixG StrixG merged commit 449c5c3 into multitheftauto:master Aug 6, 2021
@StrixG StrixG deleted the sound-effect-parameters branch August 6, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setSoundEffectParameters function
8 participants