User Tools

Site Tools


vividshaper_reference_manual

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vividshaper_reference_manual [2024/03/28 09:04] larsvividshaper_reference_manual [2024/03/30 10:02] (current) lars
Line 52: Line 52:
 gatetimeon     -- Time in seconds for how long the key was pressed. gatetimeon     -- Time in seconds for how long the key was pressed.
 gatetimeoff    -- Time in seconds since the key was released. gatetimeoff    -- Time in seconds since the key was released.
 +timeon         -- The number of seconds since the generator was turned on. Resets after parse.
 +gtimeon        -- Global time. The number of seconds since the first generator was turned on. Resets after parse.
 tick           -- The number of times the Lua code has been called since initiation (when tick=0). tick           -- The number of times the Lua code has been called since initiation (when tick=0).
 cc[x]          -- Value of CC message x (between 0 to 127). cc[x]          -- Value of CC message x (between 0 to 127).
Line 61: Line 63:
  
 -- Output information -- Output information
-wave[x]        -- Wave array x (one array for each oscillator x).+wave[x]        -- Wave array x (one array for each oscillator x, 128 elements).
 panning[x]     -- Panning for oscillator x (between 0 - 1; 0 = left, 0.5 = middle, 1= right). panning[x]     -- Panning for oscillator x (between 0 - 1; 0 = left, 0.5 = middle, 1= right).
 note[x]        -- Note output for oscillator x (default value is the same as note). note[x]        -- Note output for oscillator x (default value is the same as note).
 vol[x]         -- Volume for oscillator x. Default is 0. vol[x]         -- Volume for oscillator x. Default is 0.
 +ring[x]=y      -- Oscillator x should be ring moduled by oscillator y (coming in next version)
 +sync[x]=y      -- Oscillator x should be synced by oscillator y       (coming in next version)
 gvol           -- Global volume, default = 1. Multiplied on the output to amplify or limit the audio. gvol           -- Global volume, default = 1. Multiplied on the output to amplify or limit the audio.
 updatefreq     -- Update frequency: 128, 256, 512, 1024, 2048, or 4096. Tells how many frames to wait before running Lua. updatefreq     -- Update frequency: 128, 256, 512, 1024, 2048, or 4096. Tells how many frames to wait before running Lua.
Line 95: Line 99:
 wave[x] = VSWaveFold(wave[x],amplify)         -- Wave will be folded outside the range [-1, 1]. wave[x] = VSWaveFold(wave[x],amplify)         -- Wave will be folded outside the range [-1, 1].
 wave[x] = VSNorm(wave[x],threshold,normvalue) -- Normalise the waveform to normval if max amplitude is above threshold wave[x] = VSNorm(wave[x],threshold,normvalue) -- Normalise the waveform to normval if max amplitude is above threshold
 +wave[x] = VSAbs(wave[x])                      -- Return absolute values of the input wave.
  
 -- Wave math operators - arguments can be either arrays or scalar factors -- Wave math operators - arguments can be either arrays or scalar factors
Line 111: Line 116:
 lfo = VSLFOSquare(frequency,phase,width,time) -- width is between 0 to 1 lfo = VSLFOSquare(frequency,phase,width,time) -- width is between 0 to 1
  
 +-- Helper function to remove negative values
 +output = VSRect(input)  -- Input is a scalar value
 +wave[x] = VSRect(wave[x]) -- Input is a wave array
  
 -- Envelopes -- Envelopes
vividshaper_reference_manual.1711613045.txt.gz · Last modified: 2024/03/28 09:04 by lars