-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add mechanical sound support. #453
base: master
Are you sure you want to change the base?
Conversation
When working in the specific table project, I did add an AudioMixer asset called SoundMixer to try and alter the speed of sounds. I exposed the pitch shifter parameter and called the mixer in the sound inspector script but the setfloat method wasnt working (getfloat did work). I dont know another way to change the speed unless there are some external plugins to use. |
c13239f
to
45fb977
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, thanks a lot!
You'll see in my comments that most of the code in MechSoundsComponent
should be moved to the individual components. I'd suggest to just do it for the flipper, then I'll help doing the rest of the items.
There are some minor code style incoherences that I'll comment on as this PR matures.
All in all, awesome work. Looking forward to getting this in. :)
VisualPinball.Unity/VisualPinball.Unity/VPT/Sounds/MechSounds/MechSoundsComponent.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity/VPT/Sounds/MechSounds/MechSoundsComponent.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity.Editor/Inspectors/MechanicalSoundsInspector.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity.Editor/Inspectors/MechanicalSoundsInspector.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity.Editor/VPT/Sounds/SoundInspector.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity/VPT/Flipper/FlipperApi.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity/VPT/Sounds/MechSounds/MechSoundsComponent.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity/VPT/Sounds/MechSounds/MechSoundsComponent.cs
Outdated
Show resolved
Hide resolved
VisualPinball.Unity/VisualPinball.Unity/VPT/Sounds/MechSounds/MechSoundsComponent.cs
Outdated
Show resolved
Hide resolved
…component. Have mechsoundcomponent inherit from monobehaviour directly. Update mechsoundinspector to inherit from unity editor directly and by adding a propertydrawer to handle mechsound appearance. Initialize soundlist in mechsoundscomponent.
…he MechSound Drawer. Handle when no component attached to the gameobject implements it.
…om methods, refactor handling of audio clip playing using an established gameobject's audiosource, and moved call to update event into OnEnable method. Also deleted mechsounddata and some other minor cleanup.
I've pushed a few commits. Changes:
Still TODO:
|
…changes and then playing the clips under round robin selection.
…ts: plunger, drain, bumper.
Hello. I've resumed work on this feature. Work in progress resides in my fork branch https://github.com/linojon/VisualPinball.Engine/tree/feature/sounds . I am building it into the Volley table (https://github.com/jsm174/vpe-volley/tree/sounds ). using that as a baseline project and trying get our sounds like the VPX version (https://vpuniverse.com/files/file/8185-volley-gottlieb-1976/ ). Changes so far:
To test and verify, i am using the vpe-volley project,
Sounds todo:
Plus object collision and ball rolling sounds. I'll make a separate github issue #463 |
i've committed my current work in progress. I have questions, could use some help as i'm still just getting familiar with how VPE works.
Or, we could play one sound for the whole target bank reset (this is what the VPX game does). I tried this and it works but the code is messy, as I needed to add ItemApi to DropTargetBankApi.cs, which (in order to reference local variable MainComponent) requires i derive DropTargetBank from something like MainRenderableComponent, which in turn required i add a bunch of unused methods. See DropTargetBankComponent.cs. If this is a bad idea, i'll clean up the code.
|
Awesome! Could you open a PR from your branch to About your questions:
Apologies for not being 100% in the context yet. I'll need to re-read the code that has been written so far to be of more use. Many thanks already for your contributions! |
This is the initial commit for the mechanical sounds as discussed here:
#449.
Main items added are:
Sound Asset(scriptable object)
Sound Inspector
Mechanical Sounds Data
Mechanical Sounds Component
Mechanical Sounds Inspector
ISoundEmitter