Sound Support in release 1.5.0

The place to discuss creating, porting and modifying Celestia's source code.
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 8 months
Location: Nancy, France

Post #21by Vincent » 31.08.2007, 08:59

dirkpitt wrote:Hooks are great in principle, but I personally have had to field dozens of questions about Celestia supposedly malfunctioning, when in fact it was an issue caused by the (beta) Lua edu tools hooks and this is probably what Fridger is warning against. BTW, since the Lua tools are in beta problems are to be expected but it does highlight the fact that bugs in hooks may appear to be indistinguishable from bugs in Celestia itself.

Please keep in mind that there's a difference between the Lua Edu Tools, that are an addon for Celestia, and that can be easily disabled like any other addon, and the Lua Hook, which is part of the Celestia code. As we (too) often recommend to new users, all addons must be disabled before tracking a bug. Beside all that, I'm not aware of such dozens of problems caused by the Lua Edu Tools. Testers have found some bugs during the testing phase, but I think we all agree that this is a common step in the development of an addon. The last version is now stable.

Then, if you're talking about the single bug reported by Martin (Cham), nobody else has been able to reproduce it. I've submitted this issue to Hank, since it may be a bug in the Lua Hook code, not in the Lua Edu Tools.

Anyway, this is the only single bug that is still causing one single problem on one single user sytem :wink:. For all these reasons, I find your judgment on the Lua Hook and the Lua Edu Tools a bit severe.
Last edited by Vincent on 31.08.2007, 09:22, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #22by t00fri » 31.08.2007, 09:18

BTW: Vincent,

my warnings were not specific to problems related to YOUR work. My point was way more general, addressing forthcoming problems with unexperienced users starting to compile their custom-code versions without understanding a THING about how this works...

Bye Fridger
Image

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #23by Fenerit » 31.08.2007, 13:08

Can someone one explain better why the sound in Celestia may be a good thing which it can't be done with other, specific, programs? I do not have problem to load celestia and my player altogether. Simply add the low priority system to the player and use DirectX output while Celestia run in OpenGL. And this on a 750 Duron. For what concern the synchronization, the most simple operation is to press the shortcut's key to the play command slightly before runs the Celestia's scripts. Perhaps I'm an analogue yet?
Never at rest.
Massimo

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #24by t00fri » 31.08.2007, 13:57

Fenerit wrote:Can someone one explain better why the sound in Celestia may be a good thing which it can't be done with other, specific, programs? I do not have problem to load celestia and my player altogether. Simply add the low priority system to the player and use DirectX output while Celestia run in OpenGL. And this on a 750 Duron. For what concern the synchronization, the most simple operation is to press the shortcut's key to the play command slightly before runs the Celestia's scripts. Perhaps I'm an analogue yet?


My saying since a long long time ;-) . Yet the advocates of sound argue (correctly) that they might want to play a narrator's voice in some educational context that should be synced with the displayed images, of course.

Bye Fridger
Image

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #25by Fenerit » 31.08.2007, 14:29

Oh, well... Then Celestia need to add a multitracks feature such compressors, delays, choruses and reverbs? :P I think that when a script run and the speaker record his voice over it with a simple record program, after finished the sequence the sound is pratically synchronized. With difficult the script's text run too fast for not having the adeguate calm to record whatever discourse.
Never at rest.
Massimo

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #26by t00fri » 31.08.2007, 15:57

LordFerret wrote:Not that I've tried it (I don't have Lua installed), but can't you do something with Lua's "os.execute" command to shell out and play a sound file? Like in WinXP for example - os.execute (wmplayer c:\i386\ding.wav)

The problem I see with wmplayer (Windows Media Player) however, is that when it starts it opens on top, and there are no command line switches to force it to run minimized - I've checked. The same with mplayer2. But perhaps there are other players which have such a command line switch that could be used instead?

By no means do I expect this convention to work cross-platform being defined in a script... I only suggest it as something a user might want to set up for their own use.


No, no the latest MS media player version 11 can even be embedded into your taskbar! It can also be clicked into quite small "compact mode". There is also a neat free cross-platform player: VLC media player. It's also small yet quite good.

Bye Fridger
Image

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #27by Fenerit » 31.08.2007, 16:43

t00fri wrote:
LordFerret wrote:Not that I've tried it (I don't have Lua installed), but can't you do something with Lua's "os.execute" command to shell out and play a sound file? Like in WinXP for example - os.execute (wmplayer c:\i386\ding.wav)

The problem I see with wmplayer (Windows Media Player) however, is that when it starts it opens on top, and there are no command line switches to force it to run minimized - I've checked. The same with mplayer2. But perhaps there are other players which have such a command line switch that could be used instead?

By no means do I expect this convention to work cross-platform being defined in a script... I only suggest it as something a user might want to set up for their own use.

No, no the latest MS media player version 11 can even be embedded into your taskbar! It can also be clicked into quite small "compact mode". There is also a neat free cross-platform player: VLC media player. It's also small yet quite good.

Bye Fridger


Winamp for example can be tricked in several manner: by systray, shortcuts, taskbar, dockbar, system metering, etc.
Never at rest.
Massimo

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #28by Fenerit » 31.08.2007, 18:05

Vincent, I do not know the Lua routines as you, of course, but that command of which LordFerret has spoke ("os.execute"), in the case would allow the launch of the playlist files it could resolve the problem; since the playlists usually are associates with the respective players.
Never at rest.
Massimo

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 8 months
Location: Nancy, France

Post #29by Vincent » 01.09.2007, 07:49

Fenerit wrote:Vincent, I do not know the Lua routines as you, of course, but that command of which LordFerret has spoke ("os.execute"), in the case would allow the launch of the playlist files it could resolve the problem; since the playlists usually are associates with the respective players.

I'm not pushing for including sound support to Celestia scripts here, but simply trying to show that it deserves to be discussed. Personally, I could see two major advantages in integrating sound support to Celestia via Lua rather than using a media player:

1- Mutlitracks playback: the OpenAl sound library can play up to 8 sound tracks at the same time. This allows to add real comments by astronauts ("That's one small step for man,...), or real sounds (spoutnik sound signal) to the narrator's voice. Please, note that I'm not talking here about laser guns or alien voices, but about real historical sound recordings.
As for compressors and other effects racks, I prefer to use them during my sound recording sessions, or my live concert sonorizations... :wink:

2- Synchronization facilities: sound playback from an independant media player can hardly be in sync with a script in Celestia, even using commands like 'os.execute'. BTW, this command simply doesn't work in celx script (You have to use the Lua Hook :wink:) . Moreover, you won't be able to pause the sound playback and the Celestia script at the same time during classes or conferences.

As an example, sound playback has been available in Stellarium scripts for quite a long time... :wink:
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #30by Fenerit » 01.09.2007, 14:32

Tx for the further delucidations about of what Celestia sound account for.
Never at rest.
Massimo

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 1 month
Location: NJ USA

Post #31by LordFerret » 02.09.2007, 04:14

Oh boy. :oops:

After making that post I realized that os.execute was not amoung the commands readily available to Celestia... so I quickly deleted it being it didn't apply (not fast enough apparently). :oops: Sorry.
BTW, this command simply doesn't work in celx script (You have to use the Lua Hook ) .

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 19 years 11 months

Post #32by dirkpitt » 02.09.2007, 09:43

Vincent wrote:Then, if you're talking about the single bug reported by Martin (Cham), nobody else has been able to reproduce it. I've submitted this issue to Hank, since it may be a bug in the Lua Hook code, not in the Lua Edu Tools.

Anyway, this is the only single bug that is still causing one single problem on one single user sytem :wink:. For all these reasons, I find your judgment on the Lua Hook and the Lua Edu Tools a bit severe.


Sorry Vincent, I didn't mean to create the illusion that Lua Edu Tools is some kind of threat to Celestia development..

However to set the record straight, there has been more than 1 bug that was ultimately traced back to Lua Edu Tools.. at one time, the "8" key wasn't working, another issue caused dragging of split screen separators to stop working, and more recently there was a crashing issue that appeared to be occurring somewhere in the Edu Tools.

These are entirely different from the usual issues caused by simple addons! For example, the "8" key issue had me wondering whether there was a bug in my recent multibyte keyboard input code.

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 8 months
Location: Nancy, France

Post #33by Vincent » 02.09.2007, 10:51

LordFerret wrote:Oh boy. :oops:

After making that post I realized that os.execute was not amoung the commands readily available to Celestia... so I quickly deleted it being it didn't apply (not fast enough apparently). :oops: Sorry.
BTW, this command simply doesn't work in celx script (You have to use the Lua Hook ) .
LordFerret,

Indeed, celx scripting doesn't offer all the Lua capabilities. That shows again how the Lua Hook improved the scripting possibilities in Celestia. :)

dirkpitt wrote:Sorry Vincent, I didn't mean to create the illusion that Lua Edu Tools is some kind of threat to Celestia development..
DW,

Good ! I wouldn't like to be torn between working hard to improve the scripting possibilities of Celestia and having the feeling to disturb the main development of Celestia.

dirkpitt wrote:However to set the record straight, there has been more than 1 bug that was ultimately traced back to Lua Edu Tools.. at one time, the "8" key wasn't working, another issue caused dragging of split screen separators to stop working, and more recently there was a crashing issue that appeared to be occurring somewhere in the Edu Tools.
OK, pointing out these 3 issues is more reasonnable than talking about dozens of bugs... :wink:

dirkpitt wrote:These are entirely different from the usual issues caused by simple addons! For example, the "8" key issue had me wondering whether there was a bug in my recent multibyte keyboard input code.

I don't entirely agree here. The "8" key bug was caused by a one line error in a function that uses Chris' new key handler for Celestia 1.5. This bug could have happened with any other celx script that would have contained the same error. Once again, the Lua Tools are nothing else than an addon, and thus should be simply disabled during a debugging session.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 19 years 11 months

Post #34by dirkpitt » 02.09.2007, 11:56

Vincent wrote:I don't entirely agree here. The "8" key bug was caused by a one line error in a function that uses Chris' new key handler for Celestia 1.5. This bug could have happened with any other celx script that would have contained the same error.


That's true. What I'm saying is not limited to the Edu Tools, but hooks in general (since the only major hooks addon at the moment is Edu Tools, I was using it as an example - sorry if it sounded like finger-pointing).

The "8" key issue illustrates that the kinds of bugs caused by hooks may sometimes appear to be very similar to bugs in Celestia itself, because hooks "hook in" at a much lower level than simple model+texture+ssc addons. Of course, I completely agree that users should disable addons before reporting bugs. Cham of course knows this by now I'm sure.. :wink:


Return to “Development”