PHONOTYPE: code a sound

PHONOTYPE

Teletype-inspired modular livecoding sound language.

General idea

Like Teletype, PHONOTYPE is a prefix programming language. For example:

+ 1 * 2 2.5

Is a statement that yields the sum of 1 and the product of 2 and 2.5: 6.

Unlike Teletype, PHONOTYPE directly produces and manipulates sound. It’s designed allow patching and repatching flows of signal and sound live in performance, and/or creating drones, self-playing generative patches, MIDI synths, drum machines, or whatever else you can dream of.

Every operation in PHONOTYPE is declarative. Instead of executing, like a line of Teletype code, it tells the audio engine (SuperCollider) what to connect to what. You can think of this much like patching a modular synth. The last line of your main (M) script is output to the output jack. Operations do things like output various kinds of waves, delay signals, or output triggers in certain rhythms.

Requirements

Norns or reasonable facsimile thereof.

Computer keyboard.

MIDI controller recommended but not required.

Documentation

To use PHONOTYPE:

  • Install it onto Norns ;install https://github.com/sixolet/phonotype
  • Restart the Norns, so they can see the new Engine
  • Unplug keyboard from Teletype
  • Plug keyboard into Norns
  • Select PHONOTYPE
  • Code a sound

Navigation

F1…F8 on the keyboard navigates to script 1 through 8.

F9 on the keyboard navigates to the M (main) script. This is the script that outputs sound.

ESC nagivates to the scene description.

Arrow keys choose a line to edit; enter key actually changes the line.

Shift-enter inserts a new “passthrough” line above the current one.

E 2 adjusts the fade time of the current line.

E 3 adjusts the update cycle of the current line; for example, if you adjust it to 4, then the line will update every 4 beats. This is useful for making changes on barlines.

Mini-tutorial

Try SIN 440 in M.

Then on the next line put * IT PERC QN .5 (QN = quarter notes. .5 is our env decay). We have turned the tone into some pinging sounds.

Now add + IT * .5 DEL.F IT * .75 M 3.

DEL.F is a delay w/ feedback. We delay by a dotted eigth with a 3s decay.

Then go back to the first line. Hit ctrl-enter to get a new line above. Make the new line say:

S+H SCL SIN .1 0 7 QN

This samples-and-holds a slow LFO on every quarter note, and scales it to 0 to 7.

Then change SIN 440 to say SIN N.MIN IT: use the previous line we just wrote as an index into a minor scale.

You should now have a little melody playing.

Saving and Loading

While in the scene description, Ctrl-Enter or Alt-Enter saves your scene, with the filename based on the first line of your scene description.

To load a scene, change the scene parameter (on the params page) to a file of your choice. I have put a couple examples in the code directory of the script (though your own code will save to the data directory).

To load a fresh scene, press Ctrl-Shift-Escape.

Operators

Please see the full list of operators at README.md; it is too long for this margin to contain.

A taste to get you started:

SIN <freq> - Sine wave

PSIN <freq> <phase> - Phase-modulated sine wave

PERC <trig> <duration> - Percussive envelope

QN - Quarter note triggers

Download

v0.2.0-- Release v0.2 · sixolet/phonotype · GitHub

Version history

  • 0.1: Most of the stuff
  • 0.2: Buffer operations, polyphonic midi in

Roadmap

Things I expect for this script in the future:

  • Buffer ops, both read and write DONE
  • The ability to load samples into buffers from params DONE
  • Crow CV and trigger input and output
  • A “tracker view” to allow you to manually edit buffers and use them as sequencers
  • Polyphonic midi input DONE
  • A library to incorporate the PHONOTYPE engine in other scripts (without the editor, but loading a scene to run from params and be a synth or effect)

Acknowledgements

This script is inspired by Teletype and Dronecaster.

Thanks to @zebra, @license, and @infinitedigits for answering billions of supercollider questions and looking at my code, to @tyleretters for reviewing the documentation and making suggestions, to @zbs for feedback on the edit flow and contributing some smoothness to the edit flow, and the Teletype study group for encouragement, talking through the idea, and general awesomeness especially @nonverbalpoetry who I think was my main interlocutor in the conversation that started this mess. Also thanks to @noracodes for an aluminum panel for my shield so it looks like its big Teletype sibling.

There are now code contributions in PHONOTYPE from @zbs and @license. Thanks so much, friends.

Other

I don’t know why PHONOTYPE got stuck all caps in my head, it just always has been. Now autocorrect on my phone keeps it up for me.

Contributions and suggestions more than welcome.

I plan to perform on PHONOTYPE at Flash Crash V. It promises to be an interesting time.

96 Likes

It’s here!!! yay! Great job naomi

4 Likes

No way that’s seems amazing
:desktop_computer:
:keyboard:

1 Like

Amazing! I can’t wait to try this out and I look forward to when crow integration is available.

1 Like

i don’t know much about TT, but this looks deep.

thanks for making this!

1 Like

The fact that you did this in just over a month, starting basically from 0 with SuperCollider, is pretty incredible. Amazing work.

13 Likes

It’s been so cool watching you puzzle this out over the past month, I’m so looking forward to seeing it in action on Saturday :smiley:
Also incredible deadline abilities, well done!!
I’m super glad we had that ‘what if Teletype but noises’ convo, I had no idea it would turn into a real thing!!

6 Likes

this looks incredible! :raised_hands: :raised_hands:

3 Likes

I implemented the midi in ops (F for frequency, G for gate, V for velocity, monophonic only for now) this morning before work when I had the sudden realization of how they’d fit in the language, but realized I forgot pitch bend. Anyway pitch bend has now been committed to the main branch.

7 Likes

Excited for the flashcrash set!

4 Likes

absolutely astounding engineering work on this project. you’ve been pouring yourself into this for what feels like years (though i know it has “only” been weeks).

7 Likes

Looking at the program, does anyone, eh maybe @sixolet, have a guess which timeslots we might see this thing taken for a ride?

so so many congratulations @sixolet !! that demo is really really lovely + i absolutely love the thoughtful implementation of the operators – so many futures await!! :rocket:

4 Likes

I’m performing under the moniker “line of purples” at 6pm Pacific.

4 Likes

Got it, thanks. Happy crashing!! :skull_and_crossbones:

2 Likes

spectacular performance today! i can’t wait to listen to it again (and again) when the videos are posted.

i have one observation about phonotype…when i was going through the little tutorial (above), which by the way is a really thoughtful introduction, it seemed that when i typed a line that wasn’t recognized, the line was lost, but correctly constructed lines are saved and can be recalled by hitting the up arrow on the keyboard. perhaps i wasn’t using it correctly, but it would be great if all line entries can be recalled so bad entries can be corrected without having to retype the entire line all over again.

thanks for this great script!

2 Likes

Yes! That would be a true improvement!

3 Likes

cool. i am very good at writing bad code so this would help me bunches.

2 Likes

It is done on the main branch now. Holding shift while pressing up or down will navigate history.

4 Likes

Looks and sounds like a lot of fun :+1: