[RESOLVED] How to code dual sound outputs?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45569
    RustyCardores
    Moderator
      @rustycardores
      MemberModerator

      Quite some time ago I asked this question somewhere… I forget where :( ….but it is something that I would like to revisit if I may, in the the hope of finding an answer.

      At present Bumper sounds (for example) are output via the primary sound device ie the backbox speakers.   However these sounds can be “toggled” to the secondary sound device using the toggle function VP’s Sound Manager.

      All good…. but what I would like to do is have the sound come from both.  This can’t be done in the sound manager, as it is either one or the other. So it would need to be coded into the script “if” possible.

      I gave it a crack way back, but couldn’t make it work. Do any of our code gurus have an idea if this is possible and if so, the code needed?

      Cheers

      #45576
      robwaade
      Participant
        @robwaade
        Member

        i dont know if y cabeling your computer audio out to 2 audio devices would work for what youre trying to do

        #45580
        RustyCardores
        Moderator
          @rustycardores
          MemberModerator

          i dont know if y cabeling your computer audio out to 2 audio devices would work for what youre trying to do

          I’m running PMD and have mechanical sounds split and running to a second audio device. My goal if it is possible, is to have a single event (ie a bumper hit), trigger a sound that runs to both audio outputs.

          or… perhaps have the one event trigger too separate sounds that would allow me send one to background audio and the other to mechanicals, using the toggle feature of VP’s Sound Manager.

          #45617
          randr
          Keymaster
            @randr
            ModeratorMember

            I’m sure it could be done but I don’t have anyway to test it.

            ********************************************************
            Messing with the VPinball app and push notifications.
            So if you haven't downloaded app yet what are you waiting for!?
            for IOS and Android

            ********************************************************

            #45618
            RustyCardores
            Moderator
              @rustycardores
              MemberModerator

              I’m sure it could be done but I don’t have anyway to test it.

              Unless your playfield is HDMI Audio and you can select it as secondary sound device ;)

              #45642
              WED21
              Participant
                @wed21

                Could you copy all sound lines and rename the sound it uses. Then import the same sounds under the names that you created the new script for. Does that make sense? Not sure it would work though. Like this as an example:

                ‘ Standard Sounds
                Const SSolenoidOn = “fx_Solenoidon”
                Const SSolenoidOff = “fx_solenoidoff”
                Const SCoin = “fx_Coin”

                ‘ Standard Sounds
                Const SSolenoidOn = “fx_Solenoidon1”
                Const SSolenoidOff = “fx_solenoidoff1”
                Const SCoin = “fx_Coin1”

                 

                1 user thanked author for this post.
                #45644
                RustyCardores
                Moderator
                  @rustycardores
                  MemberModerator

                  Thanks WED21,

                  Yes I have tried duping the code to renamed second sounds, but still only the original triggers. :(

                  There are some tables that do what I want.  High Speed for example… the flippers not only activate the mechanical exciters but they also make the rev sound from the default audio output.  I get excited when I find a table like this, but then get disappointed when I find that the secondary sound is coming from ROM  :(

                  I might have a play with ‘Collections’ today, perhaps a singular table device can live within two separate collections? I could then have the collection trigger the sound event? … maybe? … hopefully … probably not :(

                   

                  #45650
                  Updon
                  Participant
                    @posty90

                    I am in no way an expert but it’s my understanding that all sounds go through bass.dll, I would guess that VPX is coded to a dedicated rom sound channel and one for table sounds, which could be why it won’t recognize the table sounds on the secondary? just a guess

                    #45651
                    RustyCardores
                    Moderator
                      @rustycardores
                      MemberModerator

                      WOOT!!!  I have it working.

                      I can’t change ROM sounds, my statement above was more to the point that I would get excited that perhaps I had find a table with the code needed to run dual sounds and then find that the second sound was coming from ROM… which I can do nothing about. :(

                      But the sounds available via the Sound Manager is a different story and it was these that I wanted to be able to duplicate…. which I have now done! :) **Strike up the band!!!

                      My “Collection” idea worked. So rather than try and make a single event call two sounds directly (fail), adding the second call via a second method works.

                      So for example… I want the sound “Bumper3” to come from both sound devices, so I….

                      • leave the existing call to “Bumper3” as is. (let’s say it’s going to the PMD tactile exciters)
                      • duplicate the “Bumper3” sound in the sound manager and call it “fx_Bumper3”
                      • toggle “fx_Bumper3” to the other sound device in the sound manager. (Save and restart the table for this to take effect)
                      • Open Collection Manager and create a new collection (eg Collection1) & select “Fire events for this collection”
                      • Add the device “Bumper3” to the collection
                      • Add the following sound routine to the script

                      Sub Collection1_Hit(idx):Playsound “Bumper3”:End Sub

                      *Standard volume and balance control can be added after “Bumper3” if needed, but at the moment I am leaving them out.

                      …and that’s it, I now have two sound events at once. One coming from the tactile feedback and the other from the regular backglass speaker system.  This will be a huge plus for PMD users I think. :)

                      #45652
                      randr
                      Keymaster
                        @randr
                        ModeratorMember

                        Very cool. Glad you got it working. Will come in handy if I add this to my dof setup and I may do that sometime

                        ********************************************************
                        Messing with the VPinball app and push notifications.
                        So if you haven't downloaded app yet what are you waiting for!?
                        for IOS and Android

                        ********************************************************

                      Viewing 10 posts - 1 through 10 (of 10 total)

                      Forums are currently locked.

                      ©2024 VPinBall.com

                      Log in with your credentials

                      Forgot your details?