تنغيم
TANGHIM
A hardware instrument for Arabic maqām music
تنغيم, tanghīm: giving a voice its melody. An instrument that plays the maqāmāt in their own tunings, with a step sequencer, a keyboard, sliders that tune and a small screen.
Prototype in development · nothing manufactured yetThe drawings
The front and the rear
Hidden-line drawings of the current prototype, from its 3D model. The 3D viewer shows it from every side, in each of its boxes.
The front
the panel, the headphones and the card slotThe rear
audio, MIDI, CV and gate, USB-CThe instrument
Everything on the panel is for playing
Tanghim is a desktop instrument in a box of 250 × 176 mm (the panel). Its sliders set the tuning of each degree and the notes of the sequencer, with a light under each one to show where it stands; its keys play and step through patterns; its knobs shape the sound; its screen shows where you are. At the rear it speaks to the studio: audio, MIDI, CV and gate, USB.
On the panel
- 16 keys in 2 × 8 · the sequencer and the keyboard, a light in each
- Function · Patterns · Record · Play
- 6 keyboard controls · octave up and down, and more
- 8 sliders · tuning and sequencer notes, an RGB light under each
- 6 control knobs · Tempo · Volume
- 6 encoders and 6 navigation buttons
- A 1.54 in screen, 128 × 64
At the rear
- Audio · stereo out and stereo in, 6.35 mm jacks
- MIDI · in, out and thru, 3.5 mm TRS (type A)
- CV and gate · in and out, six 3.5 mm jacks
- USB-C · power, and USB MIDI with a computer
At the front
- Phones · 3.5 mm headphone output
- microSD · the card slot
TanghimOS
The software inside the instrument
TanghimOS is Tanghim's own software: the maqām theory at its heart, the sound engines, the sequencer, MIDI and the screen's interface, written in C++ for the instrument. The same core is tested on a computer, against reference answers, before it plays a note.
The maqām engine
- 28 historical tuning systems · from al-Mawṣilī (850), al-Kindī and al-Fārābī to al-Ṣabbāgh and Allami (2025)
- 145 maqāmāt and 44 ajnās · their ascending and descending forms
- Transposition that keeps each tuning's own intervals
- Modulation, and 193 suyūr · the melodic paths of al-Shawwā, al-Ḥilū and al-Ṣabbāgh
Playing and the studio
- A step sequencer · patterns and Euclidean rhythms
- MIDI in and out · the maqām's tuning sent to other instruments: MPE, MIDI Tuning Standard, pitch bend
- A screen that speaks Arabic and Latin
Our sound: physical modelling
The heart of our own work: instruments of the maqām rebuilt as physics, strings, bodies and pipes, tuned by the maqām itself.
Watarوتر
The oud · strings and body
Our research on the oud: the risha plucks paired strings, digital waveguides, while six open courses ring in sympathy, all through the body of a real oud: its recorded impulse response, and resonators set from the measured modes of an oud soundboard.
Built and heard on the computer.
Kasabقصب
The pipe · reeds and bores
Pipes and reeds modelled as air columns: the wind instruments of the maqām as physical models, beside the strings of Watar.
In research.
The building blocks
Strings, tubes, resonating bodies
Digital waveguides, Karplus-Strong strings and modal resonators: the parts the engines are made of, each playing the maqām's own pitches, never rounded to twelve equal steps.
FM on the tanghīm
Ratios from the tuning
FM synthesis whose operator ratios come from the tuning itself: the intervals of the maqām become the timbre's harmonics.
Processing
Proposed for every engine
Filter · reverb · delay · chorus · sample-rate and bit reduction · distortion.
Built on DiArMaqAr
Tanghim's knowledge of the maqām comes from DiArMaqAr, the Digital Arabic Maqām Archive, by Dr. Khyam Allami with Ibrahim El Khansa at the Music Intelligence Lab, American University of Beirut.
The data is theirs. The tuning systems, ajnās, maqāmāt and suyūr that Tanghim plays are DiArMaqAr's, read from their archive, with the sources it documents for each one.
The code is ours. Their algorithms (the pitch tables, the transpositions, the modulations) inspired TanghimOS's maqām engine: we studied them and wrote our own from scratch, in C++, for the instrument. No line of DiArMaqAr's code is in Tanghim. We check our engine against DiArMaqAr's own answers.
What we add. The instrument around the theory: the sound engines above, from the physical modelling of the oud and the pipe to FM on the tuning, the sequencer, and playing the maqām live, on keys, sliders and MIDI.
DiArMaqAr's data is published under CC BY-NC-SA 4.0; the tables Tanghim derives from it keep that licence.
In development. TanghimOS runs in our tests on a computer; it has not yet run on the instrument.
Words
واعلم أن كل صوت له نغمة وصفية وهيئة روحانية، خلاف صوت آخر، وأن الهواء من شرف جوهره ولطافة عنصره يحمل كل صوت بهيأته وصفته، ويحفظها لئلا يختلط بعضها ببعض، … إلى أن يبلغها إلى أقصى مدى غاياتها عند القوة السامعة، لتؤدّيها إلى القوة المتخيلة … وذلك تقدير العزيز الحكيم
— إخوان الصفا وخلّان الوفاء
“Know that every sound has its own tone, its own quality and a spiritual form, unlike any other sound; and that the air, by the nobility of its substance and the subtlety of its element, carries each sound with its form and its quality, and keeps them so that they do not mix with one another … until it brings them to the farthest reach of their course, at the faculty of hearing, which passes them on to the faculty of imagination … That is the decree of the Mighty, the Wise.”
The Brethren of Purity (Ikhwān al-Ṣafāʾ), Rasāʾil, 10th century. English: our translation.
Links