krähemann.com

Custom application design and development out-sourcing

FM and Impulse Oscillator

In view of next release v2.3.0 of Advanced Gtk+ Sequencer, I have implemented Frequency Modulation and impulse oscillator synth utility functions.

The utility functions

Some code is yet implemented and available in git.

ags_synth_util.h

The synth util has got an impulse oscillator:

http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/ags_synth_util.h?h=2.3.x

void ags_synth_util_sin(void *buffer,
			gdouble freq, gdouble phase, gdouble volume,
                        guint samplerate, guint audio_buffer_util_format,
                        guint offset, guint n_frames);

void ags_synth_util_sawtooth(void *buffer,
                             gdouble freq, gdouble phase, gdouble volume,
                             guint samplerate, guint audio_buffer_util_format,
                             guint offset, guint n_frames);

void ags_synth_util_triangle(void *buffer,
                             gdouble freq, gdouble phase, gdouble volume,
                             guint samplerate, guint audio_buffer_util_format,
                             guint offset, guint n_frames);

void ags_synth_util_square(void *buffer,
                           gdouble freq, gdouble phase, gdouble volume,
                           guint samplerate, guint audio_buffer_util_format,
                           guint offset, guint n_frames);

void ags_synth_util_impulse(void *buffer,
                            gdouble freq, gdouble phase, gdouble volume,
                            guint samplerate, guint audio_buffer_util_format,
                            guint offset, guint n_frames);

ags_fm_synth_util.h

The FM synth util is going to provide frequency modulation oscillators:

http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/ags_fm_synth_util.h?h=2.3.x

void ags_fm_synth_util_sin(void *buffer,
                           gdouble freq, gdouble phase, gdouble volume,
                           guint samplerate, guint audio_buffer_util_format,
                           guint offset, guint n_frames,
                           guint lfo_osc_mode,
                           gdouble lfo_freq, gdouble lfo_depth,
                           gdouble tuning);

void ags_fm_synth_util_sawtooth(void *buffer,
                                gdouble freq, gdouble phase, gdouble volume,
                                guint samplerate, guint audio_buffer_util_format,
                                guint offset, guint n_frames,
                                guint lfo_osc_mode,
                                gdouble lfo_freq, gdouble lfo_depth,
                                gdouble tuning);

void ags_fm_synth_util_triangle(void *buffer,
                                gdouble freq, gdouble phase, gdouble volume,
                                guint samplerate, guint audio_buffer_util_format,
                                guint offset, guint n_frames,
                                guint lfo_osc_mode,
                                gdouble lfo_freq, gdouble lfo_depth,
                                gdouble tuning);

void ags_fm_synth_util_square(void *buffer,
                              gdouble freq, gdouble phase, gdouble volume,
                              guint samplerate, guint audio_buffer_util_format,
                              guint offset, guint n_frames,
                              guint lfo_osc_mode,
                              gdouble lfo_freq, gdouble lfo_depth,
                              gdouble tuning);

void ags_fm_synth_util_impulse(void *buffer,
                               gdouble freq, gdouble phase, gdouble volume,
                               guint samplerate, guint audio_buffer_util_format,
                               guint offset, guint n_frames,
                               guint lfo_osc_mode,
                               gdouble lfo_freq, gdouble lfo_depth,
                               gdouble tuning);

ags_lfo_synth_util.h

The LFO synth util is going to provide LFO amplification oscillator:

http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/ags_lfo_synth_util.h?h=2.3.x

void ags_lfo_synth_util_sin(void *buffer,
                            gdouble freq, gdouble phase,
			    gdouble depth,
                            gdouble tuning,
                            guint samplerate, guint audio_buffer_util_format,
                            guint offset, guint n_frames);

void ags_lfo_synth_util_sawtooth(void *buffer,
                                 gdouble freq, gdouble phase,
                                 gdouble depth,
				 gdouble tuning,
                                 guint samplerate, guint audio_buffer_util_format,
                                 guint offset, guint n_frames);

void ags_lfo_synth_util_triangle(void *buffer,
                                 gdouble freq, gdouble phase,
                                 gdouble depth,
                                 gdouble tuning,
                                 guint samplerate, guint audio_buffer_util_format,
                                 guint offset, guint n_frames);

void ags_lfo_synth_util_square(void *buffer,
                               gdouble freq, gdouble phase,
                               gdouble depth,
                               gdouble tuning,
                               guint samplerate, guint audio_buffer_util_format,
                               guint offset, guint n_frames);

void ags_lfo_synth_util_impulse(void *buffer,
                                gdouble freq, gdouble phase,
                                gdouble depth,
                                gdouble tuning,
                                guint samplerate, guint audio_buffer_util_format,
                                guint offset, guint n_frames);

By Joël