Digigurdy-baz
Loading...
Searching...
No Matches
Variables
Optical Crank Configuration Variables

Variables

const float EXPRESSION_VMAX = 120.0
 The crank speed in RPMs at which expression volume will max out. More...
 
const int EXPRESSION_START = 90
 The minimum expression volume. More...
 
const int NUM_SPOKES = 80
 The number of "spokes" on the optical crank wheel. More...
 
const float V_THRESHOLD = 5.5
 The crank speed at which sound begins to play in RPMs. More...
 
const int SAMPLE_RATE = 1000
 The delay between crank samples in microseconds. More...
 
const int MAX_WAIT_TIME = 40000
 The maximum amount of time in microseconds to wait for crank movement. More...
 
const float DECAY_FACTOR = 0.00
 The multiplier applied to the velocity when no movement is detected. More...
 
const int BUZZ_MIN = 200
 The minimum duration of buzz sounds. More...
 

Detailed Description

These are configuration variables that only apply to optical-crank models. USE_GEAR_CRANK must be disabled for these to have effect.

Variable Documentation

◆ BUZZ_MIN

const int BUZZ_MIN = 200

The minimum duration of buzz sounds.

  • Increase this if buzzing feels too "jittery" or rapid.
  • Decrease if buzzing feels sluggish or unresponsive.

◆ DECAY_FACTOR

const float DECAY_FACTOR = 0.00

The multiplier applied to the velocity when no movement is detected.

  • Smaller values cause sound to cut out more quickly once crank motion stop.

◆ EXPRESSION_START

const int EXPRESSION_START = 90

The minimum expression volume.

  • Expression (MIDI CC11) value will be at least this much.
  • Silent = 0, Max = 127

◆ EXPRESSION_VMAX

const float EXPRESSION_VMAX = 120.0

The crank speed in RPMs at which expression volume will max out.

◆ MAX_WAIT_TIME

const int MAX_WAIT_TIME = 40000

The maximum amount of time in microseconds to wait for crank movement.

  • The actual wait time changes dynamically, but will not exceed this value.

◆ NUM_SPOKES

const int NUM_SPOKES = 80

The number of "spokes" on the optical crank wheel.

  • This is the number of black/blocking bars on the wheel, not the number of transitions.

◆ SAMPLE_RATE

const int SAMPLE_RATE = 1000

The delay between crank samples in microseconds.

  • Code will cycle though at least this long between samples.
  • This is not how long the code waits for movement, just how often it checks.

◆ V_THRESHOLD

const float V_THRESHOLD = 5.5

The crank speed at which sound begins to play in RPMs.