Microtonal Musical Robot

<Teno>

a robotic Bb tenor saxhorn made by Charles Mahillon

dr.Godfried-Willem RAES

2024

Robot: <Teno>

When starting the design and construction of this musical robot, we could build further on the experiences gained through the realization of quite some automated brass instruments build since 1999: <So>, a sousaphone, <Korn>, a cornet, <Heli>, a helicon, <Bono>, a valve trombone and <Horny>, a French horn, <Bug>, a fluegelhorn, <Hunt>, a hunting horn, <Trumpeter> and <Cornalto>, the latter two made on request for Alain Van Zeveren. Musically speaking the cornet, the flugelhorn as all saxhorns are very similar instruments, differing only in the range and the timbre they produce. They all have a conical bore and are said to sound more mellow than the trumpet, the trombone and other brass instruments with a cylindrical bore. The ambitus of the tenor saxhorn (often also called a baryton horn) however is considered to be quite a bit more limited, the lowest notes being never used. The textbooks mention 2 1/2 octaves at the most. The tenor is in fact not really a horn, although called tenorhorn ('tenorhoorn' in Dutch), but a saxhorn like the tuba. The instrument we started off with is made by Charles Mahillon (1841-1924) and it came in out possesion in 1983, when we bought it on the Ghent flea market. It was in a reasonable shape although it must have undergone some changes and (poor quality) resoldering works, as we found it to be tuned to A 440Hz, quite impossible taking into account the time it was originally constructed. For sure after 1878 and before 1924.

Thus it made sense to start the design of this robot by re-examining the <Cornalto> robot and improving over this one where ever possible. Again we used a membrane compressor directly coupled to the saxhorn via a capillary. In this case we could uan original mouthpiece made for such an instrument. Thus we had to turn on the lathe to fit the compressor new one on the lathe. The internal sizing conforms to the original mouthpiece and is just a little smaller sized in the capillary section. The motor driver causes resonance in the saxhorn tubing, but in this case there is no unidirectional windflow through the instrument. Instead, the wind flows over and back inside the bore. When a note is requested from the horn, the firmware will calculate the optimum valve combination -including non orthodox fingerings- for the requested pitch. Thus a resonant standing wave in the instrument can be produced. Microtonal pitches are implemented such that the instrument is capable of performing quartertone music, as well as a wide range of different tunings and temperaments with great perfection. The relatively low Q-factor of the horn (compared to strings...) as an acoustic resonator renders this very well possible. The signal generated in the compressormotor can be choosen by the users from a list of implemented models. All driving signals consist of two phases: an attack portion, derived from an excitation wave modeling the start of vibration on the lips and in the mouth cavity followed by a sustain phase wherein the waveshapes generated are based on different models of granular synthesis. At the one hand we have some waveforms shaped after a physical model of the air pressure waveform in the mouth cavity of a player. (Beauchamp, 1975,1980) and at the other we used calculated excitation waves derived mathematically from samples obtained by playing the actual instrument in different registers. (Raes, 2020). Since there is no loop coupling from the resonator to the generator, the sound generation mechanism is a hybrid somewhere between synthetic/electronic and natural/acoustic. The advantage being that the reliability of the robot becomes very high, but this is obtained a bit at the detriment of realism, in particular with regard to the onset of the sounds. The sound onset in this robot however, using the two phase approach, is already a major improvement over previous robots such as <Cornalto> and all earlier robotic wind instruments we designed. A dynamic formant filter was added using analogue electronic circuitry, in this case a matched pair of germanium diodes in series with a resonant LC circuit Thus the sound color will be, to a certain extend, a nonlinear function of loudness, conform to acoustic reality common in brass instruments.

The valves are used in this instrument to tune the fundamental frequency of the instrument. The valves can be controlled independently from the mouth driver frequency. They are mechanically driven by two large unipolar push solenoids and one pull solenoids of the same size. The notes that are normally produced using different valve combination, following theory, are: Note that this is untransposed, so in reality everything will sound a major second lower on an Bb instrument. However, we found out that using the valve combinations entailed by this system, does not always lead to optimum resonance in the instrument. Thus we used the optimal valve combinations based on empirical acoustic measurement and evaluation. A deficiency we encountered in our <Korn> robot was that the buildup of a sound pressure wave in the instrument was anticipating the valve movement. The valves take about 10 ms to take position, thus here we delayed the driver signal with the same amount in all cases where changes of fingering are involved. This introduces some latency but makes the sound quite a bit more realistic, in particular for the attack portion of the envelope. This idea was first implemented and fully tested on the <Bug> robot. It is also implemented in our <Trumpeter> and <Cornalto> robots and now also in this one.

As we had to save as much as possible on cost, we dropped substantial movement from the design. As we still had a suitable Crouzet synchronous AC motor in stock, we used it to implement gentle over and back movement. Precise position control was not implemented due to the costs of the proximity sensors required. Thus the construction was a bit less involved than that of our fully moving brass robots <Bug>, <Korn>, <Horny> and <Hunt>.

The electronic circuitry -in overview- consists of only two 'intelligent' PC-boards:

Overview:

1. Midi-hub board: This board, using a Microchip 18F2620 controller, takes care of the Midi I/O handling and communication as well as the control of the three valves. The circuit for the pulse/hold function here follows a recipe we applied nearly one hundredth times by now: The PCB board, is a new design used for the first time for the <Trumpeter> robot. It can in principle be applied for just about any brass instrument with up to four valves to be automated.

The source code for this processor is here.

The hex-dump for programming the PIC processor using MPLAB IPE is here.

2. Sound generator board: This board steers the 75 Watt motor compressor horn driver via a digital audio amplifier module. A 16-bit processor is used to generate the required waveform and two analog multipliers are used for envelope shaping and amplitude modulation. Thus we could maintain audio resolution even at the lowest soundlevels. Handling this in the full digital domain would have required a fast 32-bit processor. The analog dynamic formant filter also found a place on this board.

The power amp is a pure analogue design, using a high quality but by now obsolete LM12 power opamp (introduced by National Semiconductor in 1988), in a 5-pin modified TO3 package, rated for 150 Watt: We designed it back in 1991 (in fact to be used as a powerful ac source for tape-recorder motors), but copies of it were used also for robots such as <Autosax>, <So>, <Hunt>, <Trumpeter> and <Cornalto>. The current this amp draws at rest is 60mA , corresponding to a power of 4.3 Watt.

In the development of this robot we implemented some form of musical artificial intelligence. Thus legato playing is fully automatic and depends on the musical context. If notes with an overlap are played, legato will automatically be applied. So successive notes will be played without attack wave nor attack-decay in the ADSR. The sustain level will be steered by the velocity byte in combination with controller 17 although the velo byte itself will not be used. Thus dynamic variation in note-series is very well possible without having to use controller 7. If the controller for portamento is set, the robot will apply portamento if the musical context makes it possible. Portamento is always performed with the sustain level in use for the starting note of the portamento.

The source code for this microprocessor is here. Note that the code has to be compiled two times: once with the metacompiler constant $pitch defined, once with the $ampli constant defined.

The Hex-dump for the pitch processor is here, and the hex dump for the amplitude processor here.

A note on the compression driver:

see what we wrote on that topic on the <Trumpeter> page.

Power supply voltages and currents:

 

Midi Mapping and implementation:

Midi channel: 13 (fixed in the firmware)
Midi note range: 28 to 89. (Optimum sound in the range 46-82) Note on, velocity is implemented and steers the level of the attack phase in the adsr. We did also implemented the acoustic pedal notes 28 to 34 although they are extremely difficult to sound as well as the unplayable notes 35 to 39 leading to minimal resonance in the instrument. Thus the implemented range is now continuous starting from note 28.

Note Off commands are required, but can be dropped for pure legato playing. Note off with release is implemented and can steer the release phase of the envelope. Note Off commands for notes that were not sounding are disregarded.

The eye-lights are mapped on note 120 and 121 (cf.. Controller 69 below) and a blue LEDstrip light on note 122. On note 123, a bright orange light is mapped. The light notes 122 and 123 use the velocity byte to steer flashing speed.

Controllers:

Controller 1: Noisiness of the sound [default = 30]

Controller 2: Vibrato delay time [default=48]

Controller 3: FM modulation depth (vibrato depth). Large values can cause audible artifacts, due to the modulation of the sampling frequency.[default=8]

Controller 4: FM modulation speed. (vibrato speed) [default=94]

Controller 5: AM modulation depth (tremolo depth) [default = 4]

Controller 6: AM modulation speed (tremolo speed) [default = 20]

Controller 7: used as a general volume controller. Note that timbre will change as the volume is changed. On high settings, the formant frequency becomes more dominant. [default = 80]

Controller 8: Portamento time. Small values make fast portamento, high values slow. Value 0 disables portamento. The controller will only work if the legato flags is set by playing overlapping notes. Portamento will be applied only when a note is playing and a different new note-on command is received without note-off for the first note. The parameter sets the time for a single step. The minimum time is ca. 1 ms, the maximum time ca. 10 ms.[default = 0]

Controller 10: Steers the motor for oscillating movement. The parameter steers the speed. Fast movement is not possible. [default = 0]

Controller 13: allows changes of valve fingering during sounding notes. Bit 0 corresponds to the 1/2 tone valve, bit 1 to the 1 tone valves, and bit 2 to the 3 semitone valve. Using this controller it is also possible to change the fingering for a sounding note whilst it is sounding, thus rendering some sound coloration possible without changing the actual pitch.

The table below gives all details:

Ctrl 13 Value -1/2t (valve 2) -1t (valve 1) -1 1/2t (valve 3)
0 off off off
1 on off off
2 off on off
3 on on off
4 off off on
5 on off on
6 off on on
7 on on on


Controller 15: ADSR-period. [default = 40]
Controller 16: used to control the duration of the attack phase in the ADSR cycle. [default = 30]
Velocity byte = attack level
Controller 17: sustain level , as a percentage of velocity. Value 127 equals 100% and entails that velocity level and sustain level are identical. With a value of 100, the sustain level will be 88% of velocity level. With a value of 25, the sustain level will be half of the velocity. Thus the sustain level can never become larger than the maximum level reached during the attack. Note that the curve follows a square rooted law of a normalised range 0 to 1. [default = 100]
Controller 18 is used to control the duration of the decay after the attack, the time required to reach the sustain level of the sound. [default = 8]
Controller 19 steers the duration of the release decay (from sustain level to zero) starting after reception of a note off command. Release will be canceled or interrupted with a new note on command if such a command comes within this time. [default = 120]

The interdependencies of these controllers together with the velo byte is shown in the graph below:

 

CoController 20 - tuning for the tenor saxhorn . By default equal temperament and A = 440 Hz for value 64. Acceptable values for this controller are limited to:

 

Controller 25: Steers the attack force for the valve solenoids. [default = 64]
Controller 26: This controller steers the time the valves stay in their position after reception of a note-off command. This implements some resonance in the instrument after the excitation from the mouthpiece has stopped. It also avoids unnecessary mechanical noise from the valves, in particular on repeated notes or on notes that can be produced with the same valve combination. [default = 32]

Controller 33: Selects different lookup tables for the fingerings. The default value 0 corresponds to the theory-book fingerings used for a Bb instrument. By setting this parameter to other values, the robot would use a lookup table as if it were an B-horn, C-horn, Db horn... . Note that we do not treat the instrument as a transposing instrument! Acceptable value for this controller are limited to the range 0 to 12. On cold boot, this controller is always set to 0, the standard value for a Bb instrument. This is not always the best choice!

