Skip to content

Commit

Permalink
Merge pull request #44 from magnetophon/lf_sawpos_reset
Browse files Browse the repository at this point in the history
add reset and phase versions of lf_sawpos
  • Loading branch information
rmichon authored Oct 13, 2020
2 parents 2d5e402 + f4dc8b3 commit 21978db
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions oscillators.lib
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,47 @@ lf_sawpos_phase(phase,freq) = (+(phase-phase') : ma.frac) ~ +(freq/ma.SR);
// MarkDown: Romain Michon
lf_sawpos(freq) = ma.frac ~ +(freq/ma.SR);

//-----------------`(os.)lf_sawpos_reset`--------------------
// Simple sawtooth waveform oscillator between 0 and 1.
// with reset.
//
// #### Usage
//
// ```
// lf_sawpos_reset(freq,reset)
// ```
//
// Where:
//
// * `freq`: frequency
// * `reset`: reset the oscillator to 0
//
//---------------------------------------------------------
// Author: Bart Brouns
// License: STK-4.3
lf_sawpos_reset(freq,reset) = ma.frac * (reset == 0) ~ +(freq/ma.SR)

//-----------------`(os.)lf_sawpos_phase_reset`--------------------
// Simple sawtooth waveform oscillator between 0 and 1.
// with phase control and reset.
//
// #### Usage
//
// ```
// lf_sawpos_phase_reset(freq,phase,reset)
// ```
//
// Where:
//
// * `freq`: frequency
// * `phase`: phase between 0 and 1
// * `reset`: reset the oscillator to 0
//
//---------------------------------------------------------
// Author: Bart Brouns
// License: STK-4.3
lf_sawpos_phase_reset(freq,phase,reset) = lf_sawpos_reset(freq,reset) +phase :ma.frac;

//-----------------`(os.)lf_saw`--------------------
// Simple sawtooth waveform.
// `lf_saw` is a standard Faust function.
Expand Down

0 comments on commit 21978db

Please sign in to comment.