Jump to content



Photo
- - - - -

making a song loop


  • Please log in to reply
15 replies to this topic

#1 faralos

faralos

    VPF Veteran

  • Members
  • PipPipPipPipPipPip
  • 7,838 posts
  • Location:Eastern Pa,USA

  • Flag: United States of America

  • Favorite Pinball: Flash (Williams) 1979, Flash2 Updated




  • Trophies:

Posted 09 January 2010 - 05:36 PM

I want to get a song to play in a loop during play. For now when it ends that's it, and some people may play my pins well past the actual song length. So how can I get it to play over and over again?
"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs


#2 Wizards_Hat

Wizards_Hat

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 1,258 posts
  • Location:Manchester, UK

  • Flag: United Kingdom

  • Favorite Pinball: STTNG




  • Trophies:

Posted 09 January 2010 - 05:51 PM

QUOTE (faralos @ Jan 9 2010, 05:36 PM) <{POST_SNAPBACK}>
I want to get a song to play in a loop during play. For now when it ends that's it, and some people may play my pins well past the actual song length. So how can I get it to play over and over again?

Playsound "filename", -1
or
Playmusic "filename", -1

Regards,
Dan.
A wizard only needs one ball...but can handle six.

#3 faralos

faralos

    VPF Veteran

  • Members
  • PipPipPipPipPipPip
  • 7,838 posts
  • Location:Eastern Pa,USA

  • Flag: United States of America

  • Favorite Pinball: Flash (Williams) 1979, Flash2 Updated




  • Trophies:

Posted 09 January 2010 - 06:02 PM

Wow! that was quick! and a big howdy to you, sir! long time no see, so to speak! I found that castle falmeir table file again after months of thinking I'd lost it, I posted about it in the wip area!
Thanks for that!! oh and my Zen table is in the vp9 download area, and don't let its color turn ya' off, if you are a decent player it'll turn colors for ya'
"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs


#4 Wizards_Hat

Wizards_Hat

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 1,258 posts
  • Location:Manchester, UK

  • Flag: United Kingdom

  • Favorite Pinball: STTNG




  • Trophies:

Posted 09 January 2010 - 09:13 PM

QUOTE (faralos @ Jan 9 2010, 06:02 PM) <{POST_SNAPBACK}>
Wow! that was quick! and a big howdy to you, sir! long time no see, so to speak! I found that castle falmeir table file again after months of thinking I'd lost it, I posted about it in the wip area!
Thanks for that!! oh and my Zen table is in the vp9 download area, and don't let its color turn ya' off, if you are a decent player it'll turn colors for ya'

Hi faralos,
Good to see you back.

I already downloaded your zen table when you first posted it up the other week.
It's a bit strange...but then, so's most of what you do tongue.gif

Regards,
Dan.
A wizard only needs one ball...but can handle six.

#5 Theguyoverthere

Theguyoverthere

    Enthusiast

  • Charter Member
  • 391 posts
  • Location:Seattle, WA

  • Flag: United States of America

  • Favorite Pinball: Black Rose and Simpsons Pinball Party

Posted 17 March 2010 - 03:29 AM

I wasn't aware that Playmusic command can have a loop count. I always assumed you have to use the Table1_musicdone() event...

#6 faralos

faralos

    VPF Veteran

  • Members
  • PipPipPipPipPipPip
  • 7,838 posts
  • Location:Eastern Pa,USA

  • Flag: United States of America

  • Favorite Pinball: Flash (Williams) 1979, Flash2 Updated




  • Trophies:

Posted 17 March 2010 - 03:40 PM

QUOTE (Theguyoverthere @ Mar 16 2010, 11:29 PM) <{POST_SNAPBACK}>
I wasn't aware that Playmusic command can have a loop count. I always assumed you have to use the Table1_musicdone() event...


not even sure what that means, I use PlaySound"whatever",-1 for a loop and StopSound"whatever" to stop it
"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs


#7 moogster66