Controller 40:Selects the waveform used for the low register, notes 28 to 39. The default setting here is 6. Range 1 to 12. Alternatives are 5, 1, 3
Controller 41:Selects the waveform used for the low register, notes 40 to 58. The default setting here is 5. Range 1 to 12. Alternatives are 6, 1, 3
Controller 42: Selects the waveform used for the medium register, notes 59 to 78. The default setting is 6. Good alternatives are 5, 8, 2 , 4, 3 or 11. Range 1 to 12.
Controller 43: Selects the waveform used for the high register, notes 79 to 89. The default setting is 6. Good alternatives are 3, 1, 5. Range 1 to 12.

Waveforms implemented for these three controllers:

0 Attack wave, excitation wave used as a first phase for all waveforms further implemented. Not selectable.
1 Wave_1, excitation wave  
2 Square Wave 1 parameter: CC104, default setting is 42
3 Wave_3, excitation wave good for high notes
4 Wave_4, excitation wave can be used for the medium register
5 Wave_5, excitation wave, derived from Eb (midi note 51) excitation wave, acoustically corrected
6 Wave_6, excitation wave excitation wave, some filtering applied
7 Wave_7, excitation wave recorded with 1/2t valve depressed, a bit more rough
8 Wave_8, excitation wave the mathematically correct excitation wave
9 Dirty Sine

2 parameters: CC105, CC106

default setting for the parameters: 20 and 64

with CC105 = 64 and CC106 = 0, a pure sinewave is obtained.

10 Wave_10, output wave recorded on an alto saxhorn without valves depressed, not very useable. For development.
11 Beauchamp textbook, acoustical modeling, parametric

4 parameters: CC100, 101, 102,103

the default settings are respectively 27,83,96,110

12 Wave_12, excitation wave  


Controller 65: bit 0 in the parameter sets the legato flag. When this flag is set, the firmware will disregard any note-off commands thus enabling the sounding of successive notes without attacks. To switch the soundsing note off, first the flag should be cleared followed by either an all notes off command or a new note-on. Bit 1 in the parameter sets the portamento flag. This is only valid if also the legato flag is set. Also this flag should be set immediately following a note-on command. The speed of the executed portamento is determined with controller #8. In summary, valid values for this controller are only 0, 1 and 3. [ removed from the implementation]


Controller 66: Power on/off switch (0 = off, any other value is on). Power off also resets all controllers to their default startup values. Also resets the wave tables to the default startup settings.

Controller 69: Switches automation for the eye-lights on or off depending on bit 0 in the data byte. If this controller bit is reset, the eye-lights can be controlled with note on/off commands for notes 120 and 121.Bit 1 steers the automation of motor movement when notes are playing. If this bit is reset, the motor can be fully controlled with controller 10. By default, both bits are set, so the parameter value equals 3.

Controller 80: Dynamic range mapping. The default is 62, resulting in a 30dB dynamic range.

value mapping
0-30 20dB
31-62 30dB
63-94 40dB
95-126 50dB
127 60dB

Note that increasing the value of controller 80 and thus the dynamic range does not make the sound volume at its maximum any higher! The dB mapping steers the dynamic range, starting from the absolute maximum. So, if set to 64, corresponding to 40dB, the loudest and the softest volume levels will relate to each other as 100. Or, dynamic value 1 will be at -40dB compared to the maximum value 127. Here the maximum value is defined as 0dB. Note that changing this controller affects all amplitude related parameters, including the ADSR and the tremolo.

Controllers 100, 101, 102, 103: parameters for waveshape parametric Beauchamp. . This applies to Wave11. It is mandatory that Ctrl100 < Ctrl101 < Ctrl102 < Ctrl103. After reception of controller 103, the wave table will be recalculated. Following graph describes the waveform and its parameters: Note that with some settings of parameters, this waveform may sound the wrong octave.

Controller 104: parameter for setting the symmetry when waveform 2 is selected. Value 64 makes a symmetric square. Valid values are between 1 and 126.

Controller 105: parameter for setting the symmetry when Waveform has been set to 9 (dirty asymmetric sine wave) .Value 64 makes a symmetric sinewave. Valid values are between 1 and 126. The graph illustrates the parameter:

