# NaPoWriMo+GenMo2025_Locomotion

# WordsRotating

For the 15th poem of **NaPoWriMo/ NaPoGenMo** 2025, *“****WordsRotating****”* is Coded with ***Locomotion & SonicPi***.

## Poem

```ocaml
Words Rotating
Also Dangling and Floating
Wishing to add more Elevating
In its Stating

```

## Video

%[https://youtu.be/Zmxf1OUWqLE] 

## Code

### Locomotion

```haskell

directional {z = 6, intensity = range 0 10 (osc 0.5), color = 0xff0000};

point {x = range 0 17 (osc 0.15), z = range 0 6 (osc 0.35) , intensity = range 0 10 (osc 0.5), color = 0x00fff0};

b n = dancer {url="https://raw.githubusercontent.com/IllestPreacha/CreativeDataStuff/a4edf8f5d57cd4ec3bcb9bf2b0147827c338aa13/3Dmodel/WordsRotating.glb", ly
 = 90 * n, size = 0.015 * n, ry = n * range 40 190  (osc 0.01), z= n *  range -8 8 (osc 0.05) };
for [0..4] b;
```

### SonicPi

```ruby

live_loop :wobbly do
  
  #making more wobbles
  with_fx :wobble, wave: dice(3) do
    #making sure the shuffles are random
    use_random_seed Time.now.to_f
    use_random_seed [Math.cbrt(Time.now.to_f),Math.sqrt(Time.now.to_f)].choose
    
    #variables for the wobbly
    a,b,c,d,e,f,g,h,i,j,k,l,m,n = dice(3),2,rrand_i(3,7),4,5,dice(9),7,8,dice(10),10,rrand(7,12),12,13,rrand(11,14)
    
    
    #following the wobbly function
    wobbling = Math.sin(a * b + c + d * Math.sin(e * f + g)) + Math.sin(h * i + j + k * Math.sin(l * m + n))
    
    #print the wobbly function
    puts wobbling
    
    #sounds of the wobbly function
    sample [:loop_breakbeat,:loop_breakbeat,:loop_compus].choose,rate: wobbling
    sample [:ambi_dark_woosh,:tabla_ghe3,:tabla_tun1].choose, rate: (wobbling * wobbling).abs
    sleep [0.5,1,2,2.5,4,8].choose
  end
end
```

```ruby
live_loop :addition do
  
  use_random_seed Time.now.to_i
  
  
  # recursion call being the function calling a new sub string
  def Addition(arr)
    return 1 if arr.length == 0
    arr[0] + Addition(arr[1..-1])
  end
  
  #variables that will be used in the Method Call below
  #Dice is a randomizer that functions as a dice roll
  a = dice(6)
  b = dice(6)
  c = dice(6)
  d = rrand_i(2,5)
  e = 3
  
  #Calling the Method to aid with sound design
  smacks = Addition([a,b,c,d,e])
  notes = Addition([a,b,d])
  
  #sound elements
  if notes % 2 == 0
    
    with_fx :flanger, mix: rrand(0.3,0.5) do
      with_fx :echo do
        use_random_seed Time.now.to_i / 2
        use_synth [:pretty_bell, :kalimba, :prophet].choose
        play notes * 4, attack: dice(6)
      end
    end
  else
    
    with_fx :whammy, mix: rrand(0.2,0.6) do
      with_fx :gverb do
        use_synth [:chipbass, :kalimba, :prophet].choose
        play notes * 4, attack: dice(6)
      end
    end
  end
  
  if smacks > 10
    
    use_random_seed Time.now.to_i/4
    
    if notes > 8
      
      use_random_seed Time.now.to_i/5
      
      
      with_fx :vowel ,voice: dice(4) do
        sample :drum_bass_hard, decay: smacks / 12 if spread(smacks/4, smacks/3).look
      end
      
    else
      with_fx :ixi_techno, mix: 0.75 do
        sample :drum_bass_soft, decay: smacks / 12 if spread(smacks/4, smacks/3).look
      end
    end
    
  else
    
    if notes > 8
      
      with_fx :vowel do
        sample :tabla_ghe1, decay: smacks / 12 if spread(smacks/4, smacks/3).look
      end
      
    else
      with_fx :ixi_techno, mix: 0.75 do
        sample :tabla_ghe3, decay: smacks / 12 if spread(smacks/4, smacks/3).look
      end
    end
    
  end
  
  
  #print out numbers
  puts Addition([a,b,c,d,e])
  puts notes
  
  sleep [0.25,0.5,1,2].choose
end
```