moogster66

    Pinhead Deluxe

  • VIP
  • 1,277 posts
  • Location:The Hoosier State

  • Flag: United States of America

  • Favorite Pinball: Black Knight, Kiss, Black Hole, Gorgar, Centaur



Posted 08 August 2010 - 04:57 PM

QUOTE (Wizards_Hat @ Jan 9 2010, 01:51 PM) <{POST_SNAPBACK}>
QUOTE (faralos @ Jan 9 2010, 05:36 PM) <{POST_SNAPBACK}>
I want to get a song to play in a loop during play. For now when it ends that's it, and some people may play my pins well past the actual song length. So how can I get it to play over and over again?

Playsound "filename", -1
or
Playmusic "filename", -1

Regards,
Dan.

This is not working for me. I get an error every time I put the loop count on.
I don't mind being called a PINHEAD!
I'd rather have a bottle in front of me, than a frontal lobotomy!
Posted Image

#8 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 08 August 2010 - 06:21 PM

QUOTE (moogster66 @ Aug 8 2010, 12:57 PM) <{POST_SNAPBACK}>
QUOTE (Wizards_Hat @ Jan 9 2010, 01:51 PM) <{POST_SNAPBACK}>
QUOTE (faralos @ Jan 9 2010, 05:36 PM) <{POST_SNAPBACK}>
I want to get a song to play in a loop during play. For now when it ends that's it, and some people may play my pins well past the actual song length. So how can I get it to play over and over again?

Playsound "filename", -1
or
Playmusic "filename", -1

Regards,
Dan.

This is not working for me. I get an error every time I put the loop count on.


TheGuyOverThere is correct, the Playmusic command is for mp3's and you can't use the ,-1 for it to loop. You need the .mp3 in the filename and you need the mp3 file in your Music folder, so you need something like the following.

CODE
Sub Table_MusicDone()
PlayMusic "FlyingCondor.mp3"
End Sub

Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#9 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 08 August 2010 - 06:48 PM

PlayMusic will also work with WAV files and WMA files too. Correct on all accounts.

Build a fire, vipers love the heat.


#10 moogster66

moogster66

    Pinhead Deluxe

  • VIP
  • 1,277 posts
  • Location:The Hoosier State

  • Flag: United States of America

  • Favorite Pinball: Black Knight, Kiss, Black Hole, Gorgar, Centaur



Posted 08 August 2010 - 07:30 PM

I got it together guys, thanks! This may sound silly but I was looking at a video of Williams' Flash table, and noticed the droning hum in the background. The version I have been playing on VP does not have the sound. Some people may find the noise annoying, but it adds to the realism for me. So I added a sound loop of the hum to the table. dblthumb.gif
I don't mind being called a PINHEAD!
I'd rather have a bottle in front of me, than a frontal lobotomy!
Posted Image

#11 faralos

faralos

    VPF Veteran

  • Members
  • PipPipPipPipPipPip
  • 7,838 posts
  • Location:Eastern Pa,USA

  • Flag: United States of America

  • Favorite Pinball: Flash (Williams) 1979, Flash2 Updated




  • Trophies:

Posted 08 August 2010 - 09:09 PM

it's not just a one tone droning hum either. As you hit more objects and drop more banked sets of drop targets, that music tone will start to climb eventually going past human hearing! Now that is the cool part! I no of no other machine that has used that before or since! (you get I think; thunder flash, lightning flash, thunder and lightning flash, a double thunder, etc. you must play further than you currently have to fully enjoy how that ai music coding works!
"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs


#12 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 08 August 2010 - 11:42 PM

QUOTE (moogster66 @ Aug 8 2010, 01:30 PM) <{POST_SNAPBACK}>
I got it together guys, thanks! This may sound silly but I was looking at a video of Williams' Flash table, and noticed the droning hum in the background. The version I have been playing on VP does not have the sound. Some people may find the noise annoying, but it adds to the realism for me. So I added a sound loop of the hum to the table. dblthumb.gif


If you fix your adjustments for Flash then you get the sound emulated without your music loop. It has been more than beat to death on the forum on how to get the hum sound back.
http://www.vpforums....i...59&hl=flash

