FizX Correct way add ball-hit & custom mechanical sounds for custom models/objects

madmrmax

Weeeeeee
Site Supporters
Joined
Sep 21, 2017
Messages
412
Solutions
1
Reaction score
216
Points
55
Favorite Pinball Machine
Indiana Jones (Williams)
Some questions about how to properly use some built-in sounds as well as to add new sounds for object hits in my table (TOM).

Custom Sounds: I have access to the VPX TOM custom sounds captured from a Theatre of Magic IRL pin. Some examples are the sound that the trap door mechanism makes when it pops up and down. Others are the variety of sounds of the trunk hit.

When I'm looking to add new sounds, for objects where there is a Hit event, based upon the AIO tutorial I should follow the PinMechSound pattern and add new Subs similar to below. I would also add the sounds to the sound manager.

C#:
Sub PinMechSound_LaunchRampExit_Hit
    PinMechSound ("mech_Ball_Drop_"&Int(Rnd*5)+1), TriggerLaunchRampExit, 1, , , ""
End Sub

Sub PinMechSound_RampExit_Hit
    PinMechSound ("mech_Ball_Drop_"&Int(Rnd*5)+1), TriggerRampExit, 1, , , ""
End Sub

Custom ball rolling sounds: Also from the VPX TOM, I have table specific ball rolling sounds when the ball is on its ramps and metal wireforms. Is it fine to add these sounds to the music manager and update code in things like "BallRolling_Wireramp" to be specific to the TOM plastic and wire ramps?

C#:
Sub BallRolling_WireRamp    'needs to be called using a trigger at ramp entrance
    if PUP_SSF_enabled = false then
        BallRolling_Sound = "mech_ballroll_wire"
        PlayMusic FP_BallRolling_Channel, BallRolling_Sound, true ,0 ,0
        if BallRolling_Debug_enabled = true then AddDebugText "FP Ball Rolling on Wire Ramp"
    end if
    if PUP_SSF_enabled = true then
        'PUP_BallRoll_Max_Volume = 0    'PUP can't change sound file for ball rolling, so we mute it while on the ramp
        'AddDebugText "PUP Ball Rolling on Wire Ramp"
    end if
End Sub

For custom models: with material of metal, I think I can use the default metal hit sounds that FizX provides for things like ball guide models, since these models currently do not have a Name. But I also read in the FizX that I should perhaps use a Diverter model type and set the name to "Metal..."

So what way gets the best FizX experience: Should I make them of type Diverter and Name them "Metal..." to get the FizXMetalHitEvent experience, or should I just rely on the generic "Auto_Generated" hit sound experience?

In looking at the code it doesn't seem like there is any real difference in relying on the Auto Generated or specific except the downside for using\relying on Auto Generated is that I could experience too many sounds. Is that accurate?
 
PinMechSound is code I made to basically unify the functions of DOF, PUP SSF, FP Sounds into one single command. It will trigger the DOF event, PUP SSF event only if those apps are installed / detected, and only if they are enabled in the script, or it will play the FP sound. This was originally meant for "event driven" sounds such as flippers, bumpers, coins in, etc... and would handle the behind the scenes stuff for PUP SSF positioning and dof triggering based on what was entered in the command. The DOF portion of the command is optional (look at the example events that don't use it like Coin In, Drain, etc).

So you can use PinMechSound for "mechanical sounds" or any other sound you want to support both FP Sounds and PUP SSF for positional sounds. If using new custom sounds, if you want it to work with PUP SSF, you need to create your own custom PuP-Pack to support them (convert them to wav and add to pup-pack, give the pup-pack a new name and change the script to match, etc)



JLOU created FizX in a way that allowed for any "ball hit" event to play a specific sound to match the material type of the item that was hit (metal, wood, rubber, etc) or other custom types he created based on the item name.

The way JLOU integrated "Ball Hit" events into FizX meant that is was easy for me to integrate PinMechSound into FizX for him instead of using normal playsound commands.... which resulted in FizX automatically supporting PUP SSF for all ball hit events. This was a big deal.

The extent to how far this goes for every model type I can't say for sure (pegs, toys, etc... not sure). Only way to know is to test it.

The older method that FizX used required you to manually add "diverter models" to act as rubber posts / bands, etc to allow for both FizX controlled items for physics, but also allows for autogenerated sounds as well. We still use these for places like Slingshots posts for physics reasons. You can add different surfaces / items on the table and name them specifically so they will play FizX's autogenerated sound regardless of their material settings.

Its up to you to try whichever works fine for you regarding sounds. There is no right or wrong method, depending on your intentions / end goal. Myself, I always just allowed the auto generated sounds to come first for "ball hit" events, and would only add extra for anything I felt I wanted to be different or more specific (like ball drops, etc). The other events like Flippers, Bumpers, slings, etc need to be manually added to each table.



For BallRolling, yes you can update the code to use whatever rolling sounds you add to Music Manager for the FP sounds side. You will need to add the required triggers at the entrance / exit of each ramp and name them as needed and update the code to match, as each table is different depending how you built it. (don't change anything in the pup section as that is handled by pup and the pup-pack and can't be changed.)
 
Last edited:
On Attack From Mars, I added diverters like this:

Sub PinMechSound_Diverter1_On
PinMechSound ("mech_Diverter_SolenoidOn_"&Int(Rnd*4)+1), Diverter1, 1, , , ""
End Sub

sub PinMechSound_Diverter1_Off
PinMechSound ("mech_Diverter_SolenoidOff_"&Int(Rnd*4)+1), Diverter1, 1, , , ""
end sub

I just about always add gate sounds although I usually just add one gate sound. There is a huge difference in the gate sounds in the download so just pick one and don't use the random select for it.

Sub PinMechSound_cetralenter_Hit
PinMechSound ("mech_Gate_1"), cetralenter, 1, , , ""
End Sub

If the table has a knocker, I use this. The FP version of it is awful sounding so I always replace it. Knockers are usually located inside the backbox on a real table so find an object near the top of the table that has X and Y coordinates to use for the location.

Sub KnockerSound
PinMechSound ("mech_Knocker"), Flasher10, 1, , , ""
End Sub

I found a ball rolling sound that I prefer to use for the playfield on a VP table. I don't recall why but the table developers on VP tables add the identical ball rolling sound many times so just use one of them. You can check to see if they are identical by adding two of the files to Audacity like you would add multiple channels. There is an invert function that you can use on one of the two sounds. Then you can merge them together and they will produce a flat line of silence if they are identical.

I pretty much follow Terry's guide on sounds except I prefer using numbered ramps instead of names of the opto triggers like this. I tried using named ramps like he did and I got very confused.

' ****** Ramps and Ball Rolling Sounds ******

Sub PinMechSound_TriggerRamp1Exit_Hit ' Note this is run in the Sub TriggerRamp1Exit_Hit below
PinMechSound ("mech_Ball_Drop_"&Int(Rnd*5)+1), TriggerRamp1Exit, 1, , , ""
End Sub

Sub PinMechSound_TriggerRamp2Exit_Hit ' note this is run in the Sub TriggerRamp2Exit_Hit below
PinMechSound ("mech_Ball_Drop_"&Int(Rnd*5)+1), TriggerRamp2Exit, 1, , , ""
End Sub

' to change Ball Rolling Sounds for different ramp materials (plastic, metal)
' you need to control that using triggers at the entrance and exit of the ramps

Sub TriggerRamp1Enter_Hit
If (LastSwitchHit.Name = "TriggerRamp1") or (LastSwitchHit.Name = "TriggerRamp1Enter") Then 'ball rolled back down to ramp entrance
BallRolling_ExitRamp
end if
set LastSwitchHit = TriggerRamp1Enter
End Sub

Sub TriggerRamp1_Hit
If (LastSwitchHit.Name = "TriggerRamp1Enter") Then 'ball is on plastics ramp
BallRolling_PlasticRamp
end if
set LastSwitchHit = TriggerRamp1
End Sub

Sub TriggerRamp1Exit_Hit 'ball has exited ramp
BallRolling_ExitRamp
PinMechSound_TriggerRamp1Exit_Hit
set LastSwitchHit = TriggerRamp1Exit
End Sub

Sub TriggerRamp2Enter_Hit
If (LastSwitchHit.Name = "TriggerRamp2") or (LastSwitchHit.Name = "TriggerRamp2Enter") Then 'ball rolled back down to ramp entrance
BallRolling_ExitRamp
End if
set LastSwitchHit = TriggerRamp2Enter
End Sub

Sub TriggerRamp2_Hit
If (LastSwitchHit.Name = "TriggerRamp2Enter") Then 'ball is on plastics ramp
BallRolling_PlasticRamp
end if
set LastSwitchHit = TriggerRamp2
End Sub

Sub TriggerRamp2Exit_Hit 'ball has exited ramp
BallRolling_ExitRamp
PinMechSound_TriggerRamp2Exit_Hit
set LastSwitchHit = TriggerRamp2Exit
End Sub

If you have more than 2 ramps, just make a copy of one of the sets of three subroutines above and change all the numbers to a 3. If you use the set of subs for ramp 2, change every 2 in all 3 subs to a 3. Do the same thing to the ball drop sound.

When a ramp transitions from plastic to wire (or other transition), I use a new set of double triggers when the transition occurs on the up hill side of the ramp just like you would use on a new ramp because the ball can roll back down. If the transition occurs on the down hill side of the ramp, I use a single trigger like this:

Sub TriggerRamp1Middle_Hit
BallRolling_WireRamp
set LastSwitchHit = TriggerRamp1Middle
End Sub

When the ball gets to the down hill side of the ramp, you only need the one trigger because the ball can't go up hill.

Be sure you have an exit sub anywhere the ball can exit the ramp. It makes the sound change back to the playfield sound in addition to the playing the ball drop sound. If there is a diverter, you will need 2 exit subs. I think I added an "a" and "b" to the names but I used the same ramp number consistently throughout.

I used this method on both Attack From Mars and Medieval Madness. Both of them have very complex ramps so it covers most of the possibilities. I think there may have even been a metal ramp on one or both of them. There is a ball rolling sound for metal and you just have to create new version of the SUB BallRolling_PlasticRamp.

I have attached the template I use which is a rework of the AIO. I added a later version of the tweaker that you don't have to use. It is very complex. You may want to copy the opto triggers to your table because it uses the naming convention I describe above.
 

Attachments

  • ```Attack From Mars 1.03.fpt
    77.3 MB · Views: 1
Last edited:
Thank you both @TerryRed and @GeorgeH for the detailed responses! It sounds like there is a straight away approach, just need to add the switches whenever the ball can change where it is at.
 
Thank you both @TerryRed and @GeorgeH for the detailed responses! It sounds like there is a straight away approach, just need to add the switches whenever the ball can change where it is at.

I hope it helps you. The main difficulty I had on the ball rolling sound on ramps was when I need to add more subs to add sound to more ramps. Once I converted Terry's noun names to ramp numbers, it started making sense and it made it easy to duplicate. I wouldn't have been able to add the sound if I hadn't done that.

You might want to use the ball rolling sounds that I used. I couldn't get the sound levels to match because there is only one volume control in the AIO for all the ball rolling sounds so I made adjustments of the levels in the audio files. The rubber hit sounds are very quiet so I ended up increasing the sound level a bit in them also. It is important to be able to hear all the sounds. The rubber hit sounds can be easily drowned out by the other sounds, especially music. Terry doesn't like you to do it but I have found that other VPX table developers do it. You just don't want to carry it to an extreme.

I have found that if you want the cabinet guys to play your table you really need to add SSF. It helps to test the table on a cabinet with SSF. If you don't have a cabinet, you should see if you can find someone to test it for you.
 
I hope it helps you. The main difficulty I had on the ball rolling sound on ramps was when I need to add more subs to add sound to more ramps. Once I converted Terry's noun names to ramp numbers, it started making sense and it made it easy to duplicate. I wouldn't have been able to add the sound if I hadn't done that.

You might want to use the ball rolling sounds that I used. I couldn't get the sound levels to match because there is only one volume control in the AIO for all the ball rolling sounds so I made adjustments of the levels in the audio files. The rubber hit sounds are very quiet so I ended up increasing the sound level a bit in them also. It is important to be able to hear all the sounds. The rubber hit sounds can be easily drowned out by the other sounds, especially music. Terry doesn't like you to do it but I have found that other VPX table developers do it. You just don't want to carry it to an extreme.

Do me a favor and stop speaking on my behalf, or making assumptions, or acting like your difficulties equals what everyone else would struggle with, or assuming your own personal preferences (to accommodate what you don't understand) are a superior way of doing things. Not everyone requires "simplification" that doesn't actually change any functions at all compared to the examples that are already given.

I've never once told anyone that "I don't like them to adjust hit sound levels or use different sounds" or anything else for that matter. EVERY table is different! How one author uses their audio and music levels in script can be completely different, so each table may need to be adjusted for audio levels for Ball Hit sounds or Rolling Sounds to match in script, or even the table's own sounds and music. Why would I have added ALL those extra audio options in the AIO that allows you to adjust those things, if I didn't want anyone to ever make any changes?

A "template / example" table (like the AIO that JLOU and myself created) is just that. An example, that won't be perfectly setup for every table, or for anyone's personal preferences or needs. Its up to each table creator / modder to decide what they need to do for audio levels, or the "names" they use that works best for them or for those pesky ball rolling sounds, or anything that's custom they may need to add for their table / project.

On top of that, everyone's audio setup is very different which can have a drastic change in how the audio mixing output can come across (on their headphones, desktop speakers, cabinet speakers, SSF transducers, stereo vs 5.1, etc)... and FP and PUP's audio levels are completely different as well for those who use that. The Fleep sounds and Ball Rolling sounds I include are the exact same sounds used on 100's of VP tables and all my releases, and no one else has an issue with them on any of those tables. The very few who might or have specific needs, can adjust each table as needed.

At some point, you need to accept that you can't have everything done for you (in someone else example project / code, etc) in the way you want for whatever challenges or preferences you have. Everyone needs to put effort in for whatever they need for their own projects. So stop... stop... getting sour because I don't include your ideas or changed sound files (that are only for your own benefit and don't change anything) in my own projects / examples. Do your own thing and carry on.
 
Last edited:
Well I am sorry I am such an unreasonable, hard to work with, stupid idiot. However, I do remember that I posted the ball rolling audio files several years ago on the FizX development topic where I adjusted the audio of the different files so the levels match. I remember that JLou thought it was great and you said that it was my opinion that the levels match. The fact is that all music is mixed by human ears. I have used the exact same audio files on many tables and have never had one complaint.

As far as my method of adding sound to ramps, I have had others tell me that they cannot figure out how to add sound to the ramps. I find my method is easier but anyone can use your method if they so choose. Answer this though, "How many table developers are adding the ball rolling sound to ramps?"

But I am here to tell you something that will make you eternally grateful. I am thinking about discontinuing posting tables after I finish the Williams Indiana Jones table. At least, I will not post as many as I once did.
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    CORY75 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    wildman22 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Yolo222 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    vumvuri has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    PMarot has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Anthias has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    rickpask has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Pauli_666 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Cattlesnake has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    AchillesK has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    emanoel299 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Bwolf122 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    thE fluiD musics lab. has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    denisman has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    odanny has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Rayman1103 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Vergin with Gerbil has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    pavement has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    AnyNameYouWish has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    NIPOGI has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    blackrose989 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    GeorgeH has joined the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Cheech93 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    MedievilMadness has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Pinbalbilly has left the room.
      Chat Bot Mibs Chat Bot Mibs: Pinbalbilly has left the room.
      Back
      Top