Jump to content



Photo
- - - - -

@JP tell me about vpm, and positional audio

vpm audo ssf

  • Please log in to reply
6 replies to this topic

#1 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 25 November 2020 - 08:31 AM

Ok so tell me about using VPM to do the SSF audio?

so like if i have

 

Sub LB1_Hit 'Switch 75
Controller.Switch(75)=1
Controller.Switch(77)=1:LB1.IsDropped=1
PlaySound "Target", 1, 1, AudioPan(LB1), 0,0,0, 1, AudioFade(LB1)

NON STANDARD EVENT HERE
End Sub

Sub LB2_Hit 'Switch 65
Controller.Switch(65)=1
Controller.Switch(77)=1
LB2.IsDropped=1
PlaySound "Target", 1, 1, AudioPan(LB2), 0,0,0, 1, AudioFade(LB2)

NON STANDARD EVENT HERE
End Sub

Sub LB3_Hit 'Switch 55
Controller.Switch(55)=1
Controller.Switch(77)=1
LB3.IsDropped=1
PlaySound "Target", 1, 1, AudioPan(LB3), 0,0,0, 1, AudioFade(LB3)

NON STANDARD EVENT HERE
End Sub

Sub LB4_Hit 'Switch 45
Controller.Switch(45)=1
Controller.Switch(77)=1
LB4.IsDropped=1
PlaySound "Target", 1, 1, AudioPan(LB4), 0,0,0, 1, AudioFade(LB4)

NON STANDARD EVENT HERE
End Sub

Sub LB5_Hit 'Switch 35
Controller.Switch(35)=1
Controller.Switch(77)=1
LB5.IsDropped=1
PlaySound "Target", 1, 1, AudioPan(LB5), 0,0,0, 1, AudioFade(LB5)

NON STANDARD EVENT HERE
End Sub

Obviously the non standard events must stay, as they need some way of knowing when to happen, and Hit is just as easy i guess than watching for if controller.switch(35) then do this thing

 

But are you saying i could take all the rest, and rip it out, and do

 

sub Table1_init

Stuff
more stuff

    set dtLeftBank = new cvpmdroptarget
    With dtLeftBank
        .InitDrop Array(LB1, LB2, LB3, LB4, LB5), Array(75, 65, 55, 45, 35)
        .initsnd SoundFX("Target", DOFContactors), SoundFX("flapopen", DOFContactors)
        .AllDownSw = 37
        .CreateEvents "dtLeftBank"
    End With

And does that eliminate this also?

 

Sub RaiseLeft(Enabled)
	If Enabled Then
		LB1.IsDropped=0
		LB2.IsDropped=0
		LB3.IsDropped=0
		LB4.IsDropped=0
		LB5.IsDropped=0
		Controller.Switch(35)=0
		Controller.Switch(45)=0
		Controller.Switch(55)=0
		Controller.Switch(65)=0
		Controller.Switch(75)=0
		Controller.Switch(77)=0
		PlaySound"FlapOpen", 1, 1, AudioPan(LS3), 0,0,0, 1, AudioFade(LS3)
DOF 108, 2 'pulse left front bumper Sol

If mode > 1 then
Select Case Int(Rnd*7)+1
		Case 1: call BankReset1
		Case 2: call BankReset2
		Case 3: call BankReset3
		Case 4: call BankReset4
		Case 5: call BankReset5
		Case 6: call BankReset6
		Case 7: call BankReset7
	End Select
End If
	End If
End Sub

I guess i would have to append the bankreset cases to the solcallback
and just make them a stand lone sub?

 

SolCallback(5)="RaiseLeft"

I guess would then look something like what you used
 

Sub SolReset(No, Enabled)
    If Enabled Then
        Controller.Switch(37) = False
        If no < 2 Then
            dtLbank.SolUnHit 1, True
            dtLbank.SolUnHit 2, True
            dtLbank.SolUnHit 3, True
        Else
            dtLbank.SolUnHit 4, True
            dtLbank.SolUnHit 5, True
        End If
    End If
End Sub

Though i honestly have no clue what that is doing exactly
not sure if that is specific to that rom or.
 
I'd love to do less typing to accomplish the same thing, or have it work better

And does that do anything for DOF hardware?

If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#2 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,984 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 25 November 2020 - 10:45 AM

Michaels explained this in the beta thread. Single sound events - like this first you mention needs their own playsound. The cvpmdroptarget and a few others, don't anymore. What JP is saying in the other place, is that he used to take the vpmdroptarget calls, add hit event which plays the sound. This since before update of core.vbs - it was hard coded to play just a sound. Now it can, so those hit subs that he added is now reverted.

 

Why don't you just download any of the 3.0 releases, and the previous version. Export the scripts and run them through diffchecker.com or something. Should explain quite easily what is going on instead of "demanding" by subject response from JP.


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#3 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,325 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 25 November 2020 - 12:19 PM

:) Thalamus just explained quite well :) And you too :) 

 

After the core.vbs update we don't need anymore to play the sound in an extra _Hit event for the droptargets, that's why I removed all that from the script. And we can start using again the .CreateEvents("name"), since we don't need either the _Dropped, which didn't work very well with the "new" VPX droptargets.


If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

Next table? A tribute table to Stern's Foo Fighters


#4 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 26 November 2020 - 03:15 AM

 

Why don't you just download any of the 3.0 releases, and the previous version. Export the scripts and run them through diffchecker.com or something. Should explain quite easily what is going on instead of "demanding" by subject response from JP.

 

I wasnt demanding anything
I didnt want to bloat his table support thread with the conversation that had nothing to do with the table

I told him i'd make a separate thread instead of make a mess out of the table thread


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#5 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 26 November 2020 - 03:38 AM

:) Thalamus just explained quite well :) And you too :)

 

 

Problem is, i have no clue what i explained


Edited by wiesshund, 26 November 2020 - 03:38 AM.

If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#6 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,325 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 26 November 2020 - 05:36 AM

In short:

 

Before:

 

    set dtbankLeft = new cvpmdroptarget
    dtbankLeft.InitDrop Array(sw12, sw22, sw32), Array(12, 22, 32)
    dtbankLeft.initsnd SoundFX("", DOFDropTargets), SoundFX("fx_resetdrop", DOFContactors)
 
and then we needed to do these lines for the audio in SSF
 
Sub sw12_Hit:PlaySoundAt SoundFX("fx_droptarget", DOFDropTargets), sw12:End Sub
Sub sw22_Hit:PlaySoundAt SoundFX("fx_droptarget", DOFDropTargets), sw22:End Sub
Sub sw32_Hit:PlaySoundAt SoundFX("fx_droptarget", DOFDropTargets), sw32:End Sub
 
and the normal vpinmame "hit" event, or dropped in this case:
 
Sub sw12_Dropped:dtbankLeft.Hit 1:End Sub
Sub sw22_Dropped:dtbankLeft.Hit 2:End Sub
Sub sw32_Dropped:dtbankLeft.Hit 3:End Sub
 
 
Now, since the recent core.vbs changes we can go back doing this, and have SSF sound at the same time:
 
    set dtbankLeft = new cvpmdroptarget
    dtbankLeft.InitDrop Array(sw12, sw22, sw32), Array(12, 22, 32)
    dtbankLeft.initsnd SoundFX("fx_droptarget", DOFDropTargets), SoundFX("fx_resetdrop", DOFContactors)
    dtbankLeft.CreateEvents("dtbankLeft")
 
 
That's all :)

If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

Next table? A tribute table to Stern's Foo Fighters


#7 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 26 November 2020 - 05:49 AM

Hmm

Seems that it would make sense and be shorter for a table that adheres to stock completely (or mostly)

But the old way seems like it might be easier for something where you are doing a lot of mods, that involve the triggers among other things, that would cause you to
need a slew of hits anyways?

 

Think i will try using it on a non bastardized table 1st


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow






Also tagged with one or more of these keywords: vpm, audo, ssf