Jump to content



Photo

Help with Altsound


  • Please log in to reply
4 replies to this topic

#1 MrGrynch

MrGrynch

    Enthusiast

  • Members
  • PipPipPip
  • 127 posts

  • Flag: United States of America

  • Favorite Pinball: Blood Machines, Fish Tales, Attack from Mars

Posted 26 April 2023 - 03:19 PM

I am starting to learn about altsounds, and trying to fix a game with poorly mixed sound.  I cannot find much documentation on Altsounds, so I am hoping someone here can help

 

I understand that sounds are assigned to channels, and when a sound plays on that channel, any other sound triggered on the same channel stops the previous sound.

  • How many channels are available?
  • Are there any standard channel assignments?
    • What are they?  I have heard that:
      • Background music goes to channel "0"
      • Music overlays go to channel "1"
      • FX go to blank channel
  • What happens when there is no channel assigned?
    • Is a random channel assigned?
      • If so, will it be a channel that is not currently playing a sound?
      • Is it possible for channel "0" or "1" to be chosen?

The information I've found says that the "DUCK" will reduce the volume of background music while another sound is playing

  • What constitutes "background music"?
    • Is it only background music on channel "0"?
    • Is it anything that is not  playing on the current channel?  I see many altsounds that define "background music" on channel "0", with non-zero DUCK values.  This is either incorrect, or implies that the DUCK value applies to sounds other channels
  • The range of DUCK is 0 - 100
    • Does this mean its a percentage?
      • If so, percentage of what?
        • Is it the percentage of the gain currently used for the background music?
          • How does VPinMame know the gain on the currently playing the background music?
        • Is it the percentage of gain currently playing on ANY other channel?
          • How does VPinMame know the gain on the channel playing the sounds on other channels?
        • Is it the percentage of the gain assuming 100%?
          • If the background music was playing at 50%, would setting the DUCK to 75% INCREASE the volume of the background music?

 

 

I would greatly appreciate any help you can provide!

 -G

 



#2 sdivodul

sdivodul

    Hobbyist

  • Members
  • PipPip
  • 39 posts
  • Location:NY

  • Flag: United States of America

  • Favorite Pinball: Indiana Jones PB Adventure

Posted 27 April 2023 - 02:16 PM

Some info I've read, but have not verified:

 

The ducking setting is in a config.ini file in the root folder. It looks like this:
  ducking_jingle = 10
  ducking_sfx = 80
  ducking_voice = 65
  This means that a jingle will duck the music by 90%, the sfx will duck the music by 20%
  and the voice will duck the music by 35%. Setting the voice ducking to 50 for example
  will make the ducking way more obvious and the voice should be easier to understand -
  but that's also a process that goes hand in hand with the volume and can be a lot of
  finetuning to get right.

altsound.csv file format:
- Hdr: "ID","CHANNEL","DUCK","GAIN","LOOP","STOP","NAME","FNAME"
- The only fields that need to be specified are id, name and fname, the rest can optionally
  be left empty and will be filled in with defaults.
- ID: Hex int as string "0x10e" for soundboard cmd, technical ID as it comes from the MPU.
  If the same ID is used for > 1 channel, the file played is chosen randomly. These same
  IDs must be grouped together one after another in a sequence.
- Channel 0: Background music.
  Channel 1: Short music snippets that interrupt or end the background music.
  Channels 2..15: Arbitrary. If channel fld is empty, any of these that is free is used.
  Sound effects are not assigned a channel. When played, channel is assigned randomly.
  Only 1 file in the same channel will play at a time. So when 2nd is triggered, 1st stops.
- DUCK: Reduce volume of background music when playing the sample. Range 0-100%.
- GAIN: Increase or reduce volume of the sample. Range 0-100. 50 leaves the sample volume
  as is. It's recommended to not go over 50 to avoid sample clamping/distortion.
- LOOP: Loop the sample this many times. Range 0-100. 0 = no loop, 100 = infinite loop
- STOP: 0 = don't stop music, 1 = stop music when clip triggered
- NAME: String, descriptive/internal name of the sample.
- FNAME: string, actual filepath/filename of the sample. Can contain any path prefixes if
  one likes to organize sound files in directories.

 



#3 MrGrynch

