[nama] Singleton branch passes all tests

  • From: Joel Roth <joelz@xxxxxxxxx>
  • To: nama@xxxxxxxxxxxxx
  • Date: Thu, 8 Sep 2011 19:17:47 -1000

Hi all,

Somehow I seem to keep finding and fixing bugs.

All 140+ tests passing is a good sign.

I still need to handle the following before
the branch is releasable.

* Save/restore, including backward compatbility
* GUI issues

However, this part is really only just a renaming of
variables.

With a bit more work, I can start to introduce
a more modern, "singletonish" coding style. 
Here are a couple examples of old/new:

::ChainSetup::initialize()        $setup->initialize()
::ChainSetup::really_recording()  $setup->really_recording()
read_config()                     $config->read()

This change will probably happen slowly over time, as
part of an ongoing cleanup... especially if I am happy
with the new look of the codebase.

For your interest, the current list of hash variable/singleton
objects is:

$ui        # select text/graphical UI
$mode      # doodle, preview, mastering, etc.
$file      # filenames
$graph     # routing graph
$setup     # generate chain setup
$config    # Nama config variables 
$jack      # JACK clients and daemon status
$fx        # project effects/controllers
$fx_cache  # effects registry
$engine    # realtime engine operation related
$text      # text UI related
$gui       # GUI related
$midi      # MIDI related
$help      # help system
$mastering # mastering related config
$project   # current project (currently name only!)

Note that this is in addition to tracks, buses, marks,
fades, edits and other objects.

I think this is quite an improvement over the 250 
global variables we had before!!!

One minor question. I have a script that checks for
illegal hash keys.

I'd like to abort the build script with an error if 
this script returns any text. Any suggestions?

cheers,

Joel

-- 
Joel Roth

Other related posts: