Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

Poll

Which inter-song delay option makes most sense to you?

a) SongDelay is the minimum total delay between songs.
1 (33.3%)
b) SongDelay is the delay between the before and after song delays.
2 (66.7%)
c) SongDelay is a default delay and is ignored if a BeforeSongDelay or AfterSongDelay is present.
0 (0%)
d) SongDelay enables or disables the other delays.
0 (0%)
e) Find a way to make all these options work and allow the user to pick.
0 (0%)
f) Eliminate SongDelay completely and just use the other two delay settings.
0 (0%)
g) I have a better idea (please post it!)
0 (0%)

Total Members Voted: 3

  

Author Topic: Delays between songs: Need suggestions  (Read 2534 times)

0 Members and 1 Guest are viewing this topic.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Delays between songs: Need suggestions
« on: August 30, 2006, 09:11:43 am »
In another post someone was asking about being able to trigger a sound effect before every song.

For those just joining us, the jukebox's GUI is message-driven.  This is what makes the interactive parts completely skinnable: the jukebox sends "messages" to all of the components of the interface, and it's up to that component to decide whether or not to respond to a message.  Clickable interface elements send those messages as well as receive them.  Each message has an "on" and "off" version to indicate which state is being changed to, with the "off" states being represented as "negative" messages.

Here's an example: When the button mapped to Pause is pressed (or an on-screen button with an Action set to BTN_PAUSE), a message called BTN_PAUSE is sent to the interface, with a -BTN_PAUSE (negative BTN_PAUSE) sent a tenth of a second later (to represent the pressing and releasing of a button).  The jukebox itself also sees this message and pauses the playing song, sending a MSG_SONGPAUSED message to the interface.  When the Pause button is pressed again, another BTN_PAUSE is sent, with another -BTN_PAUSE sent a tenth of a second later; the jukebox resumes play and sends a -MSG_SONGPAUSED to indicate that the juke is no longer paused. So a skin can have a clickable icon mapped to BTN_PAUSE to send and respond to the key events and an icon representing a light mapped to respond to the message that the juke is actually paused.  Does this make any sense?

Adding MSG_ messages is relatively trivial, because I don't have to write a command dispatcher for them (the juke doesn't react to them, only the interface); all I have to do is decide when to send the message and whether its "off" message is timed or triggered by something in the jukebox.

So on to the issue at hand: playing a sound effect before each song. There is currently a message for a song starting, MSG_SONGSTART, that you can key a sound effect off, but it's triggered when the music actually starts.  there is a configurable delay between songs, controlled by SongDelay in jukebox.ini; there is no message for when this delay stops and starts, but adding one is easy. However, SongDelay does not trigger before the very first song played, nor does it trigger after the last song if there are no more in the queue, so it won't work for the instance of always wanting to do something before a song or after a song.  My thinking is to create a BeforeSongDelay and an AfterSongDelay that always play.  The only purpose for these, though, is to send messages for a skin to trigger sounds or animations (record change, etc.) from, so it would make sense for them to be in the skin file rather than on the global jukebox.ini level.

But not all skins are going to have delays built-in, and someone might always want a delay...

So I'm trying to think of the best way to handle this:

a) SongDelay is the minimum delay between songs.  So if a skin has a BeforeSongDelay of 1 and an AfterSongDelay of 1, and the SongDelay is set to 3, the AfterSongDelay will trigger, then a 1-second pause, then the BeforeSongDelay will trigger.  If SongDelay is the same as or shorter than the sum of the two shorter delays, there will be no delay between them at all.

b) SongDelay is the delay between the two delays. So if a skin has a BeforeSongDelay of 1 and an AfterSongDelay of 1, and the SongDelay is set to 3, the AfterSongDelay will trigger, then a 3-second pause, then the BeforeSongDelay will trigger.

c) SongDelay is a default delay and is ignored if a BeforeSongDelay or AfterSongDelay is present.  So if a skin has a BeforeSongDelay of 1 and an AfterSongDelay of 1, and the SongDelay is set to 3, the AfterSongDelay will trigger, then the BeforeSongDelay will immediately trigger with no additional delay.

d) SongDelay is a simple toggle: it can be set to Enabled or Disabled, with the actual song delay made up of the two delay entries in the skin.  If it's Disabled, not only will the delays never trigger, but neither will any events associated with them.

e) Don't worry about making a decision and add a SongDelayBehavior setting that allows the user to pick from all these options.

f) Eliminate SongDelay completely and just use the two delay settings in the skin. 


Is one of these more intuitively "correct" than the others?  I keep changing my mind as to which is the most natural...  Please post your thoughts on the subject!
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

cripto9t

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:January 31, 2008, 10:30:30 am
Re: Delays between songs: Need suggestions
« Reply #1 on: August 30, 2006, 12:31:25 pm »
I have to go with B. The before/after set in the .skn and a delay between them set in jukebox.ini.
 
[before_delay(pop hiss)] + song + [after_delay(hiss pop)]  =  record side  - song delay

E would be my second choice, but sounds like it could get confusing.
_- cripto9t -_

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Delays between songs: Need suggestions
« Reply #2 on: August 30, 2006, 01:49:06 pm »
B is certainly the easiest solution, and it was my first instinct... I was worried that the delays would be too long, though, so I came up with A... then thought of C... then it got ugly.  :D
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

JustMichael

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1438
  • Last login:September 27, 2015, 01:19:40 am
  • Mmmmm!! Cheesecake!!
Re: Delays between songs: Need suggestions
« Reply #3 on: August 30, 2006, 10:42:16 pm »
B does allow more choices for each person and skin.

LHUPA

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 59
  • Last login:September 03, 2019, 01:05:09 am
Re: Delays between songs: Need suggestions
« Reply #4 on: September 07, 2006, 03:21:29 am »
I remarked that when we select tunes (three generally) at a time, it has no delay to the first tune. The tune begin instantly as normal but between tunes, predetermined song delay is present (I use usually 9 sec.) at this time. What can we do to put on a song delay in the begining of the selection (First of three or more) once the number button entered, like between tunes?

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Delays between songs: Need suggestions
« Reply #5 on: September 07, 2006, 08:22:12 am »
I remarked that when we select tunes (three generally) at a time, it has no delay to the first tune. The tune begin instantly as normal but between tunes, predetermined song delay is present (I use usually 9 sec.) at this time. What can we do to put on a song delay in the begining of the selection (First of three or more) once the number button entered, like between tunes?
That's what I'm working on right now.. hopefully I'll have it available this week.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com