Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old April 14, 2020, 18:11   #1
anselmus
Rookie
 
Join Date: Apr 2020
Location: south spain
Posts: 13
anselmus is on a distinguished road
Frogcomposband: sound?

I have been trying, with no luck, several days to enable sound on Frogcomposband. If I compile Frogcomposband (7.1 or 7.0) from sources with linux (with no "visible" errors), just no option for enable sound inside game menu ('='): gcu, curses or x11: it's the same. And I can't find any config file (neither with grep -rin 'sound') for enable it. If I launch the precompiled Windows version of the game, I can enable 'sound' option (not from x11 GUI, only from config file), but anyway the sound is not working. I've been trying with different sound.cfg setups (on lib/xtra/sound/sound.cfg) and different .wav compressions, but, again, with no luck.

Can someone give me any clue?
For get working sounds on linux, preferably.

I'm very interested fixing this: as an ascii game lover, and as sound-textures lover, I think that ambient & fx sounds are about 80% of the inmersion, and I have a big sound library of sounds for roguelikes waiting for Frogcomposband!! XD

Thanks you very much in advance.
anselmus is offline   Reply With Quote
Old April 14, 2020, 18:57   #2
Sideways
Knight
 
Join Date: Nov 2008
Posts: 686
Sideways is on a distinguished road
Quote:
Originally Posted by anselmus View Post
I have been trying, with no luck, several days to enable sound on Frogcomposband. If I compile Frogcomposband (7.1 or 7.0) from sources with linux (with no "visible" errors), just no option for enable sound inside game menu ('='): gcu, curses or x11: it's the same. And I can't find any config file (neither with grep -rin 'sound') for enable it. If I launch the precompiled Windows version of the game, I can enable 'sound' option (not from x11 GUI, only from config file), but anyway the sound is not working. I've been trying with different sound.cfg setups (on lib/xtra/sound/sound.cfg) and different .wav compressions, but, again, with no luck.

Can someone give me any clue?
For get working sounds on linux, preferably.

I'm very interested fixing this: as an ascii game lover, and as sound-textures lover, I think that ambient & fx sounds are about 80% of the inmersion, and I have a big sound library of sounds for roguelikes waiting for Frogcomposband!! XD

Thanks you very much in advance.
You are the second player in the last few days, and also the second in the last few years, to ask about the sounds Are sounds the latest in thing?

The only sound in the game "as is" is an audible error bell which you can turn on in the disturbance options, there are no other sounds. However, the game can theoretically support a large variety of other sounds, it's just that there are no actual sound files and USE_SOUND is commented out in the source code.

