Microtonal Musical Robot

Research project on the development of new tools for musical expression at the University College Ghent

School of Arts


a robotic microtonal and moving alto clarinet

dr.Godfried-Willem RAES


[Nederlandstalige versie]

Robot: <Klar>

A somewhat rare instrument became the starting point of this robot: an alto clarinet - or should we call it a tenor clarinet-, built by Higham in Manchester in the first half of the 20th century. It's an Eb instrument, a fifth lower than the regular Bb clarinet. and thus reaching down to G (midi 43) in absolute pitch. So in a way it comes pretty close to the basset horn, normally in F but reaching down to F (midi 41). In any case it's an instrument that never found its way into the regular symphony orchestra, nor is there any classical repertoire -at least to our knowledge- for this instrument. It has a curved metal bell and is made -presumably- of coconut wood. The mouthpiece is connected to the instrument through a bent neck also made of metal. The tuning conforms to A=440Hz. Here is a picture with the neckpiece removed:

For the design we benefited from the experiences gained with previous monophonic brass instruments such as <Korn>, <So>, <Heli>, <Bono>, our <Autosax> -a single reed instrument-, as well as the double reed instruments <Ob> and <Fa>. Our prime concern - next to sound production itself- was to make the mechanical parts as quiet as possible. <Ob> and <Fa> in that respect were the most succesful so far, but in a clarinet the forces needed to open and close the valves are quite a bit higher than on the oboe. On the other hand the solution that has made <Fa>, the bassoon, a success cannot be applied here: in <Fa> we removed all existing valves and replaced them with solenoid driven pallet valves directly mounted on the bassoon. The clarinet body however just does not offer enough space to make that a viable solution. Thus we had to find something in between what we realized for <Ob> and <Fa>. Some original valves were removed and replaced by solenoid driven valves mounted on a separate chassis. For other valves we left the original valves and springs in place, but operated them with felt or rubber padded solenoids replacing the human fingers.

The sound driver follows a recipe that has proven its validity over many previous wind instrument robots: the membrane compression driver followed by a capillary impedance convertor. Obviously the impedance convertor we finally inserted (after having made many models on the lathe) has quite different proportions than the ones used for the brass and double reed instruments. One of the problems was to work out empirically the equivalent acoustical length of the clarinet mouthpiece. There are -so far as we could find out- no mathematical models available. It is known in acoustics that a single reed can be considered to be a flat bar clamped at one end, but if we look at the spectrum produced once the reed is mounted on the mouthpiece and coupled to the resonator (the clarinet proper), almost nothing of this theory seems to hold true. What we do know is that the pitches that can be produced on the clarinet, must be below the natural frequency of the reed. Thus the reed is the limiting factor for the ambitus of the instrument. As we do not have this limit in our design, we can extend the ambitus of the clarinet way beyond what is possible on a normal instrument with a reed. Because of the lack of an abstract mathematical model, our approach in the design of the impedance convertor was simply musician's insight (I happen to be a former though none too great clarinettist myself...) combined with trial and error by successive approximation.

It is not by accident that the clarinet came to join the robot orchestra much later than all the previously realised robotic instruments. In many respects, the clarinet poses many more implementation problems than brass or double reed instruments, for its expressive possibilities are the widest of all wind instruments. First of all, there is the extreme dynamic range: a clarinet can really play ppp as well as being capable of producing a hefty fff. That's close to 110dB, well above what is reachable with 16 bit dsPIC or other similar processors. Furthermore, through reed control, the timbre of the sound is modulated continuously. This called for a pretty complex compression driver with many parameters, leading to a wealth of controllers for the user. Then of course, there are the 'special' playing techniques such as vibrato, flatterzunge (fluttertongue, a form of chopped amplitude modulation), multiphonics of different kinds as well as quartertones and microtonal inflections. Because of these complexities, we called in the services of a true 32-bit ARM processor. The firmware models the drive of an acoustic clarinet, including the spectral duodecime component and its slight detuning (or shifting phase), a formant filter with resonance, as well as the typical reed noise.

As in some previous robotic wind instruments, here again we implemented some form of movement: the clarinet together with the valve chassis are suspended in a cradle and can perform pendulum-like movement. The mechanism is controlled by two dented wheels (gear ratio 1:6) and a heavy duty stepping motor. The position of the instrument is read by a tilt sensor mounted on the vertical backbone. By design we made sure the motor and the mechanism would not produce enough torque to turn the instrument round fully, as this would be detrimental to the wiring. A selection of built-in lights in different colors (white, blue and red) have found a place in the instrument as well.

An overview of the circuitry is shown in the drawing below:


The electronic circuitry consists of four PC-boards:

1. Midi-hub board: This board, using a Microchip 18F2525 controller, takes care of the Midi I/O handling and communication as well as the control of some of the the lights and the movement. It also reads the tilt sensor mounted on the moving instrument chassis.

2. Stepping motor driver board using a IB106 motor controller getting all control signals from the processor on the hub board.

3. Valve control board (Microchip 18F4620 controller). This board is mounted on the back of the moving instrument part.

4. Compression motor driver board:

Here we used a development kit for a 32-bit ARM processor. The processor used on the board is a STM32F407. The board can be programmed through its USB connector. It even has a tiny MEMS microphone on board.

Power supply voltages and currents:


Midi Mapping and implementation:

Midi channel: 5 (fixed in the firmware, offset 0)
Midi note range: 43 to 106. (Optimum sound in the range 43-91) Note on, velocity is implemented and has a wide control range.

Note Off commands are required, but can be dropped for pure legato playing. The note release byte, if not 0, can be used for what it's standard function is for.


Controller 1: Wind controller, steers the amount of noise in the sound. Default = 1. Advised setting: 1
Controller 2: LFO3 frequency applied to the filter. Default = 2. Advised setting: 2
Controller 3: Vibrato depth (LFO1 amplitude). Default = 20. Advised setting: 20, to turn vibrato off, set this controller to 0.
Controller 4: Vibrato speed. (LFO1 frequency). Default = 8. Advised setting: 8
Controller 5: Tremolo depth, amplitude modulation. (LFO2). Default = 0
Controller 6: Tremolo speed. (LFO2 frequency). Default = 0
Controller 7: Global volume control. Can be used for crescendo and decrescendo effects whilst notes are sounding. This also affects the sound color of the instrument, as normal for clarinets. Default = 80
Controller 16: Note attack speed controller (0= slow attack, 127= fast attack) . Default setting: 100
Controller 17 is used to control the maximum sound level reached after the attack time. This controller is always larger than or equal to the level set by the velocity byte. For sfz or staccato playing, this controller must be set to high levels and the velocity byte kept rather low. Default setting: 127
Controller 18 is used to control the speed of the transition between the attack level once reached and the sustain or hold value set by the velocity byte.(0= slow transition, 127= fast transition) default setting: 90
Controller 19: is used to control the release time after reception of a note off. Here again a value of 0 will give a slow release whereas a value of 127 will give a very fast release. Note that with very low values, the note may not even turn off completely. Default setting: 96. Note that if real note-off commands are used, the release value sent with them, if this value is not zero, will override controller 19, such that the value of controller 19 will be set to 128-release value.

The following graph gives a picture of the mutual dependencies of all these controllers. Note that the implementation is different than what we have implemented in previous monophonic instruments!

Controller 20: Basic tuning of the instrument. The range is + or - a semitone.(Defaults to value 64 for A=440Hz)
Controller 21: minimum motor speed controller (for development only) (default = 64)
Controller 22: Vertical inclination controller. (0-63= backwards, 64=central, unpowered, 65-127= forwards). At extreme positions the holding power of the motor will not be high enough to hold the clarinet in place and as a result, the instrument will oscillate. (default = 64)
Controller 24: 0 = motor in half step mode, any other value: motor in full step mode (for development only. Default = 0)
Controller 25: Filter cut off frequency. Default = 62.
Controller 26: Filter resonance amount. Default = 90.
Controller 27: Echo mix. Default = 0. Only use this for experimental sounds, as it can generate multiphonics.
Controller 28: echo feedback. Default = 0. Only use this for experimental sounds, as it can generate multiphonics.
Controller 29: LFO3, filter depth. Default = 20. (large values give a wha-wha effect)
Controller 30: Valve release time out.(only used for code development)
Controller 31: Does the same thing as aftertouch: fingered vibrato. However, it does not require to be sent again and again in a sequencer. The parameter sets the fingered vibrato speed. Default = 0
Controller 40: Bendrange for the pitchbend. 0= no bending, 1=+/- 50 cents. Default = 1.
Controller 41: Duodecime component detune. Herewith we can detune the duodecime partial just a bit. This causes slow beats in the sound. With setting = 64, there are no beats. Default setting: 62
Controller 42: Duedecime component amplitude. Default = 120.
Controller 43: Wait time for vibrato start after reception of a note-on command. Note that in legato playing, vibrato will continue. The wait time starts again after a note off is received. Default = 100.
Controller 44: Wait time for the tremolo (AM modulation) to start after a note-on command. Default = 10
Controller 66: Power on/off switch (0 = off, any other value is on). Power off, resets all controllers to their cold-boot values.
Controller 100: special fingerings , bit settings for valves 1 to 7
Controller 101: special fingerings, bit settings for valves 8 to 14
Controller 102: special fingerings, bit settings for valves 15 to 21
Controller 123: switches the sounding note off, unpowers the stepper motor, dims all the lights. Does not reset any controllers.

