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

  

Author Topic: command line volume adjust?  (Read 1309 times)

0 Members and 1 Guest are viewing this topic.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
command line volume adjust?
« on: October 11, 2005, 05:17:54 pm »
I have been working at balancing sound levels in my cab, so that different games and different emulators, and the jukebox software, have roughly the same base volume.
I have a few PC games that don't have a volume adjust option (I think Demon Star is one of them).

Is there a command line utility that I could use to set the current master volume of your sound card to a particular level? I could then launch the PC game from a batch file that sets the volume lower before launching the game, then restores it. Ideally you would be able to query the initial volume so you don't have to hardcode anything.

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: command line volume adjust?
« Reply #1 on: October 11, 2005, 08:02:23 pm »
Slightly off topic but I have two button configured on my control panel to adjust the volume while in the Front-End, MameWAH, by using an AHK script that I wrote. I would guess you could edit the script and make it any two keys you like. That way you could use too "odd" keys (not used by the game) to adjust the volume while the game is playing. It may work. The script looks like so:

; This script assigns hotkeys of your choice to raise and lower the
; master volume.

;_________________________________________________
;________________Global Settings__________________

#NoTrayIcon
#SingleInstance force

;_________________________________________________
;________________User Settings____________________

; The percentage by which to raise or lower the volume each time:
vol_Step = 2

HotKey, m, vol_MasterUp
HotKey, n, vol_MasterDown

vol_MasterUp:
SoundSet, +%vol_Step%
return

vol_MasterDown:
SoundSet, -%vol_Step%
return



Good Luck,
John

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: command line volume adjust?
« Reply #2 on: October 11, 2005, 10:38:07 pm »
I have a volume control of my cab (an actual knowb to the speakers) but I'm trying to make all games about the same level.
I nothing else I can use AHK to change the volume and exit wihtout actually waiting for a key, so you jsut gave me a way to write my own volume adjust. I had not thought about it.

I use to use AHK a lot when it used to be AutoIt, but kind of forgot about it, but it's becoming my cab's new best friend.

pkellum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 24, 2009, 12:53:04 am
  • I want to build my own arcade controls!
Re: command line volume adjust?
« Reply #3 on: October 12, 2005, 02:58:02 am »
Have you tried VolumeLine?  It seems to do exactly what you're asking, setting the volume of any sound channel.  I've tried it a bit and it seems to work fine.  And it's free, always a good thing :)

http://glorysoft.omsk.ru/vlt_download.html

Patrick

BobbyG66

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 588
  • Last login:November 13, 2016, 11:52:09 am
  • Current project: Dodgeball
Re: command line volume adjust?
« Reply #4 on: November 07, 2005, 08:52:03 am »
Slightly off topic but I have two button configured on my control panel to adjust the volume while in the Front-End, MameWAH, by using an AHK script that I wrote. I would guess you could edit the script and make it any two keys you like. That way you could use too "odd" keys (not used by the game) to adjust the volume while the game is playing. It may work. The script looks like so:

; This script assigns hotkeys of your choice to raise and lower the
; master volume.

;_________________________________________________
;________________Global Settings__________________

#NoTrayIcon
#SingleInstance force

;_________________________________________________
;________________User Settings____________________

; The percentage by which to raise or lower the volume each time:
vol_Step = 2

HotKey, m, vol_MasterUp
HotKey, n, vol_MasterDown

vol_MasterUp:
SoundSet, +%vol_Step%
return

vol_MasterDown:
SoundSet, -%vol_Step%
return



Good Luck,
John

John,

Do you have a command to MUTE?
Half of the people you meet are below average.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: command line volume adjust?
« Reply #5 on: November 07, 2005, 10:29:48 am »
Look in the auohotkey help file, there is a mute command

BobbyG66

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 588
  • Last login:November 13, 2016, 11:52:09 am
  • Current project: Dodgeball
Re: command line volume adjust?
« Reply #6 on: November 07, 2005, 11:14:43 am »
Thanks, I am a former Autoit user.
Will check it out!
Half of the people you meet are below average.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: command line volume adjust?
« Reply #7 on: November 08, 2005, 12:18:09 am »
Is there a command line utility that I could use to set the current master volume of your sound card to a particular level? I could then launch the PC game from a batch file that sets the volume lower before launching the game, then restores it. Ideally you would be able to query the initial volume so you don't have to hardcode anything.

I liked your idea so I wrote a little program to do that. It's written so you can launch before and after a game to store/restore volume settings. You run "volume -read" before the game to store current volume, launch the game and then manually set the volume the way you want, exit the game then run "volume -write" to write the game volume settings and restore volume back to original. Now when you run the game again it will set the volume to your manual setting.  I havn't properly tested it yet so if you have any problems, just post here.

It can also store/retrieve volumes for multiple games, just use the "-file <filename>" switch with both the -read and -write switches and it will read/write a volume dat file for that game.

You could use a batch file...

Code: [Select]
@echo off
volume.exe -read -file mygame.dat
mygame.exe
volume.exe -write -file mygame.dat

You only have to manually set the volume once during the game, then it will remember forever. You can always change it again during the game and it will store the new volume.

Volume v1.0
« Last Edit: November 08, 2005, 12:31:16 am by headkaze »