Setting Values
- This will set the value when ever you trigger it
oscillator.frequency.value; //returns the current frequency value
oscillator.frequency.value = 100; //sets the value immediately
Scheduling Values
- these are used to create Envelopes in tone, but we can use them on their own
Types of scheduling
- setValueAtTime - to schedule a value change at a precise time.
- linearRampToValueAtTime - to ramp to a value starting from the previously scheduled value.
- exponentialRampToValueAtTime - same as the above, but with an exponential curve instead of a linear curve.
- setTargetAtTime - unlike the RampValueAtTime methods, in setTargetAtTime, the time attribute is when it should start ramping towards the value instead of arrive at the value. It takes a third parameter which is the time constant at which it will change.
- setValueCurveAtTime - sets an array of values which will be evenly invoked over the course of the duration.
- cancelScheduledValues - cancels all values after the specified time.
Ramping values
- linearRampTo - set a value and a ramp time and the signal will begin linearly ramping towards that value.
- exponentialRampTo - same as above but exponential ramp.
- rampTo - same interface as the above methods, but will automatically decide to use linear or exponential based on the units of the signal.
Time
Tone.Transport.bpm.value = 80;
//ramp the bpm to 120 over 10 seconds
Tone.Transport.bpm.rampTo(120, 10)
Notation time
- Describes time in BPM and time signature relative values.
- “4n” = quarter note
- “8t” = eighth note triplet
- “2m” = two measures
- “8n.” = dotted-eighth note
LFO - Low Frequency Oscillator
LFO (Low Frequency Oscillator)
starter
remaking effects with lfos
- we can use an LFO to remake any effect with ‘auto’ in the name
- autowah, autopanner, autofilter
- also tremolo, vibrato
- fast tremolo is amplitude modulation
- fast vibrato is frequency modulation
examples