Program change: not implemented so far. Will be used later for interactive robotic modes of functioning, exploiting the audio input possibilities on the ARM-board.

Lights: The lights are mapped on very high midi-notes as follows:

Channel Aftertouch: used for implementing fingered vibrato. The parameter sets the vibrato speed. Note that timbral vibrato cannot be consistently applied to all notes! For note 43 for instance, all valves are closed and there is simply no valve to use for vibrato. In this case we activate the overblow valve as vibrato valve. Sending the fingered vibrato command is harmless at any time. If it is impossible, nothing will happen. The parameter sets the speed wherewith the vibrato is performed. Note that most sequencers reset the channel aftertouch after every note off. To overcome that problem, we have implemented controller 31 as an alternative.

Pitch bend: The robot can be used in any tuning system. In the drawing below we give the coding example for a quartertone scale on <Korn>, since the implementation is similar:

Most good sequencer software (such as Cakewalk or Sonar) use the signed 14 bit format. Note that one unit of the msb corresponds exactly to a 50/64 cent interval. To convert fractional midi to the msb only pitchbend to apply follow following procedure: if the fractional part is <= 0.5 then msb= 63 + (FRAC(note) * 128), if the fractional part is larger than 0.5, we should switch on the note + 1 and lower the pitch with msb= (1-FRAC(note)) * 128. Note that the pitch bend range on <Klar> can be modified with controller 40. By default this controller sets the range to plus or minus a quartertone. By setting this controller to higher values, large continuous glissandi become possible. Setting this controller to zero disables pitch bending.

Classified by function, we have the following groups of controllers:

Download the complete midi implementation for <Klar> in a synoptic and easy to print format (odt file).

Technical specifications:

Design and construction: dr.Godfried-Willem Raes

Collaborators on the construction of this robot:

Music composed for <Klar>:

Classical pieces adapted for <Klar> and the robotorchestra:

Final evaluation of the <Klar> experiment:

The robot can be controlled such as to perform classical pieces (Debussy's 'Premiere Rhapsody' is a good example) in a quite convincing way. However, realizing this, involves a lot of work from the side of the programmer, since all details with regard to expression have to be translated into appropriate controller commands. Seen in the group of monophonic wind instruments designed and build sofar, <Klar> is doubtless the most flexible instrument. The wealth of controllers make it possible to program the instrument such as to sound sounds completely unlike what we expect clarinets to be capable of doing. It can easily surpass the possibilities of human players but at the other hand, human players can produce sounds that this robot is not yet capable of producing, such as some multiphonics, loud slaptongues and vocal-instrumental interfering sounds.

Pictures taken during construction in our workshop:


Back to composers guide to the M&M robot orchestra.

Back to Main Logos page:index.html To Godfried-Willem Raes personal homepage... To Instrument catalogue Go to Godfried-Willem Raes' homepage


Robot: <Klar>

Er is geen nederlandse tekst beschikbaar.

Construction & Research Diary:

(Terug) naar logos-projekten:


Terug naar Logos' index-pagina:


Naar Godfried-Willem Raes personal homepage... Naar katalogus instrumenten

gebouwd door

Godfried-Willem Raes

Go to Godfried-Willem Raes' homepage  

Last update: 2016-10-28 by Godfried-Willem Raes

The following information is not intended for the general public, but is essential for maintenance and servicing of the robot.

Technical drawings, specs, maintenance notes and data sheets:

Fingering - valve numbering schemes:

Fingering Table (separate html page)

Note: valves 11 and 12 are interchangeable. They are never used together so we automated only one of these valves. The mechanism for valve 21 was removed from the instrument. Originally it was place next to the thumb hole.


Rotary solenoid: Lucas Ledex type nr.H-1079-032 (Price: 123 Euro) Cold resistance is 30 Ohms, thus the current drawn at 12V comes to 400mA.

Soft shift solenoids: Lucas Ledex type nr. 70019696, P.O# 4166460, manufacturing date: 04/23/07, supply id#7389. Cold resistance: 28.7 Ohm. (Saia Burgess type 198090-001, cage 81840).We cannot trace this exact type number in the catalogue, but it should be equivalent to type 191995-032 (Size 2EP), rated for 13.9V at 100% duty cycle. Power is specified as 7Watt. The mounting threads are #3-48 UNC-2A and the required nuts are very hard to find in Europe. The price is very high: 149US $ a piece in the year 2000. These solenoids show up considerable heating under 100% duty cycle operation within the specs. Also the current at 12V cold is 400mA and goes down to 320mA after a while once hot. The position of the anchor is not reliably controllable with the applied voltage. Achor movement starts at an applied voltage of 3.5V. Maximum position is reached at a voltage of 11V. To protect the coil against overheating, we placed a small bulb (6V, 4.2W Halogen type with an E10 socket) in series with it. This works as a voltage dependent resistor.

Pallet lifting solenoids: August Laukhuff, 12V types. Kleiner trakturmagnet: Pallet lifter magnet: Pallet pusher magnet:

Stepping motor: MAE HY200 3424 T70 A8 b(Vmax = 90V, I = 1.7A/phase), we connected the phases in series to obtain maximum torque at low speeds.

Stepping motor controller: IMS IB106 (Datasheet PDF) Current limiting resistor: 120 Ohm.

Dented wheels: Modul size 1. On motor: KW410 020, on cradle: KW410 120. Gear ratio: 1:6. Source: Gallon n.v., Kruisboommolenstraat 11, 8800 Roeselare. URL: http://www.gallon.be

Tilt sensor: Penny & Giles (Price 270 Euro) Datasheet: (STT280.60.P2) Data sheet. (PDF)

Compression driver: Padu, 16 Ohms impedance, power 100W. This must be understood as 'peak power', and thus in true rms terms would correspond to ca. 35Watt sine wave. Thus the maximum voltage that can be applied to the driver is 25V.

Wheels: 300mm spoke wheels with solid polyurethane tires, ordered from Kaiser & Kraft

Power Supplies: Note that there are no SMPS circuits in this robot. So, leakage currents are minimal and MTBF should be maximal.

Metal work: Stainless steel AISI 306, all welding performed with the manual TIG technology.

Midi-Hub board schematics:

firmware for this microcontroller
Hex-dump midihub board

Assembled PC board:

Finger solenoids microcontroller board:

firmware for this microcontroller
Hex-dump valve board

Assembled PC board:

Compressor driver board: http://www.st.com/stm32f4-discovery (all development tools can be downloaded here) Firmware for this board written by Johannes Taelman. Documentation sheet on this board (PDF).

For transportation, the components designed for blocking the mechanism must be mounted allways. They are shown in the picture: <Klar> has a flightcase of its own. The sizes of this fightcase are 425 (width) x 690 (depth) x 1235 (heigth). The weight of the empty case is 30 kg.


BAINES, Anthony "Woodwind instruments and their history", ed. Faber and Faber Ltd., London, 1977 ISBN 0 571 08603 9
BARTOLOZZI, Bruno, 'New Sounds for Woodwind' , Oxford University Press, London 1982 (1967), ISBN 019 318611-x
BENADE, Arthur H., "Fundamentals of musical acoustics", Dover Publications Inc., New York 1990 (1976). ISBN 0-486-26484-x
BRYMER, Jack "Klarinet" ed. A.J.G.Strengholt's boeken, Naarden, 1979. ISBN 90 6010 501-X
CHEN, J.M., SMITH. J. and WOLFE, J. "Pitch bending and glissandi on the clarinet: roles of the vocal tract and partial tone hole closure" (2009) J. Acoust. Soc. America, 126, 1511-1520.
DICKENS, P., FRANCE, R., SMITH,. J. and WOLFE, J. "Clarinet acoustics: introducing a compendium of impedance and sound spectra". (2007) Acoustics Australia, 35, 17-24.
ELSENAAR, E, "De Klarinet", ed. Harmonia Hilversum, 1927. (5e editie, ongedateerd)
FRITZ, C. and WOLFE, J. "How do clarinet players adjust the resonances of their vocal tracts for different playing effects?",(2005), J. Acoust. Soc. America 118, 3306-3315.
FRITZ, C., WOLFE, J. a.o. "Playing frequency shift due to the interaction between the vocal tract of the musician and the clarinet". (2003) Proc. Stockholm Music Acoustics Conference (SMAC 03), (R. Bresin, ed) Stockholm, Sweden. 263-266.
RAES, Godfried-Willem, "Expression control in automated musical instruments" (2012)
RAES, Godfried-Willem, "<Klar>, a robot in per- and retrospective" (2014) In: No Patent Pending, iii, 2014.
RENDALL, Geoffrey F. "The Clarinet, some notes on its history and construction", ad. Ernest Benn Ltd., London 1971 (3th edition) (ISBN 0-510-36700-3)
RENES, Jules & VAN RICKSTAL, Jos "Handboek van den klarinettist", ed. nv. de Nederlandse Boekhandel, Anrwerpen 1942


Robodies pictures with <Klar>: