Crate sampsyn

Source

Structs§

WaveTable
WaveTable(hz, sr, samples, [(time, wave)])

Functions§

create_wavetable
Takes a bunch of samples, sr of the input and the frequency of the fundemental to create the wave table. Yes, you should know what the base frequency is otherwise it won’t work. You could try doing a different frequency than it actually is for artistic effect but I didn’t test that.
initial_state
Generates an initial state to use with wavetable_act_state. t is the starting time
parse_wavetable_from_buffer
Parses table from buffer, so you can manage the file seperately
read_wavetable_from_file
Reads a file and you get the table out of it(if it is indeed a table file)
wavetable_act
Takes a wave table and a frequency of what you want the fundemental of the output to be. t is the starting time it’s at currently and sr is the samplerate of the output. len is the amount of frames the output should be.
wavetable_act_state
Takes a wave table and a frequency of what you want the fundemental of the output to be. t is the time it’s currently at. t must not jump through time. sr is the samplerate of the output. It takes the state and updates it. Outputs a single sample frame per use.

Type Aliases§

WaveTableState