svn diff -r "{2013-01-01}:{2013-01-31}" | diffstat
git diff --shortstat @{2013-01-01} @{2013-01-31}

2013/08 ========================================================================

- collecting gtk3 work-arounds

2013/07 ========================================================================

The last two month I mostly worked on porting the UI from gtk+2 and gnome-canvas
to gtk+3 and clutter. First I ported our own widgets (vumeter, waveform-viewer
and pattern-editor). This was relative straight forward. One issue were the
colors. I was using GtkStyle->bg[state] to draw the background, but the color
there is simply wrong. Will have to see if things look better if I use 
GtkStyleContext.

I also wrote a prototype for a gnome-canvas replacement using clutter. This
looks nice now and I am quite excited about the potential for adding nice stuff
in the future. Clutter is a lot more powerful than gnome-canvas.

Right now I am in the middle of porting buzztrax-edit to gtk3. The application
already compiles and starts. Getting it back to compile was about two evenings.
Biggest work was to replace the v/h widgets with the orientable variants. After
that came a lot of soft-breaks, e.g. "expose-event" signal -> "draw" signal.
Some of the things are documented, but e.g. what to do as an application if you
where using the "size-request" to provide a sane natural size to scrolled
windows is left as an exercise to the reader :/ Next came attacking all the
layout changes. I've figured solutions/hacks for many of them, but I guess this
will keep me busy for a while.

On the machine view, I'll also need to do a lot more work. The basics work, but
there is quite a few things commented out still. Many thanks to the folks in the
clutter irc channel for their help so far.

700 files changed, 21979 insertions(+), 17892 deletions(-)

2013/05 ========================================================================

We applied as an organisation to take part in the Google Summer of Code program,
but got rejected mainly due to the project name. As this was not the first time
people where uncomfortable with the name, we renamed the project - buzztard is
now called buzztrax. The homepage with the wiki and wordpress already got moved.
The renamed codebase is online at github [1]. The mailing lists have been
migrated to buzztrax.org. A few things still need to be fixed (e.g. file
releases). 

Besides the renaming there are also some improvements on the code side. I am
probably the last one to discover the g_signal_handlers_disconnect_by_* macros.
Using these made the code a bit leaner. I also worked on the level-meter
features. I did some cleanups on the widget. The syncing code is more efficient
as we listen to sync-messages on the gstreamer side to avoid another thread
round trip. Song rendering can disabled the level-meters for less noise on the
screen and some performance savings.
The song-rendering now uses the TOC support in gstreamer-1.0. That means that
the labels of a song (intro, chorus, break, ...) will end up in wav and flac
files right now. When other formats support toc, this will automatically work
for those formats too. The flag in ogg muxing got fixed in upstream and now
works for us again.

[1] https://github.com/Buzztrax

56 files changed, 715 insertions(+), 631 deletions(-)

2013/04 ========================================================================

This month I mostly cleaned up small bits and pieces from the gstreamer-1.0
port. Most notably multitrack encoding works again. The handling of EOS and
starting of the next track was racy. Speaking of the recording dialog - this one
now has some basics for a silent mode implemented. For now it only disables the
scrolling in the sequence view. Next thing would be to disable the level meters.

I hacked a bit more on the child-proxy iface. This now turned into utility
functions that allows to write:
  bt_child_proxy_set(obj, "prop1::prop2::prop3", val, NULL);
So what does this do?
  GObject obj1, obj2;
  g_object_get(obj, "prop1", &obj1, NULL);
  g_object_get(obj1, "prop2", &obj2, NULL);
  g_object_set(obj2, "prop3", val, NULL);
  g_object_unref (obj2);
  g_object_unref (obj1);
This saved quite a few lines of C in buzztrax. I wonder if this is something we
want to add to glib? If we do I would go for a single ':' as a separator and we
might also want to consider starting the property with one:
  g_object_set(obj, ":prop1:prop2:prop3", val, NULL);
The leading ':' would help to quickly detect whether we need to split the
property name and recurse into child objects. The whole scheme is backwards
compatible as property names are not allowed to contain ':'.

In the end of march I attended the GStreamer hackfest in Milano. First I looked
into a few tests - both on GStreamer and buzztrax side. On the GStreamer side
adder has some test fixes. On the buzztrax side I improved my encoding tests.
Wim gave me the crucial tip that fixed the dynamic adding/removing of analyzers
while playing. Maybe I can try that for machines again. I showed the parser for
controller-setups to some people and did smaller changes on it. I also discussed
what we could do with gst-tracelib for gst-1.0 and started a new design-draft
for it.

41 files changed, 871 insertions(+), 816 deletions(-)

2013/03 ========================================================================

As I already mentioned in last months issue, I ported buzztrax and gst-buzztrax
to use gstreamer-1.0. It will require 1.1.X for some fixes in gstreamer itself.
So how id it went. The basic porting to make it compile against 1.0 took about
20 hours spread over a couple of days. It is quite straight forward. I updated
the porting guide [1] where things were not mentioned.

The more tricky part where the soft api changes. At this port I was running the
apps with G_DEBUG=fatal_warnings. The property name changes here and there we
easy to fix. Also request pad name changes (%d -> _%u) took not too long to
handle. Other things like caps negotiation kept me busy for a few evenings. For
once I was e.g. writing GST_AUDIO_NE ("S16") instead of GST_AUDIO_NE (S16) which
leads to caps negotiation failing. Another recommendation is to avoid setting
channel-mask=3 for stereo caps. It is purely optional, most elements drop it
anyway and by leaving it out, you can merge the mono and stereo caps.

I ported freeverb in plugins-bad and made fixed to audiopanorama and adder.
Adder and collectpads have a few more new tests upstream. Another things that
took a while was getting seek-in-ready to work again. Buzztrax needs to
configure the playback segment from the application, as the sources happy beep
for all eternity. In 0.10 I could send a seek to my bin in ready, in 1.0 it gets
dropped (pads are flushing). Now I recursively iterate over sources and seek on
all of them. This is only needed to get to playing. To get these things fixed I
ported a few of my stand alone examples, but the majority of this is still left
unported.

Now the basics seem to work. I am confident that I can fix the remaining issues
in march and look forward to attend the hackfest in Milano over easter [2]. 

The porting for buzztrax:
69 files changed, 1909 insertions(+), 1473 deletions(-)
The porting for gst-buzztrax:
34 files changed, 1254 insertions(+), 1414 deletions(-)

The other thing I was doing this month was to experiment with embeddable
scripting engines. I wrote a toy gtk app that opens a window, sets up the
scripting engine, registers a function to get the window handle and start a
script that calls the function to get the window and adds a vbox with two
labels. I did that for lua, seed and gjs. For lua it took 30 min, for seek it
took 30min, for gjs it took 2 hours and is still not working fully (the custom
function returning a gobject).

[1] http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/random/porting-to-1.0.txt
[2] http://gstreamer.freedesktop.org/wiki/GStreamerHackfest2013

69 files changed, 1907 insertions(+), 1507 deletions(-)

2013/02 ========================================================================

We started the year with a release in the beginning of January. So far only a few
issues were reported. Patches for these are on the 0.7.1 branch. One last minute
change in 0.7 was the departure from trying to link/unlink elements in gstreamer
while playing. I sadly have to conclude that in 0.10 this only works for some cases.
It was working sort of okayish for buzztrax, but the were still deadlocks or internal
dataflow errors from time to time. One such scenario is that when you happen to
reconnect elements while the song loops. These things are not easy to sync from the
application level. Lets hope this is easier in 1.0. The sticky events should help
with setting up the context from new elements. 

On the mainline I bumped the required library version and removed the ifdefs for the
backwards compatibility. As a first bigger change, I ported the settings from gconf
to dconf. We had a settings abstraction to other gconf or play keyfiles, which we
now removed. Altogether I kept to use an intermediate object that exposes settings
as a gobject with properties for the keys. This allows to use notify to bind to
property changes instead of using a custom api.

Then I started with porting gst-buzztrax & buzztrax to gstreamer-1.0. I made good
progress. I will report the details in the next update.

77 files changed, 5892 insertions(+), 8131 deletions(-)

2013/01 ========================================================================

Happy new 2013!

Besides a lot of testing and little bug fixes here and there I finished of a few 
half ready features. One is range-randomize (press Ctrl+Shift+R). In contrast to
randomize which takes the parameters min-max value as bounds, this one picks the
bounds from the first and last value in the selected range. The other one is that
now one can rename machines also from the sequence headers. I was afraid that
swapping the GtkLabel with a GtkEntry would use too much space and look ugly, but
luckily one can turn off the frame. I still get a different background color though.

During testing I noticed some inconsistencies when renaming machines and found a
rather bad data corruption. Certain interaction would create songs that won't read
back fully. One can manually fix them up (it is xml after all). I fixed the bug and
could even make the format a bit simpler. I had to touch quite a few places: 
  30 files changed, 246 insertions(+), 404 deletions(-)
Old songs can still be read, but songs written with the new version, also need the
new version for reading. One lesson learned, the 'id' attribute in xml is special. 

Another results from testing is that the shell based test scripts can now be run
standalone to check a bunch of songs (do syntax check, print stats, convert or
encode songs).

Finally I entered string freeze for 0.7. I already received the first updates for
the translations, thanks a lot! I am looking forward to release it soon.

438 files changed, 3138 insertions(+), 2800 deletions(-)

2012/12 ========================================================================

At the beginning of the month I made a few changes to the pattern editor. It now
has a binding to the ',' key, which insert the current parameter value into the
pattern. This is a neat shortcut for using the ui to tune a parameter and then
copy the base value to the pattern. Another change in the pattern editor is that
it now shows tinted bars under the numeric values. If one ramps a parameter from
max to min, it would now show that also graphically. At some point I have to add
mouse editing.

I did a round of code cleanups. The ugly workaround for the type punning
warnings is gone, as they don't occur anymore.

I also added a new element to gst-buzztrax called 'wavetabsyn'. It uses the
wavetable oscillator component to loop a tiny grain and one can use the offset
parameter to set the position in the sample where the grain is taken from. The
osc component can now do trivial resampling, so that one can play melodies. The
new element also uses the asdr-envelope component.
 
The rest of the month was preparations for the next release: autofoo
modernisation, test cleanups, api-doc updates and so on. The tests now write
individual logs for each test. That makes looking at the logs of a failing test
much easier. I also silenced the remaining tests that where beeping during
'make check'. Finally I spend more time actually using buzztrax [1]. Found and
fixed a few more bugs and usability quirks.

[1] https://soundcloud.com/ensonic-1/devin

2012/11 ========================================================================

Finally pushed the pattern control-source: 26 files changed, 1204 insertions,
1333 deletions. It looks like only a little gain in code size, but that is not
true; we added more tests and splitting up a large class always comes with some
boilerplate for the new class. There are still some opportunities for
optimizations, which I'll probably try some soon.

In the UI I improved the interaction controller workflow. For controllers that
implement control discovery the dialog from the context menu will also bind the
new controller. The settings are now finally useful, as there one can do
mass-learning (tweak all knows and then go through the list and name them).

Writing synth plugins for buzztrax would be quite a bit of copy and paste. I
chopped simsyn into pieces as reusable objects in libgst-buzztrax. We have a few
oscillators, envelope objects and the svf-filter. The gst elements would proxy
some properties of the synth component. Unfortunately that means copy'n'paste of
the property setup. I've tried this code, but it shows no effect :/  

     GObjectClass * filter_klass = g_type_class_ref (GSTBT_TYPE_FILTER_SVF);
     g_object_class_install_property (gobject_class, PROP_RESONANCE,
        g_param_spec_override ("resonance", 
          g_object_class_find_property (filter_klass, "resonance")));
     g_type_class_unref (filter_klass);

A full standalone example can be found at [1].

We also have a new element called wavereplay. This is mainly for testing the
wavetable oscillator, but also has a nice property compared to tracker elements.
It only has parameters to select the wave to play and it will play it from start
to finish in syn with the song. That is if you seek to 2:00, the wave will play
content from 2:00. This is unlike tracker elements that would only play what
gets triggered from the new time position. One practical use is doing a mixdown
of the music rendering with the vocal recordings. In such a song you load two
wave (song, vocals), use two wavereplay elements, add effect elements to the one
for the vocals and re-render the song to create the mixdown.

I thought I knew pretty much all about gobject. This month I discovered
something old I did not know about. It is supported to calls
g_object_class_install_property() for a property inherited from the baseclass to
e.g. narrow down the value range. This is very useful for the "children"
property of polyphonic elements (where children is the number of voices). The
interface does only limit the property to the full int range. With this feature
elements like e.g. sidsyn can override the range to 3...3 (sid has always 3
voices).

The last bigger change this month was a refactoring cleanup in sequence and
song-info. This was quite a big of code shuffling, but now all the timing info
is in song-info (which already has bpm an stuff). This change helped with an
optimization in the pattern control-sources.

[1] http://buzztrax.git.sourceforge.net/git/gitweb.cgi?p=buzztrax/buzztrax;a=blob;f=design/gobject/propertyproxy.c

132 files changed, 2417 insertions(+), 2138 deletions(-)

2012/10 ========================================================================

After a discussion on IRC about tunings I looked into adding some of those to
the ToneConversion class which so far only implemented the usual equal
temperament. I have to say the wikipedia articles on this matter are awesome,
detailed and plentiful. I added two 12tone tunings to the ToneConversion class
now [1] and implemented tuning in sidsyn and simsyn.

I also had a look at the TODO comments and planned items on the wiki. When I was
writing the list model classes I did not wrote ones for the wavetable and
wave-level-list. I did this now. The list models can also be tested separately
from the UI (which is harder to test). I wrote basic tests for all model classes
which bumps the test coverage in the ui by 10% (61% classes have tests now, 105
ui tests).

IRC was quite active this month. Another chat was on the wave-table page and
wave-preview. The workflow was indeed needless complicated. Now preview is a
toggle and if it is active, moving the selection in the file-browser will play
sounds. Other discussion motivated me to implement audio-device selection in the
settings. So far one could only select the protocol. Now for e.g. alsa or
pulseaudio one can also choose to which device to play the audio. While working
on the settings I started to make the interaction controller setting more
useful. So far the only use of this settings-tab was to list the detected
settings. I added a couple of messages to help the user to know what to do when
e.g. the list of devices is empty. And I started to implement batch-learning of
controls to the settings.
  
[1] http://en.wikipedia.org/wiki/Just_intonation#Twelve_tone_scale

84 files changed, 4199 insertions(+), 1653 deletions(-)

2012/09 ========================================================================

I worked a bit on preset handling in gstreamer. Now machines with variable
number of parameters with save their properties correctly. One example is the
parametric equalizer. I needed this for sidsyn in buzztrax too. I also updated
the preset handling for buzzmachines. They now store presets in user-data-dir.
This avoids that those get overwritten when the plugins get updated. The preset
handling logic will read user-presets first and then merge in system wide
presets. One shortcoming here is that we would need a flag on each preset
whether it comes from a preset file in user-data-dir (and thus is writable) or
comes from a system dir (and thus is read-only). This would allow the UI to
require that users pick a new uniqe name when changing a system preset.

Songs in buzztrax now also store their non-dynamic settings. This will fix
fluidsynth forgetting the selected patch file and is also needed for e.g.
setting the chip-type in sidsyn. I refactored the code a bit and now we don't
show empty properties dialogs anymore and instead gray out the menu item that
would invoke them.

The build system now can show the class-coverage of the tests. As this is just a
few shell commands it quickly shows untested classes. It relies on naming
conventions for tests. To make that work I also cleaned up the whole UI tests.
Those are now more robust and actually verify a lot more things (we went from 54
to 92 ui tests).

 77 % (24/31) lib/core/
 40 % ( 4/10) lib/ic
100 % ( 1/ 1) ui/cmd
 51 % (27/52) ui/edit

The last thing I worked was to progress on live machine playback. And hell yes,
it works! One can bind e.g. midi keyboards to machines and play them live. This
includes a round-robin voice management for polyphonic generators. It is a lot
of fun to play with. 
 
Tom made good progress on the pattern control source. Most of the tests now
pass. We hope to be able to merge it soon and to remove the complicated 2step
controller updating code.

151 files changed, 8453 insertions(+), 6451 deletions(-)

2012/08 ========================================================================

I started the month with some preparational work for the 2nd GSoc task - to use
GstEncodeBin for recording. The first change was to streamline the recording UI.
Instead of two dialog - one for setting and one for the progress - we now just
show one. This causes less noise on the screen and avoids us some data passing.
I also added a bunch of unit tests for sink bin to provide a means to check for
regressions when switching the implementation. This also uncovered some
unimplemented code path on the gstreamer side. Those are now fixed or handled on
our side.

In the mid of the month I could merge the encodebin transition. It is a very
decent code simplification (68 insertions(+), 113 deletions(-)). Adding new
output formats is a piece of cake now. And as a bonus, the code is now platform
independent - instead of specifying the explicit elements to use, we now specify
the container and audio track format. This way encodebin would pick suitable
elements depending on what is available.

After the audiosynth baseclass was added, I wanted to see how well it works and
started with a long time todo - a c64 sid synthesizer plugin. This wraps the
rsid library - an awesome cycle based sid emulation. The library API is quite
simple; basically:
  init(); update(regs[29]); clock(*buffer, num_samples); release();
I was really happy to also see a lot of technical information about the sid chip
available on the net. When designing the gstreamer element API one needs to have
a little understanding how the chip is use to still provide a convenient access
to the parameters, but now hide important modes. That needs a bit of experiments
to decide whether individual bits need to be exposed or only certain
combinations make sense. In addition I implemented a couple of the typical
effects. The normal timing resolution of a tracker song is not too high and thus
one needs support from the element to provide things like arpeggio, portamento
and vibrato.

The sidsyn is the first more complex audio synth we have in buzztrax. It is also
the first one that uses more of the gst-buzztrax API. This was a good
opportunity to review and cleanup the APIs a bit. With those cleanups I also
killed the help interface, as new enough gstreamer has the required feature on
the element metadata side and the feature is not crucial any way.

This month I skip the git stats, as I took the indent git commit hook into use
and reformatted the buzztrax code base. Voilà: buzztrax - now with whitespace!

2012/07 ========================================================================

I did more test cleanups and finally the libs are done. I am going to increase
the coverage more, but it is quite good already. We're having more than 200 test
for libbuzztrax-core now. That helps making changes.

One aspect of writing tests is also to check the API for testability. While
working on the wire tests I noticed that we had a disabled test to check for
cycles in the machine graph. There where basics checks in the UI, which I now
moved to core as new API, expanded it to actuall do a full cycle check and
enabled the tests.

While updating the test suites I had a couple tests that I still did not like
much. They were all iterating over an array of parameters (input files,
extensions) and tested them. What is the problem? It is only a problem if things
fail. In the current setup, the test would stop on the first failing parameter.
If it would also run for the remaining parameters, I might get a better idea
what actually wrong. Besides that, I also don't see right now for which
parameter it fails (I need to log it and take a look at the log). Luckily the 
Check library has loop tests. They are simple to use, instead of 
tcase_add_test(), use tcase_add_loop_test() and pass the start/stop index to the
test. From within the test you can access '_i' to fetch the parameter set. If
the tests run via CK_FORK=yes (which is the default), each loop runs in a new
process.

I gave a talk at work about electronic music and used buzztrax to demo a few
things. While preparing the demos, I naturally found quite a few bugs. This
time I also wrote more tests for these things.

The other big change in the repo is the migration to non-recursive make. I
started on the buzztrax module. The first step was to still recurse into docs,
po, src and tests. That gave some nice speedup already. Then I rebased also src
and test to the project root and used includes to keep the Makefile
maintainable. This unfortunately made things  little slower as I have to do:
  SUBDIR = . po docs
The problem here is that the docs will link the libraries to introspect them,
but don't depend on them :/ Adding a dependency in there does not work, as the
Makefile in the docs-dir does not know the rules for how to make them.
On the slow down, the config.status run is faster (two less Makefiles to make),
but the '.' in SUBDIRS causes a recursive make invocation for the project root.
And thats where we have the big Makefile :/ The workaround I am using now is to
have own all-local, check-local, clean-local, install-data-local and
uninstall-local targets. The good thing of it is, that now the rules to build
the api docs have proper dependencies on the libraries they introspect.  In
order to see how far I can speed up things, I also trimmed the includes. The
effect of this can be seen in the third group of measurements. The benchmarking
was not to elaborate, but the big picture is clear. [1]

Some general tips for how to do the change below:
* in the Makefile.am, first set all kind of vars (so that in includes you can do
  VAR += ...)
* include the per subdir rules
* add common rules
* targets in e.g. "lib_LTLIBRARIES = libabc.la libdef.la" have to be in
  dependency order, wtf! [2]

So far, this looks good (aka 'make distcheck' passes). Will do this for the
other modules next month.

Tom made good progress on the audiosynth base class. I just merged the branch.
Now it writing a audio synth is a lot less code.

169 files changed, 7236 insertions(+), 6459 deletions(-)

[1] http://buzztrax.org/wp-content/uploads/buildbench.png
[2] http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/Makefile.am

2012/06 ========================================================================

In May I finished the refactoring of the sequence damage-repair code for
updating the controller time-lines after pattern changes. It is a lot less code
now and it is also faster. The "less code" is important as there is quite a bit
of logic to handle combining events from patterns overlapping in time or on
several tracks.

In the same vein, I could also refactor main-page-patterns with quite a nice
code removal mount (~400 lines).

While reading "The Art of Unit Testing" [1] I decided to start cleaning up the
test suite in buzztrax. The changes so far result in tests that are more
focused, less brittle and a lot smaller. I am writing down some of the tips on
the wiki [2].

36 files changed, 2085 insertions(+), 2517 deletions(-)

[1] http://www.amazon.com/The-Art-Unit-Testing-Examples/dp/1933988274/ref=sr_1_1?s=books&ie=UTF8&qid=1338748288&sr=1-1
[2] http://wiki.buzztrax.org/index.php/Testing

2012/05 ========================================================================

More cruft removal this month. We dropped some more configure options (thanks
Adrian) and removed more old/unused code. The project also got the first commits
merged from Thomas - our GSoC student.

The pattern class had a boolean parameter to chose between command and data
patterns. I refactored that into a proper class hierarchy. The downside of that
is that we need more casts now :/

I also continued in the duplicated code cleanups. We have now a value-group,
that holds the pattern portion for a parameter-group. This way I could remove
lots of code from pattern and sequence. Finally I could also remove wire-pattern
itself. I am not totally happy with the extra code for loading and saving now,
but have some ideas here too.

The UI tests have a couple more helpers to synthesize events and saw a couple of
cleanups. The tests have been really useful for all the refactorings.

97 files changed, 4684 insertions(+), 5279 deletions(-)

2012/04 ========================================================================

I started hacking on the transport settings. The idea here is to have a generic
scheme for how to control playback (start, stop, seek) externally. This can be a
midi-controller, but also qjackcontrol or a MPRIS applet. The setting now show
the available modules and allow to enable master and slave mode as well as mode
specific settings. I could remove the combobox from the toolbar again.

As a next big thing I started to refactor a big chunk of duplicated code in
core. Machines have global parameters, per voice parameters and per incoming
wire parameters. Now we have a parameter-group class that deals with those.

I spend the rest of the month cleaning up the test suite and the autofoo setup.
On the latter I bumped the required versions. The policy now is to support the
linux distributions from about the last two years. This allowed me to remove
large chunks of conditional code. Unfortunately it is not easy to do that. The
easy part is to check what versions we require, by looking at the pkg-config
macros in configure.ac. Then we can also grep for conditional section in the
code:
find . \( -name "*.c" -o -name "*.h" \) -exec egrep -o "[A-Z]*_CHECK_VERSION\(.*\)" {} \; | sort | uniq
Now the tricky part is to figure what distributions ship. It is somewhat easier
for debian/ubuntu as they have pages like:
http://packages.debian.org/search?suite=all&arch=any&searchon=names&keywords=libgstreamer0.10-0
http://packages.ubuntu.com/search?suite=all&section=all&arch=any&searchon=names&keywords=libgstreamer0.10
For fedora Company suggested to look at the spec files in git and iterate over
the branch names
http://pkgs.fedoraproject.org/gitweb/?p=gstreamer.git;a=blob;f=gstreamer.spec;hb=f17
For opensuse Vuntz suggested to use an osc query at which I failed misserably and
in the end checked the packages in the repo and iterated over the versions:
http://download.opensuse.org/distribution/12.1/repo/oss/suse/i586/
Anyone know better tricks? Please share them!

One more motivation for doing this is upcomming gsoc. If I am lucky to get a
student who will port buzztrax to gstreamer 1.0. We'll release a 0.7 of buzztrax
before we switch to the new gstreamer api.

212 files changed, 7954 insertions(+), 7778 deletions(-)

2012/03 ========================================================================

As a big leftover promise from my talk at the GStreamer conference in 2011 I
spend more time to understand latencies inside GStreamer. For plain playback the
latencies are not an issue, but for anything interactive, be it entering notes
or changing parameters while the song is playing, we want much lower latencies.
For the talk I did some measurements by having a pipeline with two branches -
src1 ! sink and src2 ! fx1 ! ... ! fxn ! sink. The fx elements where plain
volume elements. The branches where panned hard left and right. For the
experiment, I was pulling down the volume on the two sources down to 0 at the
same time and recoding the audio on the sink. Looking at the wave [1], one could
see the delay in the signal that went through the effect-chain. The longer the
effect-chain the larger becomes the delay. Don't misunderstand this, GStreamer
is properly handling A/V sync. The buffers that get mixed in front of the sink
have the same time stamps, the problem is that we have a lot more buffers
traveling the the effect-branch. This is because of the queue elements. In
buzztrax one can freely link generators to effects, effects to effects and
effects to sinks. This includes diamond shaped connections. Here we need queues
to not stall processing on one branch. It is sufficient for the queues to keep
only 1 buffer. Still even knowing the buffer duration, I could not tell a
formula to explain the measured delays.
This month I looked at the issue with a new idea. I wrote a small example [2]
that build pipelines close to what I have in buzztrax, but stripped of many
details. In this code I add buffer probed to all pads. The probe is comparing
the time-stamp on the buffer to the pipeline clock. This tells how early the
buffer is. Ideally we want buffers to be generated and processed as much in
time as possible. When generating audio one needs to configure audio-buffer
sizes on the source elements and two properties on the audio-sink - buffer-time
and latency-time. A good scheme is to use buffer-time = 2 * latency-time. That
configures the sink to have two audio-segments. Initially I also set the buffer
sizes on the source elements to have a duration of latency-time. Now one problem
with that is that we will have one buffer waiting on each queue. Thus if there
are two queues the actual latency is (n-queues + 1) * latency-time. One way to
improve that a bit is to half the buffer sizes on the sources, then the 2nd
buffer is calculated when the first one is needed. As the first one won't be
sufficient to fill the gap, the calculation of the 2nd buffer is scheduled right
away. The disadvantage of this scheme is that one gets quite jittery latencies.
In the end I settled on finishing the subtick timing in buzztrax. Each tick will
have n subticks, where n is setup so that we get down to the desired latency.
So far I get nice low latency on all my machines (inlcuding a atom based
netbook).

We also ported more buzzmachines and have 49 machines right now. When porting we
often also fix bugs as gcc is quite good at warnings these days. Finally, the
machines now also install docs (where available).

In the UI I got rid of the GtkRuler copy again. The analyzer window now has own
code to draw the rulers. I think they look nice, a lot less noisy then the older
rulers [3].

[1] http://files.buzztrax.org/latencies/
[2] http://buzztrax.git.sourceforge.net/git/gitweb.cgi?p=buzztrax/buzztrax;a=blob;f=design/gst/latency.c;hb=HEAD
[3] http://wiki.buzztrax.org/images/e/e8/Bt-edit-0.7.0-01.png

62 files changed, 1957 insertions(+), 1844 deletions(-)
 
2012/02 ========================================================================

The first big change after releasing 0.6 was to move from svn to git.
SourceForge offers git since a while, but does not provide any tips how to do
the transition. Fortunately it is a popular topic though. I used svn2git for the
main conversion. I fixed the author tags from svn commit messages (Patch-by:)
manually using git rebase -i as I could not get a filter-branch script for it to
work. A few times gitk got confused and I had to remove my .git/gitk.cache, one
symptom are missing tags. I updated the enlistments on ohloh and tweaked the git
hooks to have the same functionality as before.

A first code wise change was to move the bsl module into the buzztrax one. It is
a small module for the buzztrax song-loader plugin and it is not needed if you
don't want to load buzz songs. But it is small and has no further dependencies
and thus it is easier to just include it. Especially as we plan to add other 
loaders in the coming cycle(s).

In the editor I bumped the required gtk version to get rid of some #ifdef and be
able to use newer API. I replaced the ruler widgets in volume and panorama 
popups with with scale markers. Those look nicer and take the scale handle size
into account. Unfortunately they were almost untested. I made the needed patches
for gtk-2-24, gtk-3-2 and gtk-HEAD [1],[2]. I could also made workarounds for
the issue for the time being. So for the time being, don't use inverted ranges
on your scales and don't use an adjustment with fractions (use 0 .. 100 instead
of 0.0 to 1.0).

Most of the work went in the the interaction controller. The controller
assignment in the UI is a bit more discoverable (content menu not only on main
widgets, but also on the label and value label). Controllers can be assigned to
combo-boxes too (mapped to enums). We have controllers for note-on midi messages
and the velocity that comes with it now.

The other bigger change is that we now have persistent audio sessions (right now
only enabled for jack). We're basically keep the sink alive across songs and
also keep it in a resource allocated state. This gives a little speedup on the
playback startup, but the main motivation was to allow to configure linkage of
buzztrax with other jack client in qjackcontrol. This is also an enabler for
transport sync support. I have landed initial support for this in gstreamer-git.

There were also a few smaller changes for user feedback on docs and new tips.
The design folder got more experiments.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=667598
[2] https://bugzilla.gnome.org/show_bug.cgi?id=667590

485 files changed, 2638 insertions(+), 2033 deletions(-)

2012/01 ========================================================================

Finally after a long time, I managed to release a 0.6 of buzztrax. So far only
one regression was found and bml-0.6.1 was released to fix it.

A few things happened before the release still. At first after updating my
distro, I made a lot of changes to avoid deprecated gtk+ api. For now we ship
a copy of the ruler widget (that got removed in 3.0). The internal ruler widget
is a lot saner than the upstream one too. 

Another big change was to move from string parameter for notes to an enum. This
is faster and lets us do things like blending of note ranges or transposing.

I also made quite a few bug-fixes - laspa effects work again, fluidsynth fixes,
etc.

Now I look forward to a lot of new changes in 0.7.X.

2011/12 ========================================================================

Over the last 2 month I did quite a bit of work on the GStreamer side. Right now
we're working on 0.10 and 0.11 in parallel. I worked on the audiovisualizers and
opencv elements in 0.10. I added a freeverb port to 0.10. In 0.11 I updated the
controller susbsystem. If is now a lot easier to use and faster too. I also
ported the audiovisualizers and fixed a few elements here and there.

In the beginning of November I gave a seminar about mobile multimedia using
GStreamer. For that I wanted to have a few more examples. I have been polishing
some examples in GStreamer and adding some more (simple audio-mixer with xfade).
One example is a nice showcase for how easy you can do some things. It is called
tonematrix [1]. It is 497 lines of c, including comments, a GTK ui with an own
widget and the whole GStreamer handling. The toy supports different sounds,
different speeds and different scales.

Buzztrax allows live control of audio elements. Right now can use midi and hid
devices. The software that exposes the wiimote as a hid device uses uinput. This
is a kernel device with a simple api that allows user-space apps to create hid
devices. I wrote a small toy (280 lines of c) that can use different GStreamer
pipelines containing analyzer elements and map the detected features to virtual
joystick controls [2]. The simplest example is to map the loudness of the
mic-input to the x-axis. A similar example is to map the brightness of the
camera input to a joystick axis. Then you can control e.g. the filter-cutoff of
a synthesizer by shielding the light from the camera sensor. Now the fun starts
with the recently improved facedetect plugin in GStreamer. This can not only
detect the faces, but also the positions of eyes, nose and mouth within the face.
Unfortunately the detection is not very stable when drawing faces. The idea here
obviously is to make grimaces and control sound with that. A very expressive
performance :)

I also spend a lot of time to track down issues with dynamic linking. A few more
fixes are done on buzztrax side and GStreamer side. I think on the buzztrax side
things are good for a release. Everything is reviewed (docs, demo-songs, ...)
and make distcheck passes :)

57 files changed, 4323 insertions(+), 374 deletions(-)

[1] http://buzztrax.svn.sourceforge.net/viewvc/buzztrax/trunk/buzztrax/design/gst/tonematrix.c?revision=3655&view=markup
[2] http://buzztrax.svn.sourceforge.net/viewvc/buzztrax/trunk/buzztrax/design/input/gstinput.c?revision=3655&view=markup

2011/10 ========================================================================

This month I focused on testing for the next release. My free time for the
project was a big short anyway, as my family move to our new home and I had
quite some janitorial work to do.

One lesson learned for the start. Some time ago I had problems with tests going
crazy and eating memory. This can bring down the whole system which is bad. My
solution at this time setrlimit(RLIMIT_AS,&rl) to cap the memory usage. While
that works, that is also one way to shoot yourself in the foot. I was wondering
why tests that work flawlessly on 32bit systems fail with "mmap() failed: 
Cannot allocate memory". Doh, 64bit platforms need more memory than 32bit ones.
Now I raised the limits unconditionally and everything is working again. Would
be good to check the difference to see how much more memory 64bit apps that in
average - its not twice as much I think.

I did lots of valgrinding and obviously found and squashed a few leaks. It would
be really nice if each library would ship a suppression file as part of the dev
package. The file could be installed to /usr/lib/valgrind/<package>.supp. The
pkg-config file would have two variables: 'vg_supp' pointing to the suppression
file and 'vg_env' setting extra environment variables easing valgrinding. This
way one could just collect these from the libraries an application uses and be
done. GObject based libs could suppress their singletons to improve the valgrind
experience.

From time to time potential users show up on irc and get scared when I ask them
to build the latest version from the sources. In the need for having an easy way
to offer testers and translators the latest version, I took a look at glick [1].
It is actually pretty straight forward. The resulting glick files where
initially somewhat large, but after pruning development files, they are just
about 6 Mb. I have two of them online - one for 32bit [2] and one for 64bit [3]
systems. How to use them? Just download and run them - they don't install
anything. The only downside I can see so far is, that the glick bundle would use
the same settings as the properly installed one, which could be harmful if
different versions are run. Also the path to the example songs in the bundle is
somewhat cryptic - /proc/self/fd/1023/share/buzztrax/songs :/. Having better
desktop integration of such bundles would be great too, but less see how glick
evolves.

50 files changed, 836 insertions(+), 373 deletions(-)

[1] http://people.gnome.org/~alexl/glick/
[2] http://www.hora-obscura.de/~ensonic/buzztrax.x86_32.glick
[3] http://www.hora-obscura.de/~ensonic/buzztrax.x86_64.glick

2011/09 ========================================================================

After lots of changes I have switched the code permanently to the new sequence
model. It saves about 170 lines of code in the sequence-page source. There is
some potential to save more though.

I also did more work on state persistence. A song now contains more information
(selected machines, pattern, options) and these things are restored when loading
a song.

Another good change was moving the song-unsaved flag from the song
(core-library) to the edit application. This make the core library more light-
weight. The editor application can now determine whether there is something to 
save by combining the unsaved-flag and the undo/redo stack. The unsaved-flag is
still needed as I feel not everything needs to go to the undo/redo stack (like
selecting a machine). Undo/redo looks quite complete now. I found a solution for
my last issue, although I am still not entirely happy with it.

I also made a few startup time improvements. Found a weird issue with the
interaction-controller library probing joystick devices. One ioctl on joy
devices for hdaps devices is hanging for quite a bit.

Finally I did a huge cleanup on or somewhat uncommon header file setup. We
always had a header declaring the types and one the methods. This helped with
include conflicts. But now we have 50% less files to care and I just needed 2
forward declarations.

Again several bugs were fixed. I will check remaining reported bugs and hope that
everything is fine to consider releasing 0.6.

253 files changed, 27205 insertions(+), 26602 deletions(-)

2011/08 ========================================================================

Another month with good progress. I've started with the undo/redo parts in the
sequencer view. Most of the edits are handled now. I am still stuck with one
problem though. So far the order of signal handler on object removal did not
matter. Now it does :/ There are things that when they get removed remove other
things. And that causes chains of modificatins that in the change log would 
overwrite (shadow) the save data. Not yet sure how to solve that. I'll probably
confront someone at the desktop summit [1] with the problem over some beer in
the hope that I find a solution while I am explaining the issue :) As a good
side effect of the undo/redo work, I could remove the warning dialogs that I was
showing when removing things. Makes the editor more pleasant to use.

During my july trip to mountain view I brought two cheap midi controlers -
korg nanokontrol [2] and nanokeys 2 [3]. The nanokeys2 is not so nice, but the
nanokontrol seems to be okay. Unfortunately I didn't notice is is the old model,
the nanokontrol 2 [4] has more keys. I have played quite a bit with the nanokontrol
in buzztrax. Found and fixed a few bugs. One thing I definitely needed to do is
to store the keys one has trained. Thanks to my long train journeys between
munich and leipzig these days, that got implemented. For the nanokeys I need to
still do a couple of things and those will have to wait for the next version.

As I was blocked on the undo/redo I did more small mini-songs. As usual found a
couple of bugs. Buzztrax stores timestamps in the song (like when it was created
and when it was saved the last time). When closing a song with changes it warns
you about loosing the changes for the last n hours/minutes. Thas was completely
off if one loads a song and makes some changes. I need to set the last-saved to
the time of the first change. A few other bugs were related to 64bit arch and
using wrong int types in varargs functions. I also made some ui improvements.
The settings hide more unusable audiosinks (apexsink, sfsink), especially
probing apexsink caused long delays as I don't have the hardware for it.

One issue that I had no good explanation for but that was quite apparent when
doing demos was small breaks when the song loops. Especially at the first loop
it caused a bad glitch and later it sometimes played a bit too much or skipped
something when wrapping around. I had made some test apps for it, but could not
reproduce it there so far. Finally I looked at it again and found a small self-
contained testcase that was reproducing it. On that base I could narrow it down
to a combination of two gstreamer elements causing it. Still it was not straight
forward to fix it, after all it is not crashing or such. I decided that the only
way forward was to get a good picture of what is happening and verifying the
events step by step. Voila, we now have a improved gst-tracelib and a gnuplot
script for plotting event over time. Would be nice to have a more interactive UI 
for gnuplot though. I filed a bug [5] and put the data there, if you are curious
about the graphs. After some more nights I found the issue and the fix for the
adder plugin is now upstream. A simillar change needs to be done for the
videomixer elements (will look into that soon). 

[1] http://www.desktopsummit.org
[2] http://www.amazon.de/Korg-NANOKONTROLB-nanoKONTROL-schwarz/dp/B001J8LJWK
[3] http://www.thomann.de/gb/korg_nanokey_2_black.htm
[4] http://www.thomann.de/gb/korg_nanokontrol_2_black.htm
[5] http://bugzilla.gnome.org/show_bug.cgi?id=655204

43 files changed, 2779 insertions(+), 496 deletions(-)

2011/07 ========================================================================

This month I made great progress. I have been making several small demo songs
and found+fixed quite many bugs and glitches along with that.

After a little break I took up undo/redo work and could make good progress. Now
also pattern property changes (name and length) are tracked. In the sequence the
boilerplate code is there, single edits, track and property changes are handled.
In the machine view the initial machine position is tracked in the change-log.

In the middle of the month I did doc updates - api docs had some stuff missing
and the user help finality has more beef and short-cut tables for all the
keyboard accelerators.

OmniMancer on irc gave me some good first perspective usage experience. I added
a blacklist filter to hide gstreamer elements from the menu that are known
to be not useful for buzztrax (e.g. dtmfsrc). Also some machines used GTypes not
yet supported by the UI - this is now fixed. With that came some fixes in
pattern editing (blending parameters wasn't working in all cases). I also added
a flip operation to the patterns. Also to make a few things easier for new users
I added two items to help menu - file a bug and goto irc. The later fires up the
freenode webirc as xdg-open seems to be unable to launch e.g. xchat for irc://
urls.

I have started to write the missing treemodel for the sequence view and used
that changed to overhaul a few things. Even without the new model its quite a
bit faster as we do less model rebuilds  (e.g. when expanding the length). Also
the row-shading code is simpler and with that the cell-data functions. Finally
the pattern usage tracking is now using a hashtable instead of rescanning the
sequence.

With all those changes comes a bag of bug fixes - I'll skip listing them here -
it is all in the change log. Also I did a bit of code cleanups and reorgs. Like
using macros for the GType handling to save lines of code. Or bump the gtk+
version (2.10.12) to get rid of fallback code. Finally I rechecked a glib bug
regarding mime-matching. It's fixed since a while, but I still saw it, as the
.recently-used.xbel file had the wrong mime type from the time when glib had the
bug in there. Maybe it would be good to trim that file from time to time. Imho
it should also be in $XDG_CACHE_DIR and not $HOME, but that is a different
story.

48 files changed, 2712 insertions(+), 1250 deletions(-)

2011/06 ========================================================================

In the beginning of the month I finished the new treeview models. There were a
couple of corner cases I did not handled yet. I did some thinking about the
remaining model, but did not yet write any code for it. Instead I did some code
review of the whole project leading to numerous small cleanups and fixes. I also
got rid of some holes in the api docs.

Otherwise I worked more on GStreamer and gtk-doc. In GStreamer I mostly hacked
on a baseclass for audio-visualizers which is now in gst-plugins-bad (together 
with 4 elements using it).

There are some other reasons for not having so much time to hack on, of which I
will shortly speak about :)

