SoundSynth 1.1.1
A small compiled library with applications for C sound synthesis and playback functions. The library was compiled for Windows 64-bit and should work with 64- or 32-bit windows architectures.
Loading...
Searching...
No Matches
Synthesizing Sounds

Functions related to generating sounds either directly in time-domain or using frequency-domain heuristics. More...

Functions

void generateSinWave (short *buffer, double frequency, double volume, int sampleRate, int numSamples)
 Generate a sinusoidal wave with a specified frequency and duration.
 
double spline (double x)
 
double getFrequencyRelativeToFrequency (double frequency, int semitoneDistance)
 

Detailed Description

Functions related to generating sounds either directly in time-domain or using frequency-domain heuristics.

Function Documentation

◆ generateSinWave()

void generateSinWave ( short * buffer,
double frequency,
double volume,
int sampleRate,
int numSamples )

Generate a sinusoidal wave with a specified frequency and duration.

This function generates a sinusoidal wave with the given frequency and duration. The waveform is stored in the provided buffer.

Parameters
bufferPointer to the buffer where the waveform will be stored.
frequencyThe frequency of the sinusoidal wave in Hz.
volumeThe volume of the waveform (scaled between 0 and 1).
sampleRateThe sample rate of the waveform (e.g., 44100 for CD quality).
numSamplesThe number of samples in the waveform (likely, the length of buffer).

◆ getFrequencyRelativeToFrequency()

double getFrequencyRelativeToFrequency ( double frequency,
int semitoneDistance )

◆ spline()

double spline ( double x)