Jump to content



Photo
* * * * - 1 votes

How to disable mech sounds, redundant with force feedback


  • Please log in to reply
19 replies to this topic

#1 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 11 August 2014 - 01:24 PM

When you have a cab with force feedback, it is not nice to heat the flipper sounds, bumper, gears, knocker, toy animation when you have toys that does it.

 

I manually deleted all the sounds on my table collection, i release some of my mods and eventually, I started to use the methods that Koadic and UW used to disable the mech sounds with just one change of a constant on top of the script.

 

Here's how to do it, thanks Ggtxjoe for the improvement:

 

here's the constant

 

'**********************TABLE OPTIONS******************************************************************************************************************************************************

'-1=VPinMAME, 2=UVP backglass server, 3=B2S backglass server(and implicitely DOF), 4=B2S backglass server, DOF and disable mech sounds

Const cController = 4 

'**************************************************************************************************************************************************************************************************

 

This is the method

 

Function SoundFX (sound)
    If dofS = 0 Then 'Table sounds enabled
        SoundFX = sound  
    Else                   'DOF enabled.  Table sounds disabled
        SoundFX = ""
    End If
End Function

 

And here are examples:

 

Dim SSolenoidOn: SSolenoidOn = Soundfx("fx_solenoid")

SolCallback(sKnocker)="vpmSolSound Soundfx(""knocker"")," 

Sub SolPostUp(Enabled)

If Enabled Then

Post.IsDropped=0

PlaySound Soundfx("postup")

End If

End Sub 

Set dtL=New cvpmDropTarget

dtL.InitDrop Array(DT21,DT22,DT23,DT24),Array(21,22,23,24)

dtL.InitSnd Soundfx("DROPTARG"), Soundfx("droptargetreset")

Set dtR=New cvpmDropTarget

dtR.InitDrop Array(DT20,DT19,DT18,DT17),Array(20,19,18,17)

dtL.InitSnd Soundfx("droptarget"), Soundfx("droptargetreset")

 
 

any suggestions are welcome


Edited by arngrim, 12 August 2014 - 05:44 PM.


#2 The Loafer

The Loafer

    Pinball Wizard

  • VIP
  • 3,472 posts
  • Location:Embrun, Ontario, Canada

  • Flag: ---------

  • Favorite Pinball: Superman, Firepower & Tron



Posted 11 August 2014 - 01:54 PM

This is a great post! I appreciate very much the ability to enable/disable via script due to sometimes having a need to play in "night mode", such as last night when I played with headphones (surprisingly a better experience than I expected lol). I still like the led bar to light up, so I don't want to do without dof at all. IMHO any possibility of having the switch controlled via f6 popup is even better so that it doesn't require to enter the editor.

Kind if ironic though as I appreciate your solution for the opposite reason, I want an easy way to add back in the sounds for those few times when I can't use the noisy "toys" :)

#3 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 11 August 2014 - 02:05 PM

f6 option is possible, it is just the top of the iceberg, i don't know how it works, and i see uw dropped that idea in his last builds

 

if someone can explain how that works

 

biggest issue with f6 or f1 with our cabs, for me it appears on the pf screen, so we would need to rotate the screen to make it readable, or make to use it appears on backglass screen, and that the regular buttons, flipper left, flipper right, enter can be used to navigate through the options



#4 Gilrock

Gilrock

    Enthusiast

  • Platinum Supporter
  • 169 posts

  • Flag: United States of America

  • Favorite Pinball: Time Warp

Posted 11 August 2014 - 02:19 PM

I think it's a good idea but mainly because it gives an easy option to make the change.  I personally I kinda like the blended sound I get from the game sound mixing with the hit of the contactor.  For my recent table release I bought a $150 microphone to record each solenoid.  So the sounds for my right and left flippers are not the same and each bumper was recorded separately.



#5 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,156 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 11 August 2014 - 10:48 PM

I can add support for this to my tables, but I don't like the idea of having to specify a number for each sound.  It's more work :)  Here is a generic function routine that will return the sound string or "" (null) if DOF is enabled.

 

'**********************TABLE OPTIONS************************************************

Const cController = 3 ' 1=VPinMAME, 2=UVP backglass server, 3=B2S backglass server

Const dofS = 1 ' set it to 1 to disable mech sounds

'***********************************************************************************

Function SoundFX (sound)
    If dofS = 0 Then 'Table sounds enabled
        SoundFX = sound  
    Else                   'DOF enabled.  Table sounds disabled
        SoundFX = ""
    End If
End Function

 

 

 

 

Examples:

Dim SSolenoidOn: SSolenoidOn = Soundfx("fx_solenoid")
 

SolCallback(sKnocker)="vpmSolSound Soundfx(""knocker""),"

 

Sub SolPostUp(Enabled)

If Enabled Then

Post.IsDropped=0

PlaySound Soundfx("postup")

End If

End Sub

 

Set dtL=New cvpmDropTarget

dtL.InitDrop Array(DT21,DT22,DT23,DT24),Array(21,22,23,24)

dtL.InitSnd Soundfx("DROPTARG"), Soundfx("droptargetreset")

Set dtR=New cvpmDropTarget

dtR.InitDrop Array(DT20,DT19,DT18,DT17),Array(20,19,18,17)

dtL.InitSnd Soundfx("droptarget"), Soundfx("droptargetreset")



#6 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 12 August 2014 - 11:38 AM

i was looking for a better solution but this is even better that i was thinking, will update the first post with it thanks Joe!

#7 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 12 August 2014 - 12:15 PM

i propose only one constant for choosing the controllers and disabling mech sounds, as there's no real sense to have b2s.server off and dofs on

 

'**********************TABLE OPTIONS************************************************

Const cController = 4 ' 1=VPinMAME, 2=UVP backglass server, 3=B2S backglass server, 4=B2S backglass server AND DOF (disable mech sounds)

'***********************************************************************************

Function SoundFX (sound)
    If cController = 4 Then 'Table sounds enabled
        SoundFX = sound  
    Else                   'DOF enabled.  Table sounds disabled
        SoundFX = ""
    End If
End Function
 
what do you think

Edited by arngrim, 12 August 2014 - 12:22 PM.


#8 The Loafer

The Loafer

    Pinball Wizard

  • VIP
  • 3,472 posts
  • Location:Embrun, Ontario, Canada

  • Flag: ---------

  • Favorite Pinball: Superman, Firepower & Tron



Posted 12 August 2014 - 12:22 PM

Just to ensure I understand, 3 = b2s backglass server and DOF (enable mech sounds)?

#9 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 12 August 2014 - 01:12 PM

let me explain

 

when you activate b2s.server, DOF bridge is activated, whether you use it or not it makes no difference.

 

so to be consistent, i can put the variable on my method to 4 so it is more explicit that it enables special DOF calls and disable sounds?

 

'*DOF method for rom controller tables by Arngrim********************

'*************************use Tabletype rom or em********************

'*******Use DOF 1**, 1 to activate a ledwiz output*******************

'*******Use DOF 1**, 0 to deactivate a ledwiz output*****************

'*******Use DOF 1**, 2 to pulse a ledwiz output**********************

Sub DOF(dofevent, dofstate) 

If cController=4 Then

If dofstate = 2 Then

Controller.B2SSetData dofevent, 1:Controller.B2SSetData dofevent, 0

Else

Controller.B2SSetData dofevent, dofstate

End If

End If

End Sub



#10 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 12 August 2014 - 02:34 PM

If you have dof but only lights, then you can choose option 3, so no sounds will be disabled and DOF still enabled (if you don't have DOF, no impact to choose option 3)

 

or if you have DOF with contactors, knockers, choose cController = 4 and sounds are disabled

 

'**********************TABLE OPTIONS************************************************

Const cController = 4 ' 1=VPinMAME, 2=UVP backglass server, 3=B2S backglass server(and implicitely DOF), 4=B2S backglass server, DOF and disable mech sounds

'***********************************************************************************

 

'*DOF method for rom controller tables by Arngrim********************

'*************************use Tabletype rom or em********************

'*******Use DOF 1**, 1 to activate a ledwiz output*******************

'*******Use DOF 1**, 0 to deactivate a ledwiz output*****************

'*******Use DOF 1**, 2 to pulse a ledwiz output**********************

Sub DOF(dofevent, dofstate) 

If cController=3 or cController=4 Then

If dofstate = 2 Then

Controller.B2SSetData dofevent, 1:Controller.B2SSetData dofevent, 0

Else

Controller.B2SSetData dofevent, dofstate

End If

End If

End Sub

 

Function SoundFX (sound)
    If cController = 4 Then 'Mech sounds disabled
        SoundFX = ""
    Else                   'Mech sounds enables
        SoundFX = sound  
    End If
End Function


#11 The Loafer

The Loafer

    Pinball Wizard

  • VIP
  • 3,472 posts
  • Location:Embrun, Ontario, Canada

  • Flag: ---------

  • Favorite Pinball: Superman, Firepower & Tron



Posted 12 August 2014 - 03:18 PM

Yes, I think this is cool and I think covers any scenario and the ease of switching from one to the other is very big own my book

#12 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 12 August 2014 - 05:44 PM

first post updated with the better solution



#13 FreeMason

FreeMason

    Pinball Pur-Fection

  • Members
  • PipPipPip
  • 219 posts
  • Location:Netherlands

  • Flag: Netherlands

  • Favorite Pinball: Tz

Posted 12 August 2014 - 09:22 PM

I would really like a hard button on cabinet it self enabling or disabling FFB with enabling/disabeling mech sounds. Would that be possible?

#14 The Loafer

The Loafer

    Pinball Wizard

  • VIP
  • 3,472 posts
  • Location:Embrun, Ontario, Canada

  • Flag: ---------

  • Favorite Pinball: Superman, Firepower & Tron



Posted 12 August 2014 - 09:33 PM

Yes, I have two switches, one that disables the mech and gear motor, the other disables the contactors. I didn't do that though, someone else did but if I understand correctly, it's just a question of the switch enabling or disabling power to the devices.

Oh wait, you would want the button to also trigger the sounds off/on in the table? If yes, I don't see how that could be possible.

#15 FreeMason

FreeMason

    Pinball Pur-Fection

  • Members
  • PipPipPip
  • 219 posts
  • Location:Netherlands

  • Flag: Netherlands

  • Favorite Pinball: Tz

Posted 12 August 2014 - 10:03 PM

Why not..? I sounds ideal to be to have the option on/off. You just need to script what sounds to use under a button

#16 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,156 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 12 August 2014 - 10:32 PM

It can be done, not sure what DOF is capable of but example below would toggle whether VP plays those mechanical sounds or not using the Extra Ball button anytime during gameplay

 

'**********************TABLE OPTIONS******************************************************************************************************************************************************
' 1=VPinMAME, 2=UVP backglass server, 3=B2S backglass server(and implicitely DOF), 4=B2S backglass server, DOF and disable VP mech sounds
Const cController = 4 
' Toggle button VP Mechanical Sounds On/Off ('3 - Extra Ball button. You can use other VP keycodes if desired)
Const ToggleMechSoundsKey = 3
'**************************************************************************************************************************************************************************************************
 
In LoadVPM routine, add:
    Case 4
        Set Controller = CreateObject("B2S.Server")
 
In Table1_Keydown routine, add:
    If keycode = ToggleMechSoundsKey Then ToggleMechSounds = (ToggleMechSounds + 1) mod 2
 
New method:
Dim ToggleMechSounds
Function SoundFX (sound)

    If cController = 4 and ToggleMechSounds = 0 Then
        SoundFX = ""
    Else
        SoundFX = sound
    End If
End Function



#17 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 19 August 2014 - 02:41 PM

at some point, i would like to have these options at vp level, if we don't care about uvp support anymore, we can just have an option to choose between vpinmame.controller or b2s.server once and for all the tables, becauseb2s.server can run even if there is no db2s present.
and for dof sound, if we can have the ability from commandline at vp level, to enable or disable mech sounds it would be great, so the frontends can adapt to use 2 launch buttons that are associated, one with and one without.
sorry i didn't read your post joe, your solution is excellent

#18 jkimbrell

jkimbrell

    Enthusiast

  • Members
  • PipPipPip
  • 298 posts
  • Location:Cincinnati, OH

  • Flag: United States of America

  • Favorite Pinball: Star Trek NG, Indiana Jones, South Park

Posted 19 August 2014 - 05:16 PM

It can be done, not sure what DOF is capable of but example below would toggle whether VP plays those mechanical sounds or not using the Extra Ball button anytime during gameplay

 

'**********************TABLE OPTIONS******************************************************************************************************************************************************
' 1=VPinMAME, 2=UVP backglass server, 3=B2S backglass server(and implicitely DOF), 4=B2S backglass server, DOF and disable VP mech sounds
Const cController = 4 
' Toggle button VP Mechanical Sounds On/Off ('3 - Extra Ball button. You can use other VP keycodes if desired)
Const ToggleMechSoundsKey = 3
'**************************************************************************************************************************************************************************************************
 
In LoadVPM routine, add:
    Case 4
        Set Controller = CreateObject("B2S.Server")
 
In Table1_Keydown routine, add:
    If keycode = ToggleMechSoundsKey Then ToggleMechSounds = (ToggleMechSounds + 1) mod 2
 
New method:
Dim ToggleMechSounds
Function SoundFX (sound)

    If cController = 4 and ToggleMechSounds = 0 Then
        SoundFX = ""
    Else
        SoundFX = sound
    End If
End Function

 

 

So this can be added to the top of any table script then?  Nothing else is required to be added to the script?



#19 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,156 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 19 August 2014 - 05:34 PM

Maybe someday it will be that simple, but no, it does require tweaking of the table script, most of it is talked about in the thread. 

 

At a high level:

1) Update LoadVPM routine to support the different cController settings as described above

2) Update the Table1_keydown routine as described

3) Copy and paste the new method section into the script as described

4) Review all the DOF related sounds used in the script, and change them over to use the SoundFX( ...) call, so they can be controlled

 

We could walk through a table if you really wanted to invest time and learn it, but hopefully something like this will become the norm on future tables, like nudge,  ball to ball collisions, fading lights, flasher object routines, etc has become...



#20 robertms

robertms

    Control Enthusiast

  • Members
  • PipPipPipPip
  • 623 posts
  • Location:Chicago, IL

  • Flag: United States of America

  • Favorite Pinball: Steve Ritchie designs

Posted 30 May 2015 - 09:20 PM

arngrim, when using the manual method through the sound manager which sounds do you recommend deleting for a 10-contactor setup? I would assume the obvious ones like flippers, sling shots and bumpers but should I be deleting anything else? This is for existing/older tables that lack the above script method.


Edited by robertms, 30 May 2015 - 09:53 PM.

Behold Godzilla! Check out my monster pincab project here: http://www.vpforums....topic=32236&hl=