What you should be able to do is get the FrogComposband source (any version, but the latest dev version on github is the most up-to-date), locate the bit in z-config.h where "#define USE_SOUND" is commented out, move it out of the comment, recompile, then add your own .wav files and map them to game events in sound.cfg. (As you can probably guess, this hasn't been tested very extensively... but it ought to not break the game.)
__________________
The Complainer worries about the lack of activity here these days.
Sideways is offline   Reply With Quote
Old April 15, 2020, 19:39   #3
anselmus
Rookie
 
Join Date: Apr 2020
Location: south spain
Posts: 13
anselmus is on a distinguished road
Quote:
Originally Posted by Sideways View Post
You are the second player in the last few days, and also the second in the last few years, to ask about the sounds Are sounds the latest in thing?

The only sound in the game "as is" is an audible error bell which you can turn on in the disturbance options, there are no other sounds. However, the game can theoretically support a large variety of other sounds, it's just that there are no actual sound files and USE_SOUND is commented out in the source code.

What you should be able to do is get the FrogComposband source (any version, but the latest dev version on github is the most up-to-date), locate the bit in z-config.h where "#define USE_SOUND" is commented out, move it out of the comment, recompile, then add your own .wav files and map them to game events in sound.cfg. (As you can probably guess, this hasn't been tested very extensively... but it ought to not break the game.)

Thanks a lot, Sideways.

About make the sound work on Frogcomposband:

maybe I'm doing something wrong: I have tried commenting out 'define USE_SOUND' but it seems does not work (no errors output when 'make'). Looking the source files (stating that my programming skills are very basic) and doing some test (by trial/error method) I've noticed some ¿strange things?: Frogcomposband (v. 7.0 and 7.1 at least) has very similar code than Poschengband v7.2.1, but there are some differences on the use of 'use_sound' term that might be in relation with this question. If I do a search with 'grep' command for 'use_sound', I have the same results with Frogcomposband code and Poschengband code (the term 'use_sound' appears on same files and is commented by default in the same lines), but, in Poschengband case, grep says that 'use_sound' is present on some binary files and in Frogcomposband case not: specificaly, 'use_sound' appears (in Poschengband 7.1), in 'main-x11.o', 'poschengband.exe', 'util.o', 'variable.o', and 'main-gcu.o', but in Frogcomposband, in these files is not present 'use_sound'. Sounds works with Poschengband v.7.2.1, on Windows version at least, but I'm not able to make it work when I compile Linux version. I guess sound it's possible to make it work on Linux because on most vanilla versions of Angband it is working. I've check the dependencies, but my system seems to have installed all of them. I'm pretty sure that I'm leaving out something obvious, but I don't know what!

Any clues?

About the interest of sounds themself (and specially for ascii games):

In short: I think/feel that "hearing" it's "touching" in no different meaning than touching "with hands". It depends, obviously, on the fidelity/quality of the sounds sources/medias. Graphics are less important, in my opinion, for this: the interest about ascii graphics is that, when you start seeing things, not the symbols of things, you have a very wide range for feel/imagine (automatically; I mean: subconscious) the surrounding world of the game, but, in the other hand, this range is too wide in terms of immersion. So, yes: I think/feel that reasonable quality sounds + ascii graphics it's "the latest in things"!! XD (at least "the latest in videogame things"). Less abstract graphics than ascii are better for a fast immersion (they are symbols too, but more "usual", so better for selling huge copies of the same old crap), but these kind of graphics narrow the range for feel/imagine worlds too much, and good quality sounds can't do nothing to counter it (it's more difficult expand limits than cut them). It's an opinion, just my experience. Anyway, if you try Cataclysm DDA, for example, with ascii and a decent soundpack, it's brutal: very hard to forget the impression of this experience.
anselmus is offline   Reply With Quote
Old April 15, 2020, 19:48   #4
Sideways
Knight
 
Join Date: Nov 2008
Posts: 686
Sideways is on a distinguished road
"#define USE_SOUND" is already commented out. You have to make it not be commented out - remove the /* and */ around #define USE_SOUND in z-config.h, then compile. (PosChengband 7.2.1 has made this exact change, that's the reason you're seeing different behavior there.)
__________________
The Complainer worries about the lack of activity here these days.

Last edited by Sideways; April 15, 2020 at 20:02.
Sideways is offline   Reply With Quote
Old April 15, 2020, 20:19   #5
anselmus
Rookie
 
Join Date: Apr 2020
Location: south spain
Posts: 13
anselmus is on a distinguished road
Quote:
Originally Posted by Sideways View Post
"#define USE_SOUND" is already commented out. You have to make it not be commented out - remove the /* and */ around #define USE_SOUND in z-config.h, then compile. (PosChengband 7.2.1 has made this exact change, that's the reason you're seeing different behavior there.)
Yes, sorry, this is what I'm doing. Removing the /* and */ around. Like this:

...

#ifdef USE_SPECIAL

/*
* OPTION: Allow the use of "sound" in various places.
*/
#define USE_SOUND

/*
* OPTION: Allow the use of "graphics" in various places
*/
#define USE_GRAPHICS

...

Edit: Oh, another thing: I don't know if it's relevant, but differences I noticed between *.o files on Frogcomposband and PosChengband are checked before compile process

Last edited by anselmus; April 15, 2020 at 20:28.
anselmus is offline   Reply With Quote
Old April 15, 2020, 20:40   #6
Sideways
Knight
 
Join Date: Nov 2008
Posts: 686
Sideways is on a distinguished road
The .o files are created when you compile, of course there are 1000s of differences between FrogComposband and PosChengband, but the ones that concern use_sound specifically will disappear after you (successfully) compile with USE_SOUND defined in z-config.h. (If they don't, that means the compile itself was flawed, try compiling with "make clean" or manually delete all .o files before compiling.)
__________________
The Complainer worries about the lack of activity here these days.
Sideways is offline   Reply With Quote
Old April 15, 2020, 21:23   #7
anselmus
Rookie
 
Join Date: Apr 2020
Location: south spain
Posts: 13
anselmus is on a distinguished road
Quote:
Originally Posted by Sideways View Post
The .o files are created when you compile, of course there are 1000s of differences between FrogComposband and PosChengband, but the ones that concern use_sound specifically will disappear after you (successfully) compile with USE_SOUND defined in z-config.h. (If they don't, that means the compile itself was flawed, try compiling with "make clean" or manually delete all .o files before compiling.)
My mistake: yes, .o files that I checked were made after compiling.

Now: I try with 'make clean' but it's the same. But I noticed something new: if I launch the game with './frogcomposband -v', there is an ouput on the terminal each time the game should trigger a sound:

sh: 1: ./playwave.sh: not found

Maybe I'm doing something wrong on compile process (or maybe have I to define something like default paths somewhere?). I'm following this steps:
$ sh ./autogen.sh
$ ./configure --with-no-install [I've tried with --enable-sdl-mixer too]
$ make

and then I launch the game from /src folder with

$ ./frogcomposband -mgcu [or -mx11]
anselmus is offline   Reply With Quote
Old April 15, 2020, 23:19   #8
Sideways
Knight
 
Join Date: Nov 2008
Posts: 686
Sideways is on a distinguished road
That sounds like an X11-specific problem, I can see what the problem is (it's telling the system to run a non-existent shell script) and the solution presumably involves fixing its nonexistence, unfortunately I'm a fake programmer who don't speak .sh. How do you normally play .wav files from the command line?

My instinct is that a playwave.sh that looked about like this should work:

Code:
#!/bin/sh

if [ "$1" != "" ]; then
aplay $1
fi
But we probably have dozens of people here who know how it's actually done, hopefully this horror-movie script will induce some input from them.
__________________
The Complainer worries about the lack of activity here these days.
Sideways is offline   Reply With Quote
Old April 16, 2020, 01:05   #9
backwardsEric
Apprentice
 
Join Date: Aug 2019
Posts: 92
backwardsEric is on a distinguished road
Sideways' script looks pretty good. I'd use

Code:
#!/bin/sh

if test X"$1" != X ; then
    exec aplay "$1"
fi
exit 1
Put that in playwave.sh in the same directory as the frogcomposband executable and run

Code:
chmod a+x playwave.sh
on it to make it executable.

Last edited by backwardsEric; April 16, 2020 at 03:05. Reason: typo; text instead of intended test
backwardsEric is offline   Reply With Quote
Old April 16, 2020, 01:09   #10
anselmus
Rookie
 
Join Date: Apr 2020
Location: south spain
Posts: 13
anselmus is on a distinguished road
Quote:
Originally Posted by Sideways View Post
That sounds like an X11-specific problem, I can see what the problem is (it's telling the system to run a non-existent shell script) and the solution presumably involves fixing its nonexistence, unfortunately I'm a fake programmer who don't speak .sh. How do you normally play .wav files from the command line?

My instinct is that a playwave.sh that looked about like this should work:

Code:
#!/bin/sh

if [ "$1" != "" ]; then
aplay $1
fi
But we probably have dozens of people here who know how it's actually done, hopefully this horror-movie script will induce some input from them.
Thanks you very much for your time, Sideways. Your horror-movie script is magic! Works!

I usually play wav files from terminal with 'play' command (from 'sox' package), but the script works with 'aplay' too.

For gcu the game calls to gcusound.sh, so I've done two scripts, gcusound.sh and playwave.sh with your entry.

However, this "script method" has a drawback: graphics are refreshed at the end of the sound, not at the beginning: I mean: when my @ open's a door, I can hear the sound but the door doesn't open until the sound is over, so the animations looks with delay.

Maybe you have another horror-movie instinct to fix this... Anyways, I'll do some research. Thanks again.
anselmus is offline   Reply With Quote
Reply

Tags
frogcomposband, sound


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FrogComposband 7.0.peppermint Sideways Variants 151 June 29, 2020 02:06
Regarding Devicemasters (Frogcomposband) Nonary Variants 2 March 16, 2020 09:29
Frogcomposband Help Needed. Nonary Variants 11 October 29, 2019 19:40
frogcomposband frogcomposband: Angband needs an 80x24 'curses' scre poschengbandplayer Variants 2 August 19, 2019 16:13
FrogComposband 7.0.strawberry Sideways Variants 40 April 18, 2018 08:27


All times are GMT +1. The time now is 02:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.