SynthMaker lets you prototype audio effects or build complete software synthesizers graphically
July 20, 2008
URL:http://www.drdobbs.com/architecture-and-design/audio-applications-and-effects-made-easy/209101944
Craig Lindley is a hardware engineer who, for many years, has been writing largescale Java applications. Craig has authored more than 30 technical articles on various programming topics and published five books, dealing mostly with multimedia. His "Digital Audio With Java" is all about processing sound with DSP software written in Java. Craig can be contacted at [email protected] .
In 2000 I published the book Digital Audio With Java, wherein I presented an architecture for processing sound with code written entirely in Java. In the framework I provided, you had to combine user-written code for sound processing and user interface with modules I provided for reading and playing samples. Once all of the code in the signal processing chain was available, audio samples were pulled through the sound processing functions and the results could be heard in real time.
That was then. Today there is SynthMaker from Outsim Ltd. SynthMaker provides the same type of functionality but does so in a completely graphical environment. With SynthMaker, you can prototype audio effects or build complete software synthesizers by graphically connecting various types of modules provided with the program and/or by writing modules one self. And SynthMaker is not limited to the digital signal processing side of the equation. SynthMaker allows elaborate user interfaces to be created with all of the switches, knobs and readouts your creations require for real time operation.
Once you have your audio application built, it can be tested and debugged directly in the SynthMaker environment by connecting up any inputs required and listening to the result on a direct sound or midi output. Various readouts and analyzers are provided that allow you to inspect signals along the signal path which is a real help in debugging. Once your application functions correctly it can be:
For programmer/musicians like myself, the third bullet is probably the most important aspect of SynthMaker. Without a tool like SynthMaker, creating custom VST plug-ins is a time consuming, tedious and error-prone process that takes the focus away from what you are trying to achieve -- the recording of music. In addition, you must have software development tools like Visual C++ to implement the plug-in and understand the Steinburg VST spec from top to bottom to build a plug-in that works.
Building your VST plug-ins with SynthMaker can save a lot of time and effort. For example, the other day I recorded a guitar part and wanted to use vibrato on it to give it an edge. I looked around at the plug-ins I had available and didn't find a suitable one. Later that night I started to think about the vibrato algorithm and the next day I created a VST plug-in that suited my purpose.
Other plug-ins I have created with SynthMaker include:
All of these effect modules are available from Dr. Dobb's in this source code archive. The rest of this article is an overview of the SynthMaker concept and how it is applied.
Installing SynthMaker is a breeze. The program is downloaded as a ZIP file which contains the installation program as an EXE file. Clicking on the EXE performs the installation. When you first start up SynthMaker, you're presented with a schematic containing "a very simple synth built completely from high-level modules." SynthMaker projects are in the form of multi page hierarchical schematics which are stored in ".osm" files. Figure 1 shows the SynthMaker UI.
On the left side of the UI are filters that are used to organize the 75+ modules that come standard with SynthMaker. Clicking on a filter causes the modules of that category to be displayed in the next column of the display. The majority of the UI is for display of the schematic (bottom-right) and the hierarchical schematic browser (top-right). Figure 1 shows the UI of the example software synthesizer. To see the functionality behind the sleek brushed aluminum front panel, click on the module to give it focus and then click the page down key. This opens the next lower level of the schematic hierarchy for view. Use the page up key or click on the high level schematic in the browser to return to the top level. Modules can be made up of many other modules each with many levels.
An important thing to notice about the high-level display is that the example synthesizer is setup for interactive testing. The Midi In module allows the computer's keyboard to act as a Midi controller for driving the synthesizer. The link (connection) from the Midi In module to the synthesizer's Midi input routes the Midi codes. On the output side, the two outputs (left and right) from the synthesizer are connected to the DS Out (DirectSound) module which allows the sounds produced by the synthesizer to be heard via the computer's audio subsystem. Pressing keyboard keys causes the synthesizer to do its thing. All buttons and knobs on the synthesizer are active and any changes made will be heard in real time. Pretty neat.
To develop your own instruments or effects, you select the modules you need from the left side of the UI and drag them onto your schematic. Modules are connected by dragging a link from the output connector of a module to the input connector of the next. Once you have your creation working you can convert it into a module that is managed by SynthMaker just like standard modules. I've created a module category called mine that I put all modules I create into. If SynthMaker doesn't have the functionality you need in a standard module and that functionality cannot be created by combination of the standard modules you can create a code or assembler module and code it up. The language syntax is explained in the documentation.
SynthMaker enforces correct signal routing between modules by only allowing links to be made between input and output connectors of compatible types. SynthMaker supports over 30 different types of data with each type having a unique connector symbol. All data types fall into one of two categories: stream or triggered.
Quoting from the SynthMaker User's Guide:
Stream data covers all digital audio and control signals. These signals are fluctuating at sampling rate and so any components which process them will also perform calculations at sampling rate. Components that process stream data are where all the digital signal processing occurs. Triggered data works in a completely different way. Whereas stream data is continuously flowing, triggered data only flows in response to some event. Usually the event is a user interaction or data arriving from some external source like MIDI or a timer". Commonly used data types include: integer, float, stream, UI events, midi, mono and poly data.
One of the modules I created is bypass switch. Most audio effects have a bypass switch built in to allowing signal processing to be quickly turned on and off. Though not useful by itself, the bypass switch module is designed for incorporation into effect plug-ins including the vibrato described shortly. There are two aspects of the bypass switch: The actual signal switching and the user interface. I choose a toggle switch (a standard SynthMaker module) as the UI element. Figure 2 shows the module's UI and Figure 3 the implementation.
The UI in Figure 2 is simple. A toggle switch, a couple of labels and input/output connectors. Not shown is the tool tip help displayed whenever the mouse is positioned over the module. You'll notice the UI is transparent. This was done so the bypass switch takes on the appearance of whatever module it is incorporated into.
Figure 3 shows the implementation. Briefly, the toggle switch's boolean output drives a selector that routes the unprocessed (dry) signal or the processed (wet) signal to the module's output connector. When the toggle switch is in the bypass position the dry signal is routed to the output. In the on position the wet signal is routed. The string field connected to the Help module provide the tool tip help. It is interesting that the toggle switch can be clicked on the schematic and the selector component will change selections to show it operation. Features like these help with debugging.
Moving up the complexity scale I next present a vibrato effect. As you may know, vibrato is a form of frequency modulation applied to an audio signal. Here the vibrato effect is obtained by changing the delay, input samples are exposed to, by a time varying signal produced by a LFO. Figure 4 shows the completed module's UI including the tool tip help and Figures 5 and 6 show a portion of its implementation.
The vibrato module sports a labeled brushed aluminum front panel, a LFO with user selectable wave shape and frequency, a vibrato depth control and the bypass switch discussed previously.
Here you can see the modules which make up the vibrato effect including an LFO module of my own design. The top half of the schematic shows how the functionality is achieved; the bottom half of the schematic shows how the presentation is achieved.
The Fractional Delay module in Figure 6 is a code module containing:
streamin in; streamout out; streamin delay; float index; float intdelay,frac; float temp1,temp2; float out1; float mem[44100]; float MAXDELAY=44100; stage(1) { mem[index]=in; intdelay = delay - 0.5; intdelay = rndint(intdelay); frac = delay - intdelay; temp1 = index - intdelay; temp2 = temp1 - 1; temp1 = temp1 + (temp1 < 0)&MAXDELAY; temp1 = mem[temp1]; temp2 = temp2 + (temp2 < 0)&MAXDELAY; temp2 = mem[temp2]; out = (1 - frac) * temp1 + frac * temp2; index=index+1; index=(index<MAXDELAY)&index; }
The somewhat strange language syntax is driven in part by the the need to support streaming SIMD instruction set extensions (SSE) on Intel and AMD processors. Conditional expressions are especially strange since they act on four channels simultaneously.
The vibrato works as follows: As samples enter the vibrato they are placed at the start of a delay line. Where samples are extracted from the delay line depends upon the maximum depth allowed for the effect which I have limited to:
(.2 * sample rate) / (2 * Pi)
or 20 percent of the maximum frequency allowed at the current sample rate. This maximum level is controlled by the circuitry in Figure 6. If the depth control is set to zero the samples are always extracted from the same location in the delay line which represents the latency of the sampled audio (~16 milliseconds average). As depth is increased, the position of the extracted samples modulates around this point as a function of the LFO's output level. You can hear and see the vibrato effect in operation by rigging up a test schematic as shown in Figure 7.
Here a potentiometer is used to control the frequency of a sine wave oscillator that is the signal source. The scope module on the left shows the waveform being applied to the vibrato. The scope on the right is used to see the frequency modulation in operation. Since the output of the vibrato module is connected to the DS Out module you can hear as well as see the vibrato in operation.
As you can probably tell, I'm somewhat taken by SynthMaker. Not only does the program have most of the functionality I need but there is an active user community with some very seasoned users that are willing and able to answer new user questions. In addition, examples abound that can be used in parts or parcel in your own applications. Plenty of audio applications can be created with little DSP experience although as usual the more you know the better. Coding will be required for many advanced applications.
SynthMaker is not without its limitations, however. One feature I feel is lacking is the ability to couple the SynthMaker environment to external functionality contained in DLLs. I have written to the company and requested they add this feature and their response was the feature was on their list but of low priority. While SynthMaker does have FFTs and inverse FFTs they are not yet real time quality (admitted to me by the company themselves) so this needs to be addressed as well. While I'm a Windows-only user, the lack of a version of SynthMaker for Macs and for UNIX is considered a limitation by many. Finally, although the product documentation is fairly well done it could easily be flushed out even further. This would help new users, including myself, quite a bit.
Even with these limitations, SynthMaker is a great tool for developing stand alone audio processing programs and VST plug-ins. In addition to being quite capable, it is also fun to use. It is my VST development system of choice for now and with enhancements will continue to be so in the future.
SynthMaker 1.1 was used during the preparation of this article. A downloadable version of the personal edition costs $133 US at the time this article was written. A professional edition is also available for those who want to sell their creations commercially. All documentation is available, for free, on-line.
You may find the following resources helpful/informative:
Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.