Controller 106: parameter to set the level of noisiness in the waveform 9.

 

Controller 123: switches the sounding note off. Stops the motor.

 

Pitch bend: The <Teno> robot can be used in any tuning system. In the drawing below we give the coding example for a quartertone scale:

Most good sequencer software (such as Cakewalk, Sonar or Reaper) uses the signed 14 bit format. Note that one unit of the msb corresponds exactly to a 0.78 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 off does reset the pitch bend for the playing note! The resolution implemented on <Teno> for pitch bend (and vibrato) is limited to 1/10th of a semitone.

<Teno> was finished in the month October of 2024.

Godfried-Willem Raes

Technical specifications:

Design, research and construction: dr.Godfried-Willem Raes (2024)

Collaborators on the construction of this robot:

Music composed for <Teno>:

in the works...

Some pictures taken during the construction:

:


[Nederlands]

Robot: <Teno>

Voor de bouw van deze robot, vertrokken we van een antieke originele tenor saxhoorn uit de ateliers van Charles Mahillon in Brussel. Dat instrument hadden we ooit eens op de Gentse rommelmarkt gekocht voor gebruik in ons vormingswerk gericht op vrije muzikale expressie, de toenmalige Filharmonie van Gent. Toen we het instrument opnieuw uit onze verzameling opdolven in februari 2024 bleek het nog steeds in een redelijke staat te zijn en bovendien ook volstrekt bespeelbaar. Er moeten ooit - na WO2 vermoeden we- wat buisjes aan omgesoldeerd zijn, want de stemming La 440Hz bleek helemaal korrekt, wat gezien de geschatte leeftijd van het instrument, zo goed als uitgesloten is. We hadden eerder 455 Hz of 430Hz verwacht.

Wat de automatisering van dit instrument bouwden we verder vanuit de ervaringen opgedaan met de robots <Trumpeter> en <Cornalto> die we bouwden in opdracht van Alain Van Zeveren. In dit geval gebruikten we echter kwalitatief heel wat betere elektromagneten van Tremba. Gezien de diameter van deze magneten een plaatsing naast elkaar, boven of onder de ventielen, onmogelijk maakt beslisten we twee duwmagneten toe te passen voor resp. het 1-toon en het anderhalve toonsventiel terwijl we het halvetoonsventiel -het middelste- bedienen met een trekmagneet gemonteerd onder het ventiel. Daartoe dienden we wel een messing plaatje voorzien van M3 schroefdraad onderaan in het ventiel met cyaanacrylaatlijm vast te kleven.

In tegenstelling tot de <Trumpeter> and <Cornalto> robots, voorzagen we hier ook in wat beweging, zij het eerder minimalistisch. Daartoe monteerden we het instrument en de drager ervan op een in een juk draaiende as. Dit geheel kunnen we zachtjes laten schommelen via een aandrijving met een Crouzet synchroonmotor met 1:650 vertragings kast en een excentriek. Aan het plaatsen van positiesensoren verzaakten we in dit ontwerp.

Voor de aandrijving van het mondstuk maakten we gebruik van een Padu 100 W membraankompressor aangestuurd door een historische maar nog steeds uitstekende LM12 power op-amp met een zuiver analoge symmetrische voeding. Het maximaal vermogen is in dit ontwerp beperkt tot 40 Watt, ruim voldoende voor een maximale geluidsterkte zoals op een door mensen bespeeld instrument.

Ingaand op een verzoek van onze gebruikers, wijzigden we voor deze robot de werking van controller 17 waarmee het luidheidsniveau (sustain) na de aanslag (velocity) geprogrammeerd kan worden. Hier wordt deze controller benut om het sustain niveau in te stellen als een percentage van de aanslagsterkte. Hierdoor is het met deze robot niet langer mogelijk een sustain niveau in te stellen dat hoger is dan de aanslagsterkte. Het soepel regelen van de muzikale expressie via kontrole van de velocity waarden is met deze implementatie evenwel heel wat eenvoudiger geworden. Ook voor real time gebruik kan het een wezenlijke vooruitgang betekenen.

In deze robot implementeerden we voor het eerst ook een vorm van muzikaal-interpretatieve artificial intelligence. Zo worden tonen die met een overlapping in een bestand staan of zo worden uitgestuurd, automatisch legato gespeeld. Hierdoor komt de attack golfvorm evenals de attack-decay faze in de omhullende van de klanken te vervallen en sluiten de tonen gewoon op elkaar aan in de sustain faze. Gebruikers die de robot met code aansturen, kunnen om legato te bereiken, gewoon de note-off kommando's weglaten. Dat laatste is voor gebruikers van commenciele sequencers onmogelijk. Wanneer de <Teno> robot een passage in legato speelt, dan kan de gebruiker nu ook een portamento instellen. Daartoe moet controller 8 een waarde toegekend krijgen. De duur van het portamento is een funktie van de waarde van de parameter. Het effect werkt best met relatief kleine waarden voor deze controller.

 

 

 

References:

Beauchamp, J.W. "Analysis and Synthesis of Cornet Tones Using Nonlinear Interharmonic Relationships". In: j-aes, volume 23, number 10, pages 778--795, 1975.

Beauchamp, J.W., "Analysis of Simultaneous Mouthpiece and Output Waveforms of Wind Instruments" . In: j-aes, 1980, Preprint No. 1626,

Benade, Arthur .H., "Fundamentals of Musical Acoustics". Ed.: Oxford University Press, 1976.

De Keyser, Ignace "Mahillon" (doctoral dissertation), 1995

Fletcher, N.H. & Tarnopolsky, A. "Blowing pressure power and spectrum in trumpet playing" In: J. Acoust. Soc. Am., volume 105, number 2, part 1, 1999.

Martin, Daniel W., "Lip vibrations in a Cornet Mouthpiece", In: J.Acoust.Soc.Am. vol13 . 1942

National Semiconductor Corporation, "Linear Databook 1", p.2-272 -2-285 (LM12), 1988 Edition.

Raes, Godfried-Willem, "Kursus Akoestiek", Ghent University College 1982/2014, Internet: http://www.logosfoundation.org/kursus/4023.html

Raes, Godfried-Willem, <Bug> an automated Fluegelhorn, 2016.

Raes, Godfried-Willem, "Expression control in musical automates", 1977/2024,

Raes, Godfried-Willem, "Logos @ 50, het kloppend hart van de avant-gardemuziek in Vlaanderen", ed. Stichting Kunstboek, 2018

Rose, Nicholas and Holloway, Damien, "Finite element modeling of brass musical instruments', in: Proceedings of Acoustics, Fremantle, Australia 2012.

Smith, Bob H., "An Investigation of the Air Chamber of Horn Type Loudspeakers", in: The Journal of the Acoustical Society of America 25, 305-312 (1953); https://doi.org/10.1121/1.1907038

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

Construction & Research Diary:


Maintenance information:

+24V - 2.5 A power supply: recycled DVE Agilent modular SMPS, type U1253-60002. Model DSA-60W-20.1, production date: 04/2008

+12V - 5 A power supply module, Model 0179 Amplus, Made in China.

+36 V - o - -36 V analog power supply, using a 100 VA toroidal transformer. The +15 V - 0 - -15 V supply for the opamps is derived from this power supply.

+ 5V - 2 A smps module on the hub-board. (XP-Power)

Compression driver: PADU 100. 100 W, 16 Ohm.

Multiplier chips: MPY634 (Burr-Brown).

LM12 power opamp, 150 W, analog amplifier.

Microprocessors: Microchip 18F2620, 24EP128MC202, 24EP256MC202

Power-on relay: SPST-NO 20A/ 5Vdc coil, type G4A-1A-E DC5, RS-components stock nr.: 683-9065

[EOF]