Nothing a simple search can't fix, but whatever.

Edited by destruk, 08 August 2010 - 11:42 PM.

Build a fire, vipers love the heat.


#13 moogster66

moogster66

    Pinhead Deluxe

  • VIP
  • 1,277 posts
  • Location:The Hoosier State

  • Flag: United States of America

  • Favorite Pinball: Black Knight, Kiss, Black Hole, Gorgar, Centaur



Posted 09 August 2010 - 12:29 AM

QUOTE (destruk @ Aug 8 2010, 07:42 PM) <{POST_SNAPBACK}>
QUOTE (moogster66 @ Aug 8 2010, 01:30 PM) <{POST_SNAPBACK}>
I got it together guys, thanks! This may sound silly but I was looking at a video of Williams' Flash table, and noticed the droning hum in the background. The version I have been playing on VP does not have the sound. Some people may find the noise annoying, but it adds to the realism for me. So I added a sound loop of the hum to the table. dblthumb.gif


If you fix your adjustments for Flash then you get the sound emulated without your music loop. It has been more than beat to death on the forum on how to get the hum sound back.
http://www.vpforums....i...59&hl=flash

Nothing a simple search can't fix, but whatever.

My bad, I guess I figured it would have been playing when the table started. I pressed F6, and played with the sound settings with no luck.
I don't mind being called a PINHEAD!
I'd rather have a bottle in front of me, than a frontal lobotomy!
Posted Image

#14 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 09 August 2010 - 12:45 AM

QUOTE (moogster66 @ Aug 8 2010, 06:29 PM) <{POST_SNAPBACK}>
My bad, I guess I figured it would have been playing when the table started. I pressed F6, and played with the sound settings with no luck.



It's ok, it's not solely controlled with the F6 settings. If you can get sound you are happy with somehow, that's the important thing. If you want it to be accurate you go into the adjustments in that sequence posted and it works. Your playmusic information you learned will no doubt be useful for other games in the future.

Build a fire, vipers love the heat.


#15 lodger

lodger

    Board Certified Funk Master

  • Members
  • PipPipPipPip
  • 993 posts
  • Location:Altoona Pennsylvania

  • Flag: United States of America

  • Favorite Pinball: Whirlwind, TAF

Contributor

Posted 10 September 2014 - 10:25 AM

Hey all,

 

hopefully I'm not reanimating a dead tutorial, but if you start playing/looping a sound, is there any way to stop it from playing, change volume, or change pitch?


berzerk2_0logo.png

http://www.vpforums....&showfile=11819

Version 2.0- Released 2/27/16


#16 faralos

faralos

    VPF Veteran

  • Members
  • PipPipPipPipPipPip
  • 7,838 posts
  • Location:Eastern Pa,USA

  • Flag: United States of America

  • Favorite Pinball: Flash (Williams) 1979, Flash2 Updated




  • Trophies:

Posted 10 September 2014 - 05:34 PM

if you use this coding and add a routine called silence which composes of

all of your tunes in it will stop the music if used

Sub Silence
     Stopsound"Death"
     StopSound"motor pool"
     Stopsound"vc"
    Stopsound"crazy"
    Stopsound"slalom1"
 End Sub

 to keep a song going in a loop you  write as such:

Playsound "your song",-1       the negative one is what keeps it looping

 pitch changes ain't possible in  game play from what I understand


 if you code it like this using a silence routine

 then the tunes will stop when the silence command gets used
  Sub Kicker2_hit()             
             Silence
            PlaySound"slalom1"
            Kicker2.TimerInterval = 3000             
            Kicker2.DestroyBall         
            Kicker2.TimerEnabled = True
  End Sub

 

Sub Silence
     Stopsound"Death"
     StopSound"motor pool"
     Stopsound"vc"
    Stopsound"crazy"
    Stopsound"slalom1"
 End Sub

 to play in a loop you code it like this:

playsound "your tune here" ,-1

the negative one is what keeps it playing in a loop

pitch changes from what I understand can't be done in game

 UNLESS you add the tune yourself with the pitch changes already in


"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs