So I got this idea for generating melodies on the teletype from motives.
Basic idea is this: If you break down an integer into 4 nibble you can store four numbers 0-15.
The first nibble holds a jump, centered round 8: 0 means rest, 8 means hold note, 7 means one step down in the scale, 9 means one step up, etc.
The second nibble is length of note, 0 means one step (in my case a M-cycle), 1 is two steps etc
The third and fourth nibble holds another jump and another length.
This (super short) motive is stored in A, the script playing the notes rotates A bit wise 8 location after each read to make it easier to strip out the correct parts of the integer.
In this short proof of concept instagram clip I have four integers stored in a pattern, TI.PRM determines to probability that a new motive will be read from the pattern and stored in A. With only four motives, it’s a little too obvious, but I figured it would be easier to follow:
https://www.instagram.com/p/CJbNMwpByZx/
Being able to do stuff like this is why I just love the teletype!
EDIT: Here’s the script:
#1
IF ! Z: A <<< A 8
IF Z: Z - Z 1; BRK
I & A 15; Z >> & A 240 4
IF I: J - + J I 8
IF || < J 0 > J 13: J RRND 6 8
TR 1 I; CV 1 N P J
There are a few “magic numbers” and assumptions in there:
- A holds the current motive (set from somewhere else)
- Z is the number of ticks to next note, exposed in a global var to be able to re-sync
- The script assumes you have a scale stored in current pattern
- Line 5: “0” and “13” is the beginning and end of the scale (so in this case the scale goes from location 0-13)
- Line 5: “6” and “8” is the range in which the melody will drop back when reaching the outer bounds
- Line 6: adjust to send gate/cv somewhere else than buildin TR 1 and CV 1