[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Date Index][
Thread Index][
Author Index]
Reading the entrails of Mobius
Hey kids! Put on your tinfoil helmets and gather up your D&D
figurines, it's time to enter The Geek Zone!
We had a riveting conversation the other day about how much code is
required to build a software looper and a few of you asked for some
cold, hard, statistics. I did a quick analysis of the Mobius source
code and here are the results. Please try to contain your enthusiasm.
As software developers know, there's a difference between "line count"
and "statement count". A typical file of code is filled with comments
that help the programmer remember what the heck they were trying to
do, and blank lines to improve readability. I happen to think
comments are essential and worth including at least a percentage of
them as "code" but I'll follow the usual method and leave them out.
Here is a breakdown of the primary subsystems and their sizes:
PortAudio: 10955 lines, 3971 comments, 1622 empty, 5362 statements
This is the 3rd party library that I use to interface with audio
devices. If you were writing for an embedded system you would not
need something this general so I won't include it in the totals.
SoundTouch: 6391 lines, 2208 comments, 1203 empty, 2980 statements
This is the 3rd party library I use for pitch shifting. I have
made a number of modifications so it's about 25% "mine" at this point.
VST SDK: 16908 lines, 1626 comments, 2494 empty, 12788 statements
This is Steinberg's code that you have to link with in order
to make a VST plugin. I won't include this in the totals but
some of you might be interested.
Utilities: 12979 lines, 4017 comments, 2126 empty, 6836 statements
This includes general purpose utilities for file handling, threads,
XML parsing, WAV file generation, and a few other things.
MIDI: 21982 lines, 7696 comments, 3698 empty, 10588 statements
This is a MIDI and timer interface library. There are things in
here that Mobius doesn't actually use (yet) like a multi-track MIDI
sequencer. This is also where the millisecond timer lives and the
events
that are at the heart of synchronization.
UI Toolkit: 22740 lines, 4594 comments, 4041 empty, 14105 statements
This is a general purpose user interface toolkit that the Mobius
UI is built upon. It is essentially an implementation of Java
Swing in C++.
Mobius: 110089 lines, 27922 comments, 16694 empty, 64734 statements
This is the core Mobius code. About 6899 of these statements
are related to the UI leaving 57835 statements at the core.
Test scripts: around 7000 lines
I'm not going to include these in the totals, but I do believe these
are essential for any large project. If you don't have a thorough
set of unit tests you're never going to be able to keep developing
it reliably. In some cases development of the automated tests took
longer than the development of the functions being tested.
And now the moment you have been waiting for...
In these totals I'm going to include SoundTouch because if you
want pitch shifting at all you're going to need something
on this scale. I won't include the VST SDK or PortAudio.
Core Mobius + MIDI + Utilities + SoundTouch: 78239 statements
Mobius UI + UI Toolkit: 21004 statements
Core Mobius with UI: 99243 statements
Damn! Just under 100,000. I guess I have a goal for this weekend.
Thank you for your rapt attention. I'm sure the 3 of you
(or was it 4?) will sleep much easier tonight :-)
Jeff