src/cshellsynth/dsf.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_dsf_t

Defines

#define cs_dsf_destroy(cs_dsf)   cs_synth_destroy((cs_synth_t *) (cs_dsf))
#define cs_dsf_set_freq(cs_dsf, freq)   cs_synth_set_freq((cs_synth_t *) (cs_dsf), (freq))
#define cs_dsf_set_offset(cs_dsf, offset)   cs_synth_set_offset((cs_synth_t *) (cs_dsf), (offset))
#define cs_dsf_set_amp(cs_dsf, amp)   cs_synth_set_amp((cs_synth_t *) (cs_dsf), (amp))

Functions

int cs_dsf_init (cs_dsf_t *self, const char *client_name, jack_options_t flags, char *server_name)
void cs_dsf_set_bright (cs_dsf_t *self, float bright)
void cs_dsf_set_scale (cs_dsf_t *self, int scale)

Detailed Description

Discrete Summation Formula Synth

Ruby version: Synths::Dsf

This produces a wave corresponding to the equation

inf  n-1
 Σ  b    * sin(n*wt)
n=1

Where b is "brightness", valued from 0 (a sine wave, sine.h) to 1 (a cotangent/2 wave, containing equal amounts of all frequencies, cot.h).

If the scale parameter is set, the amplitude of the wave will be decreased such that the peak is always under 1.0.


Define Documentation

#define cs_dsf_destroy ( cs_dsf   )     cs_synth_destroy((cs_synth_t *) (cs_dsf))

Destroy dsf synth

See cs_synth_destroy

#define cs_dsf_set_amp ( cs_dsf,
amp   )     cs_synth_set_amp((cs_synth_t *) (cs_dsf), (amp))
#define cs_dsf_set_freq ( cs_dsf,
freq   )     cs_synth_set_freq((cs_synth_t *) (cs_dsf), (freq))
#define cs_dsf_set_offset ( cs_dsf,
offset   )     cs_synth_set_offset((cs_synth_t *) (cs_dsf), (offset))

Function Documentation

int cs_dsf_init ( cs_dsf_t self,
const char *  client_name,
jack_options_t  flags,
char *  server_name 
)

Initialize dsf synth

See cs_synth_destroy

void cs_dsf_set_bright ( cs_dsf_t self,
float  bright 
)

Set bright, from 0-1, see discussion at dsf.h

Ruby version: bright=

Parameters:
bright the brightness. Default is 0.5.
void cs_dsf_set_scale ( cs_dsf_t self,
int  scale 
)

Set whether to scale to 1 or not

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