Music for Tablets – DHALANG MG

Print Friendly, PDF & Email


Dhalang MG is an all-in-one microtonal synthesis, sequencing, algorithmic control, and mixing with more features than you can shake a stick at.


by Warren Burt, Jan. 2017


Some apps do just one job well, while other apps take, as William S. Burroughs said, “a broader, general view of things.”  Dhalang (the name derives from the puppet-master in the Indonesian shadow puppet theater) by the Finnish developer Joel Kivela does at least four different things, and it does each of them well.  It’s a microtonal tuning utility, a series of sound generators, a traditional DAW-type sequencer, a series of algorithmic generators, and a mixer.  It can both receive and send out MIDI.  It can be used as a complete all-in-one solution for composition, or it can be used in conjunction with other programs using Inter App Audio, or AudioBus, or MIDI input and output programs.  It’s very much still a work in progress, but even at this stage of development, offers a huge range of resources for computer or tablet users.

Each of the parts of Dhalang is very deep and thoroughly thought out, so this review can only hope to skim the surface of it.   However, we can at least give an overview of what it can do.  Dhalang MG stands for Dhalang Microtonal Groovebox, so let’s begin with the first part of the name, the microtonal bit.  When you first open up the program, it opens on to the “Tuning” page. 



This has a Scale grid on the left side of the page, and scale and tuning controls on the right side.  Running across the bottom of the page is a touch keyboard.  You can set any sound generator in the program to be played by this keyboard by pressing the “Touch” button that appears at the upper right of the keyboard on any of the sound generator pages.  By pressing “System” at the lower right, a list of scale types, mostly listed by nationality, show up.  Touch one of these to select a family of scales and then select one of the Scale Presets at the top of the column.  Or, as shown in the diagram, you can select “Custom,” which makes a button for the Tuning Editor appear at the lower right of the scale grid.  The scale grid can have between 4 and 32 notes in it.  You can select which of the notes of your tuning you want to be in your scale and you can have up to 9 different scales, all of which will be subsets of the tuning you have specified. The “Update” button at the lower left of the scale grid should be touched whenever you change the selection of pitches in your scale.  The keyboard below will then immediately reflect your different choice.  If you’re going to use the Piano Roll sequencer, it’s best that all your scales have the same number of tones in them. 

Let’s now go to the “Tuning Editor,” so we can see how we can set up tunings in Dhalang.  Note that there are two very different concepts here – a tuning and a set of scales.  A tuning is the master set of all possible frequencies you will want to work with in a given piece.  This can have twelve notes in it, like our normal tuning, or it could have any number of notes greater or less than that.  For example, nineteen notes for nineteen-note equal temperament.  On the Tuning Editor page, we are specifying the tuning for our piece, and with Dhalang, you can only have one tuning active in each instance of the program.  However, you can then specify up to nine different scales, which are subsets of that.  A traditional use of that would be to have our normal twelve-note tuning as your tuning for the piece, but then to set up nine different seven-note “modes” (on the Tuning page), so that your piece could change between major, minor, Phrygian, Lydian, etc.


The Tuning Editor page is divided up into several segments.  Across the top, labelled “Regular System” is a graph of an octave so you can see where your pitches lie.  Below that are two buttons, “Clear System,” and “Remove Selected.”  These do what they say, returning the tuning to a blank slate, and removing a tone that is selected by touching it in the Regular System graph.  The selected tone will then glow white.  Below that is a slider labelled “Selected Step/Generator,” where you can adjust the tuning of your selected step.  To create a step, just touch any of the buttons in the Add Step/Generator panel below the slider, then adjust the slider to the exact pitch you want.  Or you can use these buttons to generate a number of specific intervals. You can add pitches or use the pitch you’ve selected as a “generator” for a scale, as given in the “Formulas” panel in the middle right of the page.  In this panel you can set up various kinds of scales that follow certain kinds of scale generating formulas.  For example the controls on the far right of the panel are labelled “Prime Size” and “Prime Steps.”  If you set Prime Size to 13, and Prime Steps to 3, then pressed “Generate Prime,” you would generate a thirteen-tone tuning made of every 3rd prime numbered harmonic, and reduced to within an octave. 

