Skip to content

Commit

Permalink
Updated documentation. Added smoothing to a few synth inputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
clone45 committed Aug 10, 2014
1 parent 11f87eb commit 018c2ab
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 24 deletions.
2 changes: 0 additions & 2 deletions GlobalFilterTables.cpp

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ModuleExtClock.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
* Helpful clock divisions have been defined in defines.h.
*
*
* ModuleClock *module_clock = new ModuleClock(120, 48); // produce 1/8th note gates at 120 BPM
* ModuleClock *module_clock = new ModuleClock(120, EIGHTH_NOTE_CLOCK_DIVISION); // produce 1/8th note gates at 120 BPM
* ModuleClock *module_clock = new ModuleClock(100, QUARTER_NOTE_CLOCK_DIVISION); // produce 1/4th note gates at 100 BPM
* ModuleClock *module_clock = new ModuleClock(100, WHOLE_NOTE_CLOCK_DIVISION); // produce whole note gates at 100 BPM
* ModuleExtClock *module_ext_clock = new ModuleExtClock(120, 48); // produce 1/8th note gates at 120 BPM
* ModuleExtClock *module_ext_clock = new ModuleExtClock(120, EIGHTH_NOTE_CLOCK_DIVISION); // produce 1/8th note gates at 120 BPM
* ModuleExtClock *module_ext_clock = new ModuleExtClock(100, QUARTER_NOTE_CLOCK_DIVISION); // produce 1/4th note gates at 100 BPM
* ModuleExtClock *module_ext_clock = new ModuleExtClock(100, WHOLE_NOTE_CLOCK_DIVISION); // produce whole note gates at 100 BPM
*
*/

Expand Down
37 changes: 27 additions & 10 deletions ModuleInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,37 @@
// EquationComposer.ino and passed into each synth. But you can ignore the gory
// details and simply access the inputs using:
//
// inputs->sr
// inputs->mod
// inputs->param1
// inputs->param2
// inputs->param3
// inputs->gate
// inputs->sr
// inputs->mod
// inputs->param1
// inputs->param2
// inputs->param3
// inputs->gate
//
// Example usage:
//
// ModuleWavetableOsc *osc = new ModuleWavetableOsc();
// osc->wavetable_input = inputs->mod;
// osc->frequency_input = inputs->sr;
// ModuleWavetableOsc *osc = new ModuleWavetableOsc();
// osc->wavetable_input = inputs->mod;
// osc->frequency_input = inputs->sr;
//
// this->last_module = osc;
// this->last_module = osc;
//
// You can also activate a "smoothing" algorithm on the inputs, which is a good
// way to help reduce noise on the inputs. The smoothing algorithm requires
// extra CPU cycles, but that usually isn't a problem.
//
// The syntax for using smoothing on an input is:
//
// inputs->param2->smooth;
//
// Example usage with smoothing:
//
// ModuleWavetableOsc *osc = new ModuleWavetableOsc();
// osc->wavetable_input = inputs->mod->smooth; // <== smoothing added
// osc->frequency_input = inputs->sr;
//
// this->last_module = osc;
//

#ifndef ModuleInput_h
#define ModuleInput_h
Expand Down
11 changes: 10 additions & 1 deletion ModuleWaveFolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
// ModuleWaveFolder is simple audio wave folder with automatic gain compensation.
// See http://www.analoguehaven.com/doepfer/a137/A137_2principle.gif
//
// lower_clipping_level_input and upper_clipping_level_input both clip MORE when
// increased in value. This allows adjustment of both lower and upper clipping
// levels with a single input. For example, here both clipping levels are
// controlled by param1:
//
// ModuleWaveFolder *wave_folder = new ModuleWaveFolder();
// wave_folder->lower_clipping_level_input = inputs->param1;
// wave_folder->upper_clipping_level_input = inputs->param1;
//
// Example usage:
//
// // SynthTutorial15
Expand All @@ -30,7 +39,7 @@
//
// this->last_module = wave_folder;
//
//
// Also see: SynthWavetableFolder.cpp

#ifndef ModuleWaveFolder_h
#define ModuleWaveFolder_h
Expand Down
4 changes: 3 additions & 1 deletion ModuleWavetableOsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
// =============================================================================
//
// ModuleWavetableOsc is a wavetable oscillator with control over frequency and
// wavetable. The wavetables are defined in Wavetables.cpp.
// wavetable. The wavetables are defined in GlobalWavetables.cpp.
//
// Example usage:
//
// ModuleWavetableOsc *wavetable_osc = new ModuleWavetableOsc();
// wavetable_osc->frequency_input = inputs->sr_input;
// wavetable_osc->wavetable_input = inputs->mod_input;
// this->last_module = wavetable_osc;
//
// Also see: SynthWavetable.cpp and SynthChords.cpp

#ifndef ModuleWavetableOsc_h
#define ModuleWavetableOsc_h
Expand Down
6 changes: 3 additions & 3 deletions SynthChords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SynthChords::SynthChords(Inputs* inputs)
quantizer->scale_input = inputs->param1;

chords->root_note_input = quantizer;
chords->chord_input = inputs->mod;
chords->chord_input = inputs->mod->smooth;

rotating_router_3->rotate_input = inputs->gate;
rotating_router_3->input_1 = chords->note_1_output;
Expand All @@ -27,10 +27,10 @@ SynthChords::SynthChords(Inputs* inputs)
wavetable_osc1->wavetable_input = new ModuleConstant(0);
wavetable_osc1->frequency_input = rotating_router_3->output_1;

wavetable_osc2->wavetable_input = inputs->param2;
wavetable_osc2->wavetable_input = inputs->param2->smooth;
wavetable_osc2->frequency_input = rotating_router_3->output_2;

wavetable_osc3->wavetable_input = inputs->param3;
wavetable_osc3->wavetable_input = inputs->param3->smooth;
wavetable_osc3->frequency_input = rotating_router_3->output_3;

mixer_3->input_1 = wavetable_osc1;
Expand Down
6 changes: 3 additions & 3 deletions SynthDrumPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ SynthDrumPlayer::SynthDrumPlayer(Inputs* inputs)

// Use the 3 parameters to select the patterns
// used for the drums.
drum_sequencer->kick_pattern_input = inputs->param1;
drum_sequencer->snare_pattern_input = inputs->param2;
drum_sequencer->hihat_pattern_input = inputs->param3;
drum_sequencer->kick_pattern_input = inputs->param1->smooth;
drum_sequencer->snare_pattern_input = inputs->param2->smooth;
drum_sequencer->hihat_pattern_input = inputs->param3->smooth;

// Use the mode input to select the drum kit
kit_select->kit_selection_input = inputs->mod;
Expand Down

0 comments on commit 018c2ab

Please sign in to comment.