gematria

gematria

organized electricity for norns & crow

inspired by gematria, this one is quick lil’ “stick-n-poke” about organizing electricity with hexadecimals. basically a “macro quad LFO” with dubious coarse/fine controls and ready for livecoding in maiden…

gematria

turn encoder 2 clockwise and you “wrap” the current sequence horizontally. but turn encoder 2 counter-clockwise and steps 1, 2 and 3 fall “downwards” while step 4 wraps back around to 1. the bottommost row is the gematria value. this uses a recursive algorithm to calculate the column’s value via a basic substitution cipher:

function recursive_gematria(input)
  if input > 15 then
    -- explode the input
    explode = {};
    input_string = tostring(input)
    input_string:gsub(".", function(c) table.insert(explode, c) end)
    -- sum the explosion
    local sum = 0
    for k, v in pairs(explode) do
      sum = sum + tonumber(v)
    end
    -- keep going until it is < 15
    return recursive_gematria(sum)
  else
    return input
  end
end

i also got to write a function called fallen_cipher() so i can finally scratch that one off the bucket list:

function fallen_cipher()
  local t_x, t_y = get_x_and_y()
  o1_cache = gematria.o1.cipher[t_x]
  o2_cache = gematria.o2.cipher[t_x]
  o3_cache = gematria.o3.cipher[t_x]
  o4_cache = gematria.o4.cipher[t_x]
  gematria.o1.cipher[t_x] = o4_cache
  gematria.o2.cipher[t_x] = o1_cache
  gematria.o3.cipher[t_x] = o2_cache
  gematria.o4.cipher[t_x] = o3_cache
  fallen_timer = 15
end

imagined, designed, built, and shared in one day.

requirements

  • norns
  • crow

documentation

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A
E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G
M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E
A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M A T R I A G E M
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

## norns                                                 ## crow                   
- key 1:                     exit                       - in  1: clock in, parameters > clock
- key 2:                     gematria.lattice:toggle()  - in  2: unused
- key 3:                     randomize entire matrix    - out 1: organized electricity                     
- enc 1:                     "target"                   - out 2: organized electricity                     
- "clockwise" enc 2:         "wrap"                     - out 3: organized electricity                     
- "counter-clockwise" enc 2: "fall"                     - out 4: organized electricity  
- enc 3:                     "tune"

## maiden
- access everything via table "gematria"
- access lattice api via "gematria.lattice"
- access crow output 1 via "gematria.o1"
- this README uses "o1" as an example but the same commands work for o2, o3, and o4
- each output has an api for use with livecoding via maiden and/or extending the script:
  - gematria.o1.cipher
  - gematria.o1.now
  - gematria.o1.shape
  - gematria.o1.slew
  - gematria.o1.division
  - gematria.o1.enabled

### cipher
- table, eight steps in stringed hexadecimal
- set with "gematria.o1.cipher[1] = A"
- 0 maps to -5v, crow's min
- F maps to 10v, crow's max

### now
- integer, cipher step right now
- set like "gematria.o1.now = 4"

### shape                                     ### slew
- string, default linear                      - floating sequins in seconds, default 1.0
- set like "gematria.o1.shape = rebound"      - set like "gematria.o1.slew = sequins{.1,.2}"
- valid shapes:                               - the sequins are advanced each step
  - linear                                    
  - sine                                      ### division
  - logarithmic                               - float, default 1/4
  - exponential                               - the lattice pattern division
  - now                                       - set like "gematria.o1.division = 0.66"
  - wait                                      
  - over                                      
  - under                                     
  - rebound                             
      
### enabled
- boolean, default true
- the lattice pattern state
- set like "gematria.o1.enabled = false"
- can also toggle with "gematria.o1.pattern:toggle()"

## troubleshooting
- if crow's tempo isn't working:
  - make sure you have pulses going into input 1
  - jiggle paramters > clock
  - disconnect and reconnect crow

download

;install https://github.com/northern-information/gematria

50 Likes

i am enchanted by gematria.

yesterday i was fiddling with the code so each voltage value is represented by a shaded rectangle, as seen in this video:

8 Likes

thank you for sharing. i love this so much. that moment where you modulate the pitch up was magical. what is the second norns running?

2 Likes

thank you so much tyler. i feel gematria has so many possibilities for exploration and i’ve just barely gotten my toes wet.
the second norns is running the flora script.

1 Like

<3 yess!!


huge shoutout to @jaseknighter for adding these really useful voltage indicators. it is especially helpful when using e2 because you can see how things are sliding around:

gematria

8 Likes

how do the indicators work?

1 Like

lower voltages are dark rectangles behind the hex values while higher voltages are bright. we can see 0 has a dark background and is the lowest voltage (-5) and F has a bright background and is the highest voltage (10).

7 Likes

Mmm cool. I’ll try modify this thing to produce MIDI cc, the people’s CV, when i have the time.

13 Likes

gematria modulating everything in a just friends mini system (performed with gridkeys). love this thang :slight_smile:

edit: i was trying carefully to make it exactly 4:20 and realizing now that soundcloud is saying it’s 4:21… dangit!

8 Likes

i love this so much. i feel transported to an alternate and distant solarpunk future. you claim it is Bm and i believe you, but something about the progression feels ancient or klingon in the best way. this audio is all JF?!

2 Likes

ah the “kick” is a sample, but yea that + just friends (gematria modulating ramp, curve, and FM) > analog downsampler (“samplerate” modulated by gematria) > through a DJ style lp-hp filter (lp at the beginning, and then hp by the end). the lofi sampler and downsampler add a lot of the artifacts, but otherwise it’s just only friends… i mean only just friends !

4 Likes

Ah, but 4:21 is kind of like saying it goes to 11, right?!?

:crazy_face:

3 Likes

@renegog really beautiful work. thank you for sharing!!

i gave up trying to make songs with exact lengths because different players round differently…

3 Likes