Skip to content

adult-video/tram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRAM

This is a stand-alone module that contains the core functionalities of my livecoding language TRAM (which is short for Typographic Rythm Automation Machine). For the packaged software please refer to this repository.

This repository acts as a submodule for my various applications. At the same time it can be run as a standalone web demo. For this the index.html file and the script.js file is used. All files used for the submodule are contained within the /js/ folder.

How to ride the TRAM

Every line you enter into the main interface will either be interpreted as a mapping or as a bar.

Mapping is one of the two key features. With mapping I am referring to the action of connecting a character or word to either a set of other characters or a MIDI message. To map you simply write a = character between the intended characterset and the MIDI message like this:

K=1:C5:100

You can also map words:

KICK=1:C5:100

And you can map a set of characters to another set of characters:

K=1:C5:100
KICK=KKKK

You can even use this to create recursive beat structures, either by referring to a mapped character within its mapping:

K=1:C5:100
S=2:C5:100
A=KKSA

Or by creating multiple mappings that are referring to each other

K=1:C5:100
S=2:C5:100
A=KKB
B=SA

There are different supported ways to type out midi messages. The three message bytes are seperated by a : character. The first message byte is the channel, the second is the first data byte and the third is the second data byte. Instead of writing 128 for a note-on message on the first channel you can simply write 1. This is supported for channels 1 to 16. Instead of writing 148 as a first databyte you can simply write note and octave like this C5. All of these lines result in the same midi message being sent:

128:148:100
1:148:100
1:C5:100
128:C5:100

While unknown characters are treated as silence, TRAM will try to map any part of a word that it can. Words seperated by spaces are being treated on their own. So a mapping of:

K=1:C5:100
S=2:C5:100
TECH=KKKK
NO=SS
TECHNOLOGY=KSKS

Will result in the following:

NO TECH -> SSKKKK
DOMINO -> ----SS
TECHNO -> KKKKSS
T E C H NO -> ----SS
NOTTECH -> SS-KKKK
HIGHTECH -> ----KKKK
NO TECHNO -> SSKKKKSS
TECHNOLOGY -> KSKS
TECHNO LOGY -> KKKKSS----
NO TECHNOLOGY -> SSKSKS
TECHNICALNOISE ->KKKK----SS---

While the main interface allows mapping of any set of characters to any kind of midi message, the settings tab of the main applicaton allows you to preset certain mappings without having to type them out. There only single characters can be mapped and they can only be mapped to note-on messages.

Writing a # character infront of a line will treat the line as a comment, it will neither be mapped nor played. The characters for mapping, commenting and splitting can be changed from the settings when using the standalone application.

TRAM will try to interprete every line that is not a mapping as a bar. The amount of symbols in the line determine the length of the bar. Bars are resolved to 16th notes so when a line contains 16 symbols (or words) it will result in a bar that is actually a bar long (4 quarter notes). If a line contains more then 16 commands the line is interpreted as more then one bar. One additional bar is added for each full set of 16 commands. Unmapped characters are treated as a pause, so can use unmapped characters to shift steps around by extending the pattern length without adding additional commands.

This will result in a clap on the 1:

C

This will result in a clap and a ssnare on the 1 and a snare on the 3:

C
SS

This will result in a four to the floor pattern with a snare on every second kick and a clap on the 1:

C
SS
KKKK

This will add 16th notes hihats:

C
SS
KKKK
HHHHHHHHHHHHHHHH

Now if we want the clap to be on the last kick in the pattern instead of the first we simply add 3 unmapped characters before it:

---C
SS
KKKK
HHHHHHHHHHHHHHHH

Lets add an open hat on the upbeat:

---C
SS
KKKK
HHHHHHHHHHHHHHHH
-O-O-O-O

Now lets break out from the rigid pattern by adding a lo-tom, a hi-tom and a rimshot pattern:

---C
SS
KKKK
HHHHHHHHHHHHHHHH
-O-O-O-O
LLL
TTTTT
R-RR-RR

To create multi bar patters you can either write your pattern with unmapped characters and 16 characters per bar:

---C---C---C---C---C---C---CCCCC
SS
KKKK
HHHHHHHHHHHHHHHH

But its easier to just create parts and write with them instead. This will result in the same pattern as above:

X=---C
Y=CCCC
A=XXXX
B=XXXY
AB
SS
KKKK
HHHHHHHHHHHHHHHH

Planned features

  • Support for microtiming by treating patterns written in square brackets like 1 step instead of 1 bar. A=[-X--]; B=XA would nudge the second trigger 1/4 of a step.
  • Support for polyrythms by treating patterns written in round brackets as the length of steps of characters contained instead of a full bar. XXXX; (Y--) would create a 4/3 polyrythm.
  • Support for polymeters by allowing different temporesolutions infront of curled brackets. 120{XXXX};60{Y};92{ZZZ} would create a four to the floor pattern with 120bpm, a trigger for Y on every second bar and a polymetric second pattern for Z.
  • Support for temporary comments. 4#XXXX would disable the triggers for X for 4 bars and then automatically remove the comment character.

Acknowledgmenet

This project was inspired by ORCA by Hundred Rabbits and Fisches Nachtgesang by Christian Morgenstern.

About

TRAM is short for Typographic Rythm Automation Machine - this repository contains the stand alone module

Topics

Resources

Stars

Watchers

Forks

Contributors