src/cshellsynth/impulse_train.h File Reference

#include <jack/jack.h>
#include <cshellsynth/atomic-types.h>
#include <cshellsynth/synth.h>

Go to the source code of this file.

Data Structures

struct  cs_itrain_t

Defines

#define cs_itrain_destroy(cs_itrain)   cs_synth_destroy((cs_synth_t *) (cs_itrain))
#define cs_itrain_set_freq(cs_itrain, freq)   cs_synth_set_freq((cs_synth_t *) (cs_itrain), (freq))
#define cs_itrain_set_offset(cs_itrain, offset)   cs_synth_set_offset((cs_synth_t *) (cs_itrain), (offset))
#define cs_itrain_set_amp(cs_itrain, amp)   cs_synth_set_amp((cs_synth_t *) (cs_itrain), (amp))

Functions

int cs_itrain_init (cs_itrain_t *self, const char *client_name, jack_options_t flags, char *server_name)
void cs_itrain_set_scale (cs_itrain_t *self, int scale)

Detailed Description

Impulse Train Synth

Ruby version: Synths::ImpulseTrain

This produces an impulse train, which corresponds to:

inf
 Σ cos(n*wt)
n=1

If the scale parameter is set, the (bandlimited) amplitude of the wave will be decreased such that the peak is always under 1.0. This is probably not what you want unless you are using a constant frequency value.


Define Documentation

#define cs_itrain_destroy ( cs_itrain   )     cs_synth_destroy((cs_synth_t *) (cs_itrain))

Destroy impulse train synth

See cs_synth_destroy

#define cs_itrain_set_amp ( cs_itrain,
amp   )     cs_synth_set_amp((cs_synth_t *) (cs_itrain), (amp))
#define cs_itrain_set_freq ( cs_itrain,
freq   )     cs_synth_set_freq((cs_synth_t *) (cs_itrain), (freq))
#define cs_itrain_set_offset ( cs_itrain,
offset   )     cs_synth_set_offset((cs_synth_t *) (cs_itrain), (offset))

Function Documentation

int cs_itrain_init ( cs_itrain_t self,
const char *  client_name,
jack_options_t  flags,
char *  server_name 
)

Initialize impulse train synth

See cs_synth_destroy

void cs_itrain_set_scale ( cs_itrain_t self,
int  scale 
)

Set whether to scale the bandlimited waveform to 1 or not. This is probably not what you want unless the frequency is constant. For manual scaling, note that if a given frequency doesn't clip, no frequency above that will clip.

Ruby version: scale=

Parameters:
scale scale. 0 for not scaling, nonzero for scaling
 All Data Structures Files Functions Variables Typedefs Enumerations Defines
Generated on Thu Sep 2 23:47:09 2010 for cshellsynth by  doxygen 1.6.3