denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Scripting in Denemo


From: Jeremiah Benham
Subject: Re: [Denemo-devel] Scripting in Denemo
Date: Mon, 28 Jul 2008 10:51:35 -0500

On Mon, 2008-07-28 at 11:59 +0100, Richard Shann wrote:
> On Sun, 2008-07-27 at 17:57 +0200, Nils Gey wrote:
> > Scripting is SUCH a good idea! I work as composer and game designer on
> > an open source game (www.rastullas-lockenpracht.de) and we use Swig
> > and Ruby to have scripting acces to all C++ classes.
> As the other email, there are no C++ classes in Denemo, nothing like,
> you would need to start with quite a clean sheet :-(

We don't need c++ classes. From what I read it is used to create
wrappers for current c or c++ functions, structures, or classes. The
exported functions are placed in a filename.i.  So I could do something
like create a python (tcl, ruby and any other) wrapper for a
hypothetical function like addnote that was a function that contained
something like:

gboolean addnote (pitch, length){
        mudela_obj_new = new_dnm_object (length,0);
        struct harmonic enote = enharmonic ((int) ((nstack *)
list->data)->pitch,mididata->key);
        dnm_addtone (mudela_obj_new, enote.pitch, enote.enshift,
mididata->gui->si->cursorclef);
}

Then create a wrapper in the addnote.i (where we place functions for
adding notes or objects) for the languages supported. Then a user could
write a script in that language binding and load it into denemo. These
little scripts could be shared and placed in the menu if the they are
liked. This is similar to emacs. Emacs allows you to add menu's submenu
items. Almost all of these submenu items are just scripts written in
scheme or maybe elisp. The sound editor snd is like this also. What goes
in the menu is just a script in itself. I bet doxygen would quickly
create documentation on the exported functions.      

Jeremiah

> Richard
> 
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel





reply via email to

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