32 files changed, 1848 insertions(+), 444 deletions(-)

2011/05 ========================================================================

After last month spectrum analyzer work, I also looked at the volume meters
again. Handling the updates is a bit tricky as I need to sync them to the audio
playback. Now I have optimizations in place to skip updates when the meter is
zero or maxed and has not changed. This is actually quite often the case.

I also fixed a small UI glitch; song-io plugins did not tell so far whether they
support saving and/or loading. Thus one could end up selecting a format and then
getting an error. Now one will see only the formats that plugins can handle.

Finally I got around catching up on the docs too. Now all dialogs have some docs
including screenshots.

One refactoring I was actually considering to push for after the next release was
getting rid of the GtkListStores and use real GtkTreeModels instead. The
disadvantage of a ListStore is that it is static, if the underlying object is
dynamic one needs to manually synchronize it. This enlarges the code and also the
duplicated data storage uses memory. Writing own models was in the end not so
difficult, it is quite some boilerplate code though. The first one I wrote is a
object-list-model. It allows to bind object-properties to model columns. If e.g.
a field changes, the model notifies and the view updates [1]. The whole thing
could become more generic if we would have an iterator interfaces and the
collection types (list, array, ..) would be gobjects implementing the iface.
Well, I am not the first to notice that :) [2]. Next I made 2 specialized models
and started to take them into use. As a bonus e.g. the machine model provides a
nice logical sorting. One more model to implement and switch to.

72 files changed, 6268 insertions(+), 1250 deletions(-)

[1] http://buzztrax.svn.sourceforge.net/viewvc/buzztrax/trunk/buzztrax/src/ui/edit/object-list-model.c?revision=3350&view=markup
[2] http://pvanhoof.be/blog/index.php/2009/08/17/treemodel-zero-a-taste-of-life-as-it-should-be

2011/04 ========================================================================

I have been refactoring GStreamer's spectrum analyzer. It is now working faster
and also allows to get per-channel results. For testing I updated buzztrax to
check if one has the new version and if so show per channel graphs. While
hacking on the analyzer graphs I have also refactored the code, so that now it
is possible to probe the final output as well.

I spend the bigger part of the month on the tests again. I had an unref too
much somewhere. Even after all the work in refdbg this is still difficult to
track down. Eventually I found it and now all tests are green.

51 files changed, 2549 insertions(+), 1817 deletions(-)

2011/03 ========================================================================

I was testing buzztrax a lot on my MeeGo netbook this month. As screen space is
more precious on netbooks I was running it often in fullscreen mode and noticed
that some windows seem to not open. When leaving full screen the windows
appeared. Somehow they opened behind the main window. I looked over all child
windows and dialogs and cleaned up the handling with a helper method doing:

  gtk_window_set_transient_for(window, main_window);
  gtk_window_set_destroy_with_parent(window, TRUE);

On my desktop it works fine on the netbook the problem still happens :/ No idea
right now. As a good side effect I ensured that all dialogs have a properly set
default response.

I was also running the performance tests and did some oprofiling. I knew already
that my data-fixup code for buzzmachines caused quite some overhead. It is
handling denormals and marking full zero buffers as empty. I now added code that
sets the FPU on x86 machines to DAZ|FZ mode from the application and disable the
fixup code. On my netbook my 11 min benchmark song renders in about 1 min
instead of 1:20 min before. On my desktop most of the change are hard to
measure as it already only takes 5 seconds :). Anyway the oprofile runs confirm
the speedup. The code disappeared from the top 20.

The pattern editor widget becomes slow when getting large. Some text drawing
operations look expensive. For a start I ported the whole widget to use cairo,
but that does not take care of the slowness. After more measurements it becomes
clear that I need to rework this more. I need to render it offscreen and reply
to expose events by copying pixels.

I also worked a bit more on the interaction-controller library. udev/hal code is
refactored into extra objects (saves me a lot of #ifdefs). It also has some
tests now. I still have a mysterious issue with udev. Run this stand alone
example as told in the header - for me valgrind complains about uninitialized
data access. It only seems to happen when you have a /dev/input/mice which all
my computers have. I have a workaround, but believe more testing from other
would be great. [1]

65 files changed, 3160 insertions(+), 1085 deletions(-)

[1] http://buzztrax.svn.sourceforge.net/viewvc/buzztrax/trunk/buzztrax/design/udev/udevls.c?revision=3231&view=markup

2011/02 ========================================================================

As there was no project news over x-mas, I have a slightly longer one this time.
Before I dive into the usual code changes, something else - tadaa - we have a
new webpage. The previous page was a mediawiki with a few customizations. Now we
use a combo of wordpress-3 and mediawiki. Both use a similar theme (based on
the arch linux one). Wordpres gives as news, forum, social-network features and
much more. The first days I was suffering a lot from wordpress account creation
spam. Luckily this seems to be under control now. The concept and a lot of the
work was done by Joe Pea. We both have quite a few more things on the todo list.
One of the next items is single sign in for wordpress and mediawiki. Stay tuned.

In the last two month I improved the song-recovery workflow. The recovery is now
giving better feedback to the user and we're properly cleaning up afterwards.
The machine machine and pattern view do now have almost full undo/redo.

Quite several times already I had to deal with a dialog containing a treeview
showing a list of items. The latest example is the song-recovery dialog. Giving
such a dialog a nice good initial size is tricky. The treeview usually goes into
a scrolled window. By default one can see the headers and maybe one line. Of
course one can resize the dialog a bit, but as the line height is not easy to
figure it is still not easy. One approach I came up with is to grow the dialog
to show all lines until it would exceed a certain limit. The limit would be e.g.
half of screen or window height. The code for that is quite simple:

  list=gtk_tree_view_new();
  g_signal_connect(list,"size-request",G_CALLBACK(on_list_size_request),NULL);
  ...
  static void
  on_list_size_request(GtkWidget *widget,GtkRequisition *requisition,gpointer user_data)
  {
    gint max_height=gdk_screen_get_height(gdk_screen_get_default())/2;
    gint height=2+MIN(requisition->height,max_height);

    /* make sure the dialog resize without showing a scrollbar until it would
     * reach half screen height */
    gtk_widget_set_size_request(gtk_widget_get_parent(widget),-1,height);
  }

Another thing in gtk that I wonder if it has a better solution is the disposal
of popup-menus. The problem is that gtk_menu_popup is not taking ownership of
the menu, but there seems to be now event when the menu is done, so that one can
unref it. The only solution I can see is the pre-create the menu and ref-sink
it. When the entity that owns it is disposed it can destroy and unref it.

As we're quite gtk related in this time anyway one more discovery. Listening for
key-press-event instead of key-release-event and widgets makes key-repeat work.
Have added that to the gtk api docs.

Beside all the things above a couple of bug-fixes went in (make preferences in
machines work (e.g. choosing fluidsynth instruments). I did some refactoring on
midi controller handling; one can use the pitchwheel now and continuous
controllers work better. Finally the dialogs warning about unsaved changes are
more user-friendly; they now show the time passed since last saved/created in
addition to the timestamp.

20 files changed, 1635 insertions(+), 989 deletions(-)

2010/12 ========================================================================

Last month I made good progress on the undo/redo. I am now running the undo/redo
in sync with the object lifecycle. The downside of this is that undo/redo fails
when you have ref-count leaks. This now makes them more apparent. When trying to
debug them I noticed that refdbg [1] is not working anymore since quite a while.
I was googling what other people use for such problems. Well, apparently
everybody hates ref-count issues. Also most of the info you find is how to get
traces for refcount activity. That is what refdbg does also. As this did not work
for me anymore I've tried systemtap. Unfortunately right now its not useful for
user-space work on most distros (except fedora) - bugs filed. Next step: gdb
scripting. I managed to get a gdb script running [2]. Now even for simple cases
you quickly end up with a log of 150 backtraces. That is a lot to manually
review. I went one step further and wrote a script [3] to filter the traces.
Over time I got the trace-log down to 20 entries. This is practical.
Unfortunately the gdb script only work for tracing the lifecycle of one
particular object. If I extend it to work for all refcounting activity I hit a
gdb limitation to not allow nested commands :/. Back to refdbg :) I finally
figured why it does not work and have started to fix it up [4]. Lets see how far
I get next month.

Naturally this used most of my hacking time. Still I managed to make some
progress there as well. The buzztrax irc channel was much more active this
month. People reported small things here and there and most of it got fixed
right away. The manual got some more love too to help people to get started and
improve the description of several concepts. Finally all the refcount-debugging
leads to a lot of code reviews. I found several areas with lots of needless
refcount activity - fixes are in the repository.

81 files changed, 2682 insertions(+), 817 deletions(-)

[1] http://refdbg.sf.net
[2] http://buzztrax.svn.sourceforge.net/viewvc/buzztrax/trunk/buzztrax/tests/refcount.gdb?revision=3080&view=markup#l1
[3] http://buzztrax.svn.sourceforge.net/viewvc/buzztrax/trunk/buzztrax/tests/refcountfilter.pl?revision=3080&view=markup#l1
[4] http://www.gitorious.org/refdbg

2010/11 ========================================================================

In October I had not much time for buzztrax. I went to the GStreamer conference
and the CELF Europe. There I gave a talk about the "MeeGo multimedia stack" [1].
I also hacked on two GStreamer tool projects; gst-tracelib [2] and
gst-mediainfo [3]. In tracelib I worked on a UI to monitor gstreamer pipelines
on the fly. My approach to use libgvc (graphviz) for the layout seems to
challenge it a bit though - I get very mysterious failures. At some point
realloc is failing to e.g. allocate 96 bytes and the lib calls abort().
mallinfo() from libc is telling that the process uses 200 mb and valgind has
nothing serious to complain about. That's weired as I was suspecting a corrupted
memory list. I have to put that aside for a while until I get some new ideas for
tackling it.

gst-mediainfo is the UI for the new discoverer API in GStreamer. I'll make a
first release when the current gstreamer core and base is out as it depends on
them.

In buzztrax I mostly worked a bit on the crash recovery and did some bug fixing.
Hopefully will have more time in November.

14 files changed, 325 insertions(+), 166 deletions(-)

[1] http://elinux.org/ELC_Europe_2010_Presentations
[2] http://cgit.freedesktop.org/~ensonic/gst-tracelib/
[3] http://cgit.freedesktop.org/~ensonic/gst-mediainfo/

2010/10 ========================================================================

After all the initial work for journaling of edit events in the editor, I wanted
to get a first proof of concept that everything fits together. And that I just
got. The pattern editor implements a change-logger interfaces. It grabs the
changelog singleton instance and logs all changes together with the undo action.
The redo-action gets serialized and written to the changelog. The ui can
undo/redo activities by using the change-logger interface. Upon startup the ui
checks for leftover change logs, auto-cleans a few of them and offers a dialog
for deleting/replaying them. I can now load a song, make changes in the pattern
editor, ctrl-c/kill the app and replay the log when starting it again. There are
a couple of details that need to be cleanup and some things need a bit more
thinking: Next I will implement this in larger scale also.

As a continuation from last month I changed the whole editor UI to use
G_DEFINE_TYPE and co. Boring work, but good to have it done now.

I had some strange crashes in the test suite - all pointing to gconf and only
happening with the commandline client. After adding lots of extra logging there
I still could see nothing wrong. Then I remember the hack I added to get a
eventloop into the app - I run it as a new thread. By doing that I was doing
gconf bits from different threads too and it does not seem to like it. I have
now done the mainloop stuff more properly and get no more crashers. While
looking into this problem, I cleaned the settings classes and the gconf backend
a bit. It now does more stuff only as needed, improving the startup time of
buzztrax app a little further.

In GStreamer next core release will have extra metadata on element factories.
This mechanism allows me to kill the one-property help interface. I rewrote all
the code to use that conditionally and will remove it in a year or so.

As a last bigger task I migrated from deprecated HAL to GUdev. I have still
conditional support for both, but will kill the HAL code once everything works
nicely. I was using hal to discover input devices (joysticks, wiimotes,..) and
midi-devices that can be used to control effects. Most of the conversion was
straight forward. I spent a bit more time on getting nice names of the found
devices for the UI and to classify midi-devices. For the midi-device
classification I copied the matching rules from HAL - after all they seemed to
do the trick there. For the ui names HAL was actually grepping through various
files (e.g. /proc/asound/cards) for soundcard names. That I did not really
wanted to copy. I got some great help from the udev people and learned that udev
devices have properties like ID_VENDOR. One just needs to walk the device tree
to get to the root device and grab the names there.

119 files changed, 3377 insertions(+), 1953 deletions(-)

2010/09 ========================================================================

After some more work bt-dec starts to works better. I can now play buzztrax
songs in totem, banshee and co. I still see some issues with seeking though.

I have be going through my pending gtk bugs and patches. I can see a lot of
activity in gtk+ these days. People have been helpful reviewing and commenting
the changes. I could close two of my bugs with patches to code and docs
committed. At the same time I also understand a few things better and reworked
the focus handling on the tabs. Instead of listening to focus notifies and then
grabbing the primary widget on the page, I am now overriding the focus vmethod
and grab there. The disadvantage of the previous method was that the widget has
to be realized and mapped, but when you receive the notify for the tab switch,
it is not necessarily the case yet.

There were some changes on the logging in gstreamer. I had to adjust some parts
of my tests that where intercepting log messages.

I've started to migrate all modules to use G_DEFINE_TYPE, G_DEFINE_INTERFACE and
GST_BOILERPLATE macros to shorten the code. I hope I can finish it next month.
At the same time I have cleaned-up my gobject use:
 * remove dummy vmethod implementations (empty property setters/getter)
 * no need to check for dispose/finalize in parent class (just chain up, they
   always exist)

I improved the error handling in the commandline client and also in the ui (when
rendering to disk). It catches and handles missing element messages now. Before
the processing could hang if that happened :/

While doing more work on the changelog I noticed that I could also use that to
show last save date when warning about unsaved changes. The change log uses UTC
timestamps, so I had to convert them. I haven't found any nice API for this
(like give a date and tell what tz it is and ask to convert to local or any
other tz). The startup check for old change logs does now some auto cleanup and
sanity checks. Next I'll add some ui for picking one for recovery.

I recently upgraded on machine to suse 11.3. After that all machine icons where
in the wrong size. After some digging I noticed that the gnome/index.theme
misses all the 'scalable' entries and that seems to break my svg icons. I have
added a workaround, but with that I get 48x48 png scaled up. Readding the
missing entries works. I filed a bug [1], but nobody feels responsible so far :/

Bored from all the refactoring and bug fixing I hacked a bit on the spectrum
analyser. Its now using cairo (no more gdk_draw_*) and thus is ready for gtk3
and looks much nicer [2]. In addition is can do log plots and one can increase
the resolution.

While playing with orc for gstreamer and googling for simd information, I can
across some info about the gcc autovectorizer. One can ask for quite verbose
reports of gcc attempting to use simd for loops. I could improve the performance
in a few place based on the reports. Unfortunately the only places where the
vectorization finally succeeded where those where I just should have used
memset() :/

78 files changed, 4300 insertions(+), 1832 deletions(-)

[1] https://bugzilla.novell.com/show_bug.cgi?id=632602
[2] http://www.buzztrax.org/index.php/File:Bt-edit-0.6.0-01.png

2010/07 ========================================================================

Lintian complained about missing man-pages for buzztrax binaries. I also had a
pending bug for gtk-doc to clarify how one can do man-pages. Last month I wrong
some docs about how to document binaries in docbook as well, so that the
information is in the api-docs, but one can also generate man pages from the
same source. The new guides are not yet on library.gnome.org, but it can be
found in git [1].

I continued with more undo/redo hacking. I have again more tests that all pass
and working undo/redo in pattern editor for trivial operations. Need to do
edit-groups next and work more on the journal replay part. The testing work
resulted in some local check improvements - the BT_CHECKS env-var supports
globbing to select tests. Also patched that for gstreamers GST_CHECKS env-var.

While showing buzztrax to a colleague I noticed that the audio settings where
not used for the sample players. Fixed in svn.

In the early days I made some mistakes in the xml design of the song format.
Some tags had different attributes depending on their parent. This makes it
impossible to do xsd schema validation. I have changed the song xml slightly
(with backwards compatibility of old songs) and now xsd validation works.

Finally I have started buzztrax-bin. This is supposed to be a gstreamer plugin
that plugs a whole buzztrax song, so that one can play that in e.g. totem. The
basics are there, should be working quite soon.

83 files changed, 2452 insertions(+), 624 deletions(-)

[1] http://git.gnome.org/browse/gtk-doc/tree/help/manual/C/gtk-doc-manual.xml#n1594

2010/06 ========================================================================

The packaging continued - I found a Gentoo overlay that has buzztrax packages,
as well as packages for arch Linux. The later brought up some issues as Arch
Linux uses --as-needed when linking. An article in the Gentoo documentation [1]
suggests that its not a good idea to use this by default. To cut the long story
short - normally (without that option) the order of libraries in the linker
invocation did not really matter. When using --as-needed only libraries that are
actually used are linked in. To make that work one has to put needed libraries
behind libraries that need them. If you want to try this on your own software:
  LDFLAGS="-Wl,--as-needed" ./autoregen.sh

The Debian packages that have been made recently are nice too. All packages
undergo various checks, among a spell-checker of strings in binaries.

As planned I worked a bit more on undo/redo. I have it now implemented and in
use for some case in the pattern editor. I also added unit tests to verify the
stack logic.

I also managed to finished some work I had started at the Linux Audio
Conference - copy and paste of machine parameters between patterns and the
machine property window.

54 files changed, 2174 insertions(+), 699 deletions(-)

[1] http://www.gentoo.org/proj/en/qa/asneeded.xml

2010/05 ========================================================================

It is nice to  see that more and more distros have buzztrax packages. Many
thanks to Sebastian Dröge for submitting packages to Debian and Ubuntu.

Latest GStreamer releases (gst-plugins-base-0.10.28) have my adder fixes. With
those trick playback in buzztrax works much better. Scrubbing is not locking up
any more and we can play the score forward and backward at different speeds.
There seems to be still an issue in more complex songs though. Every time the
playback accelerates, the sink is waiting for something and thus there is a
pause.

One major feature I'd like to have for 0.6 is undo/redo and journaling. The
latter is important to minimise the loss of data in case the application or the
system crashes. I have been thinking for quite a while how to implement it and
came to the conclusion that it can be made so that journaling means having a
serializable redo stack. I have now started to write the code for it. Hopefully
more news on how it went soon.

48 files changed, 2240 insertions(+), 351 deletions(-)

2010/04 ========================================================================

I will give a talk about "Writing audio applications using gstreamer" at the
Linux Audio Conference 2010 [1]. Naturally quite some time went for writing the
article. Now that it has been accepted, I need to start working on the slides
and demos.

In buzztrax I've tried to make the life of people that use jack or pulse a bit
easier. The problem here is that the player is only visible in jack/pulse when
it is actually playing. I have now some code that keeps the sink alive (in
GST_STATE_READY). This allows e.g. changing the volume in pulse or routing the
output in QJackCtrl even if the app is not playing. Unfortunately it only works
after the sink was in playing once. I need to confirm my theory of what wrong
still.

I recently brought a netbook (MSI L1300) and thus wanted to try buzztrax on this
machine. I have installed moblin 2.1 on it to play with moblin. As usual,
installing own software on a new linux distro/machine always brings up
something. After a few rounds of configure maintenance and dependency trimming
I am set and having it running. Performance seems to be okay even for complex
songs. Yay!

Besides that, I fixed a few more bugs and wrote more tests.

43 files changed, 796 insertions(+), 100 deletions(-)

[1] http://lac.linuxaudio.org/2010/

2010/03 ========================================================================

As if February isn't short enough already a nasty stomach infection send me to
the couch (and bathroom) for a couple of days.

Still managed to do a couple of things. Some refactoring in the editor allowed
me to harmonize context menus. E.g. one can open machine windows also from
pattern and sequence view.

GStreamer has support for accelerated and decelerated playback, forward and
backward. I started to overhaul the seek handling a bit and added UI for fast-
forward and fast-backward. Fast-forward is working with some limitations, but
reverse playback needs some fixes in plugins still. As a side effect one can now
scrub with the mouse over the timeline.

I also wrote a standalone test app for my level meter. I was still not convinced
that is was always drawing correctly. Indeed there was a bug in the resize
behaviour, that now is fixed too.

As gtk+3 comes closer I did several rounds of adapting the the new style to use
accessor functions everywhere.

44 files changed, 1087 insertions(+), 317 deletions(-)

2010/02 ========================================================================

I couldn't really concentrate one a single task this months. Thus I ended up
with lots of small changes here and there. First obvious change is that buzztrax
got an over-engineered tip-of-the-day dialog. I takes extra care to present tips
in random order, without repeating tips before you have seen them all.
I also played a bit with parasite [1] - the cool gtk ui introspector and noticed
that my dialogs are inconsistently layouted. Well, fixed now.

Besides I did lots of small cleanups and refactorings. GStreamer pipelines load
faster as I now link pads directly (not elements). This also gives me better
diagnostics if it goes wrong. I could get rid of some dead code, removed a lot
of double checking and generally lowered the amount of gobject runtime type
checks. I also turned some more objects into proper gobject singletons. This way
I don't need to pass them around anymore.

Finally I wrote some test code in preparation of adding device selection to the
audio settings (like selecting the alsa device). Need to make a plan of how to
store the selection for multiple sinks.

173 files changed, 6014 insertions(+), 5939 deletions(-)

[1] http://chipx86.github.com/gtkparasite/

2010/01 ========================================================================

I worked most of the December time on gtk-doc [1]. After more that a year I
released 1.12 and 1.13 on the same day:).

On buzztrax I also spent a little time, improving the docs and pushing the test
coverage further. I will attack the bullets on the 0.6 roadmap next. Happy new
year and stay tuned.

[1] http://www.gtk.org/gtk-doc/

2009/12 ========================================================================

I made a nice change to the pipeline graph builder - It now uses a fixed
internal format (float 32bit). This allows us to avoid plugging audioconvert
elements in wires and machines. Now we plug them only if the machine cannot
support the internal format. This gives 7 -> 1 sec speedup for load & play of
e.g. Aenathron.bmx.

In general also plain to wav rendering is now quite fast. On my AMD64 @ 1.8GHz
the 11:45 min. song renders in 45 sec. and on my Intel Core 2 Duo @ 2.0GHz it
takes 28 sec..

The rest of the month I spent a lot of time on project maintenance, improving
the api-docs and writing more test. Regarding the latter, I got the test
coverage improved a lot. Writing automated tests for some areas is quite tough
though.

Then I also made a small change in the UI. All context menus can now be invoked
via a popup menu button in the toolbar above (machine, pattern and sequence
view), this makes it more usable on touchscreen devices.


2009/11 ========================================================================

I started the month with upstream bugs work. First I looked into #581873, made
a fix and two days later realized that my git checkout was on a stale branch and
its already fixed in gtk+-2.18. Next I looked at the mime matching issue that is
already plaguing me for a while (#541236). I also have a patch for that and
hope that I get green light for it or a review how it should be fixed instead.

In buzztrax I implemented copy and paste in sequence. I also found our what I
did wrong in my clipboard handling code (see my previous post). Dunno what wrong
with the old code, but this change made it work:
//GtkClipboard *cb=gtk_clipboard_get_for_display(gdk_display_get_default(),GDK_SELECTION_CLIPBOARD);
GtkClipboard *cb=gtk_widget_get_clipboard(widget,GDK_SELECTION_CLIPBOARD);

Next I finally got rid of the gnomevfs hard dependency. It is only needed if you
have a quite old gtk to get help working. While testing I noticed that some
translations disappear during run time. I made some i18n handling fixes
regarding to initialisation and libraries.

I am probably the last one to figure that one has to draw with the 0.5 px offset
in cairo to get non blurry gfx. After Matthias post I looked at my vu-meters and
voila, I was doing it wrong. Fixes are in svn together with some small
optimizations.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=581873
[2] http://bugzilla.gnome.org/show_bug.cgi?id=541236

2009/10 ========================================================================

After a release it is always not so easy for me to pick what I will work on next.
I decided to look into copy'n'paste as this is crippling usability right now.
This sounds like a trivial thing to implement, but its not. Its partially
difficult because the gtk documentation on that matter leaves a lot to answer.
With the help of the sources I got it implemented for patterns. One thing that
worries me right now is that I use GDK_SELECTION_SECONDARY instead of
GDK_SELECTION_CLIPBOARD (which seems to be the recommended one). In my case I
have a custom widget to edit structured data. I serialize the data in a textual
form, but use an own mime-type for copying, as its kind of pointless to paste it
into e.g. your editor. The mime type thing works. To debug it, I can also
provide the data as text and then I can paste it in some text editors. What
puzzles me is that if GDK_SELECTION_CLIPBOARD is used, gtk+ seemingly randomly
post a GDK_SELECTION_CLEAR in gtk_widget_event_internal() and that clear my copy
before I have a chance to paste the data. It has something to do with a
"selection-clear-event", but again that's only partially documented and the
other related events are not documented at all.

Besides a few bug fixes, I also did more optimisations on song-loading. There
are still a few candidates for more optimizations, but some of them require
quite substantial refactorings. Some of the improvements I already did were on
the gstreamer side and they are now in the official tree (some already in
0.10.25 release and some in the next one).

2009/09 ========================================================================


2009/08 ========================================================================

Hollidays ahead - one whole month for me and family. This month I continued
profiling a few usecases (song loading and playback start). I did quite many
optimizations both for buzztrax itself, but also for gstreamer. Altogether they
cut the times down by 20%. I still like to get it faster, but some things need
more work.

All the modules are now in string freeze. I will do releases in september unless
critical bugs get filed. While the translators are doing their work, I looked
into several smaller problems I had on my todo list and I am happy to see all
fixed. One recent changes was cleaning up the icons-theme handling. All themable
icons now use a namespace prefix to avoid clashes.

Many thanks go to Andrew Walton who is working on ubuntu packges [1].

[1] https://launchpad.net/~awalton/+archive/ppa/

2009/07 ========================================================================

After all the thinking last month regarding the saves and handling external
files, I finally found time at GUADEC to finish the implementation. I can do a
quick copy from the old file to the new one on save and create wav files on the
fly when e.g.. saving a buzz song in buzztraxs own format.

During the month I did a lot of real world testing. I recorded children songs as
I had scores from my sons kindergarden :), but also just played around. I had
the app running under gdb with G_DEBUG="fatal_warnings". Obviously I did not got
far with making music on the first evenings. A couple of days later we have a
lot bugs less.

My talk at GCDS about "multimedia in your pocket" went fine [1]. I showed short
demos of running pitivi, jokosher and buzztrax on a omap3 device using maemo 5.
I hope the slides will be available soon.
For the demo I did some more performance tuning. Using GTK_DEBUG=updates was
very helpful to improve the UI to do less redraws.

I also spend some more time on the user manual again. Much less FIXME
paragraphs left :)

[1] http://www.grancanariadesktopsummit.org/node/215


2009/06 ========================================================================

May passed quickly. I was testing a lot and as usual this brings bugs to day-
light. I noticed one particular problem, that I still have to solve. Buzztrax
songs are actually zip file containing the songs.XML file and references files
like samples. When the song is save the externals are copied from its original
location into the zip. First there is a chance that the file becomes unavailable
between loading it and saving the song (e.g. if the files where loaded some a
sample CD) and then of course if those songs are given to someone then the zip is
all there is. I see two ways to handle it - a) if the file is not available, save
the raw-pcm as a wave-file, b) when loading new files samples, copy these some-
where and keep the file open and when loading a song, copy this somewhere and
keep it open (somewhere = local file system). One thing I already have
implemented is save saving, that is rename the old file, save and in the case of
failure roll back.

There were also a couple of bugfixes in the UI. I had a long session to fix
object destruction and detaching related signal handlers - too bad that the
limitations in g_signal_connect_object() still render it pretty useless.

In the beginning of the month I continued with the work on the buzzmachines
module. I rewrote one effect from scratch and its pretty compatible. I also
added more presets and demo-songs.

While testing more buzz songs I realized two long standing issues. On the buzz
song loader I got one detail wrong from the reverse-engineering - I was loading
polyphonic pattern with voices and time swapped. That was easy to fix and make
many songs sound proper. I made a few other compatibility fixes and improvements
on the song load too. The other problem was actually much more work - the
buzzmachine emulation had a big flaw. When I instantiated a plugin I was loading
the  dll/so once for the class and created the machine instance at the same
time. The emulation API only had a init(). That means for multiple instances I
was "reusing" the class wide instance. It worked surprisingly well :) Now I did a
big refactoring there. In class init the dll/so is loaded and for each gobject
instance I create a instance of the wrapped machine.

Finally I got around implementing one feature in the GStreamer side. There are a
couple of wrapper plugins in gstreamer that act as a bridge between different
plugin APIs. The way this was done had quite a drawback. Whenever the plugin was
loaded, it was re-registering all the element types. In order to do that it
needed plugin specific metadata. So it was loading each of the bridged plugins
and querying the features. It needed two patches to get that changed. Now
gstreamer does not ref each element class of a loaded plugin during loading and
the registry can cache plugin specific metadata. What does it mean practically?
A typical buzz song now loads in a quarter of the time.

2009/05 ========================================================================

Lots of testing and small improvements again. Besides the usual valgind sessions
I tried the LLVM/Clang Static Analyzer [1]. There are some annoying warnings, but
lots of correct ones too. Most of them were nothing major, but this is a good
tool to follow. I also got more feedback from the NetBSD packages and worked on
my Maemo port. This resulted in a couple of portability fixes and dependency
cleanups.

With the testing came also many small but nice fixes and improvements. E.g.
stereo wavetable support was incomplete and is now working fine. The pattern
editor got many improvements like entering wave-table numbers, note-off support.
Finally "play notes" is fully done. Latency is a bit better also. With latest
pulsesink in gst-plugins-good git its actually quite okay (thanks wtay!).

The buzzmachines module has more machines ported, I have started to add demo
songs and preset files. This needed some update in the gstreamer plugin too.
Under windows the plugins, presets and help is all crammed into one dir. I have
split it to have docs and presets under share and not in lib.

Thanks for help on gobject-introspection irc channel, bindings start to work.
I have a javascript example that plays songs. Major obstacle was to get the js
syntax right. The python sample does still not work. I hope it will after this
summer of code.

I also reviewed and extended the user-docs. This version finally becomes
usable :) Will do the strings freeze and pre-release tarballs this month.

[1] http://clang.llvm.org/StaticAnalysis.html

2009/04 ========================================================================

We're heading for a 0.5 release! Most planned features are done and thus its
time for testing. I've added some more unit tests. Especially for the dynamic
editing, which now finally seems to work quite fine.

I added more keyboard shortcuts to support the workflow people might know from
buzz. There is one to start playback from cursor-position and several for cycling
through the comboboxes in pattern editor. I started to work on the play-notes
functionality in pattern editor too. One can play notes while editing if song is
playing already. Need to play the song in a idle-loop otherwise. Also need to
figure the horrible latency I get.

One feature that was missing compared to buzz, is that buzz also shows
parameters (volume, panorama) of incoming connections in the parameter view.
We have this now too.

I also refactored some code in the machines and made monitoring more flexible.
As a result the level-meters in the toolbar are now post-gain. Means if you
change the volume you see the level-changing accordingly.

Last change of the month is some eye candy. The icons in the machine view don't
become blurry when zooming anymore. I also added some simple effects to show the
state (desaturizing them or making them half transparent).

LJ has part two of the buzztrax article online [1]. Its an interview and tells
you all you never wanted to know a bout me and the project.

[1] http://www.linuxjournal.com/content/buzztrax-project-part-2-interview-stefan-kost

2009/03 ========================================================================

Yay. LJ has a nice online article about buzztrax [1]. While helping the author
to get the code up & running, I mad several improvments to the configure stuff
to make things more obvious, especially when installing not to /usr. I also
updated the instructions on the wiki [2] and waffel updated our jhbuild module-
set.

The GStreamer buzzmachine plugin now supports an index.txt file in the search
path. This is used in buzz to categorize machines. The wrapper plugin adds the
categories to the GStreamer classification filed and buzztrax-edit uses it to
build a structured menu. This helps makes the menu a bit more useful again. Same
stuff needed for ladspa (via rdf).

The whole machine graph handling is now getting into 2nd phase. I can already
disconnect stuff while playing without breaking things. Adding sources still has
issues :/

I also made a series of UI experiemnts. I now have some code for doing properly
scaled svgs on gnome-canvas. Sofar the machine icons became blurry when zooming.
This was quite noticable in the screenshots of the article. Speaking of those I
am suprised that even today, browsers only do nearest neighbour scaling. As
graphics is fun, I also hacked some pixbuf filter effect, so that I can get icon
variants for selecting and disabling. This will hopefully be integrated in next
month. Finally I replaced the VU meter code with the cairo variant from gbo
#547490 [3] and made some fixes/improvements.

[1] http://www.linuxjournal.com/content/buzztrax-project-part-1
[2] http://www.buzztrax.org/index.php/Building
[3] http://bugzilla.gnome.org/show_bug.cgi?id=547490

2009/02 ========================================================================

Many not so visible code changes this month. Since last Autumn I have GObject
introspection enabled if available. So far it has not been that useful due to
some wrong use of the GObject in my code. That mostly fix now. Major thing was
to change all _new() function to just call g_object_new and utilize the
_constructed() and _constructor() vmethods in GObject. That wasn't so easy.
Buzztrax uses a persistence mechanism [1] to serialize and deserialize objects.
It is implemented as an interface. So also this was needing a lot of changes to
allow construction from a data storage. Fortunately interfaces are tied to the
class, so one can have an interface method that acts as a factory. Main
remaining ugliness in the new code is there are some parameters coming from the
code and some from the file and its not straight forward to create an object
than - I will need to use g_object_newv(), but generating the GParameter array
is painful.

The second big rewrite that is now also merge to the trunk is the new GStreamer
pipeline graph handling. In the past the graph was more or less shallow.
Machines, the building blocks of a song in buzztrax, are a chain of GStreamer
elements. There are volume controls, mixing elements, level meters, converters.
They are all plugged as needed. But they were all plugged in the main pipeline.
Now machines and wires are bins (containers). That makes it much easier to
relink internals and also makes it possible to treat them with normal gstreamer
API. As a first feature buzztrax now rebuilds the pipeline before playing and
used a deep graph scan to only add fully connected parts. That means one can
play songs that e.g. have a unconnected source. In the old code this was
stalling the pipeline. The UI has now a debug menu in the debugs build. The one
and only entry allows to dump a pipeline graph, converts it to png and opens it.
Nice to check the constructed pipeline.

There are also some smaller fixes and a few more tests. Its good to have the
tests when doing such refactoring :)

[1] http://www.buzztrax.org/index.php/Gobject_serialisation

2009/01 ========================================================================

This month I worked on a couple of small, mostly UI related things, while
drafting bigger plans. There where many TODOs in the code for small improvements
and now there are less. E.g. I now filter more internal GStreamer properties
from ui dialogs. I added some more things to the menus (hide/show statusbar,
toggle fullscreen). The sequence view got some fixes - some shortcuts where
overlapping, the label column now shows cursor and selection and finally the
cursor is clamped to now leave the editable area. I also started adding a debug
menu in --enable-debug configuration. The only command right now make a
GStreamer pipeline dump as a dot file, converts and shows it.

I received two more translations this month too. I realized that its not always
easy to translate the texts and added comments above in the code to give some
context.

We're also getting more buzz-a-like. I made the playback start/stop and loop
behaving the same way. Now one can start playback from arbitrary positions.
Finally I also found and fixed one bug that caused noise in the output of
mono-to-stereo buzz machines. Together with some fixes in plugin parameter
handling, this makes more songs playing fine now.

As one item from the roadmap for 0.5 [2], I got rid of libgnome usage. Less
dependencies, yay! I read this nice autotools tutorial [1] over xmas and fixed a
couple of things in my setup. Definitely recommended reading.

[1] http://www.lrde.epita.fr/~adl/autotools.html
[2] http://www.buzztrax.org/index.php/Roadmap#Version_0.5_.28crown_of_thorns.29_2009

2008/12 ========================================================================

Finally I have cut a 0.4 release for all buzztrax packages [1]. I spend most
time before with maintenance tasks, such as i18n updates (we now have dutch and
dansk translations!).

I started with some features after the release. There are now some nice
gtk-theming improvements for the pattern and the sequence view (we have a custom
gtkrc now that extends the theme). Then the audio settings got ui for choosing
sampling rate and channels. This will be nice for arm based devices if the cpu
power is not enough for high quality as well for doing high sampling rates on
fast machines for max quality.

Naturally people try your software once you released it and not before. Thus we
got quite some amount bug reports. A lot of them were related to portability,
looks like we get it working on BSD. I'll probably do another release soonish.

[1] http://sourceforge.net/mailarchive/message.php?msg_name=492DB0BA.1070204%40users.sf.net

2008/11 ========================================================================

Beginning of October I've been at the Boston Gnome summit and learning about the
GObject Introspection project [1]. The project will help to add language bindings
to libraries in a easy and consistent way. I added the stuff to buzztrax libs and
it sort of works a bit already. Cool!

I was showing buzztrax to some people at the summit and noticed that samples are
not always imported correctly from buzz songs. This is now fixed. I've tries all
my songs (~50) and it handles them fine for all now. Along with that, I
implemented some missing methods in the buzz emulation layer - sample playback
seems to be fully emulated now.

I also looked into some ui issues. One was an obscure repaint issue with gnome-
canvas that we use in the machine view [2]. OpenSUSE released an update recently
that has the fix. Unfortunately there is no tarball release that has it. I fixed
another issue where the canvas became blank. I keep the content position fixed
when resizing the window. I was also doing this when the window was bigger than
the visible area and that means doing math with NaNs. Fixed. The last UI issue
was the self made treeview table header. It did not repaint when scrolling. I
tested this with the lovely GTK_DEBUG envvar and the area just stayed red. I got
the size requests synced the wrong way between table, viewport and actual
content.

The last issue I worked on is the interaction between animated object properties
and UIs. We use the GstController to apply the sequence events to the machines.
But also users can change parameters while playing. The sequence events are
suppressed while changing the parameter (e.g. slider), but unfortunately value
springs back once one releases the control, if there are sequence events. Seems
that we need some API to keep the sequence disabled until the next
control-point.

[1] http://live.gnome.org/GObjectIntrospection
[2] http://bugzilla.gnome.org/show_bug.cgi?id=553997

2008/10 ========================================================================

I began the month with the remainder of the namespace cleanups. Should be all
fine now. The ktorrent guy was not giving in. Well that's their way of handling
it then.

I have registered buzztrax with the translation project. All strings are frozen
for 0.4. Now of course I look for translators who are willing to help.

During testing, I discovered that for some bpm and tick resolutions, notes where
swallowed. This was due to different rounding behaviour in the sequencer and the
plugins. This is now fixed. As a side effect, I can now render in any sampling
rate. That will help my mameo version :)

[1] http://translationproject.org/latest/buzztrax/

2008/09 ========================================================================

Out of some irc conversation, I gave implementing synced meters a go. Until so
far level and spectrum meters in buzztrax were ahead of time. The reason is that
gstreamer tells me about the values once they are computed, but that's not when
the actual data segment gets played. Luckily the message has a timestamp. So all
it needs is to sync drawing with the audio sink. MikeS gave me some good
pointers on irc. It wasn't that straight forward. I found and fixed a bug in
level meter plugin so that it now puts useful timestamps on messages when it
play loops. It works really great now.

gtk_widget_grab_focus() is a nasty function. It asserts when the widget is not
mapped/realized and steals the focus in any case. This is problematic if you
have tabs and update widgets when things changed. I now have a wrapper added
that does the extra checks. Wonder if that would be a good change for upstream.

I did lot of testing with real buzz songs and machines. I have now about 80
original plugins in use. Real testing always leads to some good fixes :) We now
add an empty pattern by default when adding new source machines (like buzz did).
I also noticed that bpm/tpb information was not loaded from buzz songs. This is
now fixed (also master volume was missing). After that I spotted that most bpm
tempi did not work well. Now timing precision is much better.

A big recommendation to everyone. Pick a decent prefix for your project. I've
been a bit blue eyed and had chosen 'bt'. Part of my package is a core library
called libbtcore. Now unfortunately ktorrent did the same mistake and have a
libbtcore (bt stands for bittorrent there). As neither of them are really
general purpose they should be uniquely named. I analyzed all files I install
and went thought the great pains of renaming everything - libs, binaries, docs
includes, pkg-config files, desktop files and so on. Hope I never have to do
that ever again. I also filed a bug for ktorrent [1] so that they can fix it
before its causing problems. Interesting how they dealt with the report - "I was
first with libbtcore - RESOLVED AS WONTFIX". Interestingly I was 1.5 years
earlier, but that wasn't the point at all.

