Skip to content

pwsoft/synfactory_iii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SynFactory III
-------------------

This is the third generation of the Desktop audio/video studio based on
modular synthesizer techniques.


Open source / GPL
-------------------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Source structure
-------------------

The SynFactory tree consists of many small files that are parsed and combined
together with the m4 macro processor. The use of this pre-prosessing step
allows some action be done during compilation. In previous versions the same
was done with Perl files. Parts of the application can be selectively enabled.
There is also some use of aspect oriented techiniques to organise the code
better. This process generates a single cpp file that is compiled to optain
the application. To be able to combine all the files correctly into an
application, they must obey certain rules.


Compilation
-------------------

To generate the .cpp file run the m4 macro processor on the synfactory.m4
file. This will first include maker.m4, which contains all the generic build
macros. The files use [ and ] as quotation markers. The default markers of m4
can cause problems as the same characters are used in C++ code. The [ and ]
markers are less problemetic as they are always used in pairs in normal C++
code and are therefore normally always balanced.

The main code weaving macros are MacroBack and MacroFront that collect code
incrementally. Most other macros are build up from these two. All code is
processed and collected into hidden macros that start with double underscore.
__defs, __const, __enums, __structs, __code1 .. __code9

The final file contents is a concatination of the contents of all these macros.


Code blocks
-------------------

code1
	- convert enum to string functions (for diagnostics and debugging only)
code2
	- Log file
code3
	- Language routines
code4
	- DSP Objects
code5
	- GUI primitives, fonts and rendering
code6
	- Menus
code7
	- Application GUI layer
code9
	- Main


Set-vars
-------------------

Set-vars are variables where code can register itself to follow updates.
A Set-var is defined with the DefSetVar macro. It takes 3 arguments.
- a type
- a variable name
- a default value
For example DefSetVar([color_t], [theColor], [COLOR_BLACK]). Updates are
done by using the SetVar macro. This inserts code that calls the function
__set_<variablename>. To add code on the watch list call
WatchVar(<varname>, <code>). This code is added to the __set_X function.
Boolean flags that signal change are a good choice.
Keep in mind the performance inpact of too many watchers when using SetVars.

In the code they are used for refreshing windows when related preference
parameters change. You can safely add Watches for none existing variables.
This allows modular design where submodules can be removed with the remaining
parts still working.

Releases

No releases published

Packages

No packages published

Languages