[CLAM] newbie

David García Garzón dgarcia at iua.upf.edu
Sun Apr 20 04:48:39 PDT 2008


We are not using cygwin but mingw [http://www.mingw.org/] to compile CLAM for 
windows. mingw is another gcc version for windows. The main difference with 
cygwin is that cygwin provides a unix/posix compatibility layer that eases 
the migration of linux programs. But not such a layer is needed for clam. 
Mingw builds windows native binaries with not such a layer in between.

Official windows binaries are (cross)compiled from linux with a linux version 
of mingw. But Giulio Paci has contributed a similar procedure to build from 
windows:
http://clam.iua.upf.edu/wikis/clam/index.php/Devel/Windows_MinGW_build

I should add that most of the 3rd party libraries Giulio explains how to 
compile from sources are already compiled and available as a zip file.
http://clam.iua.upf.edu/download/win/clam-3rdparty-mingw-20080128.tar.gz



On Diumenge 20 Abril 2008, Agustin Cortés wrote:
> Hi, Hernan... Thank u very much for your help. I go on reading the
> clam library and now i understand a much more how it works.
> The data type is doble, that its what i meant, because i didn't know
> how to process the audio signal...
> Now i have another problem, i'm using the cygwin, and i cant install
> the library. i don't know how to compile it from the source code. I've
> read the file "INSTALL" but i couldn't make it work.
> If someone is familiarized with this program (Cygwin), or recomend me
> an other compiler for Windows, thats will be nice...
> Agustin..
> PS: it's true the thing of reply-to..
>
> On Sat, Apr 19, 2008 at 11:47 AM, Hernán Ordiales <h at ordia.com.ar> wrote:
> > On Thu, Apr 17, 2008 at 2:02 PM, Agustin Cortés <agucortes at gmail.com> 
wrote:
> > > I've read the tutorial, and i have one question...
> > >  ----------------------------
> > >  #ifndef MyProcessing_hxx
> > >  #define MyProcessing_hxx
> > >
> > >  #include <CLAM/InPort.hxx>
> > >  #include <CLAM/OutPort.hxx>
> > >  #include <CLAM/Processing.hxx>
> > >
> > >  // Those two configuration types could be the ones you choose.
> > >  // Your own ones or any type already in CLAM.
> > >  #include "MyInputDataType.hxx"
> > >  #include "MyOutputDataType.hxx"
> > >
> > >  class MyProcessing : public CLAM::Processing
> > >  {
> > >         CLAM::InPort<MyInputDataType> mIn;
> > >         CLAM::OutPort<MyOutputDataType> mOut;
> > >  public:
> > >         const char* GetClassName() const { return "MyProcessing"; }
> > >         MyProcessing(const Config& config = Config())
> > >
> > >                 : mIn("My Input", this)
> > >
> > >                 , mOut("My Output", this)
> > >         {
> > >                 Configure( config );
> > >         }
> > >
> > >         bool Do()
> > >         {
> > >                 bool result = Do(mIn.GetData(), mOut.GetData());
> > >                 // Tell the ports this is done
> > >                 mIn.Consume();
> > >                 mOut.Produce();
> > >                 return result;
> > >         }
> > >
> > >         bool Do(const MyInputDataType& in, MyOutputDataType& out)
> > >         {
> > >                 // Your implementation
> > >         }
> > >  ------------------
> > >  What kind of Type of Data is "MyInputDataType", i mean, what i read
> > >  from the audio from a mic, what kind of data is? is Audio? How do i
> > >  analyze data from that class?
> > >  Thanks..
> > >  Agustin
> >
> > Hi Agustín! (btw, remember to answer to clam at iua.upf.edu not private
> > mails[1])
> >
> > could be many things, audio, fundamental, peaks, depends on your
> > incontrol types
> >
> > for audio things take a look at the simple AudioAmplifier processing
> > (CLAM/src/Processing/ArithOps/AudioAmplifier.hxx)
> >
> >                /** Ports **/
> >                AudioInPort mInputAudio;
> >                AudioOutPort mOutputAudio;
> > ...
> >                bool Do(const Audio& in, Audio& out)
> >                {
> >                        int size = in.GetSize();
> >
> >                        TData gain = mInputControl.GetLastValue();
> >
> >                        TData* inb = in.GetBuffer().GetPtr();
> >                        TData* outb = out.GetBuffer().GetPtr();
> >
> >                        for (int i=0;i<size;i++)
> >                        {
> >                                *outb++ = (*inb++)*gain;
> >                        }
> >
> >                        return true;
> >                }
> >
> > if you dislike pointers this also works:
> >                bool Do(const Audio& in, Audio& out)
> >                {
> >                        int size = in.GetSize();
> >
> >                        TData gain = mInputControl.GetLastValue();
> >
> >                        DataArray& inb = in.GetBuffer();
> >                        DataArray& outb = out.GetBuffer();
> >
> >                        for (int i=0;i<size;i++)
> >                        {
> >                                outb[i] = inb[i]*gain;
> >                        }
> >
> >                        return true;
> >                }
> >
> > cheers
> >
> > [1] Pau or whoever who is the list admin, i think a 'reply-to' to the
> > list config like we have in clam-devel would be also useful here...
> > --
> >
> > Hernán
> > http://h.ordia.com.ar
> > GnuPG: 0xEE8A3FE9
>
> _______________________________________________
> CLAM mailing list
> CLAM at iua.upf.es
> http://clam.iua.upf.edu



-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20080420/d16ee5e6/attachment.sig>


More information about the clam-users mailing list