[1] http://bugs.kde.org/show_bug.cgi?id=170674

2008/08 ========================================================================

Wow, July went fast. I spend most time with my family. Still a few news from the
development front. I worked mostly on wavetable view. It now features more
proper sample playback. I wrote a memory audio source for GStreamer. It supports
forward and backward playback. This is needed for e.g. ping-pong loops. Also now
changing things takes effect while a sample plays. Our waveform widget also
shows a playback pointer and loop markers. I also got around to unify and merge
duplicated note conversion code. You know, when you've copied something the 3rd
time, its time to refactor.

Earlier this month I refactored the song-io plugin API a bit. It has now more
metadata. This helps the UI to setup file and recent filters. Unfortunately I
had to find out that the mime-type detection in glib was broken [1]. Its at
least fixed in trunk. No idea since when it actually worked. As a workaround I
am now adding "*.xml" to the filters.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=541236

2008/07 ========================================================================

Some very visible changes this month - svg machine canvas icons. For that I
needed to add better icon theme support. All icons are now themeable and colors
are matched with the theme. Machines now have tiny level-meters embedded in the
icon.

I also found a solution for slow start of playback in complexer songs. Data-
format-negotiation is not deterministic in all cyclic gstreamer graphs. Proposed
patches are attached to Bug 540645 [1].

Finally I got around implementing support for a zip based song format. This
can contain binaries (like the samples being used). The loader is based on
libgsf [2], which turned out to be a pleasant experience.

I also added filters to the load and save file-choosers and to the recent-chooser
in the new recent menu. Still fighting with the filter not doing a precise
detection [3].

Next on my todo list is refactoring the song io plugin api a bit. Right now
there is too much hard-coded data (like mime-types, format names, extensions).

[1] http://bugzilla.gnome.org/show_bug.cgi?id=540645
[2] http://directory.fsf.org/project/libgsf/
[3] http://bugzilla.gnome.org/show_bug.cgi?id=541236

2008/06 ========================================================================

In the previous month I worked further on sample support. Samples are played now
from memory and can be transposed. Also the buzz song import plugin got sample
support added. This means I can load now a big share of my existing songs. While
testing those I could fix some more issues with plugin initialisation and those
song sound like in original buzz now. Yah, we're getting there.

The current version also brings some eye-candy, Marc (aka deloun) drew us great
icons in tango style. I reworked the code to load all icons via theme mechanism.
I also allocate other color based on chosen theme now. One thing left for June
is to start using the svg on the canvas.

2008/05 ========================================================================

As can be seen on our roadmap [1] sample support is scheduled for 0.4. As this
is the major feature, we started working on it. I have to say that building
buzztrax on top of GStreamer was definitely the right thing to do. We can now
load whatever GStreamer can handle. FSM did a nice cairo-based waveform widget.
Right now I am working on the code that allows plugins to access the wavetable.
It will hopefully be ready real soon.

Besides that I've started to restructure the gst-buzztrax package a bit further.
I also plan to merge the buzz wrapper plugin into it. The aim is to reduce the
number of packages that one needs to build.

[1] http://www.buzztrax.org/index.php/Roadmap

2008/04 ========================================================================

After the release I demoed it some friends and obviously found some issues. Now I
spend the rest of the month tracking then. Its mostly ref-counts issues. Why are
the so nasty? Well unlike memory leaks, they are anonymous. Memory is allocated
once and should be paired by one free. The id of the resource is the memory
address. Now every ref should be paired by an unref, but all the refs and unrefs
share the same id (address of the object). So how to figure which ref is not
having the unref? Refdbg [1] can trace object and gather backtraces for
ref-count operations. So one has to go through the list one by one, remove pairs
and study whats left. Its not easy, but it works.
Now why is this so important. If the refcount never reaches 0, the object is not
disposed and occupies memory (until the application exits). Under valgrind it
would appear under reachable memory usually. For most apps it has no immediately
visible effect. For gstreamer app it has. In buzztrax I do dynamic stuff with
pipelines, like adding and removing elements. If you get the ref-counting wrong.
The element is unlinked but not disposed. If the pipeline is set to PLAYING one
gets data flow errors. But then its not a gstreamer only problem. E.g. icon theme
pixbufs in gtk. If the are not unrefed, gtk cannot unload the theme. Means if
you try a bunch of themes, none of the is unloaded if even just one panel
applet has a ref-count issue. The sad thing is that the gnome libraries have
quite some ref-count leaks. I've started to track and fix them as its hard to
see something within all this noise [2][3].

I've released buzztrax-0.3.1 with the fixes. A few more developments to mention:
Waffel started a demo for the zip loader based on libgsf, Deloun made great svg
designs for the machine view canvas and the tabs and Herzi send me a patch to
add native scrolling in the pattern editor. Now back to new features, yah!

[1] http://refdbg.sf.net
[2] http://bugzilla.gnome.org/show_bug.cgi?id=525815
[3] http://bugzilla.gnome.org/show_bug.cgi?id=66513

2008/03 ========================================================================

The Linux Audio Conference 2008 was nice once again. Good talks, interesting
know-how exchange and of course opportunities for testing and hacking on
buzztrax.

I have improved the playback engine a bit. It now uses less additional latency.
Still one get much lower latency by using jack, instead of pulse audio
(currently experimenting to lower latency there too).

The pattern editor got better gtk+ theme support (especially on dark ones) and
also tries to use the default monospace font and font-size to better match with
the overall look of your desktop. I implemented blending value ranges and
randomization of ranges. FSM implemented more keyboard shortcuts. I added value
descriptions to the status bar where the plugin supports it.

Also the sequence editor got some todo-fixing. The sequence was never
horizontally scrollable (adding columns would force the window to be wider). The
M,S,B buttons are now color shaded when pressed to give better visual clues.
Finally also the position unit switcher is functional (ticks/time) and the label
navigator gets properly updated. Lots of small things I never got around until
now

Level meters in sequence and analyzer windows are now more lively and precise.
Having several analyzers open now also produces the expected results.

The buzz song importer got further fixes. It seems to load all of my songs just
fine now.

Some improvements also on the buzz emulation side. More machines load and work.
We have a nice testsuite with html reports now. I spotted some issues which will
fix more machines. Will try to implement this next.

If nothing urgent comes up. I'll prepare the release in the coming days. Stay
tuned.

2008/02 ========================================================================

We're heading for a release. There is a few more features that we'd like to
finalize. Then its time for testing and this is were *you* can help.
Featurewise buzztrax improved nicely this month. I improved stereo support.
We now have new look for the wires. They show animated volume levels and
panorama positions. Both volume and panorama can be adjusted via popup-sliders.I
like this a lot more that how it works in buzz. There it was a bit confusing in
some cases (not clearly indicating which connections a panorama setting would
affect). As an extra bonus, buzztrax does stereo balance on stereo connections.

I also updated the buzz song importer to make use and correctly import panorama
and volume. Now also the master-volume is mapped to the scale used in buzztrax.

FSM worked on the pattern widget. It supports variable cursor stepping (going
down several lines at once) and selection. I added column/group/all insert and
delete actions.

Finally Waffel wrote a jhbuild module set for buzztrax [1].

http://www.buzztrax.org/index.php/Building#Building_with_Jhbuild

2008/01 ========================================================================

I guess tracker-style music editors have to live with the heritage of tabular
pattern input. Some feature rely heavily on it. FSM started with such a widget
and I integrated it into buzztrax. One can still switch between the previous and
the new one by setting a define. The widget works quite nice already. The only
missing feature is native scrolling support. To add that to an own widget
requires an ugly hack. I can't figure why gtk does not use an interface for it.

Patterns in buzz also carry volume and panorama events for the inputs of the
machine. This was totally missing in buzztrax. Now we have quite nice support
for it. The volume control works and panorama/balance support is next on the
to-do list. While working on that I made master-machine patterns useful by
allowing to control master-volume,

The sequence view got more commands. Finally one can insert and delete rows in
all columns or only in the current track.

If that wasn't enough, we also did a round of maintenance. All code has been
moved to svn. The buildbot has been extended to build all modules now.
And finally I got around to port the code to not use the deprecated gtk tooltip
API if new gtk is available.

That's a great start for 2008 I'd say!

2007/12 ========================================================================

After porting some simpler machines last month, FSM and myself where looking at
infector. This already is a quite complex generator. Porting as such wasn't that
hard, but unfortunately it did not play. But with the sources at hand we could
figure out what the issues was and fix the problem. It was a generic problem in
the buzzmachine host emulation. This could potentially also make other machines
work. Note to myself - I need to re-test the blacklisted ones.
One outcome of the better machine compatibility is that some of the original
buzz song now plays with some extra manual help.

Some improvements on the UI side also. The spectrum analyzer window is now
re-sizable. We also have a workaround for a gtk+ bug [1], there is now an
accelerator to start playback.

Unfortunately my recent attempts to merge my preset iface [2] to gstreamer got
stopped again. I need to try harder poking the other developers to review it.

That's it for this month - happy x-mas month to everybody.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=131177
[2] http://bugzilla.gnome.org/show_bug.cgi?id=396779

2007/11 ========================================================================

Very good news for buzz lovers. Recently FSM joined #buzztrax irc channel. He
gave us access to his buzzmachine sources and the okay to publish them under
LGPL. One thing that I had on my list for too long was to extend my
buzz-emulation layer to support natively built buzzmachines. Well now its in CVS,
A bml/gstbml rewrite to support native machines + initial 5 machines working.
Means approximately 900 to go. One thing that we still need to be able to port
some machines is a native implementation of buzz's dsplib. We will look into
that next and of course port more machines.

Some small progress also in the UI. I've added track reordering in sequence tab
and keymap independent note entering (y vs z mapping on different key layouts),

2007/10 ========================================================================

Before its getting even later, here is the monthly update. I worked a bit more
on the 'state persistence' - a song now tracks opened machine and analyser
windows. There are restored when loading the song. In continuation of previous
months efforts The machine view got some hot keys now too.

Now that lcov-1.6 is released, I've added a configure check for it and use the
new options. The new version does not need to be patched anymore to generate
coverage reports for user-space apps. While testing the overage, I also added a
few more tests to increase it.

Waffel has updated our MediaWiki. Now we have opened it again. Unregistered
users have to solve a captcha every time they edit or when they register. I moved
our changes into a separate skin to ease further updates. I have tweaked the css
a bit - more to come if I find good inspiration.

2007/09 ========================================================================

The first big change this month came from berzerka. He wrote midi support for
the interaction controller subsystem. That required some extension of the
classes, specifically adding a learn mechanism. That is you click a machine
property, select learn, touch the midi-controller and done.

One important requirement for a power tool, is having keyboard shortcuts for
almost everything. For the main menu its easy to do so in gtk+. But then we
have context menus and toolbars. So I read API docs and code, wrote test
programs and files bugs and patches [1][2]. The fix for [1] is in svn now, but
the patch in [2] needs review, anyone? Generally the keyboard accelerator
functionality needs some updating, seems that this has been mostly taken from
gtk-1. At least I could not figure out how to e,g. define two accelerator to
e.g. select previous/next item in a combo on a toolbar. Sure most apps won't
need this, but for productivity tools this is quite mandatory. Finally I wonder
what is the policy for the media-keys and how to use them. My gdkkeysyms.h
include does not have symbolic names for them.

While we're talking about gtk, imho the GtkRuler widget is not that esoteric, it
would be quite useful if it would have some bugs fixed [3] and be more
customizable (non-linear scales, more units).

Last month I have started the song-recording UI. The command-line tool already
supported rendering songs to mixdown files. Now there is UI for it too. In
addition to render a mixdown it can also render each track to a separate file.
This is great for postprocessing in a multi-track editor like jokosher [4].
Ideally we could even create a project file for some editors -help is very
welcome.

This month I also started to look into live song graph editing. Sounds scary?
Its is! GStreamer requires some extra care when adding or removing elements while
playing. I did this now for the wire-analyzer, that plugs spectrum analyzer and
level meter into a wire. With the changes it works reliable now and doe not kill
the playback. Next step is to do this for the song itself too.

Waffel improved out wiki a bit. We now have geshi extension [5]  installed. This
adds syntax highlighting to sample code. Really nice.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=469374
[2] http://bugzilla.gnome.org/show_bug.cgi?id=131177
[3] http://bugzilla.gnome.org/show_bug.cgi?id=465041
[4] http://www.jokosher.org
[5] http://www.mediawiki.org/wiki/Extension:GeSHiHighlight

2007/08 ========================================================================

Quite late this month. Our son was born on the 26 of July and this of course
causes some priority shift. Be assure I won't abandon then project. Also
berzerka is back and started hacking on midi control support. Speaking of this,
I did a needed refactoring of the interaction-controller stuff. Controller
assignments wont disappear when closing the dialog anymore and they are now also
saved with the song and restored when loading. I also implemented unbind and
unbind-all commands.
One TODO item is greater ui state persistence [1]. When loading the song should
appear as you left it. One more item for this is done, the active tab is saved.
This is a relative easy one for people that would like to help.

Our testing buildbot is now again up and running. The system had a faulty
battery, which made the clock run way too fast. In seconds the clock was minutes
ahead. I used the occasion to refactor a lot of dialogs into separate classes.
This allows to write some basic unit tests for those and do automated
screenshots as well. Together with some more regular tests, this greatly
increased test coverage. It of course uncovered bugs which we fixed.

As a final step I started with song rendering ui. The ui is not perfect yet, but
it starts to work. It looks like I can prepare a 0.3 quite soon. Yay!

[1] http://www.buzztrax.org/index.php/Ui_state_persistence

2007/07 ========================================================================

This month the ui (bt-edit) got improved. Editing pattern became usable - I
advance the cursor, triggers and notes can be editing as usual in a tracker. The
base-octave setting is implemented.

