Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions MetaOscil.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,34 @@ template<uint16_t NUM_TABLE_CELLS, uint16_t UPDATE_RATE, byte N_OSCIL>
int8_t phMod(Q15n16 phmod_proportion) {return current_osc->phMod(phmod_proportion);}


/** Returns the next sample given a phase modulation value.
@param phmod_proportion a phase modulation value given as a proportion of the wave. The
phmod_proportion parameter is a SFix<NI,NF> fixed-point number where the fractional part represents almost -1 to almost 1, modulating the phase by one whole table length in
each direction. This fixed point math number is interpreted as a SFix<15,16> internally.
@return a sample from the table.
*/
template <int8_t NI, int8_t NF, uint8_t RANGE>
inline
int8_t phMod(SFix<NI,NF,RANGE> phmod_proportion)
{
return current_osc->phMod(phmod_proportion);
}



/** Returns the next sample given a phase modulation value.
@param phmod_proportion a phase modulation value given as a proportion of the wave. The
phmod_proportion parameter is a SFix<15,16> fixed-point number where the fractional part represents almost -1 to almost 1, modulating the phase by one whole table length in
each direction.
@return a sample from the table.
*/
inline
int8_t phMod(SFix<15,16> phmod_proportion)
{
return current_osc->phMod(phmod_proportion);
}


/** Set the MetaOsc frequency with an unsigned int.
@param frequency to play the wave table.*/
inline
Expand Down
Loading