Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Confused about changing the volume of sounds

Author
Message
NoUJoe
11
Years of Service
User Offline
Joined: 8th Jul 2013
Location:
Posted: 13th Jul 2013 02:42
I'm reading Hands On AppGameKit BASIC and a property of the PlaySound() function is "ivol", which can be anywhere from 0 to 100 and sets the volume of the sound. Makes sense. But then a bit further down, the book states

"Although the volume of a specific sound is set when that sound is first loaded and cannot be adjusted later, the overall system volume can be adjusted at any time using the SetSoundSystemVolume() statement"

"cannot be adjusted later," confused.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th Jul 2013 07:25
The sound volume is for that specific file. The system volume changes the level of all sounds and music.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
haliop
User Banned
Posted: 13th Jul 2013 08:54
but jim what he askes is can it be changed in real time or just once?

Tone Dialer
Valued Member
19
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 13th Jul 2013 08:56 Edited at: 13th Jul 2013 21:13
@NoUJoe

Check out the 'fixed' list for 108b15

Quote: "- Fixed crash on some Android devices that try to send the app to the background
before it is initialised
- Fixed crash on Ouya when too many input events are received
- Fixed crash on Ouya when sending the app to and from the background
- For those people compiling apps with the Android NDK please go to the
AGK\IDE\platform\android\Source folder and view the readme file about updating an NDK file
- Fixed Ouya controllers not working with the joystick commands
- Removed Ouya key codes as they are now accessed through the joystick commands
- Fixed possible crash when using CreateImageFromMemblock every frame.
- Set SetImageSavePixels to default to 0 as it reduced performance when doing
frequent image updates and performance gain in general was negligible
- Fixed built in point light shaders on Samsung Galaxy S3 and other Mali-400 devices
- Fixed GetMemblockPtr removing the memblock ID from the memblock
- Fixed SetMusicFileVolume not updating the volume whilst the file is playing
- Added lite versions of the iOS and Android projects that don't include Facebook, Twitter, or Push Notifications. They are available in the IDE/apps folder
"


Edit: Oops.. I see this thread is about sound files, there is currently no command SetSoundFileVolume, hopefully AGKv2 will address this.

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th Jul 2013 09:23
That does not affect sounds - only music.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 18th Jul 2013 22:47
the volume of a sound, is embedded in the sound file, and you should adjust the volume so that it fits with the other sounds in the application, using a wav editor program. Then when everything is right, you use the volum commands in AppGameKit to adjust the overall volume the speakers produce. Everything is relative, so make sure they are equal in relation to each others.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
MTC Music
19
Years of Service
User Offline
Joined: 11th Sep 2005
Location: Montreal
Posted: 24th Jul 2013 17:22
Hi,

I've not yet started working with AppGameKit, but I'm very interested in doing so. I would like to know if there is a function in the language that permits frequency recognition from a steady pitch (like you would use if programming an instrument tuner)? I'd like to know if, using AppGameKit, I could create programs that allow for audio input from a mic to be analyzed and identified with a frequency value (ex: I sing an A, it returns a velue of 440hz).

Thanks for any help or comments on this

www.tomansuini.com
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Jul 2013 17:37 Edited at: 24th Jul 2013 17:47
@MTC Music
no,but here are all commands:
http://www.appgamekit.com/documentation/commands.html

direct access to hardware is a problem with privacy.
because this there is a os interface between.

maybe the memblocks commands will be expand that you have
access to the wave data in future.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 24th Jul 2013 17:37
MTC Music - that's fairly easy in C++ or Pascal, but I don't see TGC building Fourier Transforms into the core engine or Basic any time this century.

If you can sing a perfect 440Hz A I'll buy you lunch!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
MTC Music
19
Years of Service
User Offline
Joined: 11th Sep 2005
Location: Montreal
Posted: 25th Jul 2013 15:37
@JimHawkins : thanks for the reply. I thought it was too much to ask for the Basic language interpreter. No, I can't sing a perfect A, but I'm trying to program an instrumental intonation software for my wind students to help them practice and develop their musical ear; something like a chromatic tuner, but with more features.

Thanks again for the information

www.tomansuini.com

Login to post a reply

Server time is: 2024-11-24 18:22:26
Your offset time is: 2024-11-24 18:22:26