User Tools

Site Tools


getting_started_vividshaper

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
getting_started_vividshaper [2025/01/06 19:49] – [Delay effect] larsgetting_started_vividshaper [2025/09/13 16:23] (current) – [Delay and reverb effects] lars
Line 140: Line 140:
  
 In this example, we continue to let the generator be active as long as the volume for the oscillator is above 0.000001. Once the volume goes below, then **active == false** and the generator will turn itself off (until you press a note again). In this example, we continue to let the generator be active as long as the volume for the oscillator is above 0.000001. Once the volume goes below, then **active == false** and the generator will turn itself off (until you press a note again).
 +
 +From version 1.3, you can instead call **VSDeactivate()**. It will run exactly the same code:
 +
 +<code Lua>
 +VSDeactivate()
 +-- This runs exactly the same thing as:
 +--   active = vol[1] > 0.000001
 +</code>
  
 When you play this simple patch, you will see the wave on the right side view: When you play this simple patch, you will see the wave on the right side view:
Line 165: Line 173:
  
 active = VSMax(vol) > 0.00001 active = VSMax(vol) > 0.00001
 +
 +pitchbend = pitchbend * 2
 </code> </code>
  
Line 171: Line 181:
 note[x] is an array corresponding to the notes being played for the eight oscillators (x is between 1-8). If we don't set note[x] explicitly, each oscillator will keep the default notein value. Hence, you don't have to set the note[] array if you don't want to change the note. note[x] is an array corresponding to the notes being played for the eight oscillators (x is between 1-8). If we don't set note[x] explicitly, each oscillator will keep the default notein value. Hence, you don't have to set the note[] array if you don't want to change the note.
  
-Given that notein=48, note[1] will be 47.99 and note[2] will be 48.01. Setting these two oscillators slightly detuned will create a beat effect, which you can read more about here:+The pitchbend variable is representing the current pitch bend data from your keyboard, and ranges by default between -2 to +2 (two semi-tones in each direction). This value is added to each note[x] value in the sound engine (after the Lua code has finished running). Say that note[1] == 48 and pitchbend == 0.3. The note that will be played by the oscillator will then be 48.3. In the code above, we manipulate the pitchbend variable so that it ranges from -4 to +4 instead. If you wish to turn it off (or use the pitchbend data to modulate something else), you can do so by setting pitchbend = 0 somewhere in the code. 
 + 
 +In the above code, we are adding and subtracting 0.01 for note[1] and note[2]. Given that notein == 48, note[1] will then be 47.99 and note[2] will be 48.01. Setting these two oscillators slightly detuned will create a beat effect, which you can read more about here:
  
 https://en.wikipedia.org/wiki/Beat_(acoustics) https://en.wikipedia.org/wiki/Beat_(acoustics)
Line 442: Line 454:
 </code> </code>
  
-===== Delay effect =====+===== Delay and reverb effects =====
  
-Version 1.3 of VividShaper comes with a delay effect. There are two delays (delay1 and delay2), which can either be used separately or as a ping-pong delay. There are a number of ways to route the audio through these delays.+VividShaper comes with both reverb and delay effectsThe picture below shows how the sound goes from an oscillator through different routes.
  
-There is not a separate delay for each generator. Instead, the generators share the same delays. This means the parameters for the actual delays (feedback, time, amplify) are set globally for all generators. However, +{{ :delayeffect.png?1024 |}}
-you can control how much audio from each oscillator in each generator that should be routed to each delay. For instance, it is possible to let only one oscillator be sent to the delay.+
  
-{{ :delayeffect.png?800 |}}+There are two delays (delay1 and delay2), which can either be used separately or as a ping-pong delay. There are a number of ways to route the audio through these delays.  
 + 
 +There is not a separate delay for each generator. Instead, the generators share the same delays. This means the parameters for the actual delays (feedback, time, amplify) are set globally for all generators. However,you can control how much audio from each oscillator in each generator that should be routed to each delay. For instance, it is possible to let only one oscillator be sent to the delay.
  
 The above picture shows how the different parameters affect the delays. The arrays d1vol[x] and d2vol[x] tell for each oscillator how much of the output that should be sent to each delay. For instance, if you wish to send the output of oscillator 1 to delay1 and the output from oscillator 2 to delay 2, you would set it as: The above picture shows how the different parameters affect the delays. The arrays d1vol[x] and d2vol[x] tell for each oscillator how much of the output that should be sent to each delay. For instance, if you wish to send the output of oscillator 1 to delay1 and the output from oscillator 2 to delay 2, you would set it as:
Line 460: Line 473:
 The output to the delay lines are also affected by vol[x], so if you have set vol[1] = 0, then you won't send any sound to the delay lines. It is thus the output after applying any volume envelopes that are sent to the delays. The output to the delay lines are also affected by vol[x], so if you have set vol[1] = 0, then you won't send any sound to the delay lines. It is thus the output after applying any volume envelopes that are sent to the delays.
  
-Separately, you can now also turn off the main output of an oscillator and just let it go through the delays. This is done by setting ovol[x] = 0, for oscillator x.+Separately, you can also turn off the main output of an oscillator and just let it go through the delays. This is done by setting mvol[x] = 0, for oscillator x. By default, mvol[x] is set to 1 for all oscillators so that the sound is always sent to output through the main route unless you modify the variable. There is also a global variable called mrvol, which default value is 1. It tells how much of the main output that should be sent to the output lines (before being amplify modulated by gvol). This allows you to decrease or increase the main volume without changing the delay effect volume. 
 + 
 +**Note that in previous versions before v1.4, mvol[x] was called ovol[x] and mrvol was called mvol.**
  
 d1vol, d2vol, and ovol are local variables for each generator. You can for instance let oscillator 1 be routed through the delay lines in generator 1, but not generator 2, depending e.g. on the note value (allowing you to only let higher notes be sent to the delays). d1vol, d2vol, and ovol are local variables for each generator. You can for instance let oscillator 1 be routed through the delay lines in generator 1, but not generator 2, depending e.g. on the note value (allowing you to only let higher notes be sent to the delays).
  
-There is a new global variable called mvol, which default value is always 1. It tells how much of the main output that should be sent to the output lines (before being amplify modulated by gvol). This allows you to decrease or increase the main volume without changing the delay effect volume. 
  
 Delay1 and delay2 are controlled using two global arrays delay1[x] and delay2[x], with the following parameters: Delay1 and delay2 are controlled using two global arrays delay1[x] and delay2[x], with the following parameters:
Line 494: Line 508:
 Simply adding VSPingPoing(0.9,0.2) as the last line in your code will give you a nice ping pong effect. You can then change parts of the delay parameters if you like after calling this function. Simply adding VSPingPoing(0.9,0.2) as the last line in your code will give you a nice ping pong effect. You can then change parts of the delay parameters if you like after calling this function.
  
 +After the delay lines and the main route are mixed together, they go through the main reverb called reverb1. If you want an oscillator to bypass this reverb, you can send it through the alternative route instead and turn off the main route. Say that you want to send oscillator 5 through the alternative route. Then you would do as follows:
 +
 +<code>
 +mvol[5] = 0 -- Turn off oscillator 5 from the main route
 +avol[5] = 1 -- Turn on oscillator 5 on the alternative route
 +apanning[5] = 0.5 -- Set the panning of the alternative route for oscillator 5
 +</code>
 +
 +The parameters for the reverb are:
 +
 +<code>
 +reverb1[1] -- Dry or wet (0 to 1). Default is 0, which means no reverb
 +reverb1[2] -- Space (0 to 1). How large space you want. A value of 1 is quite big
 +reverb1[3] -- Damp (0 to 1). A value close to 0 gives almost no damping.
 +reverb1[4] -- Reverb level, how much how the reverb signal that should be mixed in (default = 1)
 +reverb1[5] -- mixMode, where 0=insert and 1=send.
 +reverb1[6] -- tailLatch, where 0=off and 1=on.
 +reverb1[7] -- keep (0 - 1), how much of the stereo signal that should be kept in the reverb.
 +reverb1[8] -- cross (0 - 1), how much of the stereo signal that should be leaked
 +</code>
 +
 +Turn tail latch on if you want the reverb signal to always play even if you set wet=0. For instance, say you have a synth sound that you are playing with tailLatch=1. When you increase the wet variable, the sound of your synth will be sent through the reverb, but when you drop it back to 0 (totally dry) then the signal won't enter the reverb. However, whatever you already have in the reverb will continue to play if tailLatch is on. Keep and cross are different ways to retain the stereo signal.
 +
 +You cannot control how much of each oscillator are the delays that should be sent into reverb1, but there is also another reverb (reverb2) where you can do exactly that. It is on its own reverb route and you control how much of each oscillator that should be passed through it by setting the rvol[x] value for each oscillator and then also rpanning[x] to tell the panning. The delays can also be sent up to reverb2.
 +
 +To summarise, there are a number of alternative routes your sound can go through:
 +
 +
 +
 +  * Main route: On by default
 +  * Alternative route: Off by default
 +  * Reverb route: Off by default. All sounds here go through reverb2
 +  * Delay 1 route. Off by default
 +  * Delay 2 route: Off by default
 +
 +All routes except the alternative routes also go through reverb1. Both reverbs are off by default.
 ===== MIDI output (experimental) ===== ===== MIDI output (experimental) =====
  
getting_started_vividshaper.1736189388.txt.gz · Last modified: (external edit)