There are other kinds of tunings which can be generated, such as Equal Temperaments and Moment of Symmetry, or MOS scales, but to explain those at the moment would take up the rest of my word limit for this article!  (The MOS scale was developed by the late, great, Mexican-American music theorist Ervin M Wilson, whose work has generated so many new tuning resources for us (for more information about Wilson and his work, go to  Suffice it to say that you can generate a huge number and kinds of tunings on this page.  I’ve been having a lot of fun with this.  The tunings generated here will be applied to all the sound generators in the program, once you press the “Update Tuning System” button in the lower right of the page. (If you use any of the MIDI generators in the program to control an external source, then the MIDI will be in normal twelve-note tuning.  The microtonal tunings in Dhalang are applied only to its internal sound generators.)  Above this are buttons to Export and Import your tunings as either a proprietary Binary file, or the universal Scala file format.  I’ve checked out the Scala file export in this program, and I can report it does work well. (Other programs which claim to export Scala format have had problems, so it’s a relief to see that Dhalang does this flawlessly.)  You can import Scala files from another computer using Dropbox, and you can also import wav and aiff files for the Sampler module, and MIDI files for the Matrix module, in the same way.

Dhalang has four different sound generating modules in it.  These are called “Analog,” “Physical,” Sample” and “Additive.”  Each one generates sound in a different way.  Analog, the simplest is a simple monophonic analog synthesizer.  You can have eight simultaneous different Analog oscillators in Dhalang, each with its own controls.  The oscillator has six waveforms, and these can have different levels and tunings, plus and minus an octave. The mix of these waveforms goes through a low-pass and hi-pass filter, and an amplifier.  There are four envelopes for each oscillator, to control pitch, the two filters, and amplitude.  There is also an auxiliary oscillator which can be used for vibrato or frequency modulation (FM), and two LFOs and an overdrive unit for each oscillator.  The LFOs not only have the usual waveforms but two fractal waveforms, a Rossler and a Lorenz attractor, which can produce semi-unpredictable waveforms.  So the Analog page is a quite nice utilitarian mono-synth with some useful features.


The “Physical” page features an oscillator that is made with physical modelling techniques.  There are four different kinds of sound sources, and three different physically modelled resonators that the sound sources are routed through.  You can have four instances of the Physical page at any one time, and each page is polyphonic. The sources are an Oscillator (sine, square, saw, triangle, sine sum and noise waveforms), a Particle Generator, an Attractor (Rossler or Lorenz) and a “Glottal Mix”, which seems to use some kind of voice simulation for its sound source.  The modelled resonators are Cord, Tract, and Pipe.  Cord simulates the sound resonating a string, Tract simulates various kinds of vocal tracts, with variable shapes and sizes, and Pipe models tubes of various sizes and shapes, which can change in real time.  Again, there are the usual filters, envelopes, LFOs and Overdrive effects available.  One could spend hours just exploring the many possibilities of this page for generating new timbres and combinations of parts of old ones.  This page is maybe not as utilitarian as the Analog page, but it’s got great possibilities for exploration.


Next up is a “Sample” page.  This not only can act as a polyphonic single-sample sound generator, it also allows you to segment your waveform in up to twelve parts so that each segment of the waveform could be played with a different pitch (so you could load a drum riff into here and get interesting drum patterns this way – part of the justification for calling the software a “Groovebox.”).  Plus, on top of that, you can also granulate the samples with a module called the “Granulizer,” which does a useful, if simple, kind of granulation.  You can have six different instances of the Sample page happening at any one time, giving you lots of timbral possibilities. The page has several uses.  You can import samples, either from Dropbox, or with AudioPaste from other apps on your iPad.  I made a sound with Virtual ANS, and had no problem transferring it into Dhalang.  One gotcha:  all your imported samples will appear in the “Local” list of available samples as “Imported.”  You have to select this, and then press “Open” for your imported samples to appear, at which point you select the sample name and press “Load” to use that sample.  Another gotcha: if you press “Auto-Seg” to automatically segment your waveform, the maximum number of segments you will get will be twelve.  But if, on the “Tuning” page, your scale is set to less than twelve notes, you will only get as many segments as the number of keys you have selected.  I’ve been having a lot of fun with this module, especially importing samples from the UVI “World-Suite” sample set also reviewed in this issue.  Of course, importing one single sample from an amazingly multi-sampled instrument like “World-Suite” doesn’t produce results with the same sophistication as the UVI instrument, but the polyphonic control of a single sample does have its own charms, which this sample page delivers quite nicely.


The final sound generator page is called “Additive,” and it delivers what it says.  It’s a polyphonic additive synthesizer page.  There are seven partials, each with its own waveform (sine, saw, square, triangle, sine sum), each of which can have any frequency from 1.00 to 32.00 times the fundamental frequency, at any desired amplitude, and with any desired added narrowly filtered noise band also at that frequency.  The noise filter also has a variable Q setting.  Additionally, each of the seven partials has its own envelope, there are low pass and hi pass filters and an additional oscillator which can be used as an LFO or a Frequency Modulation source.  And the usual Overdrive unit at the end of the chain, should you desire that.  This generator, by the way, is quite CPU intensive.  Joel Kivela recommends a 64-bit iPad Air2 as a minimum for operating the software.  I’m operating it on a 32 bit iPad4, and the results are usually quite fine, but I find I can only get two or three voices out of the software before I get sound breakups.  Understandably, there is only one instance of this page available in the program.  Someday, when I grow up, I’ll be able to upgrade to an iPad Pro, and then I’ll be able to get the full potential out of this sound generator.


Next comes a “Mixer” page, which has inputs for the eight Analog instances, the four Physical Model pages, the six Sampler pages, and the Additive Synthesis page.  Each of these can go into four buses, at any desired volume, each of which goes through an effects chain consisting of a Compressor, a Bitcrusher, a Flanger, a Chorus, a Delay, a Reverb, and a Saturator, in that order.  Of course each of these effects can be turned on or off at will, and each effect has a full range of controls.  There is also a main mix bus, which only goes through a limiter.  Each channel, and each bus, has its own pan and volume controls of course.


Next are three control pages, which act together to make a traditional DAW-style sequencer.  These are the “TouchPlay” page, the “PianoRoll” page and the “Control” page.  TouchPlay is an XY controller for pitch.  It covers four octaves and can operate in continuous or discrete pitch modes, in any of the Scales defined on the Tuning page, and controlling any of the sound generators.  Its output can also be recorded into the Piano Roll sequencer.  According to Joel Kivela, by the time you read this, or shortly after, there should be an update to the program available which will add an X-Y controller for control signals to this page, which will be able to control any synthesizer parameter and record those controls as an automation signal.  The Piano Roll page is like a traditional sequencer piano roll, with the exception that its pitch resolution is determined by the number of pitches in the first scale on the Tuning page.  It can have sixteen independent tracks, and can have looping or continuous play.  It has a good selection of editing tools and can take input from just touching the piano roll grid, or from the touch keyboard at the bottom of the page, or from external MIDI input.  One thing to note, the Tempo control in the upper right of the page is the master tempo control for the whole program.  If you’re operating any of the algorithmic control pages, you will probably be wondering where the master tempo for those is coming from.  It’s being set by the Tempo control on the Piano Roll page.  This is not at first obvious, so it’s good to know this early on in learning to use the program.  The “Control” page is an adjunct to the Piano Roll page.  It has ten separate tracks in which control signals for the Instruments, or for many other aspects of the program, can be specified.  For example, here you can set a series of Tempo changes for the program as a whole.  Or you can set MIDI continuous controllers here for use with an external sound source.  Or control various aspects of the algorithmic generators in the program.  Taken together, the TouchPlay, PianoRoll, and Control pages make a very powerful traditional DAW type sequencer, useful for controlling both the internal sound generators, or for sending MIDI to external instruments.


Now we come to three pages that are really interesting in their implications and compositional potential.  Dhalang has three different methods for algorithmically generating musical information.  Each is different, and each is unique – I’ve not seen implementations of the ideas in these pages quite like this before.  Even if you’re not interested in microtonal music, these three pages would be very interesting additions to anyone’s algorithmic control collection using external MIDI and external synthesizers, as well as controlling the internal sound generators.  The three pages are “Vector,” “Matrix,” and “Particle.”  Each is so powerful and unique they need a separate look.

“Vector,” at first glance, might seem like a normal sequencer, where you specify pitches and they circulate according to the settings.  But that’s not the case. 


There are two graphs at the heart of the page, X (Time) and Y (Space).  X does indeed set a series of durations which, in pattern mode, do circulate. You can have 5 different patterns, and you can set the probability that each one will be played after the current pattern is finished.  Each pattern can have a different length, from 4 to 32 durations long, and the overall tempo for all rhythmic patterns is set with the Grid control.  So far, so normal. But the Y (Space) graph is not the simple “pitch-specification” grid it seems.  Instead, it’s setting intervals.  So, if we’re in a twelve-note scale, a setting of +7 does not mean “play a G”, but rather, play an interval of 7 scale steps higher than the note you just played.  If you had a graph with all the levels set to one value, which was +7 (in a twelve note scale), you would get a chain of 5ths that would get higher and higher.  At the bottom right of this graph is a “Sum” readout.  If you want repeating patterns that don’t go higher or lower, you’ll want to make sure that this Sum reads 0.  However, in the “Main” window, there is a “Return” button.  If this is turned on, then you have four controls, called “First Note,” “First Jitter,” Phrase Length” and “Phrase Jitter.”  The way these work is at the end of a Phrase Length, your sequence will reset to the note you specify in the pattern.  Here’s Joel Kivela’s explanation: “If Return is toggled on, the sequencer will return to the note defined in First Note with a First Jitter random factor, when the amount of notes defined in Phrase Length is played (with again a random jitter factor). For example the default initial settings will return to note 7, every 8th step with the addition of the random jitter factors. This centers the sequencer state to some point not allowing it to run freely too much.”  I’ve tried this, and the possibilities here are really interesting.  I’ve barely begun to explore this feature, and already I’m getting some very interesting results.  Further, each of the two graphs have an alternative mode called “Stochastic.”  This allows you to set up ten different durations or intervals, and then set up probabilities for each one to occur.  So you can set up really interesting chains of probabilities of interval and duration patterns.  In addition, at the bottom of the Y (Space) mode in Stochastic mode are ten more sliders.  These can set the probability that the interval played will be either up or down.  And you can sequence these probabilities.  Plus, you can have different scales determining what the interval will be if it’s either up or down.  There is also, in the Main section settings where you can set two other notes which will parallel the output of your pattern.  With these, you can set a base note and an amount of jitter (randomness) so that you would not always get the same kinds of “chords” from this polyphony.  For this, of course, you need to be controlling a polyphonic generator. Combining all of these makes an incredibly powerful, if a bit complicated, melody generator.  You can have ten of these operating at once, and they can all record into the Piano Roll.  Each instance of the page also has a “Repeater,” which can take some of the information generated by the page, and make repeating patterns which can change according to the settings.  Altogether, this is one of the most interesting algorithmic generators, I’ve seen in quite a while.  But wait, there’s more.  The Vector page(s) have a sub-page called “State Machine” where you can save different settings of each page into a kind of macro.  You can save a number of these, and then you can manually perform transitions between them – either instantly changing from one to another, or gradually morphing – or, you can set up a sequence of these states, and then have that sequence of states playing automatically.  As you can see, there is a lot of control in this page, and it excels in generating interesting musical material.

The next page is called “Matrix,” and it doesn’t feature a choice between a blue pill and a red pill, but it does offer two Markov chain matrices, one for pitch and the other for duration.  What’s a Markov chain?  It’s a way of setting up a table of probabilities which determines the probability that each note can be succeeded by another note.  For example, one might analyse a melody and find that 30% of the time, the note C is followed by E, while 25% of the time the note C is followed by G, and 45% of the time, the note C is followed by B. So whenever a C occurs, it will be followed by either an E, a G, or a B, but not other notes.  If you are clever enough setting up a Markov matrix, you can get a kind of music that approaches the structure of “normal” music.  Or, you can set it up so that it produces a kind of music that you would never otherwise encounter.  You can also set up the matrix on this page with information from an existing MIDI file.  The program will analyse an incoming MIDI file for the successions of notes in the file, and what their percentages of following other notes are, and then will set up a matrix of values from that.  Or, you can input playing into the matrix either by playing on the internal touch keyboard, or with an external MIDI source.  You turn on the “Learn” button, select your source, and play away.  When you’re done, turn off Learn, and presto, the matrix appears filled with values based on what you just played.  The Matrix page can be set to First-Order Markov Chains, which only deal with the current state and the probability of it going to any other value, or it can be set to Second-Order Markov Chains, which take into account both the current value and the previous value.  The Second-Order Chains seem, at times, to have a more “coherent” kind of output than the First-Order ones.  There are a number of controls for generating the matrices, and there is also a “State-Machine” sub-page for this page as well, so you can set up sequences of these states.  The two State-Machines – the Vector and the Matrix –can also interact, with the Vector State Machine acting as a slave to the Matrix State Machine.  Again, the bog mindles a bit when one considers all the possibilities available in just this one page.


The last algorithmic page is called “Particle” and it allows you to set up physical sets of particles which move around the screen.  These particles can collide with “Surfaces” of various sizes, orientations, and qualities, and these can trigger off notes.  There are “Sources” of particles, which will generate particles in different rhythms based on a probability matrix similar to the Vector page.  These particles will then move across the screen until they encounter a Surface which they will either pass through or bounce off of. These will trigger notes, and you can specify the range of notes that will be selected.  You can also put “Masses” on the screen, which will gravitationally attract the particles, thus creating non-straight line paths for the particles.  These masses can also move, so that their effect on the particle streams is continually changing.  And you can also set up “Swarming,” where particles can tend to clump together in groups.  With just a single Source, Mass, and Surface, you can set up some fairly interesting patterns of notes on your chosen instrument.  But if you set up multiple Surfaces (each of which can address a different sound generator, or a different external MIDI channel), multiple Masses, and multiple Sources, you can get some lovely complex results.  This generator allows one to play with the “laws of physics” as it were, creating music that is “tracings left by a process,” to use Herbert Brun’s marvellous term, exploring the results of the processes one has set up, or changed in real time.  This is a fairly simple page, in terms of options, but I think it might be one of the most powerful resources in the whole Dhalang set.


The final page is the “Settings” page.  On this page you can set the Matrix and Vector pages to accept sync with each other, set up various MIDI in and out ports, save and load files, sync up different versions of the program on different machines, set up various system settings, like Sample Rate and Stereo or Multi outputs, and also set the color of the interface.  You’ll notice that each of the Figures in this article is in a different color.  This is to show the range of colors that Dhalang can operate in.

Given all this power, do I have any criticisms of the program?  Not many – given that the program is indeed still a work in progress, what it does do so far is already very impressive.  However, at the moment, there is no user manual.  This has meant that everything I’ve learned about the program has been done with painstaking trial and error, with many emails to Joel Kivela (which he has always answered promptly and clearly), and each email revealing to me capabilities of the program that I hadn’t noticed before.  He has said that he is working on a manual, and I hope he makes that a priority.  There are seven tutorial videos on the hypertonal website (URL below), and one can follow those through, stopping and rewinding, with a note-pad in hand, to grasp the basic operations of the program, but I don’t feel that those are enough.  For some users like me, who are willing to spend hours playing with something to learn its functions, and still getting some of them wrong, the current situation is frustrating but workable.  For most users, however, I think that a clearly written manual would be a godsend.  This is such an incredibly well made and powerful program that it would be a shame if it weren’t made accessible to the widest number of people possible.  That said, I really do recommend this program highly.  For a microtonalist, it’s a real dream come true.  For those interesting in algorithmic composition, it offers some capabilities that I haven’t quite encountered like this before.  In fact, in normal use, I tend to keep the iPad and the computer as separate musical entities, only rarely connecting one to the other.  The reason for this is that I have so many powerful programs on my PC, that using some of the iPad programs, which don’t quite match the power of the PC programs, seems to be not such an interesting thing to do.  With the algorithmic resources of Dhalang, however, I now feel I have a real reason to use the iPad to drive programs on my PC.  It’s just that interesting a set of resources. 

It’s also a very deep program.  There are lots of possibilities of the program that I haven’t covered here.  Those resources await your exploration and discovery.  But I’ve tried to cover the main bases of the program in as succinct a manner as I can.  So do buy this program.  You’ll find it has a range of possibilities that will keep you occupied for not hours or days, but months on end.

For OSX and iOS (Windows and Linux versions in preparation).  OSX and iOS versions $19.99 USD; Australian versions $30.99 AUD.  Dhalang MG Lite, a save-disabled demo version, is FREE.  Windows and Linux versions will be “coming soon.”


Update:  Since this review was written, Dhalang has had two updates.  The first did, indeed, add MIDI continuous controllers to the Touch Control page, and the second added MIDI out to the Piano Roll Sequencer.  Expect more updates along these lines in the coming weeks.

SoundBytes mailing list

Browse SB articles

Welcome to SoundBytes Magazine, a free online magazine devoted to the subject of computer sound and music production.


If you share these interests, you’ve come to the right place for gear reviews, developer interviews, tips and techniques and other music related articles. But first and foremost, SoundBytes is about “gear” in the form of music and audio processing software. .


We hope you'll enjoy reading what you find here and visit this site on a regular basis.

Hit Counter provided by technology news