PDA

View Full Version : Proper sound control


Robin
05-12-2008, 09:43 AM
snd = new Sound("jfbepop.mid");
snd.play(0,3000); // play from 0 to 3 seconds
snd.volume = 0.5; // 50% volume


Would be good if the Sound object actually did anything imho. Plus I kinda need this for GK so if you don't mind Stefan?

zokemon
05-12-2008, 12:08 PM
Sound object type, you mean? ;)
In your example, the objects are snd and jfbepop.mid.

Robin
05-12-2008, 12:47 PM
Actually in my example, Sound is a class, with the constructor param "jfbebop.mid" and snd is an instance of the Sound class. So technically the only object 'round here is snd :P

Ah wishful thinking x-x

zokemon
05-12-2008, 08:09 PM
Actually in my example, Sound is a class, with the constructor param "jfbebop.mid" and snd is an instance of the Sound class. So technically the only object 'round here is snd :P

Ah wishful thinking x-x

This is GS2, not some other programming language that you may be thinking. Sound is an object type and snd and jfbebop.mid are objects.

Admins
05-12-2008, 08:18 PM
There is a Sound object type, but for compatibility with flash scripts only (its not doing anything right now). You should use play2(soundfile, x, y, volume)

Tigairius
05-12-2008, 08:22 PM
I don't think he needs to change the x/y of the song, he wants to start at a certain point in the song, like 1 minute into the song.

Robin
05-12-2008, 10:15 PM
Yes I'd like to play from an index of the sound file.

Infact I have already asked for this four years ago x.x

cbk1994
05-12-2008, 11:58 PM
People have requested this before.

This would be awesome (for example, have a way to download songs from a web server before playing them, and then be notified when done, then be able to control (would allow DDR for Graal, etc)

DustyPorViva
05-13-2008, 12:16 AM
I would love more sound functionality in Graal in any shape or form.