MrGrynch

    Enthusiast

  • Members
  • PipPipPip
  • 127 posts

  • Flag: United States of America

  • Favorite Pinball: Blood Machines, Fish Tales, Attack from Mars

Posted 28 April 2023 - 07:47 PM

Hi!  Thanks for the reply

 

Some info I've read, but have not verified:

 

The ducking setting is in a config.ini file in the root folder. It looks like this:
  ducking_jingle = 10
  ducking_sfx = 80
  ducking_voice = 65
  This means that a jingle will duck the music by 90%, the sfx will duck the music by 20%
  and the voice will duck the music by 35%. Setting the voice ducking to 50 for example
  will make the ducking way more obvious and the voice should be easier to understand -
  but that's also a process that goes hand in hand with the volume and can be a lot of
  finetuning to get right.

 

I cannot find anything that even remotely looks like what you're describing above.  I've searched for the files, as well as an internal search for those terms.... nothing

 

Some info I've read, but have not verified:

 

The ducking setting is in a config.ini file in the root folder. It looks like this:
  ducking_jingle = 10
  ducking_sfx = 80
  ducking_voice = 65
  This means that a jingle will duck the music by 90%, the sfx will duck the music by 20%
  and the voice will duck the music by 35%. Setting the voice ducking to 50 for example
  will make the ducking way more obvious and the voice should be easier to understand -
  but that's also a process that goes hand in hand with the volume and can be a lot of
  finetuning to get right.

altsound.csv file format:
- Hdr: "ID","CHANNEL","DUCK","GAIN","LOOP","STOP","NAME","FNAME"
- The only fields that need to be specified are id, name and fname, the rest can optionally
  be left empty and will be filled in with defaults.
- ID: Hex int as string "0x10e" for soundboard cmd, technical ID as it comes from the MPU.
  If the same ID is used for > 1 channel, the file played is chosen randomly. These same
  IDs must be grouped together one after another in a sequence.
- Channel 0: Background music.
  Channel 1: Short music snippets that interrupt or end the background music.
  Channels 2..15: Arbitrary. If channel fld is empty, any of these that is free is used.

 

That description isn't quite right.  If a sound is playing on channel 1, it doesn't interrupt the background music.  It will play over it, which is why you want to apply a ducking value to allow the overlay to "punch through".  You can specify the STOP field, which will stop the background music, but you have to explicitly say so

 

Playing around with this some more, it seems the duck value does only apply to sounds on channel 0, which means there is no point in assigning a duck value to the files playing on channel 0.  It wont affect sound on channels 1-15, and can't affect other sounds playing on 0 because it will stop if another is played on the same channel.  I haven't confirmed this 100% because I seem to have run into another issue with the altsound and table I am working on.  I'll post here as I figure out more.

 

Thanks again!

 -G



#4 sdivodul

sdivodul

    Hobbyist

  • Members
  • PipPip
  • 39 posts
  • Location:NY

  • Flag: United States of America

  • Favorite Pinball: Indiana Jones PB Adventure

Posted 29 April 2023 - 02:56 PM

I cannot find anything that even remotely looks like what you're describing above.  I've searched for the files, as well as an internal search for those terms.... nothing

 

 

Best place to look would be the VPinMame source code, I guess. Search it for "config.ini" and see if anything turns up.



#5 MrGrynch

MrGrynch

    Enthusiast

  • Members
  • PipPipPip
  • 127 posts

  • Flag: United States of America

  • Favorite Pinball: Blood Machines, Fish Tales, Attack from Mars

Posted 01 May 2023 - 08:09 PM

 

I cannot find anything that even remotely looks like what you're describing above.  I've searched for the files, as well as an internal search for those terms.... nothing

 

 

Best place to look would be the VPinMame source code, I guess. Search it for "config.ini" and see if anything turns up.

 

 

Yup!  I see what the deal is now.  There used to be another format for altsound that used directory structures instead of CSV.  That format needed .txt files with ducking values supplied.  It also had predefined ducking values:

 

  - path_jingle (0) = 10 (default ducking value)
  - path_music (1) = <default>
  - path_sfx (2) = 80
  - path_single: (3) = 10
  - path_voice (4) = 65
 
The CSV format doesnt seem to support all of these types, only 0, 1 and and those default values are not used.
 
Thanks!
 -G