Month: August 2022
Typophone
A JavaScript-based sampler with adjustable panning functions
From summer 2021 onwards I have been experiementing around with JavaScript in order to create a software which can be uses as an electronic part (as an electronic instrument) of new compositions – ready to run in your standard browser.
What to do with it
Let’s get down to the most important question: What can be done with this software and given that it is an instrument, how does it sound? There is a very best answer for it: Find it out!
The Typophone is basically a sampler writting in JavaScript using the Tone.js library. Additionally it provides the user some panning functions and a random mode. Moreover all keyboard events are being displayed – they can be made visible during a performance using a video beamer.
It might seem strange at first sight that such a software is written in JavaScript as most software that is used for sound synthesis and live electronics is usually written in a programming language optimised for sound synthesis (such as SuperCollider or Max MSP or Pd whereas JavaScript clearly is not), however, using JavaScript provides us a crucial advantage in my opinion that clocks off SuperCollider or Max. It’s running in your internet browser and everyone has got one.
Run it in your browser
Why is it crucial that such a software should be browser-based? There is a stunningly simple answer: Musicians can use it for practising. One of the major problems when it gets down to including live electronics into compositions is the fact that usually the setup is rather complicated and requires a spcialist capable of getting a Max/SC/Pd-program or similar to run. We cannot expect from a normal musician to have the technical expertise of handling and setting up a complex audio-environment and doing all the (admittingly quite exciting) spatialization stuff. However, as a composer I do expect my musicians to practise extensivly on a new piece. Thus, if a new piece has an electronic part, the musicians must have a viable way of practising with it. Hence I decided that a browser-based software would be most suitable.
Another fundamental decision was implementing stereophony. We might consider monophony an option as well–natural instruments and some electronic instruments such as electric guitars act as monophonic sound sources too–however, I did not want to take a pass on the excitement of having interesting panning effects. Moreover, every computer comes along with a stereo output, so I decided to make use of its scope. Neither quadrophony was an option for that very purpose (computers having usually only a stereo jack as a standard audio output) nor 5.1 surround sound.
Onstage
The Typophone is designed for two main application fields: It should work well and without installing anything complicated at home in your rehearsal room and onstage. While it can be assumed that everyone is connected to the internet at home (and thus you can comfortably use the typophone by just visiting a website) we can not be sure if in a concert hall WLAN or an ethernet connection is always or easily available. In short, the Typophone has to work offline too. Now, before running it offline we need to know a little bit about how interenet works. Usually we are navigating through the WWW in a web browser. If we enter a web address (an URL) in our browser it will try to start communicating with a server which hosts the page we want to see or the file we would like to download. To make a long story short, browsers rely on the client (browser) and server (a computer somewhere in the world that has the material we want) principle. The Typophone works according to this principle. All sounds are provided by a server and whenever the client asks for such a file, the server will deliver it. Now, what happens, if we just download all the files and doubleclick on player.html while we are offline? The site will open, and the browser will try to retrieve all sound files from the server, however there is no server available unless we run one on our own machine and tell our browser, where it is. So that’s exactly what we’ll have to do, if we’d like to use the Typophone onstage or offline. Sounds a little difficult, right? But don’t get discouraged, its quite easy to run a server. I have made a short tutorial that explains what to do in ten steps:
Using it in my works
Thus far I have written two solo-pieces that involve the Typophone as an electronic part, Drei Illustrationen von Pflanzen for mezzosoprano being the first and Chameleon for one percussionist the other of the two compositions. In the work for mezzo-soprano and Typophone the text is being conveyd to the audience in several ways: Some parts are sung, some fragments are typed and projected to the wall while all the letters produce a distinctive or random sound at the same time and naturally the music itself reacts to the texts emotionally too. Using the Typophone in my compositions thus allows me to deal with any text quite contrapuntally. I instantly liked making use of it in my new works. Furthermore I have been looking for a way to make the process of a player creating a sound on an electronic device visible to the audience in a very straightforward way for a long time. I believe that I have now accomplished this end.
Up next
For now, the Typophone needs to prove successful in concert. I’m still not sure if my notation is already ideal. I decided to use quite a rudimentary kind of tablature, that seemed most logically. The program has got 10 modes, the pitches of the modes 1 to 9 are fixed and could be notated as normal notes, however mode 0 means random sounds. If I notated the actual pitches, it were necessary to have a tablature only for mode 0. That did not convince me. Using tablature would also be more flexible for future implementations like other tunings, other samples (maybe more noisy ones). At this juncture I have recorded a lot of bell-like sounds such as bowls or a gong. Naturally a software can be extended in so many ways that a notation for this instrument must remain extremely flexible or rudimentary. I will definitely continue noodling around with different tuning systems or detunings (seen technically this can be implemented very easily). So stay tuned and enjoy playing the Typophone (the current version is 1.4).
Link to the Typophone:
https://www.chrenhart.eu/lib/typophone/player.html
Download the software as a zip-file:
https://www.chrenhart.eu/lib/typophone/typophone.zip