Hello,
I have uploaded some change sets to the update stream (#1230, #1231) for Ogg Vorbis and Speex sound codec support. It allows you to compress sound data efficiently, and it would be easy to make tutorial project with voice guidance.
- Recoding a voice with codec using Sound Recorder in parts bin. - Making a tile from the recoeded voice, and saving as a .pr file. - Playback .ogg / .spx music from File List.
I will apply the Event Theatre soon.
However, you need a plugin file to test this feature. Please download and try it.
http://tinlizzie.org/olpc/OggPlugin/OggPlugin.linux.tgz for OLPC machine and linux.
http://tinlizzie.org/olpc/OggPlugin/OggPlugin.win.zip for Windows
http://tinlizzie.org/olpc/OggPlugin/OggPlugin.mac.zip for Mac OS X The mac plugin requires universal binary ftp://ftp.smalltalkconsulting.com/. Note that because this is my first time to build something on Macintosh, it is possible that something is completely bad. At least it worked on a MacBook though, please tell me if it doesn't work on your mac. And give me your advice!
Source code is available at: http://tinlizzie.org/olpc/OggPlugin/ogg_plugin.tar.gz
Thank you, - Takashi
Can you say a bit more about the Codec, like: What is the average compression ratio? Does it use a fixed or variable bit rate? How CPU intensive is compression/decompression?
Thanks, - Andreas
Takashi Yamamiya wrote:
Hello,
I have uploaded some change sets to the update stream (#1230, #1231) for Ogg Vorbis and Speex sound codec support. It allows you to compress sound data efficiently, and it would be easy to make tutorial project with voice guidance.
- Recoding a voice with codec using Sound Recorder in parts bin.
- Making a tile from the recoeded voice, and saving as a .pr file.
- Playback .ogg / .spx music from File List.
I will apply the Event Theatre soon.
However, you need a plugin file to test this feature. Please download and try it.
http://tinlizzie.org/olpc/OggPlugin/OggPlugin.linux.tgz for OLPC machine and linux.
http://tinlizzie.org/olpc/OggPlugin/OggPlugin.win.zip for Windows
http://tinlizzie.org/olpc/OggPlugin/OggPlugin.mac.zip for Mac OS X The mac plugin requires universal binary ftp://ftp.smalltalkconsulting.com/. Note that because this is my first time to build something on Macintosh, it is possible that something is completely bad. At least it worked on a MacBook though, please tell me if it doesn't work on your mac. And give me your advice!
Source code is available at: http://tinlizzie.org/olpc/OggPlugin/ogg_plugin.tar.gz
Thank you,
- Takashi
Etoys mailing list Etoys@laptop.org http://mailman.laptop.org/mailman/listinfo/etoys
Hi Andreas,
Can you say a bit more about the Codec, like: What is the average compression ratio? Does it use a fixed or variable bit rate? How CPU intensive is compression/decompression?
You can choose compression ratio using "quality factor". Now I set the default number as vorbis= 0.0 (you can choose -0.1 to 1.0), speex= 4 (0 to 10). In this condition:
- vorbis 35kbps - speex 19kbps - GSM 36kbps - original data 352kbps (22050 Hz mono: see below)
It uses variable bit rate. I haven't masure CPU factor seriously though, I didn't feel any problem on OLPC B2. I will test it later.
-- test code
src := FMSound majorChord asSampledSound. src duration. "2.0" src samples asByteArray size * 8 / src duration. "352800.0"
gsm _ src compressWith: GSMCodec. gsm channels first size * 8 / src duration. "36432.0" gsm asSound play.
vorbis _ src compressWith: OggVorbisCodec. vorbis channels first size * 8 / src duration. "35252.0" vorbis asSound play.
speex _ src compressWith: OggSpeexCodec. speex channels first size * 8 / src duration. "18952.0" speex asSound play.
Cheers, - Takashi
On Mar 11, 2007, at 20:23 , Takashi Yamamiya wrote:
Source code is available at: http://tinlizzie.org/olpc/OggPlugin/ogg_plugin.tar.gz
Hi Takashi,
I missed this in the latest VM. I tried briefly but it didn't build cleanly on first try so I skipped it to get the VM out in time.
I'll take another look next week, but maybe you could provide something that works cleanly in the latest VM? I started an OLPC branch at
http://squeakvm.org/svn/squeak/branches/olpc
which contains the latest additions (cursor support, video plugin, etc).
I still have to update the sugar-jhbuild module.
- Bert -
Hi Bert,
I'll take another look next week, but maybe you could provide something that works cleanly in the latest VM? I started an OLPC branch at
http://squeakvm.org/svn/squeak/branches/olpc
which contains the latest additions (cursor support, video plugin, etc).
Maybe the most simple way would be just I commit my code to the repository. Only tricky part of the OggPlugin source code was it needs external libraries (libogg, libvorbis, and libspeex). It should be compiled if it was placed properly and Makefile was good. I'll take a look later.
One thing. I'm a little bit vaguely. What was the purpose of this repository? Is it for providing a stable source tree, or experimental space for OLPC? Can I commit directly?
On Mar 31, 2007, at 16:50 , Takashi Yamamiya wrote:
Hi Bert,
I'll take another look next week, but maybe you could provide something that works cleanly in the latest VM? I started an OLPC branch at
http://squeakvm.org/svn/squeak/branches/olpc
which contains the latest additions (cursor support, video plugin, etc).
Maybe the most simple way would be just I commit my code to the repository. Only tricky part of the OggPlugin source code was it needs external libraries (libogg, libvorbis, and libspeex). It should be compiled if it was placed properly and Makefile was good. I'll take a look later.
One thing. I'm a little bit vaguely. What was the purpose of this repository? Is it for providing a stable source tree, or experimental space for OLPC?
It's "stable" only in so far as we want to make sure that sugar- jhbuild does not break. Otherwise this is a way to put out stuff without waiting for Ian.
Can I commit directly?
Sure, but you need to ask Ian for an account.
- Bert -
Hi Bert,
I have just uploaded OggVorbis plugin into http://squeakvm.org/svn/squeak/branches/olpc/.
So you can compile it as:
1) Make sure you have installed ogg / vorbis / speex headers (libogg-devel, libvorbis-devel, and speex-devel in rpm) 2) Go sugar-jhbuild directory and type $ ./sugar-jhbuild buildone squeak
For some reason, jhbuild might complain as "configuration changed", but please just choose [1] rerun stage build. Makefile should be recreated again in this case. If you don't have necessary ogg headers (libogg, libvorbos, and speex), OggPlugin would be just ignored.
However, I wanted to show a diagnosis message and stop jhbuild process if you don't have speex.h before starting make, like "This module needs speex package with headers!". Because you might not be aware the new vm won't include OggPlugin. Do you know proper way to some test before make?
Thanks, - Takashi
One thing. I'm a little bit vaguely. What was the purpose of this repository? Is it for providing a stable source tree, or experimental space for OLPC?
It's "stable" only in so far as we want to make sure that sugar-jhbuild does not break. Otherwise this is a way to put out stuff without waiting for Ian.
Can I commit directly?
Sure, but you need to ask Ian for an account.
- Bert -
Takashi,
you need to make sure the VM compiles even without the headers and libraries present. We need to have configure-time checks for all needed headers and libraries, and disable the plugin if those are not present. I see you check for the headers, but not for the libraries. There is an AC_PLUGIN_CHECK_LIB macro for this, see doc/ HowToBuildFromSource.txt
The proper way to make sure ogg or speex is installed would be in sugar-jhbuild sanitycheck.
Also, we might add a configure switch that makes certain plugins mandatory, so configure fails if it does not detect the prerequisites to mandatory plugins. Ian, do you have an idea how to best implement this?
- Bert -
On Apr 4, 2007, at 13:16 , Takashi Yamamiya wrote:
Hi Bert,
I have just uploaded OggVorbis plugin into http://squeakvm.org/svn/squeak/branches/olpc/.
So you can compile it as:
- Make sure you have installed ogg / vorbis / speex headers
(libogg-devel, libvorbis-devel, and speex-devel in rpm) 2) Go sugar-jhbuild directory and type $ ./sugar-jhbuild buildone squeak
For some reason, jhbuild might complain as "configuration changed", but please just choose [1] rerun stage build. Makefile should be recreated again in this case. If you don't have necessary ogg headers (libogg, libvorbos, and speex), OggPlugin would be just ignored.
However, I wanted to show a diagnosis message and stop jhbuild process if you don't have speex.h before starting make, like "This module needs speex package with headers!". Because you might not be aware the new vm won't include OggPlugin. Do you know proper way to some test before make?
Thanks,
- Takashi
One thing. I'm a little bit vaguely. What was the purpose of this repository? Is it for providing a stable source tree, or experimental space for OLPC?
It's "stable" only in so far as we want to make sure that sugar- jhbuild does not break. Otherwise this is a way to put out stuff without waiting for Ian.
Can I commit directly?
Sure, but you need to ask Ian for an account.
- Bert -
Bert,
you need to make sure the VM compiles even without the headers and libraries present. We need to have configure-time checks for all needed headers and libraries, and disable the plugin if those are not present. I see you check for the headers, but not for the libraries. There is an AC_PLUGIN_CHECK_LIB macro for this, see doc/HowToBuildFromSource.txt
OK. I added a couple of AC_CHECK_LIBs because using both AC_TRY_COMPILE and AC_PLUGIN_CHECK_LIB caused an error in disablePlugin.c. This is somewhat ugly though, it seems to work well. I'm completely novice about the syntax of acinclude.m4, so please check it.
The proper way to make sure ogg or speex is installed would be in sugar-jhbuild sanitycheck.
I'll take a look at that.
cheers, - Takashi
On Apr 4, 2007, at 15:13 , Takashi Yamamiya wrote:
Bert,
you need to make sure the VM compiles even without the headers and libraries present. We need to have configure-time checks for all needed headers and libraries, and disable the plugin if those are not present. I see you check for the headers, but not for the libraries. There is an AC_PLUGIN_CHECK_LIB macro for this, see doc/ HowToBuildFromSource.txt
OK. I added a couple of AC_CHECK_LIBs because using both AC_TRY_COMPILE and AC_PLUGIN_CHECK_LIB caused an error in disablePlugin.c. This is somewhat ugly though, it seems to work well. I'm completely novice about the syntax of acinclude.m4, so please check it.
Yeah, I'm not quite sure how to do it better than that ... I think it's good enough for now. Maybe Ian will refine it when moving to the trunk :)
The proper way to make sure ogg or speex is installed would be in sugar-jhbuild sanitycheck.
I'll take a look at that.
I discussed this with Marco P. G. on IRC. He had an issue with adding this as a prerequisite for each Sugar developer. To which I replied that IMO every Sugar developer should be able to rely on certain media libraries. Which he found okay for ogg vorbis, but maybe not for speex. Speex already is on the OLPC, but that may be by accident. There is no definitive list of what the platform will support. Worse, there is no such list at all. Maybe a post to Sugar list would be in order ...
- Bert -
On Apr 4, 2007, at 15:28 , Bert Freudenberg wrote:
The proper way to make sure ogg or speex is installed would be in sugar-jhbuild sanitycheck.
I'll take a look at that.
I discussed this with Marco P. G. on IRC. He had an issue with adding this as a prerequisite for each Sugar developer. To which I replied that IMO every Sugar developer should be able to rely on certain media libraries. Which he found okay for ogg vorbis, but maybe not for speex. Speex already is on the OLPC, but that may be by accident. There is no definitive list of what the platform will support. Worse, there is no such list at all. Maybe a post to Sugar list would be in order ...
Anyway, I published a new Squeak VM RPM. It will install ogg/vorbis/ speex automatically if needed, so we should be fine for now.
- Bert -
etoys-dev@lists.squeakfoundation.org