Trying a MediaWiki

“Brenden” wrote in message
news:200406201032.13455.brenden at rcsis.com

Hey all, I was just reading through the Doc Project on the libSDL.org
site,
being a newbie and all.

hey all,

purely out of curiosity i tried mediawiki on my web server to see how it
might handle the sdl docs (im not suggesting i host them… don’t have
nearly enough bandwidth :). seems quite good, i put the contents in with
some pages, http://www.nickhowes.co.uk/sdldoc if you look at the Examples
section, although the contents entries are the same, the examples sections
can be kept as sections on one examples page and it automatically puts a
table of contents at the top which is pretty neat (like here
http://www.nickhowes.co.uk/sdldoc/index.php/Examples)

sorry about the domain, not trying to plug it or anything, just thought
people’d like to have a look at what mediawiki might be good for. feel free
to have a go at editing the pages. Theres a summary of the wiki markup here
http://meta.wikipedia.org/wiki/MediaWiki_User’s_Guide:_Editing_overview

it still says “SDLDoc, the free encyclopedia.” at the top, haven’t figured
out how to change that :slight_smile:

nick howes

“Nick Howes” <n.j.howes at warwick.ac.uk> wrote in message
news:cb6u2m$qfk$2 at sea.gmane.org

hey all,

purely out of curiosity i tried mediawiki on my web server to see how it
might handle the sdl docs

hmm, not sure how effective its xml export is though…

Nick Howes wrote:

purely out of curiosity i tried mediawiki on my web server to see how it
might handle the sdl docs

hmm, not sure how effective its xml export is though…

This is a point we have to check quite good before we start, because
the exported XML-file will be the base for all our other formats.

Ciao–
Marco

  • Die Revolution sagt: ich war, ich bin, ich werde sein -

Where’s Bob Pendleton? He should be chiming in here somewhere.

Marco Kraus wrote:> Nick Howes wrote:

purely out of curiosity i tried mediawiki on my web server to see how it
might handle the sdl docs

hmm, not sure how effective its xml export is though…

This is a point we have to check quite good before we start, because
the exported XML-file will be the base for all our other formats.

Ciao

as previously said xml export does export the wiki code.

so you still got all your

[[a link]]
== a header ==

in there…

i hope the phpwiki exporter is better…
and writing an exporter for wackowiki is a quite a task atm, with the
way stuff is handled now…

Marco Kraus wrote:>Nick Howes wrote:

purely out of curiosity i tried mediawiki on my web server to see how it
might handle the sdl docs

hmm, not sure how effective its xml export is though…

This is a point we have to check quite good before we start, because
the exported XML-file will be the base for all our other formats.

Ciao

Where’s Bob Pendleton? He should be chiming in here somewhere.

I took a long weekend :slight_smile: Friday was my 27th wedding anniversary,
Saturday I went to a wedding, and Sunday was Fathers Day, the one day a
year I absolutely get my children’s attention. :slight_smile:

	Bob PendletonOn Mon, 2004-06-21 at 13:35, Tyler Zesiger wrote:

Marco Kraus wrote:

Nick Howes wrote:

purely out of curiosity i tried mediawiki on my web server to see how it
might handle the sdl docs

hmm, not sure how effective its xml export is though…

This is a point we have to check quite good before we start, because
the exported XML-file will be the base for all our other formats.

Ciao


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-------------------------------------+

“Florian Hufsky” wrote in message
news:40D72D0C.6030207 at phorus.at

as previously said xml export does export the wiki code.

so you still got all your

[[a link]]
== a header ==

in there…

i hope the phpwiki exporter is better…
and writing an exporter for wackowiki is a quite a task atm, with the
way stuff is handled now…

hmm yeah … it’s a shame there’s no standard xml format for wikis. I’m sure
there are people working on just such a thing right now, its just not ready
yet :confused:

Patches for converting SDL and SDL_mixer to use surround sound are in
ftp://ling.lll.hawaii.edu/pub/greg/Surround-SDL.tgz, and now there are
some documents there, too. My latest patch for timidity, as well as
converting it to mix down to 4 or 6 channels, also adds interpretation
of midi reverberation and chorus depth (done with little extra cpu
usage).

I removed the test .wav files from the above archive, since they?re so
bulky, and put them in
ftp://ling.lll.hawaii.edu/pub/greg/Surround-SDL-testfiles.tgz, with
some additional test files.

Here is what I know about compatibility with existing applications:

With two exceptions, so far as I know, the modified SDL12 and
SDL_mixer work the same way as the original versions, when opened for
1 or 2 channel output. The two exceptions are bugs which I fixed.
Well, the first, anyway, is a bug for sure. When rate conversions up
or down by a factor of two are applied (in src/audio/SDL_audiocvt.c),
streams with different numbers of channels (that is, mono and stereo)
are treated the same way: either each sample is copied or every other
sample is omitted. This is ok for mono, but for stereo, it is frames
that should be copied or omitted, where by “frame” I mean a portion of
the stream containing one sample for each channel. (In the SDL source,
confusingly, sometimes frames are called “samples”.) So for these
rate conversions, stereo streams have to be treated differently, and
they are, in my modified version.

The other problem that might be characterized as a bug arises when
SDL_mixer is passed a multichannel chunk which does not have an inte-
gral number of frames. Due to the way the effect_position code loops
over frames, when the chunk ends with a partial frame, memory outside
the chunk buffer will be accessed. In the case of stereo, it?s possi-
ble that because malloc may give more memory than requested, this
potential problem never actually causes a segment fault. I don?t
know. For 6 channel chunks, I do know, and it does cause segment
faults.

If SDL_mixer is passed defective chunks and this causes a segment
fault, arguably, that?s not a bug in SDL_mixer. Still, whether or not
it counts as a bug, it?s easy to protect against, so why not? I added
code in mixer.c to discard any partial frame at the end of a chunk.

Then what about when SDL or SDL_mixer is opened for 4 or 6 channel
output? What happens with the parts of the current library designed
for stereo? I don?t know whether I?ve covered all the bases, but I?ve
tried:

(1) For playing 2 channel waves, or other cases where SDL knows it has
to match up a 2 channel source with a 4 or 6 channel output, I?ve
added code in SDL_audiocvt.c to make the necessary conversions.

(2) For playing midis using timidity, I?ve converted timidity to do 4
or 6 channel output, upon request.

(3) For playing mods using mikmod, I put ad hoc code in music.c to
convert the stereo output that mikmod produces to 4 or 6 channels.
Obviously it would be better to change the mikmod code to mix down
into 4 or 6 channels, but I have a hard time following the code in
mikmod, so I didn?t do that.

(3) For playing mp3s, I put ad hoc code in smpeg to copy channels in
the case when 4 or 6 channel output is needed.

(4) There seems to be no problem with .ogg files – stereo .oggs can
be up converted as .wavs are.

(5) The effect_position code in SDL_mixer is now generalized to in-
clude the cases of 4 and 6 channel streams.

I?ve done a very limited amount of compatibility testing for some of
the games using SDL I happen to have:

Vavoom (SDL sound support added by me; uses midi files and chunks run
through SDL converter to change format, frequency and
number of channels; calls Mix_SetPosition with angles
ranging 0-360 degrees).
Tested at 2, 4, 6 channels with 8 and 16 bit formats. Six
channels at 8 bits provokes an obscure memory alloca-
tion issue, but otherwise it seems to work. Game
sound effects sound good, except that sounds of
things behind the player don?t actually sound from
the rear. Ambient sounds are nice. Midis
(converted from .mus) sound great.

lbreakout2 (uses .wav files)
Without changes, still works ok.
Fixed allocatation of mixer channels and added a
sound playing procedure which calls Mix_SetPanning.
Works ok.
Changed Mix_OpenAudio to open for six channels. Now horizontal
positioning of sound isn?t very accurate, but it
works roughly.

circuslinux (uses mod files and .wav files)
Without changes, still works ok.
Changed Mix_OpenAudio to open for six channels. Still works
– sounds about the same.

mangoquest (uses mod files and .wav files)
Without changes, still works ok.
Changed Mix_OpenAudio to open for six channels. Still works
– sounds about the same, except music is louder.

viruskiller (uses mod files and .wav files)
Without changes, still works ok.
Changed Mix_OpenAudio to open for six channels (changed useAu-
dio statement in CEngline.cpp in the code). Still works –
sounds a little better. Mouse movements of the firing target
might be slightly more sluggish.

cube (uses .wav files. .mid files, a mod file)
Without changes, still works ok, I guess. I don?t know how to
play this. I didn?t see anyone around to shoot.
Changed Mix_OpenAudio to open for six channels. Still works
– sounds about the same.

u4 – Ultima 4 (uses .wav, .mid, .ogg)
Without changes, still works ok.
Changed Mix_OpenAudio to open for six channels. Still works
– sounds about the same. I only played about a minute of
this.

Greg

I added a utility program to the surround patches in

ftp://ling.lll.hawaii.edu/pub/greg/Surround-SDL.tgz

which breaks soundfonts up into GUS compatible patch
files, and a revised patch to SDL_mixer’s timidity
library lets timidity read the patches and recover
velocity layers and stereo instruments, if those were
present in the original soundfont. Velocity layers
give you different timbres, depending on how loudly
a note is played.

Why not just have timidity read soundfonts directly?
I could have done that, but the only code I have for
it is GPL’d, rather than LPGL’d, and SDL is LPGL.
Besides, having individual patch files instead of
a monolithic soundfont makes it easier to mix and
match patches to make up your own custom instrument
banks.

Even with stereo instruments, velocity layers, chorus
and reverb, the modified timidity takes only an extra
2-3% of cpu time, on my system, playing complex midi
files, and no extra time at all for simple midis.
I’ve been very careful about this. And it can be
made more economical yet, by reducing the number
of simultaneous notes that can be played, which I
have set now to 256 (pretty liberal).

Greg

Heh, the soundfont code in timidity is nice, actually. I have a 136
meg piano soundfont (yep, just one instrument) that with proper
tweaking of timidity (mainly, completely turn off reverb, the
soundfont’s sample provides their own) it sounds just like a real
piano.

However, In leu of this, I wish game authors would quit using MIDI
music altogether. It may be small, but it is not cheap* for those
who don’t have midi hardware (ie, those who use timidity, etc). I see
not having soundfont support no different than no RLE for BMPs: it
kills an already dead format.

  • Most people have far more more bandwith, harddrive space, and memory
    space now than when MIDI was popular, however, CPU time has not
    increased enough to out run programs, so timidity would eat valuable
    CPU time that is needed somewhere else; decoding MP3 or Vorbis uses
    far less CPU time, and similiar amounts of memory (depending on
    soundfont size, of course)On Thu, 01 Jul 2004 11:00:22 -1000, Greg Lee wrote:

I added a utility program to the surround patches in

ftp://ling.lll.hawaii.edu/pub/greg/Surround-SDL.tgz

which breaks soundfonts up into GUS compatible patch
files, and a revised patch to SDL_mixer’s timidity
library lets timidity read the patches and recover
velocity layers and stereo instruments, if those were
present in the original soundfont. Velocity layers
give you different timbres, depending on how loudly
a note is played.

Why not just have timidity read soundfonts directly?
I could have done that, but the only code I have for
it is GPL’d, rather than LPGL’d, and SDL is LPGL.
Besides, having individual patch files instead of
a monolithic soundfont makes it easier to mix and
match patches to make up your own custom instrument
banks.

Even with stereo instruments, velocity layers, chorus
and reverb, the modified timidity takes only an extra
2-3% of cpu time, on my system, playing complex midi
files, and no extra time at all for simple midis.
I’ve been very careful about this. And it can be
made more economical yet, by reducing the number
of simultaneous notes that can be played, which I
have set now to 256 (pretty liberal).

Greg


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Patrick “Diablo-D3” McFarland || @Patrick_McFarland
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." – Kristian Wilson, Nintendo, Inc, 1989

Patrick McFarland wrote:

Heh, the soundfont code in timidity is nice, actually. I have a 136
meg piano soundfont (yep, just one instrument) that with proper

That piano sounds interesting. I’d like to play some of my MP3
piano pieces substituting your piano. Oh, but you can’t upgrade
intruments in MP3s, can you. A pity.

tweaking of timidity (mainly, completely turn off reverb, the
soundfont’s sample provides their own) it sounds just like a real
piano.

However, In leu of this, I wish game authors would quit using MIDI
music altogether. It may be small, but it is not cheap* for those
who don’t have midi hardware (ie, those who use timidity, etc). I see
not having soundfont support no different than no RLE for BMPs: it
kills an already dead format.

  • Most people have far more more bandwith, harddrive space, and memory
    space now than when MIDI was popular, however, CPU time has not
    increased enough to out run programs, so timidity would eat valuable
    CPU time that is needed somewhere else; decoding MP3 or Vorbis uses
    far less CPU time, and similiar amounts of memory (depending on
    soundfont size, of course)

I bought a 5.1 sound system, and now I’d like to play all my MP3s
in six channels, as I can now do with my midi collection. What
can I do, Dr. CPU?

Greg

My plan is to use MIDI or some other language to
describe the sound effects in my game. The sounds
will be rendered at compile time to some compressed
sound format. This will allow me to tweak the music
and other sounds to my liking, and still have the
distributables be as small as possible. I have not
coded any of this yet.

I already to this with my graphics. My game is 2-d,
and designed to play on a lowly 486-66. All of my
images are defined using OpenGL. I use Mesa to render
my 3-d images to 2-d sprites using a custom image
format. Granted, I end up with LOTS of sprites (64
view angles for rotation, and many different zoom/size
values). However, I designed this system for run-time
speed on legacy hardware. It works quite well. The
images (and someday sounds) get placed into a tar
file, which my game mem-maps. It works great on Linux
and Win32.

Anyway, does anyone else use a system like this to
"pre-render" media such that the “source” is still in
a highly editable format? For me, the main advantage
is that I can tweak two lines of c++ code in my OpenGL
logic to affect a change. Otherwise, I’d have to edit
thousands of very small bitmaps.

As for the Surround Sound specific patches… I think
that they are great. The community is supported by
people making patches and the maintainers accepting
the good ones. I hope to see these patches included,
even if I never use the functionality. Hopefully this
thread won’t degenerate like the one about BMP files.=====
Dennis Jenkins

Dennis Jenkins wrote:

Anyway, does anyone else use a system like this to
"pre-render" media such that the “source” is still in
a highly editable format? …

Tuukka Toivonen provided a “wave” output device in his
TiMidity program which, when you play a midi, saves the
output as a .wav file, instead of sending it to the
sound driver. Probably all free-standing derivatives
of the original TiMidity retain this. (Not the SDL
library version, though.) So you can play a midi,
converting it into a .wav file, then compress this
into an .ogg files, say for example, with oggenc.

Timidity++ does have the wave output device, and it
adds ogg and flac output devices, so you can convert
a midi to a compressed sound file in one step.

Now, if you want to make surround 5.1 files from midis,
I think you’ll have to wait a week or so. I’m working
on that. I tried hacking Timidity++ to make 6 channel
.ogg files, but they sounded awful, for some reason.
But I’ll probably get it right, eventually.

Greg