help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is best way? Octave/ASIO or .EXE/ASIO-octave module


From: Robert A. Macy
Subject: Re: What is best way? Octave/ASIO or .EXE/ASIO-octave module
Date: Tue, 22 Mar 2005 22:45:33 -0800

Paul,

Thank you for your response.  Some background...It is my
understanding that Steinberg "invented" the ASIO interface
which allows for portability between platforms for
operating sound cards.  Basically, the ASIO interface has a
buffer structure that operates asynchronously(?) just keep
it full for output going to the soundcard and keep it empty
for input coming from the soundcard.  All the octave script
has to do is make certain the ASIO interface is kept up
with.  

Synchronization is controlled in the sound card, and is my
understanding that it's fixed once running.  Latency
[defined as delay to the real world] is adjustable with the
recommended latency on the order of 50mS.  However, for my
project a large amount of latency can almost be ignored, so
I can adjust the latency large enough to encompass the
worst case Windows delays - well maybe not, but glitches
can be redone.  

Originally, I did have everything operating in "batch"
mode.  Drive the board, record the signals, and process the
data AFTER the fact.  Keep in mind the two data files
easily were 10 to 20MB EACH, for each run.  Fifty to sixty
runs every few hours was very common place.  Batch
processing worked well enough to prove feasibility, but now
it's time to make the system "real-time".  

My problem now is to make a real-time system combining
sound boards, data generation, data analyses, and
intelligent Displays.  I want to abandon Windows in favor
of Linux, but alas at this time the sound cards ONLY work
in Windows XP.  So for now, I'm stuck with trying to do
this in a Windows environment.  

Also, being new to this, I haven't been able compile *ANY*
of the ASIO programs available to me.  It seems every
program calls for antiquated Windows files, or something.
 Such as windows.h, or winsock2.h, whatever they are.  

It's just that octave is so easy to use and all my analyses
were written using octave. I would really like to expand
everything, keeping as much of octave as possible.  

Right now the most irritating part for me is that I haven't
even gotten passed error messages showing "fail to
compile".  I haven't even begun the project, exercising the
sound boards and trying anything at all.  

Anybody out there done this?  Or want to help?  

             - Robert -

On Tue, 22 Mar 2005 23:31:39 -0500
 Paul Kienzle <address@hidden> wrote:
> 
> On Mar 15, 2005, at 12:52 PM, Macy wrote:
> 
> > Which is the better structure for exercising ASIO sound
> > board?
> >
> > Option 1
> > Octave script file running compiled ASIO C++ module.
> >
> > Option 2
> > .EXE program containing compiled octave script.
> >
> > I prefer option 1.  How do I do it?
> >
> >      - Robert -
> > PS  running octave 2.1.50a-inst.exe binary installed in
> > Windows XP.
> 
> Hmmm... Octave as a real-time effects processor.
> 
> The problem with asynchronous I/O is that Octave needs to
> give up control in order to process the next block of
> audio
> data when it is ready.  Given that octave is not
> thread-safe,
> you would have to do this by hooking into the OCTAVE_QUIT
> macro defined in octave/libcruft/misc/quit.h.  While we
> are
> using OCTAVE_QUIT in many loops it is by no means
> universal,
> so you will have no real-time guarantee for when Octave
> would
> process the next block (never mind the lack of any
> guarantee
> from the underlying OS).
> 
> If you really want to write your effects as octave
> scripts,
> and your processor is fast enough to do so, you would be
> better off using synchronous audio calls.
> 
> If on the other hand you just want to record audio then I
> would suggest using a separate application with some way
> to communicate the output to octave.  I used pipes on
> unix
> with octave-forge/main/audio/aucapture.cc.  I don't know
> what people are using on Windows.
> 
> - Paul
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]