[Accueil]
Accueil
[Blog]
Blog
[GNU/Linux]
GNU/Linux
[Pierre L.]
Pierre L.
[Whist]
Whist
[Nous]
Nous
[Jabberwocky]
Jabberwocky
[LaTeX]
LaTeX


Ecascheme

Pierre L. Nageoire

2011–2021

Ecascheme : a Scheme scripting interface for Ecasound. Introduction Why Ecascheme What is Ecascheme Installation Requirements To install, compile and run Ecascheme following softwares are required : [Basic system :] i.e. a Linux system with make and a “not to old gcc”. Notice that autoconf and automake are not needed. [A svn client] The only available sources for Ecascheme are svn repos. [Ecasound 2.7.x or newer] Only shared libraries and header files are needed. Sources might be usefull only for developers. It may append that Ecascheme works with older version of Ecasound but it has not been tested.

In fact modified headers are needed since minor modifications in Ecasound headers make interesting features available.

Moreover if one wants to compile and uses the plugin version ecasound should be compiled with PIC options, otherwise linking against ecasound library will fail. The simplest way I found for the moment is to enter :

CXX=’g++ -DPIC -fPIC’ ./configure

instead of a simple configure. [Speech_Tools 2.0] Sources are mandatory since they will be recompiled and even patched ! [Festival 2.0] Here again sources are mandatory for same reason as above; Using Ecascheme svn sources There’s currently no other procedure to install Ecascheme since the project as not yet really been released. Hence to install execute following steps : [Svn checkout] Issue :

$ svn co http://www.pollock-nageoire.net/protected/ecascheme/trunk <root_dir>

Directory <root_dir> will be created with a few subdirectories. [Unpack speech_tools/Festival] Enter the directory <root_dir> and uncompress speech_tools and festival sources. Unfortunately it will overwrite files that have been checked out by svn. It does not seem to be possible to do the operations in reverse order since svn will refuse to create some directories. [Removing a few files] Remove following files in the <root_dir> directory:

[Restoring deleted files] Restore deleted files from svn repos by issuing

$ svn update

in <root_dir> directory. [compiling speech_tools:] Enter subdirectory speech_tools of <root_dir> directory and issue:

$ make clean && ./configure && make

[Compiling festival] Enter subdirectory festival of <root_dir> directory and issue:

$ make clean && ./configure && make

It will compile festival with the ecafest module that implements the scheme interpreter for Ecasound. Getting started Now in the directory where you build the whole stuff <root_dir> (see ,) there’s an executable festival/bin/festival that you can start. You will enter an interactive shell where the language is scheme. You can start play with the features yet available in Ecascheme. All interactive commands are prefixed with ecascm. Here are a few examples :

The Scheme library Technical notes Slightly patching Ecasound Here is the list of files that are patched : [eca-chain.h]

[eca-chainsetup.h]

[eca-control.h]

[eca-session.h]

The c++ source code The classes Mirroring Mirroring an Ecasound class involves modifying files and adding others : classes.cpp Mirror class should be declared in this file exposing the class hierarchy to which it belongs : The mother class

#define ECS_SUBCLASSES ||   \
  (ECS_FIRST_DAUGHTER_child_p(v ) ) ||  \
  (ECS_my_CLASS_child_p(v) )

ECS_VAL_REGISTER_CLASS(ECS_MOTHER_CLASS,MOTHER_CLASS)
  ECS_SIOD_REGISTER_CLASS(ECS_MOTHER_CLASS,MOTHER_CLASS)

#undef ECS_SUBCLASSES

The derived class MY_CLASS

#define ECS_SUBCLASSES 

ECS_VAL_REGISTER_CLASS(ECS_MY_CLASS,MY_CLASS)
ECS_SIOD_REGISTER_CLASS(ECS_MY_CLASS,MY_CLASS)

#undef ECS_SUBCLASSES

classes.cc The command ecc_my_class­init(); should be added in eca_classes_init body. classes.H Should contain following declaration :

#include "ecaclasses/ecs_my_class.H"

ecs_type.H and ecs_type.cc The former might contain a declaration like that :

class ECS_SIOD_MY_CLASS : public MY_CLASS{
public:
  static parameter_t get_c_parameter_t( LISP param );
};

And the latter :

MY_CLASS::parameter_t ECS_SIOD_MY_CLASS::get_c_parameter_t
( LISP param ){
  return (parameter_t)get_c_float( param );
}

ecs_my_class.H Such a file should be added and contain class declaration, that may looks like :

