Jump to content

Photo

JetBall (Hypa Ball clone) (In Progress) XB256 Compiled


26 replies to this topic

#26 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • 1,223 posts
  • Location:Lansing, NY, USA

Posted Sat Apr 14, 2018 7:55 AM

So, that sort of implies that sound effects should be rendered on player1 and music on player2?  That way effects override music?

Player1 has more versatility because it can use loops and goto so it should normally be used for music. Player2 plays straight through and is intended to be used for sound effects.

 

To elaborate on how the sounds are sequenced:

Lets say you have music that uses all three sound generators. You wouldn't do this, but for this example lets say you use player1 to do an endless loop of CALL SOUND(100,220,0,330,0,440,0). Now lets say you use player2 to to play CALL SOUND(250,999,0)

Start up the music and generator3 is loaded with a value that gives a 440 Hz tone.  Now 50 ms later start player2. The value for 999 Hz is plugged into generator3.  50 ms later player1 has played for 100 milliseconds and so it reloads its values, plugging the value for 440 Hz into generator 3, which stops the 999Hz tone. Remember that player1 starts with generator1 and works up; player2 starts with generator3 and works down.

If you were to start player1 and player2 simultaneously the values for player2 are loaded last and those would replace the values loaded by player1. This assumes they are both trying to use the same sound generators.



#27 LASooner ONLINE  

LASooner

    Moonsweeper

  • Topic Starter
  • 288 posts

Posted Sat Apr 14, 2018 5:47 PM

For night stalker, I had the looping heartbeat sound on player 1, and the sound effects on player 2, I set it to play the heart beat when the player spawns, and it just continues through as all sound effects play. Some effects interrupt the heartbeat, but it picks up where it left off when it was interrupted.

 

good stuff.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users