I also worked on the buzz song importer. One goal I set myself is to be able to
load and play some of the song initially shipped with buzz. Right now I try my
luck on Aenathron.bmx. The song is just 34 kbytes, but plays for more that 5
minutes. Geonik's primifun causes some headache for me as it imports a zillion
windows libs, thus I removed it from the song for now. To be able to load the
song I had to add support for old (< version 1.2) songs. The song loads, but
only produces cracks and pops so far :(.

Experimenting with loading various buzz songs also help to improve the machine
compatibility. More machine start to work. I have improved the logging in the
emulation module. the GStreamer buzzmachine wrapper go blacklist support to
disable those that are known to crash.

Unfortunately the recent changes need GStreamer form CVS again. One bug was a
silly copy'n'paste of mine, the other one got fixed by master-hacker Wim Taymans.

What else? More test work has been done. For release 0.3 I'd like to improve the
test coverage. Also kudos to Sebastian Dröge - Google summer of Code student. He
did a great job on the GstController improvements. We now have arbitrary control-
source support with backwards compatibility to the old limited API. A control-
source provides a time variant signal that modifies a GstElement parameter.
Right now there is a interpolation source, that provides a envelope and
triggers. Planned next is a LFO (low frequency oscillator).

2007/06 ========================================================================

Right after releasing 0.2 I hammered CVS with more changes. I fixed a long
standing bug, when request-pads in adder and tee where not handled correctly.
After disconnecting some elements the song never played again. I also added code
to guide format negotiation when using adder - it needs a caps-filter afterwards
that enforces audioconverts after all incoming source to the same format.

In bt-edit I totally rewrote the fake-selection handling in the pattern and
sequence view. I also added a gtk+-version dependent workaround for the cursor
navigation bug. Right now I work on improving the editing in the pattern view.

It was a short month as I also was on holiday in Germany. I rearrange the
release schedule [1] a bit and hope to release another version this summer. It
will improve stability and have some more code cleanups.

[1] http://www.buzztrax.org/index.php/Roadmap

2007/05 ========================================================================

Lots of commit and bug tracker activity this month. As we're heading for the 0.2
release I spend most time doing bugfixing. Berzerka discovered that song-saving
was flawed. Editing the patterns did not always took effect. Removing machines
had leaks and ref-count problems. There were some long-standing gtk-warnings.
All fixed in CVS. Finally that loop-playing problem got on my nerves. I was
trying to fix that several times in the past already. Finally I found that it
was a small issue with GStreamers adder element. Many thanks also to Henri
Valta, who contributed several patches. All the new testing also lead to some
new and some re-enabled unit tests.

Beside fixing, I was also working a bit on the features. The interaction
controller now works for input devices (via evdev). I've tested it with a USB
joystick and the harddisk in my laptop (via hdaps). Control devices are detected
via HAL and shown in the menus. One can assign those to effect parameters. Using
the accelerometer in the harddisk, one can control e.g. filter-cut of and
resonance by tilting the laptop - how useless. There is one flaw to mention -
the bindings aren't yet persistent, close the window and there gone.

Finally in gst-buzztrax we have a first working version of a fluidsynth
GStreamer source. Josh Green the author of swami [1] made the initial port.

I will now start to prepare the release. Should be out in the coming weeks.

[1] http://swami.resonance.org/trac

2007/04 ========================================================================

LAC 2007 was great. Was nice to meet all these people. The buzztrax demo was
well received. I will try to make a screencast of the upnp remote control
feature. I could only demo it there at a second attempt as I didn't received the
wifi router which was needed for the demo. I have put the slides online [1] (if
someone knows how the get rid of the stripes that openoffice 2 produces when
exporting slides with a gradient in the background to pdf, I am listening). For
the slides I updated the architecture picture and put it on the wiki too [2]
The time there was good to fix a lot of small issues. I believe its a good time
to try the project now. If everything goes right we try to release a 0.2 end of
April.

First bigger change is the settings UI. We have icons there for the subpages and
there are two new subpages - for the playback controller (upnp via coherence)
and for the coming interaction controller. The settings of the playback device
is instant apply now (except when playing, it will be switched after stopping).
Speaking of the interaction controller - implementation has started there. This
is one thing I would like to get into 0.2 still. I'll explain in more detail
once it is done.

I also spend lots of time doing maintenance - the api docs have been updated,
extended and uploaded, thanks to some valgrinding sessions some memleaks have
been found and fixed and refdbg helped to track down more ref-count issues.
Also now 'make distcheck' runs through for the first time. Finally I could fix
one xlib warning, which broke playback when playing with realtime effects.

During and after LAC I also spend time to work one small, but annoying things.
First I refactored the missing machines dialog so that it can remember elements
it already warned about. Next items was the level meters, they now are more
reactive and show current as well as peak level. The ui should be a bit more
usable too. The keyboard shortcut for switching between patterns and sequence
(ctrl-enter) was broken. When adding a new src-machines it also creates a track
in sequence automatically. In pattern and sequence view bt-edit shows unused
patterns in gray color (in the menu/list).

Altogether a nice list of fixes and enhancements.

[1] http://www.buzztrax.org/files/lac2007_buzztrax.pdf
[2] http://www.buzztrax.org/index.php/Architecture

2007/03 ========================================================================

February passed really quickly. I was quite busy preparing the FOSDEM talk.
Still I found some time to work on the project. Again I had to hunt some
refcount leaks and it took me days to track them down and fix them. We also had
more testers in the channel and could fix some build problems. Right now I am
working on some features for the LAC 2007 demo in Berlin. For those who can't be
there - I will write more about these new things next month.

Slomo and me are improving the audio plugins in GStreamer. He writes more
elements (like a compressor/expander) and I improved the existing ones to better
support float audio (32 and 64 bit). We now can play some more files and also
need to less often convert.

2007/02 ========================================================================

Last month I started to offer extensions from the buzztrax project for gstreamer
inclusion [1][2][3][4]. I believe that the idea behind is generic enough to
support them. The discussion and interest has been relative low so far :( I'll
probably interpret this then as agreement and commit the changes. The preset
handling has been improved. The buzz presets can be saved now too and meta data
(comments) can be edited as well. The generic implementation also shapes up.

As my solution for [5] seems to be disliked I went for a hack :( I now hide the
treeview headers and simulate my own. Now the header widgets work. As some extra
sweetness the header have per track volume meters. While working on this I also
made the label-browser function. It allows to jump to labels in the timeline.
Wanna see how it looks?
<a href="http://www.buzztrax.org/index.php/Image:Bt-edit-0.1.0-01.png"><img src="http://www.buzztrax.org/images/thumb/2/2a/180px-Bt-edit-0.1.0-01.png"></a>

I also started to add some functionality to the wavetable page. Its now possible
to browse the files and preview the selected entry.

I was curious how well the buzz song import now works. Especially with the
better handling of missing machines. So I added a test script, similar to the
unit test in core, that runs over all your buzz songs, imports them and dumps
basic info into text files. Then it greps the text files to generate most wanted
machine top 10 :).

Last weekend I did a first rough port of buzztrax for the N800. I have some of
the UI changes in place already. The GStreamer side was pleasant - no changes
needed. Unfortunately the gstreamer on the device is not the most up to date and
thus the app does not work too well.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=396774
[2] http://bugzilla.gnome.org/show_bug.cgi?id=396779
[3] http://sourceforge.net/mailarchive/forum.php?thread_id=31560403&forum_id=5947
[4] http://sourceforge.net/mailarchive/forum.php?thread_id=31471237&forum_id=5947
[5] http://bugzilla.gnome.org/show_bug.cgi?id=338271

2007/01 ========================================================================

In last month news I wrote about the gst element check. Now we also have the
respective UI parts. The apps check if the have mandatory and optional elements
available. If elements are missing the user will see an explanation which are
missing and what for they are needed. For optional elements its up to the user
to decide if that is okay or if they should be installed. In the future we can
make use of the new gstreamer libgimmicodec mechanism, to download and install
missing elements on the fly.

I also continued working on the preset support. The interface got some default
implementation, e.g. to generate a randomized preset. The buzzmachine wrapper
implements most of the interface. We can load presets, rename and remove them.
The later two actions are not yet persistent - I need to implement saving still.
On the UI side I implemented the preset pane for the machine settings window. I
decided not to copy the buzz UI here. I should post a screenshot soon.

I also went over the todo: comments in the source once again and implemented
things here and there. Now one can add/removed tracks for polyphonic machines.
Also adding/removing tracks in the sequence is now working fine and updates all
UI items properly.

Right now I am also giving the dialogs an overhaul. All got a default action
(e.g. press enter to dismiss). They also get moved into a separate object each.
This helps to test them standalone and to auto-screen-shot them during the test
runs.

Finally I spend some time configuring our buildbot [1]. For the first time all
steps are green. The machine the test run on does not have X11 running. Still we
can run UI tests and do screenshots of all windows. The magic can be found in a
few helper methods that pick a free display number, spawn a Xvfb server and
setup a GdkDisplay for gtk+. The buildbot stuff definitely rocks! I hope we can
extend this in the future - anyone found a way to trigger builds from
sourceforge.net cvs commits (via commit hook)? Make me happy and mailto:
ensonic (at) users (dot) sf (dot) net.

[1] http://141.57.8.70:8010/

2006/12 ========================================================================

This month we fleshed out the planning for 0.2. From now on we like to release
often and regularly. We defined a lot of small gtk UI tasks. If you like to
help, we welcome you with open arms on irc://irc.quakenet.org/#buzztrax.

First changes after the release are already in CVS. I worked on the buzzmachine
emulation. I can now handle some more plugins. We need to update and re-run the
coverage tests to get a clear picture. Regarding wrapper gst-elements we have a
bug in gstreamer bugzilla that needs some work [1].

I also worked on the UI a bit more. The machine preferences and properties now
have some reasonable size. Its not easy to get a default size for generated UIs.
Right now I clamp the height to the screen-height minus some extra. Would be
nice to have some way to figure how much space one should leave for upper/lower
panels. I also needed to add a workaround for the window-width wobble. If you
had sliders with labels in the UI, the width was dependent on the label with.I
can't really know the maximum width beforehand easily, so I had to set a default
width. Good enough for now.

I also started two new interfaces for gstreamer elements. First one is about the
help documentation of the element. Buzztrax can show the docs of buzzmachines or
the gtk-doc of native element already. The second iface is about the preset
handling. Implementing that for the buzzmachines is next on the todo list.

Finally I also started to put some gstreamer element check into the core lib.
During configure we can't check for installed elements and it wouldn't make
sense anyway. So we are going to check for mandatory and optional elements at
application start. Checking works fine already. Now I need to add the UI dialog
for the missing elements report.

Have a nice christmas month - we'll get back to you next year.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=350477

2006/11 ========================================================================

Finally! We did release 0.1 "genesis". In June 2002 we registered the project
and started thinking. For more than year nothing big happened. In February 2004
the first GStreamer example code landed in CVS. That was using GStreamer 0.8.
Then the metamorphosis began: using GObject, adding unit tests, API docs, user
docs and so on. In August 2005 came the switch to GStreamer 0.10. In summer 2006
our team grew from 2 to 4 developers. The whole project already contains 139000
lines of code.

Even though the current code is maybe a bit rough and the applications are not
that usable yet, we're confident that new releases will follow quickly and bring
the missing pieces. If you want it happen faster, join the project. We have lots
of tasks, some with a fleshed out concept, some merely ideas, some suitable for
not so experienced developers, so quite tricky. Give us a visit on
irc://irc.quakenet.org/buzztrax.

2006/10 ========================================================================

Finally I found some time to work one one thing that was getting on my nerves.
For the unit tests we now have a BtTestSettings class. This allows us to
simulate all sort of settings. The other benefit is that we don't need to make
sure that we don't modify user settings during test runs. And we get not hit by
my favourite GConf nastyness anymore [1].

Next I did a lot more bugfixing in the UI - or lets call it implementing
previously unimplemented stuff. Added some more tooltips here and there, syncing
data displays and so on.

Waffel spend some time so set up a buildmaster and a buildslave. This way our
code gets rebuild every 6 hours. The 6 hours cycle has two reasons - our
cvshook-script (from fdo) does not run on sf.net and the sf.net anon-cvs has a
big delay. Anyway even the current setup revealed some bugs, where some of them
are already fixed.

Tommi fights with cairo to build a real pattern editor widget for us. Hope we
can post some screenshots from it soon.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=316331

2006/09 ========================================================================

Lots of news this time. Also this time I welcome another team member on board -
Tommi 'nbd' Sakari Uimonen. His first action was a code review of the core lib
and a big patch that const'ified it more. By giving him a quick demo of the
application we also uncovered a lot of bugs. Next nbd will work on a pattern
editor widget.

Berzerka implemented song-length changing. The list will be dynamically expanded
as one scrolls down. Also keyboard shortcuts are coming to set length and move
the loop area.

While we were working on the sequence display, we fixed the step filtering for
different rhythms and also implemented many details for rhythm support (other
than 4/4). Speaking of the GUI - lots of changes there. The machine view looks a
bit nicer and has some zoom and layout fixes. Zoom fit was a bit harder than
expected and seems to be still not always be correct. The context menu to add
machines is now hierarchical. In the status bar we now show CPU usage. At least
during development this is quite useful.

Lots of code has been added to handle error situations better. If you load songs
with missing machines or samples, these components will be tracked. After
loading we present a report of missing elements. Later we can add machine
download or to specify a new location if the sample has been moved or renamed.

Many task were done to prepare a first release. We now have a nice about dialog.
It also shows the latest release notes. This dialog will always be shown once
after updating. The user guide is more complete. German language catalogues are
complete. Finally a lot of cruft code has been removed.

I also worked a bit on the buzz machine emulation. It now also support stereo
machines (need more work on the application side). The example buzz songs have
been fixed. The now all play again. The gstreamer buzzmachine plugin generates
better parameter names. It also maps some parameters to enums. Instead with a
slider, they are presented as a dropdown then.