#ifndef INCLUDED_ECS_MY_CLASS_H
#define INCLUDED_ECS_MY_CLASS_H

#include <audiofx_reverb.h>
#include "ecs_type.H"

ECS_VAL_REGISTER_CLASS_DCLS(ECS_MY_CLASS,MY_CLASS)
ECS_SIOD_REGISTER_CLASS_DCLS(ECS_MY_CLASS,MY_CLASS)


void ecc_my_class_init();

 

LISP ecs_my_class_name( LISP my_class );
LISP ecs_my_class_parameter_names( LISP my_class );
LISP ecs_my_class_set_parameter( LISP my_class,
           LISP param,
           LISP value );
LISP ecs_my_class_get_parameter( LISP my_class,
           LISP param );
LISP ecs_my_class_release( LISP my_class );
LISP ecs_my_class_process( LISP my_class );
//
// Not implemented for this class has probably to be removed ;
// but code was directly taken from that of EFFECT_AMPLIFY
// 
// LISP ecs_my_class_process_ref( LISP my_class );
LISP ecs_my_class_constructor( LISP delay_time,
          LISP surround_mode,
          LISP feedback_percent );

#endif ////  INCLUDED_ECS_MY_CLASS_H 

ecs_my_class.cc Such a file should be added and contain class implementation. It might looks like that :

#include "ecs_my_class.H"


void ecc_my_class_init()
{
  init_subr_1( "ecs_my_class_name",
        ecs_my_class_name,
        "");
  init_subr_1( "ecs_my_class_parameter_names",
        ecs_my_class_parameter_names,
        "");
  init_subr_3( "ecs_my_class_set_parameter",
        ecs_my_class_set_parameter,
        "");
  init_subr_2( "ecs_my_class_get_parameter",
        ecs_my_class_get_parameter,
        "");
  init_subr_1( "ecs_my_class_release",
        ecs_my_class_release,
        "");
  init_subr_1( "ecs_my_class_process",
        ecs_my_class_process,
        "");
  //
  // Not implemented for this class has probably to be removed ;
  // but code was directly taken from that of EFFECT_AMPLIFY
  // 
  // init_subr_1( "ecs_my_class_process_ref",
  //         ecs_my_class_process_ref,
  //         "");
  init_subr_3( "ecs_my_class_constructor",
        ecs_my_class_constructor,
        "Class constructor");
}


LISP ecs_my_class_name( LISP my_class )
{
  return
    siod
    ( ECS_MY_CLASS
      ( my_class )->name
      (  ) );
}

LISP ecs_my_class_parameter_names( LISP my_class )
{
  return
    siod
    ( ECS_MY_CLASS
      ( my_class )->parameter_names
      (  ) );
}

LISP ecs_my_class_set_parameter( LISP my_class,
           LISP param,
           LISP value )
{
  ECS_MY_CLASS
    ( my_class )->set_parameter
    ( get_c_int( param ),
      ECS_SIOD_MY_CLASS::get_c_parameter_t( value ) );
  return NIL;
}

LISP ecs_my_class_get_parameter( LISP my_class,
           LISP param )
{
  return
    siod
    ( ECS_MY_CLASS
      ( my_class )->get_parameter
      ( get_c_int( param ) ) );
}

LISP ecs_my_class_release( LISP my_class )
{
  ECS_MY_CLASS
    ( my_class )->release
    (  );
  return NIL;
}

LISP ecs_my_class_process( LISP my_class )
{
  ECS_MY_CLASS
    ( my_class )->process
    (  );
  return NIL;
}

//
// Not implemented for this class has probably to be removed ;
// but code was directly taken from that of EFFECT_AMPLIFY
// 
// LISP ecs_my_class_process_ref( LISP my_class )
// {
//   ECS_MY_CLASS
//     ( my_class )->process_ref
//     (  );
//   return NIL;
// }

LISP ecs_my_class_constructor
( LISP delay_time, LISP surround_mode, LISP feedback_percent ){
  return
    siod
    ( new MY_CLASS
      ( ECS_SIOD_MY_CLASS::get_c_parameter_t
 ( delay_time ),
 get_c_int( surround_mode ),
 ECS_SIOD_MY_CLASS::get_c_parameter_t
 ( feedback_percent ) ) );
}


This document was translated from LATEX by HEVEA.



l'imperatrice l'eremita il sole il giudizio


Copyright (©) 2009 -- 2022 Pierre L. Nageoire


Apache/2.4.52 (Unix) PHP/8.1.3 SVN/1.14.1 Hevea 2.36