[Top][All Lists]
[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
- [Denemo-devel] Crescendo & Diminuendo bug, Richard Shann, 2008/07/25
- Re: [Denemo-devel] Crescendo & Diminuendo bug, Nils Gey, 2008/07/25
- [Denemo-devel] Updated RPM spec file, Roy Rankin, 2008/07/25
- [Denemo-devel] Re: Updated RPM spec file, Richard Shann, 2008/07/25
- Re: [Denemo-devel] Re: Updated RPM spec file, Jeremiah Benham, 2008/07/25
- Re: [Denemo-devel] Re: Updated RPM spec file, Nils Gey, 2008/07/26
- Re: [Denemo-devel] Re: Updated RPM spec file, Richard Shann, 2008/07/27
- Re: [Denemo-devel] Re: Updated RPM spec file, Jeremiah Benham, 2008/07/27
- [Denemo-devel] Scripting in Denemo, Nils Gey, 2008/07/27
- Re: [Denemo-devel] Scripting in Denemo, Richard Shann, 2008/07/28
- Re: [Denemo-devel] Scripting in Denemo,
Jeremiah Benham <=
- Re: [Denemo-devel] Scripting in Denemo, Richard Shann, 2008/07/28
- Re: [Denemo-devel] Re: Updated RPM spec file, Richard Shann, 2008/07/27
- Midi: was Re: [Denemo-devel] Re: Updated RPM spec file, Richard Shann, 2008/07/27
[Denemo-devel] Re: Updated RPM spec file, Richard Shann, 2008/07/28