Wasn’t sure where the best place to share this might be, but I added a few handy keybindings to Pattern mode that let you quickly enter values from the N table.

0 = 10 is kinda obvious, but I made 1 = 11 semitones because you can already do one semitone with ALT - [ ] and by making it 11, we now have the ability to transpose up or down by any value between 1 and 12 semitones via a single key command.

Here’s a little demo video:

11 Likes

Sounds great! What’s the easiest way to apply your work to my local branch? I like to work with patches, I’m old school like that…

2 Likes
git remote add discohead https://github.com/discohead/teletype
git pull discohead pattern-mode-key-bindings

If you want patch files git will do this too:

git format-patch origin/master..discohead/pattern-mode-key-bindings

will output one .patch file per commit, or

git format-patch origin/master..discohead/pattern-mode-key-bindings --stdout > onefile.patch

will produce a single .patch file with them concatenated together.

1 Like

Thanks a lot, will try this out asap!

1 Like

@a773 let me know how it goes!

1 Like

I might need to step up my github game, but I got it working.

  1. cloned a fresh copy of current teletype github
  2. merged your work with the first two commands listed by @csboling
  3. cloned another teletype repo
  4. removed .git from both
  5. diff -Naur unpatched-path . (from the clone with your work merged)

Compiling as we speak…

2 Likes

If you just want a diff between the current master branch on origin (https://github.com/monome/teletype) and another branch you can do this with

git diff origin/master discohead/pattern-mode-key-bindings

after adding discohead as a remote.

The easiest thing for modding the Teletype source long term is probably just to put your own version on a branch and commit your own changes to it, and pull in changes from other people’s forks or from origin when new stuff gets merged into the main Teletype repo. From scratch:

git clone https://github.com/monome/teletype
git checkout -b my-changes  # make a new branch and switch to it
git remote add discohead https://github.com/discohead/teletype
git pull discohead pattern-mode-key-bindings  # pull in changes from someone else's fork
git pull origin master  # pull in new stuff that's been merged to github.com/monome/teletype since you cloned
# after making some of your own changes, stage and commit them:
git add -u
git commit -m 'added new such-and-such'
# if you've forked the repo on github, you can push your changes to your fork:
git remote add my-own-github https://github.com/my-own-github-acct/teletype  
git push my-own-github my-changes  # push the 'my-changes' branch to your fork

Generally what I’ll do is work on each feature in its own branch, then merge everything into a csboling-dev branch which is where I compile beta firmwares that contain everything. So, starting from an up-to-date origin/master:

git checkout -b some-feature
# do some work
git add -u
git commit -m 'repolarize graviton phase inverters to counteract the plasma resonance'
git push csboling some-feature  # push the branch to my fork so I can make a pull request
git checkout -b csboling-dev  # this branch already contains changes for some other beta features
git merge some-feature
make  # build the firmware with the new feature added
git push csboling csboling-dev  # update the branch on my fork that has all my changes

This makes it easy to keep each feature separate so that it can be its own pull request – which I hope you’ll consider making @discohead! Extra keybindings can be such nice little usability enhancements.

4 Likes

@csboling Thanks for all the guidance. I went ahead and made a PR. I am but a humble, self-taught, web developer who’s only ever tinkered with C so probably best if someone cleverer than I gives it a review. More than happy to make any suggested changes.

2 Likes

I made some new OPs. My changes to the docs are copypasta’d below…

[NR]
prototype = “NR p m f s”
short = “Numeric Repeater, p is prime pattern (0-31), m is & mask (0-3), f is variation factor (0-16) and s is step (0-15), returns 0 or 1"
description = “””
Numeric Repeater is similar to ER, except it generates patterns using the binary arithmetic process found in [“Noise Engineering’s Numeric Repetitor”][numeric_repetitor]. From the description:
Numeric Repetitor is a rhythmic gate generator based on binary arithmetic. A core pattern forms the basis and variation is achieved by treating this pattern as a binary number and multiplying it by another. NR contains 32 prime rhythms derived by examining all possible rhythms and weeding out bad ones via heuristic.
All parameters wrap around their specified ranges automatically and support negative indexing.
Masks

[“N.S”]
prototype = “N.S r s d”
short = “Note Scale operator, r is the root note (0-127), s is the scale (0-8) and d is the degree (0-6), returns a value from the N table.”
description = “”"
The N.S OP lets you retrieve N table values according to traditional western scales. s and d wrap to their ranges automatically and support negative indexing.

Scales

  • 0 = Major
  • 1 = Natural Minor
  • 2 = Harmonic Minor
  • 3 = Melodic Minor
  • 4 = Dorian
  • 5 = Phrygian
  • 6 = Lydian
  • 7 = Myxolidian
  • 8 = Locrian
    “”"

[“N.C”]
prototype = “N.C r c d”
short = “Note Chord operator, r is the root note (0-127), c is the chord (0-12) and d is the degree (0-3), returns a value from the N table.”
description = “”"
The N.C OP lets you retrieve N table values according to traditional western chords. c and d wrap to their ranges automatically and support negative indexing.

Chords

  • 0 = Major 7th {0, 4, 7, 11}
  • 1 = Minor 7th {0, 3, 7, 10}
  • 2 = Dominant 7th {0, 4, 7, 10}
  • 3 = Diminished 7th {0, 3, 6, 9}
  • 4 = Augmented 7th {0, 4, 8, 10}
  • 5 = Dominant 7b5 {0, 4, 6, 10}
  • 6 = Minor 7b5 {0, 3, 6, 10}
  • 7 = Major 7#5 {0, 4, 8, 11}
  • 8 = Minor Major 7th {0, 3, 7, 11}
  • 9 = Diminished Major 7th {0, 3, 6, 11}
  • 10 = Major 6th {0, 4, 7, 9}
  • 11 = Minor 6th {0, 3, 7, 9}
  • 12 = 7sus4 {0, 5, 7, 10}
    “”"

[“N.CS”]
prototype = “N.CS r s d c”
short = “Note Chord Scale operator, r is the root note (0-127), s is the scale (0-8), d is the scale degree (0-6) and c is the chord degree (0-3), returns a value from the N table.”
description = “”"
The N.CS OP lets you retrieve N table values according to traditional western scales and chords. s, c and d wrap to their ranges automatically and support negative indexing.

Chord Scales - Refer to chord indices in N.C OP

  • 0 = Major {0, 1, 1, 0, 2, 1, 6}
  • 1 = Natural Minor {1, 6, 0, 1, 1, 0, 2}
  • 2 = Harmonic Minor {8, 6, 7, 1, 2, 0, 3}
  • 3 = Melodic Minor {8, 1, 7, 2, 2, 6, 6}
  • 4 = Dorian {1, 1, 0, 2, 1, 6, 0}
  • 5 = Phrygian {1, 0, 2, 1, 6, 0, 1}
  • 6 = Lydian {0, 2, 1, 6, 0, 1, 1}
  • 7 = Myxolidian {6, 0, 1, 1, 0, 2, 1}
  • 8 = Locrian {6, 0, 1, 1, 0, 2, 1}
    “”"
15 Likes

speaking strictly from the point of view of extending the language, i would go with more verbose ops - one letter ops are the most valuable and i would keep them for something more general (like more variables or a group of ops similar to pattern ops etc)

3 Likes

NR, NS, CN, CS?
And 20

@scanner_darkly makes sense. I’ve changed them to SN for “Scale Note”, CN for “Chord Note” and CSN for “Chord Scale Note”… but feel to suggest names and I’ll use those.

… although now that you mention “a group of ops similar to pattern ops”, maybe it would make sense to have these on N? N.S, N.C, N.CS ?

2 Likes

very cool ops. i vote for the N.* notation

@tehn yea I like that too… looks like that’s done just by naming them op_N_S, op_N_C, op_N_CS… is that all there is to it?

yep, and then map them to the actual notation in match_token.rl.

[lol at discourse letting me know i’ve posted more than 17% of the replies in this thread]

4 Likes

… alright, changed to N.S, N.C and N.CS!

1 Like

also thinking might be good to keep # for future use?

@scanner_darkly cool, just removed it.

1 Like

Getting to know NR… at first it seemed bewildering, compared to the relative simplicity (!) of Euclidean rhythms :slight_smile: But after re-reading the manual a couple of times while playing with it I think I get it.

To imitate the module, you’d want to run this 4 times with the same pattern and step. Once with mask=0 and factor=1 to represent the Prime output; then once each with masks 1-3 and any factor of your choice. (factor=0 will always give you a 0 on every step).

Of course this being Teletype, you’re not limited to using it that way at all. But understanding the original intent helped me grasp things a little better. I definitely feel like combining multiple patterns from NR (and maybe ER) is the key to funkiness, rather than just using a single gate stream. :sunglasses:

This is Teletype controlling a Hertz Donut mk2 and Tallin via 3 decay envelopes from Stages:

TR.P 1                 ' to VCA env
IF NR 17 1 7 A: TR.P 3 ' to FM depth envelope
IF NR 9 0 4 A: TR.P 4  ' to wavefolder envelope
CV 1 V * 5 NR 9 1 1 A  ' to external FM input for pitch slides
IF EZ A: TR.P 2        ' to V/OCT input for a high beep every measure
A % + 1 A 16

and a touch of Valhalla Delay :slight_smile:

2 Likes

Note that all the parameters of NR wrap automatically - so you can just increment Step. (Or use O, which auto-increments)

I explored NR for a while last night but then forgot to save my Scene. I was getting some good results by changing Masks every few Steps.

If you don’t mind gates going out of the Trigger outputs for the length of the Step, you can do this:
TR 1 NR 1 2 1 O
TR 2 NR 1 3 7 - O 1
TR 3 NR 1 2 12 - O 2
etc

Didn’t realise how much I needed NR and N.S until @discohead presented them! Should be really easy to come up with some cool generative rhythms and melodies now!

1 Like