The DejaVU Framework -- hush 3.1
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

Manual: ICSOUND 4 1994


[.] [man] man1 man2 man3 man4 man5 man6 man7 man8 man9 manl mann ?

NAME

Icsound - a wrapper for csound(1)

SYNOPSIS


  
  interface Icsound : public Wrapper {
  public:
    Icsound(const char* const options ="");  // Constructor
    virtual ~Icsound();                      // Destructor
    virtual void event(const char* const e); // Play event e
    virtual void trace(int l=1);             // set trace level (default 1)
    virtual int trace() const;               // get  ,,     ,,
    
    // return number of i/f events started
    virtual int events_started(char type='i') const;        
    // return total of i+f events sent 
    virtual int events_sent() const;          
    
    // Guess if csound is already finished with playing
    virtual int finished() const;
    virtual const Status_info* info() const;
    
    virtual void output_handler(const char* const); 
    virtual void error_handler(const char* const); 
    
    virtual void get_ready();         // Blocks till object is in state "ready"
    
   protected:
    virtual int trim(char* event) const;
    virtual void proces_ics_line(const char* const); 
    virtual void proces_cs_line(const char* const);         
    virtual int harmless_line(const char* const); 
    
    virtual void adjust_time();
    virtual void state(state_type);
    virtual state_type state() const;
    
    
    state_type  state_;
    Status_info *status_info;
    long t0_sec, t0_usec;
    float last_event_stime;
    float last_event_etime;
  };
  
  
  

slide: SYNOPSIS

DESCRIPTION


This class wraps a csound process, which is started automatically by the constructor, and terminated by the destructor.


slide: DESCRIPTION

ASYNCHRONOUS I/O


While the interface for descendent classes could be quite simple, it is not because of the use of asynchronous I/O: if you use the event() member to order csound to play a C sharp for 10 seconds, you typically want the event() member fuction to return immediately, and to be informed by de wrapper (asynchronously) when the playing of the note is terminated. To accomplish this, the wrapper will call the member function output_handler(char* msg) every time it receives output on stdout form the csound process, with the output msg as a null-terminated string. In the same manner, error_handler(char *msg) will be called when output on stderr is detected.


slide: ASYNCHRONOUS I/O

ENVIRONMENT


The full pathname of the csound process to run is compiled in. You can change this pathname by setting the environment variable ICS_CSOUND. Note that the wrapper expects a slightly modified version of csound. The full pathname of the default orchestra can also be changed by setting ICS_ORCHESTRA.


slide: ENVIRONMENT

LIBRARY


hymne -- file


slide: LIBRARY

KEYWORDS

hush, hymne, csound, Tcl

SEE ALSO

csound(1), hush(1), hymne(1), Tcl(1)
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
09/24/99