Subject: interface at Paula level to dbg players or write scopes

From: laurent clevy
Date: Sat Oct 27 10:22:23 2007

To: UADE-Developer-discussion
Hello,

I propose a new and simple programing interface in UADE.
A prototype patch is available here : http://lclevy.free.fr/uade207_patch_paula_event.zip

It is callback based and very simple.
It is player independant (including custom).

It can be used to debug players and to write graphical scopes, especially to display period and vol per voice and chronologically.

Feedback is welcome

Laurent (http://lclevy.free.fr/exotica)
[email-masked]

---

From: shd
Date: Tue Oct 30 01:46:12 2007

To: UADE-Developer-discussion
[quote:0ed1a385d2="laurent clevy"]Hello,
It can be used to debug players and to write graphical scopes, especially to display period and vol per voice and chronologically.
[/quote:0ed1a385d2]
Thanks!

I did heavy modifications to the code, and adapted it into uade123. Now it's merged into the Git repository. Just pull it.

The text scope can be activated with uade123 --scope.
[code:1:0ed1a385d2]
commit dbd80c64fbfaf6025efe34aaf48a0a3f30c86a82
Author&#58; Heikki Orsila &lt;[email-masked]&gt;
Date&#58;   Tue Oct 30 03&#58;36&#58;22 2007 +0200

    Added missing #include for memset&#40;&#41; into text_scope&#40;&#41; &#91;CORRECTIVE&#93;

 src/text_scope.c |    1 +
 1 files changed, 1 insertions&#40;+&#41;, 0 deletions&#40;-&#41;

commit 9dc9a4e28f47e5525510159912356ca01bb1daa3
Author&#58; Laurent Clevy &lt;[email-masked]&gt;
Date&#58;   Tue Oct 30 03&#58;32&#58;40 2007 +0200

    Added --scope option to uade123 that prints writes to Paula registers on stdout
    &#91;PERFECTIVE&#93;

 doc/uade123.1                            |    4 +++
 src/Makefile.in                          |    8 ++++--
 src/audio.c                              |   31 +++++++++++++++++++++++++++
 src/frontends/common/uadeconf.c          |    6 +++++
 src/frontends/common/uadeconfstructure.h |    4 +++
 src/frontends/common/uadecontrol.c       |    7 ++++++
 src/frontends/uade123/audio.c            |    5 ++-
 src/frontends/uade123/playloop.c         |    8 +++---
 src/frontends/uade123/uade123.c          |   16 ++++++++++++-
 src/frontends/uade123/uade123.h          |    3 +-
 src/include/audio.h                      |    1 +
 src/include/text_scope.h                 |    9 ++++++++
 src/include/uadeipc.h                    |    5 ++-
 src/text_scope.c                         |   34 ++++++++++++++++++++++++++++++
 src/uade.c                               |    4 +++
 15 files changed, 131 insertions&#40;+&#41;, 14 deletions&#40;-&#41;
[/code:1:0ed1a385d2]

I should also give you some feedback for the future:

* Use the same coding style as the module you are modifying
* Don't put stuff that isn't used into comments
* Use &quot;diff -urp&quot;, it's much easier to read.. Your diff left too much context away so it wasn't directly obvious where it patched stuff
* Don't declare new variables anywhere else but in the beginning of new scopes
* I really suggest that you use Git, and prepare your patches with it. It's great for testing new features as creating and merging branches is easy.

---

From: lclevy
Date: Tue Oct 30 08:24:42 2007

Dear Heikki,

Sorry for the way the code was given to you. I did not anticipated you'll accept it so fast, my goal was only to explain the idea. It is also my first patch for an open source project.
I noticed your recommandations for the next time. 

Thanks for having done the necessary modifications.

I hope someone will write a graphical scope using the proposed interface...

Regards,

Laurent

---

From: lclevy
Date: Fri Nov 2 14:46:23 2007

Again thank you for correcting my code and including it in UADE.

I noticed on my GIT clone that you removed the paula event interface approach. IMHO, I agree it is simpler to implement the text scope the way you've done, but it is also less open to other scopes implementation like it was proposed using the 'paula event' interface based on a callback.

What is your opinion on this particular point ?

Each scope (text, graphical) may also be a separate and dynamically module (.so using dlopen() )... Other people may also want to write a 'paula event player' based on 'text scope format' or or MIDI output plug-in n including the MIDI definition of synth instrument, or MPEG-SA (http://sound.media.mit.edu/mpeg4/)

This simple interface (to improve and extend of course) can allow UADE becoming a tool (plug-in based) to translate Amiga Music into 21th century formats...

Anyway 'text_scope' is already an example of what is possible...

Laurent

---

From: shd
Date: Fri Nov 2 17:56:05 2007

To: UADE-Developer-discussion
[quote:15869ac480="lclevy"]I noticed on my GIT clone that you removed the paula event interface approach. IMHO, I agree it is simpler to implement the text scope the way you've done, but it is also less open to other scopes implementation like it was proposed using the 'paula event' interface based on a callback.

What is your opinion on this particular point ?
[/quote:15869ac480]
When someone creates a proof of concept scope that needs something more, we can make it better.