[Vorbis] Newbie seeking directions
Filippo Rusconi
rusconi at mnhn.fr
Fri Oct 1 13:37:17 PDT 2004
Hello everybody,
I'm developing the www.polyxmass.org (GNU polyxmass) program that is a
polymer sequence editor (a polymer is a thread made of concatenated
monomers).
I would like to code a "self-speak-out" feature for that sequence
editor: the user would select a sequence region and ask that the
program would "dictate" the sequence.
For example, the following could be a DNA sequence:
"ATGCTTCTGGGCTTGCG".
The user can define that:
- for monomer letter 'A', the ogg sound file "adenine.ogg" should be
used to vocalize it;
- for monomer 'G', the sound file "guanine.ogg" should be used, and so
on...
Now, this is how the program could vocalize the sequence
"ATGCTTCTGGGCTTGCG":
0. Let the user define an output file (ogg file) where all the sounds
are sent to (say "gene.ogg");
1. Prepare all the sounds: for each __different__ monomer in the
polymer ('A', 'T', 'G', 'C'), read its corresponding ogg file
(adenine.ogg for 'A'... see above) and put the contents of that ogg
file into an allocated char * string in memory;
2. Now that all the monomers in the sequence have their corresponding
sound data in allocated gchar * strings, we can parse the sequence
and for each parsed monomer fwrite () the contents of the
corresponding ogg sound gchar * string to the gene.ogg file (see
0).
3. At the end of the parsing of the sequence, we'll have a "gene.ogg"
file that is acutally a concatenation of the contents of the sound
files corresponding to the sequence "ATGCTTCTGGGCTTGCG".
Note that, to ease the "self-speak" hearing, the user might configure
the system to intercalate "silent sound" ("silent sound" file created
using the Audacity utility) between the contents of monomer sounds.
Basically this should work because I've read in a number of places
that ogg files are "concatenable"...
However, I have noticed this using ogginfo on the gene.ogg file:
New logical stream (#4, serial: 2553ab11): type vorbis
Vorbis headers parsed for stream 4, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20030909 (1.0.1)
Channels: 1
Rate: 44100
Nominal bitrate: 96.001000 kb/s
Upper bitrate not set
Lower bitrate not set
Vorbis stream 4:
Total data length: 10644 bytes
Playback length: 0m:01.011s
Average bitrate: 84.206821 kbps
Logical stream 4 ended
~~~~~~~~~~~ piece of interest below ~~~~~~~~~~~~~~~
Warning: illegally placed page(s) for logical stream 3
This indicates a corrupt ogg file: Page found for stream after EOS flag.
Warning: sequence number gap in stream 3. Got page 1 when expecting
page 6.
Indicates missing data.
New logical stream (#5, serial: 70c4bd08): type vorbis
Vorbis headers parsed for stream 5, information follows...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It seems that the concatenation of by-themselves-correct files does
not always succeed.
Can somebody point me to some example of such concatenation of many
in-memory gchar * ogg data into a single ogg file ?
Sorry for this long message,
Thank you for your kind help,
Filippo
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20041001/70557067/attachment.pgp
More information about the Vorbis
mailing list