diff --git a/.gitignore b/.gitignore index 152160409..8bc986da5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ tags user_guide.md notes.txt FAQ.md +*.dox *~ *.o *.lo diff --git a/ADSR.h b/ADSR.h index 7640e997f..2704ffea2 100644 --- a/ADSR.h +++ b/ADSR.h @@ -180,44 +180,44 @@ inline /** Set the attack level of the ADSR. - @param value the attack level. + @param attack the attack level. */ inline - void setAttackLevel(byte value) + void setAttackLevel(byte attack) { - attack.level=value; + attack.level=attack; } /** Set the decay level of the ADSR. - @param value the decay level. + @param decay the decay level. */ inline - void setDecayLevel(byte value) + void setDecayLevel(byte decay) { - decay.level=value; + decay.level=decay; } /** Set the sustain level of the ADSR. - @param value the sustain level. Usually the same as the decay level, + @param sustain the sustain level. Usually the same as the decay level, for a steady sustained note. */ inline - void setSustainLevel(byte value) + void setSustainLevel(byte sustain) { - sustain.level=value; + sustain.level=sustain; } /** Set the release level of the ADSR. Normally you'd make this 0, but you have the option of some other value. - @param value the release level (normally 0). + @param release the release level (normally 0). */ inline - void setReleaseLevel(byte value) + void setReleaseLevel(byte release) { - release.level=value; + release.level=release; } @@ -225,7 +225,7 @@ inline /** Set the attack and decay levels of the ADSR. This assumes a conventional ADSR where the sustain continues at the same level as the decay, till the release ramps to 0. @param attack the new attack level. - @param value the new sustain level. + @param decay the new sustain level. */ inline void setADLevels(byte attack, byte decay) @@ -244,7 +244,7 @@ inline /** Set the attack time of the ADSR in milliseconds. The actual time taken will be resolved within the resolution of CONTROL_RATE. - @param value the unsigned int attack time in milliseconds. + @param msec the unsigned int attack time in milliseconds. */ inline void setAttackTime(unsigned int msec) @@ -255,7 +255,7 @@ inline /** Set the decay time of the ADSR in milliseconds. The actual time taken will be resolved within the resolution of CONTROL_RATE. - @param value the unsigned int decay time in milliseconds. + @param msec the unsigned int decay time in milliseconds. */ inline void setDecayTime(unsigned int msec) @@ -267,7 +267,7 @@ inline /** Set the sustain time of the ADSR in milliseconds. The actual time taken will be resolved within the resolution of CONTROL_RATE. The sustain phase will finish if the ADSR recieves a noteOff(). - @param value the unsigned int sustain time in milliseconds. + @param msec the unsigned int sustain time in milliseconds. */ inline void setSustainTime(unsigned int msec) @@ -279,7 +279,7 @@ inline /** Set the release time of the ADSR in milliseconds. The actual time taken will be resolved within the resolution of CONTROL_RATE. - @param value the unsigned int release time in milliseconds. + @param msec the unsigned int release time in milliseconds. */ inline void setReleaseTime(unsigned int msec) @@ -293,7 +293,7 @@ inline The actual times will be resolved within the resolution of CONTROL_RATE. @param attack_ms the new attack time in milliseconds. @param decay_ms the new decay time in milliseconds. - @param decay_ms the new sustain time in milliseconds. + @param sustain_ms the new sustain time in milliseconds. @param release_ms the new release time in milliseconds. */ inline diff --git a/AudioDelay.h b/AudioDelay.h index 41a58abd3..759a07d54 100644 --- a/AudioDelay.h +++ b/AudioDelay.h @@ -25,7 +25,7 @@ /** -@brief Audio delay line for comb filter, flange, chorus and short echo effects. +Audio delay line for comb filter, flange, chorus and short echo effects. @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples. This should be a power of two. The largest delay you'll fit in an atmega328 will be 512 cells, which at 16384 Hz sample rate is 31 milliseconds. More of a flanger or a diff --git a/AudioDelayFeedback.h b/AudioDelayFeedback.h index 4f20ef483..861a8878a 100644 --- a/AudioDelayFeedback.h +++ b/AudioDelayFeedback.h @@ -35,7 +35,7 @@ enum interpolation_types {LINEAR,ALLPASS}; /** -@brief Audio delay line with feedback for comb filter, flange, chorus and short echo effects. +Audio delay line with feedback for comb filter, flange, chorus and short echo effects. @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples, and should be a power of two. The maximum delay length which will fit in an atmega328 is half that of a plain AudioDelay object, in this case 256 cells, or about 15 diff --git a/AutoRange.h b/AutoRange.h index 83b498ace..b52e4f186 100644 --- a/AutoRange.h +++ b/AutoRange.h @@ -25,7 +25,7 @@ /** - Keeps a running calculation of the range of the input values it receives. +Keeps a running calculation of the range of the input values it receives. */ template class diff --git a/ControlDelay.h b/ControlDelay.h index dedfc75ff..70b92c8ea 100644 --- a/ControlDelay.h +++ b/ControlDelay.h @@ -25,7 +25,8 @@ #include "AudioDelay.h" -/** Control-rate delay line for delaying control signals. +/** +@brief Control-rate delay line for delaying control signals. For example, this could be used to produce echo-like effects using multiple instances of the same voice, when AudioDelay would be too short for an actual audio echo. This is in fact just a wrapper of the AudioDelay code. diff --git a/Doxyfile b/Doxyfile index c65b8e259..d43d9af98 100644 --- a/Doxyfile +++ b/Doxyfile @@ -635,7 +635,7 @@ WARN_IF_DOC_ERROR = YES # wrong or incomplete parameter documentation, but not about the absence of # documentation. -WARN_NO_PARAMDOC = NO +WARN_NO_PARAMDOC = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text @@ -793,7 +793,7 @@ INPUT_FILTER = # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS = "*.py = /usr/local/bin/doxypypy.py" # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source diff --git a/MozziGuts.h b/MozziGuts.h index 4e42af312..cf8a658cc 100644 --- a/MozziGuts.h +++ b/MozziGuts.h @@ -33,58 +33,17 @@ #include "TimerOne.h" #include "FrequencyTimer2.h" -/** -@mainpage Welcome - -The latest version of Mozzi and this documentation are at the Mozzi home page. - -Here's a brief description of each section of this documentation: - -@section Modules -Fixed point number types, macros and functions for fast fractional maths. - -Mozzi core definitions and functions, which are used in every Mozzi sketch. - -Utility functions which are generally useful, including midi note to frequency conversion, efficient asynchronous analog input and random functions. - -@section Classes -The Classes used to generate control and audio signals. - - -@section Soundtables -Includes ready-to-use wave tables and a few example samples which are in -the Mozzi/tables and Mozzi/samples folders. - -You can convert your own sounds from a program like Audacity to tables for Mozzi -with a script called char2mozzi.py, in Mozzi/python. Read the char2mozzi.py file for instructions. -*/ - - -/** @defgroup soundtables Look-up-tables and python scripts to generate tables or convert sounds. -Includes ready-to-use wave tables -and a few example samples which are in the Mozzi/tables and Mozzi/samples -folders. You can convert your own sounds from a program like Audacity to tables -for Mozzi with a script called char2mozzi.py, in Mozzi/python. Read the -char2mozzi.py file for instructions. Also check out the other scripts in the python -folder for templates to use if you want to do your own thing. -*/ - - -/** @defgroup core Mozzi core definitions and functions -The bones of every Mozzi sketch. -*/ - /** @ingroup core Control rate setting. Mozzi's CONTROL_RATE sets how many times per second updateControl() is called. -It can be any power of 2 greater than 64, and the largest value where it starts to -become impractical is around 1024. 64, 128, 256 and sometimes 512 are all usable values. -Try to keep it as low as you can, for efficiency, though higher rates can sometimes give smoother results, -avoiding the need to interpolate sensitive variables at audio rate in updateAudio(). -CONTROL_RATE has a default of 64 Hz, but it can be changed at the top of your sketch, -after the \#includes, for example: -\#define CONTROL_RATE 256 +It can be any power of 2 greater than 64, and the largest value where it starts +to become impractical is around 1024. 64, 128, 256 and sometimes 512 are all +usable values. Try to keep it as low as you can, for efficiency, though higher +rates can sometimes give smoother results, avoiding the need to interpolate +sensitive variables at audio rate in updateAudio(). CONTROL_RATE has a default +of 64 Hz, but it can be changed at the top of your sketch, after the \#includes, +for example: \#define CONTROL_RATE 256 */ #define CONTROL_RATE 64 @@ -322,9 +281,10 @@ int getAudioInput(); /** @ingroup core -A replacement for Arduino micros() which is disabled by Mozzi which takes over Timer 0 for control interrupts. -mozziMicros has a resolution of 61 microseconds. -May be a useful hack for replacing micros() in time-related sensor libraries. +A replacement for Arduino micros() which is disabled by Mozzi which takes over +Timer 0 for control interrupts. mozziMicros is updated each time an audio sample +is output, so the resolution is 1/AUDIO_RATE (61 microseconds when AUDIO_RATE is +16384 Hz). @return the approximate number of microseconds since the program began. @todo incorporate mozziMicros() in a more accurate EventDelay()? */ diff --git a/doc/html/_02_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html b/doc/html/_02_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html index 7ac754e83..bdc3b24ea 100644 --- a/doc/html/_02_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html +++ b/doc/html/_02_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
@@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -88,7 +90,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -127,11 +129,11 @@
    This example code is in the public domain.
    */
    -
    #include <MozziGuts.h>
    -
    #include <Oscil.h> // oscillator template
    -
    #include <tables/sin2048_int8.h> // sine table for oscillator
    -
    #include <RecentAverage.h>
    -
    #include <ControlDelay.h>
    +
    #include <MozziGuts.h>
    +
    #include <Oscil.h> // oscillator template
    +
    #include <tables/sin2048_int8.h> // sine table for oscillator
    +
    #include <RecentAverage.h>
    +
    #include <ControlDelay.h>
    #define INPUT_PIN 0 // analog control input
    @@ -184,7 +186,7 @@
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -88,7 +90,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -118,12 +120,12 @@
    * This example code is in the public domain.
    */
    -
    #include <MozziGuts.h>
    -
    #include <Oscil.h>
    -
    #include <tables/triangle_analogue512_int8.h> // wavetable
    -
    #include <tables/cos2048_int8.h> // wavetable
    -
    #include <AudioDelay.h>
    -
    #include <mozzi_midi.h> // for mtof
    +
    #include <MozziGuts.h>
    +
    #include <Oscil.h>
    +
    #include <tables/triangle_analogue512_int8.h> // wavetable
    +
    #include <tables/cos2048_int8.h> // wavetable
    +
    #include <AudioDelay.h>
    +
    #include <mozzi_midi.h> // for mtof
    #define CONTROL_RATE 256 // powers of 2 please
    @@ -162,7 +164,7 @@
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    ADSR.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include "Line.h"
    +#include "mozzi_fixmath.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  ADSR< CONTROL_UPDATE_RATE >
     A simple ADSR envelope generator. More...
     
    +
    +
    + + + + diff --git a/doc/html/_a_d_s_r_8h_source.html b/doc/html/_a_d_s_r_8h_source.html index a1bbaad62..1a1bfe4ca 100644 --- a/doc/html/_a_d_s_r_8h_source.html +++ b/doc/html/_a_d_s_r_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    ADSR.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * ADSR.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,239 +132,302 @@
    20  *
    21  */
    22 
    -
    23 #ifndef ADSR_H_
    -
    24 #define ADSR_H_
    -
    25 
    -
    26 #if ARDUINO >= 100
    -
    27  #include "Arduino.h"
    -
    28 #else
    -
    29  #include "WProgram.h"
    -
    30 #endif
    -
    31 //#include <util/atomic.h>
    -
    32 #include "Line.h"
    -
    33 #include "mozzi_fixmath.h"
    +
    23 #ifndef ADSR_H_
    +
    24 #define ADSR_H_
    +
    25 
    +
    26 #if ARDUINO >= 100
    +
    27  #include "Arduino.h"
    +
    28 #else
    +
    29  #include "WProgram.h"
    +
    30 #endif
    +
    31 //#include <util/atomic.h>
    +
    32 #include "Line.h"
    +
    33 #include "mozzi_fixmath.h"
    34 
    35 
    +
    36 /** A simple ADSR envelope generator.
    +
    37 @todo Test whether using the template parameter makes any difference to speed,
    +
    38 and rationalise which units which do and don't need them.
    +
    39 Template objects are messy when you try to use pointers to them,
    +
    40 you have to include the whole template shebang in the pointer handling.
    +
    41 */
    42 template <unsigned int CONTROL_UPDATE_RATE>
    -
    43 class ADSR
    +
    43 class ADSR
    44 {
    45 private:
    46 
    -
    47  const unsigned int AUDIO_TICKS_PER_CONTROL;
    +
    47  const unsigned int AUDIO_TICKS_PER_CONTROL;
    48 
    -
    49  unsigned int phase_control_step_counter;
    -
    50  unsigned int phase_num_control_steps;
    +
    49  unsigned int phase_control_step_counter;
    +
    50  unsigned int phase_num_control_steps;
    51 
    -
    52  enum {ATTACK,DECAY,SUSTAIN,RELEASE,IDLE};
    -
    53 
    -
    54 
    -
    55  struct phase{
    -
    56  byte phase_type;
    -
    57  unsigned int control_steps;
    -
    58  unsigned long audio_steps;
    -
    59  Q8n0 level;
    -
    60  }attack,decay,sustain,release,idle;
    -
    61 
    -
    62  phase * current_phase;
    -
    63 
    -
    64  // Linear audio rate transitions for envelope
    -
    65  Line <unsigned long> transition;
    +
    52  enum {ATTACK,DECAY,SUSTAIN,RELEASE,IDLE};
    +
    53 
    +
    54 
    +
    55  struct phase{
    +
    56  byte phase_type;
    +
    57  unsigned int control_steps;
    +
    58  unsigned long audio_steps;
    +
    59  Q8n0 level;
    +
    60  }attack,decay,sustain,release,idle;
    +
    61 
    +
    62  phase * current_phase;
    +
    63 
    +
    64  // Linear audio rate transitions for envelope
    +
    65  Line <unsigned long> transition;
    66 
    -
    67  inline
    -
    68  unsigned int convertMsecToControlSteps(unsigned int msec){
    -
    69  return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
    -
    70  }
    +
    67  inline
    +
    68  unsigned int convertMsecToControlSteps(unsigned int msec){
    +
    69  return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
    +
    70  }
    71 
    -
    72  inline
    -
    73  void setPhase(phase * next_phase) {
    -
    74  phase_control_step_counter = 0;
    -
    75  phase_num_control_steps = next_phase->control_steps;
    -
    76  transition.set(Q8n0_to_Q16n16(next_phase->level),next_phase->audio_steps);
    -
    77  current_phase = next_phase;
    -
    78  }
    -
    79 
    -
    80 
    -
    81 
    -
    82  inline
    -
    83  void checkForAndSetNextPhase(phase * next_phase) {
    -
    84  if (++phase_control_step_counter >= phase_num_control_steps){
    -
    85  setPhase(next_phase);
    -
    86  }
    -
    87  }
    -
    88 
    -
    89 
    -
    90  inline
    -
    91  void checkForAndSetIdle() {
    -
    92  if (++phase_control_step_counter >= phase_num_control_steps){
    -
    93  transition.set(0,0,1);
    -
    94  current_phase = &idle;
    -
    95  }
    -
    96  }
    -
    97 
    -
    98 
    -
    99 
    +
    72  inline
    +
    73  void setPhase(phase * next_phase) {
    +
    74  phase_control_step_counter = 0;
    +
    75  phase_num_control_steps = next_phase->control_steps;
    +
    76  transition.set(Q8n0_to_Q16n16(next_phase->level),next_phase->audio_steps);
    +
    77  current_phase = next_phase;
    +
    78  }
    +
    79 
    +
    80 
    +
    81 
    +
    82  inline
    +
    83  void checkForAndSetNextPhase(phase * next_phase) {
    +
    84  if (++phase_control_step_counter >= phase_num_control_steps){
    +
    85  setPhase(next_phase);
    +
    86  }
    +
    87  }
    +
    88 
    +
    89 
    +
    90  inline
    +
    91  void checkForAndSetIdle() {
    +
    92  if (++phase_control_step_counter >= phase_num_control_steps){
    +
    93  transition.set(0,0,1);
    +
    94  current_phase = &idle;
    +
    95  }
    +
    96  }
    +
    97 
    +
    98 
    +
    99 
    100 inline
    -
    101  void setTime(phase * p, unsigned int msec)
    -
    102  {
    -
    103  p->control_steps=convertMsecToControlSteps(msec);
    -
    104  p->audio_steps = (ulong) p->control_steps * AUDIO_TICKS_PER_CONTROL;
    -
    105  }
    -
    106 
    -
    107 
    +
    101  void setTime(phase * p, unsigned int msec)
    +
    102  {
    +
    103  p->control_steps=convertMsecToControlSteps(msec);
    +
    104  p->audio_steps = (ulong) p->control_steps * AUDIO_TICKS_PER_CONTROL;
    +
    105  }
    +
    106 
    +
    107 
    108 public:
    109 
    -
    112  ADSR():AUDIO_TICKS_PER_CONTROL(AUDIO_RATE/CONTROL_UPDATE_RATE)
    -
    113  {
    -
    114  attack.phase_type = ATTACK;
    -
    115  decay.phase_type = DECAY;
    -
    116  sustain.phase_type = SUSTAIN;
    -
    117  release.phase_type = RELEASE;
    -
    118  idle.phase_type = IDLE;
    -
    119  release.level = 0;
    -
    120  }
    +
    110  /** Constructor.
    +
    111  */
    + +
    113  {
    +
    114  attack.phase_type = ATTACK;
    +
    115  decay.phase_type = DECAY;
    +
    116  sustain.phase_type = SUSTAIN;
    +
    117  release.phase_type = RELEASE;
    +
    118  idle.phase_type = IDLE;
    +
    119  release.level = 0;
    +
    120  }
    121 
    122 
    -
    126  void update(){ // control rate
    -
    127 
    -
    128  switch(current_phase->phase_type) {
    -
    129 
    -
    130  case ATTACK:
    -
    131  checkForAndSetNextPhase(&decay);
    -
    132  break;
    +
    123 /** Updates the internal controls of the ADSR.
    +
    124  Call this in updateControl().
    +
    125  */
    +
    126  void update(){ // control rate
    +
    127 
    +
    128  switch(current_phase->phase_type) {
    +
    129 
    +
    130  case ATTACK:
    +
    131  checkForAndSetNextPhase(&decay);
    +
    132  break;
    133 
    -
    134  case DECAY:
    -
    135  checkForAndSetNextPhase(&sustain);
    -
    136  break;
    -
    137 
    -
    138  case SUSTAIN:
    -
    139  checkForAndSetNextPhase(&release);
    -
    140  break;
    -
    141 
    -
    142  case RELEASE:
    -
    143  checkForAndSetIdle();
    -
    144  break;
    +
    134  case DECAY:
    +
    135  checkForAndSetNextPhase(&sustain);
    +
    136  break;
    +
    137 
    +
    138  case SUSTAIN:
    +
    139  checkForAndSetNextPhase(&release);
    +
    140  break;
    +
    141 
    +
    142  case RELEASE:
    +
    143  checkForAndSetIdle();
    +
    144  break;
    145 
    -
    146  }
    -
    147  }
    +
    146  }
    +
    147  }
    148 
    -
    153  inline
    -
    154  unsigned int next()
    -
    155  {
    -
    156  return Q16n16_to_Q16n0(transition.next());
    -
    157  }
    +
    149  /** Advances one audio step along the ADSR and returns the level.
    +
    150  Call this in updateAudio().
    +
    151  @return the next value, as an unsigned int.
    +
    152  */
    +
    153  inline
    +
    154  unsigned int next()
    +
    155  {
    +
    156  return Q16n16_to_Q16n0(transition.next());
    +
    157  }
    158 
    159 
    160 
    -
    163  inline
    -
    164  void noteOn(){
    -
    165  setPhase(&attack);
    -
    166  }
    +
    161  /** Start the attack phase of the ADSR. THis will restart the ADSR no matter what phase it is up to.
    +
    162  */
    +
    163  inline
    +
    164  void noteOn(){
    +
    165  setPhase(&attack);
    +
    166  }
    167 
    168 
    169 
    -
    173  inline
    -
    174  void noteOff(){
    -
    175  setPhase(&release);
    -
    176  }
    +
    170  /** Start the release phase of the ADSR.
    +
    171  @todo fix release for rate rather than steps (time), so it releases at the same rate whatever the current level.
    +
    172  */
    +
    173  inline
    +
    174  void noteOff(){
    +
    175  setPhase(&release);
    +
    176  }
    177 
    178 
    179 
    180 
    181 
    -
    185  inline
    -
    186  void setAttackLevel(byte value)
    -
    187  {
    -
    188  attack.level=value;
    -
    189  }
    +
    182  /** Set the attack level of the ADSR.
    +
    183  @param attack the attack level.
    +
    184  */
    +
    185  inline
    +
    186  void setAttackLevel(byte attack)
    +
    187  {
    +
    188  attack.level=attack;
    +
    189  }
    190 
    191 
    192 
    -
    196  inline
    -
    197  void setDecayLevel(byte value)
    -
    198  {
    -
    199  decay.level=value;
    -
    200  }
    +
    193  /** Set the decay level of the ADSR.
    +
    194  @param decay the decay level.
    +
    195  */
    +
    196  inline
    +
    197  void setDecayLevel(byte decay)
    +
    198  {
    +
    199  decay.level=decay;
    +
    200  }
    201 
    202 
    -
    207  inline
    -
    208  void setSustainLevel(byte value)
    -
    209  {
    -
    210  sustain.level=value;
    -
    211  }
    -
    212 
    -
    217  inline
    -
    218  void setReleaseLevel(byte value)
    -
    219  {
    -
    220  release.level=value;
    -
    221  }
    -
    222 
    -
    223 
    -
    224 
    -
    230  inline
    -
    231  void setADLevels(byte attack, byte decay)
    -
    232  {
    -
    233  setAttackLevel(attack);
    -
    234  setDecayLevel(decay);
    -
    235  setSustainLevel(decay);
    -
    236  setReleaseLevel(0);
    -
    237  }
    -
    238 
    +
    203  /** Set the sustain level of the ADSR.
    +
    204  @param sustain the sustain level. Usually the same as the decay level,
    +
    205  for a steady sustained note.
    +
    206  */
    +
    207  inline
    +
    208  void setSustainLevel(byte sustain)
    +
    209  {
    +
    210  sustain.level=sustain;
    +
    211  }
    +
    212 
    +
    213  /** Set the release level of the ADSR. Normally you'd make this 0,
    +
    214  but you have the option of some other value.
    +
    215  @param release the release level (normally 0).
    +
    216  */
    +
    217  inline
    +
    218  void setReleaseLevel(byte release)
    +
    219  {
    +
    220  release.level=release;
    +
    221  }
    +
    222 
    +
    223 
    +
    224 
    +
    225  /** Set the attack and decay levels of the ADSR. This assumes a conventional
    +
    226  ADSR where the sustain continues at the same level as the decay, till the release ramps to 0.
    +
    227  @param attack the new attack level.
    +
    228  @param decay the new sustain level.
    +
    229  */
    +
    230  inline
    +
    231  void setADLevels(byte attack, byte decay)
    +
    232  {
    +
    233  setAttackLevel(attack);
    +
    234  setDecayLevel(decay);
    +
    235  setSustainLevel(decay);
    +
    236  setReleaseLevel(0);
    +
    237  }
    +
    238 
    239 
    240 
    -
    241 
    -
    242 
    -
    243 
    -
    244 
    -
    249  inline
    -
    250  void setAttackTime(unsigned int msec)
    -
    251  {
    -
    252  setTime(&attack, msec);
    -
    253  }
    +
    241 
    +
    242 
    +
    243 
    +
    244 
    +
    245  /** Set the attack time of the ADSR in milliseconds.
    +
    246  The actual time taken will be resolved within the resolution of CONTROL_RATE.
    +
    247  @param msec the unsigned int attack time in milliseconds.
    +
    248  */
    +
    249  inline
    +
    250  void setAttackTime(unsigned int msec)
    +
    251  {
    +
    252  setTime(&attack, msec);
    +
    253  }
    254 
    255 
    -
    260  inline
    -
    261  void setDecayTime(unsigned int msec)
    -
    262  {
    -
    263  setTime(&decay, msec);
    -
    264  }
    +
    256  /** Set the decay time of the ADSR in milliseconds.
    +
    257  The actual time taken will be resolved within the resolution of CONTROL_RATE.
    +
    258  @param msec the unsigned int decay time in milliseconds.
    +
    259  */
    +
    260  inline
    +
    261  void setDecayTime(unsigned int msec)
    +
    262  {
    +
    263  setTime(&decay, msec);
    +
    264  }
    265 
    -
    266 
    -
    272  inline
    -
    273  void setSustainTime(unsigned int msec)
    -
    274  {
    -
    275  setTime(&sustain, msec);
    -
    276  }
    -
    277 
    -
    278 
    +
    266 
    +
    267  /** Set the sustain time of the ADSR in milliseconds.
    +
    268  The actual time taken will be resolved within the resolution of CONTROL_RATE.
    +
    269  The sustain phase will finish if the ADSR recieves a noteOff().
    +
    270  @param msec the unsigned int sustain time in milliseconds.
    +
    271  */
    +
    272  inline
    +
    273  void setSustainTime(unsigned int msec)
    +
    274  {
    +
    275  setTime(&sustain, msec);
    +
    276  }
    +
    277 
    +
    278 
    279 
    -
    284  inline
    -
    285  void setReleaseTime(unsigned int msec)
    -
    286  {
    -
    287  setTime(&release, msec);
    -
    288  }
    -
    289 
    +
    280  /** Set the release time of the ADSR in milliseconds.
    +
    281  The actual time taken will be resolved within the resolution of CONTROL_RATE.
    +
    282  @param msec the unsigned int release time in milliseconds.
    +
    283  */
    +
    284  inline
    +
    285  void setReleaseTime(unsigned int msec)
    +
    286  {
    +
    287  setTime(&release, msec);
    +
    288  }
    +
    289 
    290 
    291 
    -
    299  inline
    -
    300  void setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)
    -
    301  {
    -
    302  setAttackTime(attack_ms);
    -
    303  setDecayTime(decay_ms);
    -
    304  setSustainTime(sustain_ms);
    -
    305  setReleaseTime(release_ms);
    -
    306  }
    +
    292  /** Set the attack, decay and release times of the ADSR in milliseconds.
    +
    293  The actual times will be resolved within the resolution of CONTROL_RATE.
    +
    294  @param attack_ms the new attack time in milliseconds.
    +
    295  @param decay_ms the new decay time in milliseconds.
    +
    296  @param sustain_ms the new sustain time in milliseconds.
    +
    297  @param release_ms the new release time in milliseconds.
    +
    298  */
    +
    299  inline
    +
    300  void setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)
    +
    301  {
    +
    302  setAttackTime(attack_ms);
    +
    303  setDecayTime(decay_ms);
    +
    304  setSustainTime(sustain_ms);
    +
    305  setReleaseTime(release_ms);
    +
    306  }
    307 
    308 
    309 };
    310 
    -
    311 #endif /* ADSR_H_ */
    +
    311 #endif /* ADSR_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    AudioConfigHiSpeed14bitPwm.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + + + + + +

    +Macros

    #define AUDIO_CHANNEL_1_HIGHBYTE_PIN   TIMER1_A_PIN
     
    #define AUDIO_CHANNEL_1_LOWBYTE_PIN   TIMER1_B_PIN
     
    #define AUDIO_CHANNEL_1_HIGHBYTE_REGISTER   OCR1AL
     
    #define AUDIO_CHANNEL_1_LOWBYTE_REGISTER   OCR1BL
     
    #define AUDIO_BIAS   ((unsigned int) 0x2000)
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define AUDIO_BIAS   ((unsigned int) 0x2000)
    +
    + +

    Definition at line 25 of file AudioConfigHiSpeed14bitPwm.h.

    + +
    +
    + +
    +
    + + + + +
    #define AUDIO_CHANNEL_1_HIGHBYTE_PIN   TIMER1_A_PIN
    +
    + +

    Definition at line 18 of file AudioConfigHiSpeed14bitPwm.h.

    + +
    +
    + +
    +
    + + + + +
    #define AUDIO_CHANNEL_1_HIGHBYTE_REGISTER   OCR1AL
    +
    + +

    Definition at line 20 of file AudioConfigHiSpeed14bitPwm.h.

    + +
    +
    + +
    +
    + + + + +
    #define AUDIO_CHANNEL_1_LOWBYTE_PIN   TIMER1_B_PIN
    +
    + +

    Definition at line 19 of file AudioConfigHiSpeed14bitPwm.h.

    + +
    +
    + +
    +
    + + + + +
    #define AUDIO_CHANNEL_1_LOWBYTE_REGISTER   OCR1BL
    +
    + +

    Definition at line 21 of file AudioConfigHiSpeed14bitPwm.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_audio_config_hi_speed14bit_pwm_8h.js b/doc/html/_audio_config_hi_speed14bit_pwm_8h.js new file mode 100644 index 000000000..d56f7fa90 --- /dev/null +++ b/doc/html/_audio_config_hi_speed14bit_pwm_8h.js @@ -0,0 +1,8 @@ +var _audio_config_hi_speed14bit_pwm_8h = +[ + [ "AUDIO_BIAS", "_audio_config_hi_speed14bit_pwm_8h.html#aa2b18130c536085943a5768146fcb8bb", null ], + [ "AUDIO_CHANNEL_1_HIGHBYTE_PIN", "_audio_config_hi_speed14bit_pwm_8h.html#af907b5e2bf79ae514ec38f0ad687f320", null ], + [ "AUDIO_CHANNEL_1_HIGHBYTE_REGISTER", "_audio_config_hi_speed14bit_pwm_8h.html#a8f8ac5be3f490a05eae13008b7391144", null ], + [ "AUDIO_CHANNEL_1_LOWBYTE_PIN", "_audio_config_hi_speed14bit_pwm_8h.html#a924a602a1618a3829d35a4e2e9ff512f", null ], + [ "AUDIO_CHANNEL_1_LOWBYTE_REGISTER", "_audio_config_hi_speed14bit_pwm_8h.html#a808a9b91b8f1ed6d40f1c9f938f0bf57", null ] +]; \ No newline at end of file diff --git a/doc/html/_audio_config_hi_speed14bit_pwm_8h_source.html b/doc/html/_audio_config_hi_speed14bit_pwm_8h_source.html index 6dc66b33c..bb430cc9b 100644 --- a/doc/html/_audio_config_hi_speed14bit_pwm_8h_source.html +++ b/doc/html/_audio_config_hi_speed14bit_pwm_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,9 +110,9 @@
    AudioConfigHiSpeed14bitPwm.h
    -
    1 #ifndef AUDIOCONFIGHISPEED14BITPWM_H
    -
    2 #define AUDIOCONFIGHISPEED14BITPWM_H
    -
    3 
    +Go to the documentation of this file.
    1 #ifndef AUDIOCONFIGHISPEED14BITPWM_H
    +
    2 #define AUDIOCONFIGHISPEED14BITPWM_H
    +
    3 
    4 /*
    5 14 bit sound at 16384 Hz and 125kHz pwm rate
    6 Timer 1: PWM 125kHz
    @@ -119,25 +127,24 @@
    15 */
    16 
    17 // pins defined in TimerOne/config/known_16bit_timers.h
    -
    18 #define AUDIO_CHANNEL_1_HIGHBYTE_PIN TIMER1_A_PIN // 3.9k resistor
    -
    19 #define AUDIO_CHANNEL_1_LOWBYTE_PIN TIMER1_B_PIN // 1 M resistor
    -
    20 #define AUDIO_CHANNEL_1_HIGHBYTE_REGISTER OCR1AL
    -
    21 #define AUDIO_CHANNEL_1_LOWBYTE_REGISTER OCR1BL
    -
    22 
    +
    18 #define AUDIO_CHANNEL_1_HIGHBYTE_PIN TIMER1_A_PIN // 3.9k resistor
    +
    19 #define AUDIO_CHANNEL_1_LOWBYTE_PIN TIMER1_B_PIN // 1 M resistor
    +
    20 #define AUDIO_CHANNEL_1_HIGHBYTE_REGISTER OCR1AL
    +
    21 #define AUDIO_CHANNEL_1_LOWBYTE_REGISTER OCR1BL
    +
    22 
    23 /* Used internally to put the 0-biased generated audio into the right range for PWM output.*/
    24 // 14 bit
    -
    25 #define AUDIO_BIAS ((unsigned int) 0x2000)
    -
    26 
    +
    25 #define AUDIO_BIAS ((unsigned int) 0x2000)
    +
    26 
    27 
    -
    28 #endif // #ifndef AUDIOCONFIGHISPEED14BITPWM_H
    -
    29 
    +
    28 #endif // #ifndef AUDIOCONFIGHISPEED14BITPWM_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    AudioConfigStandard9bitPwm.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + + + + +

    +Macros

    #define STANDARD_PWM_RESOLUTION   488
     This is the dynamic range of Mozzi's audio output in STANDARD mode. More...
     
    #define AUDIO_BIAS   ((unsigned char) 244)
     
    #define AUDIO_CHANNEL_1_OUTPUT_REGISTER   OCR1A
     
    #define AUDIO_CHANNEL_1_PIN   TIMER1_A_PIN
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define AUDIO_BIAS   ((unsigned char) 244)
    +
    + +

    Definition at line 14 of file AudioConfigStandard9bitPwm.h.

    + +
    +
    + +
    +
    + + + + +
    #define AUDIO_CHANNEL_1_OUTPUT_REGISTER   OCR1A
    +
    + +

    Definition at line 17 of file AudioConfigStandard9bitPwm.h.

    + +
    +
    + +
    +
    + + + + +
    #define AUDIO_CHANNEL_1_PIN   TIMER1_A_PIN
    +
    + +

    Definition at line 19 of file AudioConfigStandard9bitPwm.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_audio_config_standard9bit_pwm_8h.js b/doc/html/_audio_config_standard9bit_pwm_8h.js new file mode 100644 index 000000000..8a9229ec1 --- /dev/null +++ b/doc/html/_audio_config_standard9bit_pwm_8h.js @@ -0,0 +1,7 @@ +var _audio_config_standard9bit_pwm_8h = +[ + [ "AUDIO_BIAS", "_audio_config_standard9bit_pwm_8h.html#aa2b18130c536085943a5768146fcb8bb", null ], + [ "AUDIO_CHANNEL_1_OUTPUT_REGISTER", "_audio_config_standard9bit_pwm_8h.html#af7bea692f194c5c5ef234ab57e2a3d0c", null ], + [ "AUDIO_CHANNEL_1_PIN", "_audio_config_standard9bit_pwm_8h.html#a4a4f0dc9e1f5947ac6b5336b5cf14d4f", null ], + [ "STANDARD_PWM_RESOLUTION", "_audio_config_standard9bit_pwm_8h.html#ga800c094e0a14fc31d87a360b3807a1b8", null ] +]; \ No newline at end of file diff --git a/doc/html/_audio_config_standard9bit_pwm_8h_source.html b/doc/html/_audio_config_standard9bit_pwm_8h_source.html index 9f4afd56f..7feebc4c7 100644 --- a/doc/html/_audio_config_standard9bit_pwm_8h_source.html +++ b/doc/html/_audio_config_standard9bit_pwm_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,29 +110,34 @@
    AudioConfigStandard9bitPwm.h
    -
    1 #ifndef AUDIOCONFIGSTANDARD9BITPWM_H
    -
    2 #define AUDIOCONFIGSTANDARD9BITPWM_H
    -
    3 
    +Go to the documentation of this file.
    1 #ifndef AUDIOCONFIGSTANDARD9BITPWM_H
    +
    2 #define AUDIOCONFIGSTANDARD9BITPWM_H
    +
    3 
    4 
    -
    11 #define STANDARD_PWM_RESOLUTION 488
    -
    12 
    +
    5 /** @ingroup core
    +
    6 This is the dynamic range of Mozzi's audio output in STANDARD mode.
    +
    7 It is equal to Timer1.pwmPeriod calculated for interrupt rate 16384.
    +
    8 It's included in the documentation because it's a slightly unusual number and useful to know
    +
    9 about when you're writing sketches.
    +
    10 */
    +
    11 #define STANDARD_PWM_RESOLUTION 488
    +
    12 
    13 /* Used internally to put the 0-biased generated audio into the right range for PWM output.*/
    -
    14 #define AUDIO_BIAS ((unsigned char) 244)
    -
    15 
    +
    14 #define AUDIO_BIAS ((unsigned char) 244)
    +
    15 
    16 // Used internally. If there was a channel 2, it would be OCR1B.
    -
    17 #define AUDIO_CHANNEL_1_OUTPUT_REGISTER OCR1A
    -
    18 
    -
    19 #define AUDIO_CHANNEL_1_PIN TIMER1_A_PIN // defined in TimerOne/config/known_16bit_timers.h
    -
    20 
    -
    21 #endif // #ifndef AUDIOCONFIGSTANDARD9BITPWM_H
    -
    22 
    +
    17 #define AUDIO_CHANNEL_1_OUTPUT_REGISTER OCR1A
    +
    18 
    +
    19 #define AUDIO_CHANNEL_1_PIN TIMER1_A_PIN // defined in TimerOne/config/known_16bit_timers.h
    +
    20 
    +
    21 #endif // #ifndef AUDIOCONFIGSTANDARD9BITPWM_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    AudioDelay.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  AudioDelay< NUM_BUFFER_SAMPLES, T >
     Audio delay line for comb filter, flange, chorus and short echo effects. More...
     
    +
    +
    + + + + diff --git a/doc/html/_audio_delay_8h_source.html b/doc/html/_audio_delay_8h_source.html index 79ae95e12..b063f5901 100644 --- a/doc/html/_audio_delay_8h_source.html +++ b/doc/html/_audio_delay_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    AudioDelay.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * AudioDelay.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,95 +132,131 @@
    20  *
    21  */
    22 
    -
    23 #ifndef AUDIODELAY_H_
    -
    24 #define AUDIODELAY_H_
    -
    25 
    +
    23 #ifndef AUDIODELAY_H_
    +
    24 #define AUDIODELAY_H_
    +
    25 
    26 
    +
    27 /**
    +
    28 Audio delay line for comb filter, flange, chorus and short echo effects.
    +
    29 @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples. This should
    +
    30 be a power of two. The largest delay you'll fit in an atmega328 will be 512
    +
    31 cells, which at 16384 Hz sample rate is 31 milliseconds. More of a flanger or a
    +
    32 doubler than an echo. The amount of memory available for delays on other chips will vary.
    +
    33 AudioDelay() doesn't have feedback. If you want feedback, use AudioDelayFeedback().
    +
    34 @tparam the type of numbers to use for the signal in the delay. The default is char, but int could be useful
    +
    35 when adding manual feedback. When using int, the input should be limited to 15 bits width, ie. -16384 to 16383.
    +
    36 */
    +
    37 
    38 template <unsigned int NUM_BUFFER_SAMPLES, class T = char>
    - +
    40 {
    41 
    42 private:
    43 
    -
    44  T delay_array[NUM_BUFFER_SAMPLES];
    -
    45  unsigned int _write_pos;
    -
    46  unsigned int _delaytime_cells;
    -
    47 
    +
    44  T delay_array[NUM_BUFFER_SAMPLES];
    +
    45  unsigned int _write_pos;
    +
    46  unsigned int _delaytime_cells;
    +
    47 
    48 public:
    49 
    -
    52  AudioDelay(): _write_pos(0)
    -
    53  {}
    -
    54 
    -
    55 
    -
    61  AudioDelay(unsigned int delaytime_cells): _write_pos(0), _delaytime_cells(delaytime_cells)
    -
    62  {}
    +
    50  /** Constructor.
    +
    51  */
    +
    52  AudioDelay(): _write_pos(0)
    +
    53  {}
    +
    54 
    +
    55 
    +
    56  /** Constructor.
    +
    57  @param delaytime_cells delay time expressed in cells.
    +
    58  For example, 128 cells delay at AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
    +
    59  Put another way, num_cells = delay_seconds * AUDIO_RATE.
    +
    60  */
    +
    61  AudioDelay(unsigned int delaytime_cells): _write_pos(0), _delaytime_cells(delaytime_cells)
    +
    62  {}
    63 
    -
    64 
    +
    64 
    65 
    -
    70  inline
    -
    71  T next(T in_value, unsigned int delaytime_cells)
    -
    72  {
    -
    73  ++_write_pos &= (NUM_BUFFER_SAMPLES - 1);
    -
    74  unsigned int read_pos = (_write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    66  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
    +
    67  @param in_value the signal input.
    +
    68  @param delaytime_cells sets the delay time in terms of cells in the delay buffer.
    +
    69  */
    +
    70  inline
    +
    71  T next(T in_value, unsigned int delaytime_cells)
    +
    72  {
    +
    73  ++_write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    74  unsigned int read_pos = (_write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    75 
    -
    76  // why does delay jump if I read it before writing?
    -
    77  delay_array[_write_pos] = in_value; // write to buffer
    -
    78  char delay_sig = delay_array[read_pos] ; // read the delay buffer
    +
    76  // why does delay jump if I read it before writing?
    +
    77  delay_array[_write_pos] = in_value; // write to buffer
    +
    78  char delay_sig = delay_array[read_pos] ; // read the delay buffer
    79 
    -
    80  return (T)delay_sig;
    -
    81  }
    -
    82 
    -
    83 
    -
    84 
    -
    88  inline
    -
    89  T next(T in_value)
    -
    90  {
    -
    91  ++_write_pos &= (NUM_BUFFER_SAMPLES - 1);
    -
    92  unsigned int read_pos = (_write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    80  return (T)delay_sig;
    +
    81  }
    +
    82 
    +
    83 
    +
    84 
    +
    85  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
    +
    86  @param in_value the signal input.
    +
    87  */
    +
    88  inline
    +
    89  T next(T in_value)
    +
    90  {
    +
    91  ++_write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    92  unsigned int read_pos = (_write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    93 
    -
    94  // why does delay jump if I read it before writing?
    -
    95  delay_array[_write_pos] = in_value; // write to buffer
    -
    96  T delay_sig = delay_array[read_pos] ; // read the delay buffer
    +
    94  // why does delay jump if I read it before writing?
    +
    95  delay_array[_write_pos] = in_value; // write to buffer
    +
    96  T delay_sig = delay_array[read_pos] ; // read the delay buffer
    97 
    -
    98  return delay_sig;
    -
    99  }
    +
    98  return delay_sig;
    +
    99  }
    100 
    -
    101 
    -
    105  inline
    -
    106  void set(unsigned int delaytime_cells){
    -
    107  _delaytime_cells = delaytime_cells;
    -
    108  }
    +
    101 
    +
    102  /** Set the delay time, measured in cells.
    +
    103  @param delaytime_cells how many cells to delay the input signal by.
    +
    104  */
    +
    105  inline
    +
    106  void set(unsigned int delaytime_cells){
    +
    107  _delaytime_cells = delaytime_cells;
    +
    108  }
    109 
    -
    110 
    -
    115  inline
    -
    116  T read(unsigned int delaytime_cells)
    -
    117  {
    -
    118  unsigned int read_pos = (_write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    -
    119  return delay_array[read_pos];
    -
    120  }
    -
    121 
    -
    122 
    -
    123  // /** Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal.
    -
    124  // This can be useful for manually adding feedback to the delay line, "behind" the advancing write head.
    -
    125  // @param input the signal input.
    -
    126  // */
    -
    127  // inline
    -
    128  // void writeFeedback(T input)
    -
    129  // {
    -
    130  // delay_array[_write_pos] = input;
    -
    131  // }
    +
    110 
    +
    111  /** Retrieve the signal in the delay line at the position delaytime_cells.
    +
    112  It doesn't change the stored internal value of _delaytime_cells.
    +
    113  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
    +
    114  */
    +
    115  inline
    +
    116  T read(unsigned int delaytime_cells)
    +
    117  {
    +
    118  unsigned int read_pos = (_write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    119  return delay_array[read_pos];
    +
    120  }
    +
    121 
    +
    122 
    +
    123  // /** Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal.
    +
    124  // This can be useful for manually adding feedback to the delay line, "behind" the advancing write head.
    +
    125  // @param input the signal input.
    +
    126  // */
    +
    127  // inline
    +
    128  // void writeFeedback(T input)
    +
    129  // {
    +
    130  // delay_array[_write_pos] = input;
    +
    131  // }
    132 
    133 };
    134 
    -
    140 #endif // #ifndef AUDIODELAY_H_
    -
    141 
    +
    135 /**
    +
    136 @example _09_delays/AudioDelay/AudioDelay.ino
    +
    137 This is an example of how to use the AudioDelay class.
    +
    138 */
    +
    139 
    +
    140 #endif // #ifndef AUDIODELAY_H_
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    AudioDelayFeedback.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include "mozzi_utils.h"
    +#include "meta.h"
    +
    +

    Go to the source code of this file.

    +
    +
    + + + + diff --git a/doc/html/_audio_delay_feedback_8h_source.html b/doc/html/_audio_delay_feedback_8h_source.html index 8a835fe87..d77bee515 100644 --- a/doc/html/_audio_delay_feedback_8h_source.html +++ b/doc/html/_audio_delay_feedback_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    AudioDelayFeedback.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * AudioDelayFeedback.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -123,312 +131,408 @@
    19  * along with Mozzi. If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  */
    -
    22 
    -
    23 #ifndef AUDIODELAY_FEEDBACK_H_
    -
    24 #define AUDIODELAY_FEEDBACK_H_
    -
    25 
    -
    26 #if ARDUINO >= 100
    -
    27  #include "Arduino.h"
    -
    28 #else
    -
    29  #include "WProgram.h"
    -
    30 #endif
    -
    31 #include "mozzi_utils.h"
    -
    32 #include "meta.h"
    +
    22 
    +
    23 #ifndef AUDIODELAY_FEEDBACK_H_
    +
    24 #define AUDIODELAY_FEEDBACK_H_
    +
    25 
    +
    26 #if ARDUINO >= 100
    +
    27  #include "Arduino.h"
    +
    28 #else
    +
    29  #include "WProgram.h"
    +
    30 #endif
    +
    31 #include "mozzi_utils.h"
    +
    32 #include "meta.h"
    33 
    34 enum interpolation_types {LINEAR,ALLPASS};
    35 
    36 
    +
    37 /**
    +
    38 Audio delay line with feedback for comb filter, flange, chorus and short echo effects.
    +
    39 @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples, and should be a
    +
    40 power of two. The maximum delay length which will fit in an atmega328 is half
    +
    41 that of a plain AudioDelay object, in this case 256 cells, or about 15
    +
    42 milliseconds. AudioDelayFeedback uses int sized cells to accomodate the higher
    +
    43 amplitude of direct input to the delay as well as the feedback, without losing
    +
    44 precision. Output is only the delay line signal. If you want to mix the delay
    +
    45 with the input, do it in your sketch. AudioDelayFeedback uses more processing and memory
    +
    46 than a plain AudioDelay, but allows for more dramatic effects with feedback.
    +
    47 @tparam INTERP_TYPE a choice of LINEAR (default) or ALLPASS interpolation. LINEAR is better
    +
    48 for sweeping delay times, ALLPASS may be better for reverb-like effects.
    +
    49 */
    +
    50 
    51 template <unsigned int NUM_BUFFER_SAMPLES, char INTERP_TYPE = LINEAR>
    -
    52 class AudioDelayFeedback
    +
    52 class AudioDelayFeedback
    53 {
    54 
    55 public:
    -
    58  AudioDelayFeedback(): write_pos(0), _feedback_level(0), _delaytime_cells(0)
    -
    59  {}
    +
    56  /** Constructor.
    +
    57  */
    +
    58  AudioDelayFeedback(): write_pos(0), _feedback_level(0), _delaytime_cells(0)
    +
    59  {}
    60 
    61 
    -
    67  AudioDelayFeedback(unsigned int delaytime_cells): write_pos(0), _feedback_level(0), _delaytime_cells(delaytime_cells)
    -
    68  {}
    +
    62  /** Constructor.
    +
    63  @param delaytime_cells delay time expressed in cells.
    +
    64  For example, 128 cells delay at AUDIO_RATE 16384 would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
    +
    65  Put another way, num_cells = delay_seconds * AUDIO_RATE.
    +
    66  */
    +
    67  AudioDelayFeedback(unsigned int delaytime_cells): write_pos(0), _feedback_level(0), _delaytime_cells(delaytime_cells)
    +
    68  {}
    69 
    70 
    -
    77  AudioDelayFeedback(unsigned int delaytime_cells, char feedback_level): write_pos(0), _feedback_level(feedback_level), _delaytime_cells(delaytime_cells)
    -
    78  {}
    +
    71  /** Constructor.
    +
    72  @param delaytime_cells delay time expressed in cells.
    +
    73  For example, 128 cells delay at AUDIO_RATE 16384 would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
    +
    74  Put another way, num_cells = delay_seconds * AUDIO_RATE.
    +
    75  @param feedback_level is the feedback level from -128 to 127 (representing -1 to 1).
    +
    76  */
    +
    77  AudioDelayFeedback(unsigned int delaytime_cells, char feedback_level): write_pos(0), _feedback_level(feedback_level), _delaytime_cells(delaytime_cells)
    +
    78  {}
    79 
    80 
    81 
    -
    86  inline
    -
    87  int next(char input)
    -
    88  {
    -
    89  // chooses a different next() function depending on whether the
    -
    90  // the template parameter is LINEAR(default if none provided) or ALLPASS.
    -
    91  // See meta.h.
    -
    92  return next(input, Int2Type<INTERP_TYPE>());
    -
    93  }
    +
    82  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
    +
    83  @param input the signal input.
    +
    84  @note slower than next(char input, unsigned int delaytime_cells)
    +
    85  */
    +
    86  inline
    +
    87  int next(char input)
    +
    88  {
    +
    89  // chooses a different next() function depending on whether the
    +
    90  // the template parameter is LINEAR(default if none provided) or ALLPASS.
    +
    91  // See meta.h.
    +
    92  return next(input, Int2Type<INTERP_TYPE>());
    +
    93  }
    94 
    95 
    96 
    -
    104  inline
    -
    105  int next(char input, unsigned int delaytime_cells)
    -
    106  {
    -
    107  //setPin13High();
    -
    108  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    -
    109  unsigned int read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    -
    110  // < 1us to here
    -
    111  int delay_sig = delay_array[read_pos]; // read the delay buffer
    -
    112  // with this line, the method takes 18us
    -
    113  //char feedback_sig = (char) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
    -
    114  // this line, the whole method takes 4us... Compiler doesn't optimise pow2 divides. Why?
    -
    115  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
    -
    116  delay_array[write_pos] = (int) input + feedback_sig; // write to buffer
    -
    117  //setPin13Low();
    -
    118  return delay_sig;
    -
    119  }
    +
    97  /** Input a value to the delay, retrieve the signal in the delay line at the position delaytime_cells,
    +
    98  and add feedback from the output to the input.
    +
    99  @param input the signal input.
    +
    100  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
    +
    101  It doesn't change the stored internal value of _delaytime_cells.
    +
    102  @note Timing: 4us
    +
    103  */
    +
    104  inline
    +
    105  int next(char input, unsigned int delaytime_cells)
    +
    106  {
    +
    107  //setPin13High();
    +
    108  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    109  unsigned int read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    110  // < 1us to here
    +
    111  int delay_sig = delay_array[read_pos]; // read the delay buffer
    +
    112  // with this line, the method takes 18us
    +
    113  //char feedback_sig = (char) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
    +
    114  // this line, the whole method takes 4us... Compiler doesn't optimise pow2 divides. Why?
    +
    115  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
    +
    116  delay_array[write_pos] = (int) input + feedback_sig; // write to buffer
    +
    117  //setPin13Low();
    +
    118  return delay_sig;
    +
    119  }
    120 
    121 
    122 
    -
    130  inline
    -
    131  int next(char input, Q16n16 delaytime_cells)
    -
    132  {
    -
    133  //setPin13High();
    -
    134  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    -
    135  unsigned int index = delaytime_cells >> 16;
    -
    136  unsigned int fraction = (unsigned int) delaytime_cells; // keeps low word
    +
    123  /** Input a value to the delay, retrieve the signal in the delay line at the interpolated fractional position delaytime_cells,
    +
    124  and add feedback from the output to the input.
    +
    125  @param input the signal input.
    +
    126  @param delaytime_cells is a fractional number to set the delay time in terms of cells
    +
    127  or partial cells in the delay buffer. It doesn't change the stored internal
    +
    128  value of _delaytime_cells.
    +
    129  */
    +
    130  inline
    +
    131  int next(char input, Q16n16 delaytime_cells)
    +
    132  {
    +
    133  //setPin13High();
    +
    134  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    135  unsigned int index = delaytime_cells >> 16;
    +
    136  unsigned int fraction = (unsigned int) delaytime_cells; // keeps low word
    137 
    -
    138  unsigned int read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
    -
    139  int delay_sig1 = delay_array[read_pos1]; // read the delay buffer
    +
    138  unsigned int read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
    +
    139  int delay_sig1 = delay_array[read_pos1]; // read the delay buffer
    140 
    -
    141  unsigned int read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
    -
    142  int delay_sig2 = delay_array[read_pos2]; // read the delay buffer
    +
    141  unsigned int read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
    +
    142  int delay_sig2 = delay_array[read_pos2]; // read the delay buffer
    143 
    144 
    -
    145  int difference = delay_sig2 - delay_sig1;
    -
    146  int delay_sig_fraction = ((long) fraction * difference) >> 16;
    +
    145  int difference = delay_sig2 - delay_sig1;
    +
    146  int delay_sig_fraction = ((long) fraction * difference) >> 16;
    147 
    -
    148  int delay_sig = delay_sig1+delay_sig_fraction;
    +
    148  int delay_sig = delay_sig1+delay_sig_fraction;
    149 
    -
    150  //int delay_sig = delay_sig1 + ((long)delay_sig2*fraction)>>16;
    +
    150  //int delay_sig = delay_sig1 + ((long)delay_sig2*fraction)>>16;
    151 
    -
    152  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
    -
    153  delay_array[write_pos] = (int) input + feedback_sig; // write to buffer
    -
    154  //setPin13Low();
    -
    155  return delay_sig;
    -
    156  }
    +
    152  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
    +
    153  delay_array[write_pos] = (int) input + feedback_sig; // write to buffer
    +
    154  //setPin13Low();
    +
    155  return delay_sig;
    +
    156  }
    157 
    158 
    -
    162  inline
    -
    163  void write(char input)
    -
    164  {
    -
    165  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    -
    166  delay_array[write_pos] = input;
    -
    167  }
    +
    159  /** Input a value to the delay but don't change the delay time or retrieve the output signal.
    +
    160  @param input the signal input.
    +
    161  */
    +
    162  inline
    +
    163  void write(char input)
    +
    164  {
    +
    165  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    166  delay_array[write_pos] = input;
    +
    167  }
    168 
    169 
    -
    174  inline
    -
    175  void writeFeedback(char input)
    -
    176  {
    -
    177  delay_array[write_pos] = input;
    -
    178  }
    +
    170  /** Input a value to the delay but don't advance the write position, change the delay time or retrieve the output signal.
    +
    171  This can be useful for manually adding feedback to the delay line, "behind" the advancing write head.
    +
    172  @param input the signal input.
    +
    173  */
    +
    174  inline
    +
    175  void writeFeedback(char input)
    +
    176  {
    +
    177  delay_array[write_pos] = input;
    +
    178  }
    179 
    180 
    -
    186  inline
    -
    187  void write(char input, unsigned int offset)
    -
    188  {
    -
    189  (write_pos + offset) &= (NUM_BUFFER_SAMPLES - 1);
    -
    190  delay_array[write_pos] = input;
    -
    191  }
    +
    181  /** Input a value to the delay at an offset from the current write position. Don't advance the main
    +
    182  write position or change the stored delay time or retrieve the output signal.
    +
    183  @param input the signal input.
    +
    184  @param offset the number of cells behind the ordinary write position where the input will be written.
    +
    185  */
    +
    186  inline
    +
    187  void write(char input, unsigned int offset)
    +
    188  {
    +
    189  (write_pos + offset) &= (NUM_BUFFER_SAMPLES - 1);
    +
    190  delay_array[write_pos] = input;
    +
    191  }
    192 
    193 
    -
    198  inline
    -
    199  int read(Q16n16 delaytime_cells)
    -
    200  {
    -
    201  return read(delaytime_cells, Int2Type<INTERP_TYPE>());
    -
    202  }
    +
    194  /** Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells.
    +
    195  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
    +
    196  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
    +
    197  */
    +
    198  inline
    +
    199  int read(Q16n16 delaytime_cells)
    +
    200  {
    +
    201  return read(delaytime_cells, Int2Type<INTERP_TYPE>());
    +
    202  }
    203 
    204 
    -
    208  inline
    -
    209  int read()
    -
    210  {
    -
    211  return read(Int2Type<INTERP_TYPE>());
    -
    212  }
    +
    205  /** Retrieve the signal in the delay line at the current stored delaytime_cells.
    +
    206  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
    +
    207  */
    +
    208  inline
    +
    209  int read()
    +
    210  {
    +
    211  return read(Int2Type<INTERP_TYPE>());
    +
    212  }
    213 
    214 
    -
    220  inline
    -
    221  void setDelayTimeCells(unsigned int delaytime_cells)
    -
    222  {
    -
    223  _delaytime_cells = (unsigned int) delaytime_cells;
    -
    224  }
    +
    215  /** Set delay time expressed in samples.
    +
    216  @param delaytime_cells delay time expressed in cells, with each cell played per tick of AUDIO_RATE.
    +
    217  For example, 128 cells delay at AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
    +
    218  Put another way, num_cells = delay_seconds * AUDIO_RATE.
    +
    219  */
    +
    220  inline
    +
    221  void setDelayTimeCells(unsigned int delaytime_cells)
    +
    222  {
    +
    223  _delaytime_cells = (unsigned int) delaytime_cells;
    +
    224  }
    225 
    226 
    -
    232  inline
    -
    233  void setDelayTimeCells(Q16n16 delaytime_cells)
    -
    234  {
    -
    235  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
    -
    236  }
    +
    227  /** Set delay time expressed in samples, fractional Q16n16 for an interpolating delay.
    +
    228  @param delaytime_cells delay time expressed in cells, with each cell played per tick of AUDIO_RATE.
    +
    229  For example, 128 cells delay at AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
    +
    230  Put another way, num_cells = delay_seconds * AUDIO_RATE.
    +
    231  */
    +
    232  inline
    +
    233  void setDelayTimeCells(Q16n16 delaytime_cells)
    +
    234  {
    +
    235  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
    +
    236  }
    237 
    238 
    -
    244  inline
    -
    245  void setDelayTimeCells(float delaytime_cells)
    -
    246  {
    -
    247  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
    -
    248  }
    +
    239  /** Set delay time expressed in samples, fractional float for an interpolating delay.
    +
    240  @param delaytime_cells delay time expressed in cells, with each cell played per tick of AUDIO_RATE.
    +
    241  For example, 128 cells delay at AUDIO_RATE would produce a time delay of 128/16384 = 0.0078125 s = 7.8 ms
    +
    242  Put another way, num_cells = delay_seconds * AUDIO_RATE.
    +
    243  */
    +
    244  inline
    +
    245  void setDelayTimeCells(float delaytime_cells)
    +
    246  {
    +
    247  return setDelayTimeCells(delaytime_cells, Int2Type<INTERP_TYPE>());
    +
    248  }
    249 
    250 
    -
    254  inline
    -
    255  void setFeedbackLevel(char feedback_level)
    -
    256  {
    -
    257  _feedback_level = feedback_level;
    -
    258  }
    +
    251  /** Set the feedback gain.
    +
    252  @param feedback_level is the feedback level from -128 to 127 (representing -1 to 1).
    +
    253  */
    +
    254  inline
    +
    255  void setFeedbackLevel(char feedback_level)
    +
    256  {
    +
    257  _feedback_level = feedback_level;
    +
    258  }
    259 
    260 
    261 
    262 private:
    -
    263  int delay_array[NUM_BUFFER_SAMPLES];
    -
    264  unsigned int write_pos;
    -
    265  char _feedback_level;
    -
    266  unsigned int _delaytime_cells;
    -
    267  Q15n16 _coeff; // for allpass interpolation
    +
    263  int delay_array[NUM_BUFFER_SAMPLES];
    +
    264  unsigned int write_pos;
    +
    265  char _feedback_level;
    +
    266  unsigned int _delaytime_cells;
    +
    267  Q15n16 _coeff; // for allpass interpolation
    268 
    269 
    270 
    -
    274  inline
    -
    275  int next(char in_value, Int2Type<LINEAR>)
    -
    276  {
    -
    277  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    -
    278  unsigned int read_pos = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    271  /** Input a value to the delay and retrieve the signal in the delay line at the position delaytime_cells.
    +
    272  @param in_value the signal input.
    +
    273  */
    +
    274  inline
    +
    275  int next(char in_value, Int2Type<LINEAR>)
    +
    276  {
    +
    277  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    278  unsigned int read_pos = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    279 
    -
    280  int delay_sig = delay_array[read_pos]; // read the delay buffer
    -
    281  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
    -
    282  delay_array[write_pos] = (int) in_value + feedback_sig; // write to buffer
    +
    280  int delay_sig = delay_array[read_pos]; // read the delay buffer
    +
    281  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)/128),-128),127); // feedback clipped
    +
    282  delay_array[write_pos] = (int) in_value + feedback_sig; // write to buffer
    283 
    -
    284  return delay_sig;
    -
    285  }
    +
    284  return delay_sig;
    +
    285  }
    286 
    287 
    288 
    -
    296  inline
    -
    297  int next(char input, Int2Type<ALLPASS>)
    -
    298  {
    -
    299  /*
    -
    300  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
    -
    301  also https://ccrma.stanford.edu/~jos/Interpolation/Interpolation_4up.pdf
    -
    302  for desired fractional delay of d samples,
    -
    303  coeff = (1-d)/(1+d)
    -
    304  or
    -
    305  coeff = ((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3)
    -
    306  out = coeff * in + last_in - coeff * last_out
    -
    307  = coeff * (in-last_out) + last_in
    -
    308  */
    -
    309  //setPin13High();
    -
    310  static char last_in;
    -
    311  static int last_out;
    +
    289  /** The delaytime_cells has to be set seperately, because it's slowish
    +
    290  and in this implementation the allpass interpolation mode doesn't slide
    +
    291  nicely from one delay time to another.
    +
    292  @param input an audio signal in
    +
    293  @return the delayed signal, including feedback
    +
    294  @note Timing: 10us
    +
    295  */
    +
    296  inline
    +
    297  int next(char input, Int2Type<ALLPASS>)
    +
    298  {
    +
    299  /*
    +
    300  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
    +
    301  also https://ccrma.stanford.edu/~jos/Interpolation/Interpolation_4up.pdf
    +
    302  for desired fractional delay of d samples,
    +
    303  coeff = (1-d)/(1+d)
    +
    304  or
    +
    305  coeff = ((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3)
    +
    306  out = coeff * in + last_in - coeff * last_out
    +
    307  = coeff * (in-last_out) + last_in
    +
    308  */
    +
    309  //setPin13High();
    +
    310  static char last_in;
    +
    311  static int last_out;
    312 
    -
    313  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    +
    313  ++write_pos &= (NUM_BUFFER_SAMPLES - 1);
    314 
    -
    315  unsigned int read_pos1 = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    -
    316  int delay_sig = delay_array[read_pos1]; // read the delay buffer
    +
    315  unsigned int read_pos1 = (write_pos - _delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    316  int delay_sig = delay_array[read_pos1]; // read the delay buffer
    317 
    -
    318  int interp = (int)(_coeff * ((int)input - last_out)>>16) + last_in; // Q15n16*Q15n0 + Q15n0 = Q15n16 + Q15n0 = Q15n16
    -
    319  delay_sig += interp;
    +
    318  int interp = (int)(_coeff * ((int)input - last_out)>>16) + last_in; // Q15n16*Q15n0 + Q15n0 = Q15n16 + Q15n0 = Q15n16
    +
    319  delay_sig += interp;
    320 
    -
    321  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
    -
    322  delay_array[write_pos] = (int) input + feedback_sig; // write to buffer
    +
    321  char feedback_sig = (char) min(max(((delay_sig * _feedback_level)>>7),-128),127); // feedback clipped
    +
    322  delay_array[write_pos] = (int) input + feedback_sig; // write to buffer
    323 
    -
    324  last_in = input;
    -
    325  last_out = delay_sig;
    -
    326  //setPin13Low();
    -
    327  return delay_sig;
    -
    328  }
    +
    324  last_in = input;
    +
    325  last_out = delay_sig;
    +
    326  //setPin13Low();
    +
    327  return delay_sig;
    +
    328  }
    329 
    330 
    331 
    -
    332  // 20-25us
    -
    333  inline
    -
    334  void setDelayTimeCells(Q16n16 delaytime_cells, Int2Type<ALLPASS>)
    -
    335  {
    -
    336  /*
    -
    337  integer optimisation/approximation from
    -
    338  Van Duyne, Jaffe, Scandalis, Stilson 1997
    -
    339  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
    -
    340  //coeff = -((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3) , d is fractional part
    -
    341  */
    -
    342  _delaytime_cells = delaytime_cells>>16; // whole integer part
    -
    343  Q15n16 dminus1 = - Q15n16_FIX1 + (unsigned int) delaytime_cells;
    -
    344  Q15n16 dminus1squared = (dminus1)*(dminus1)>>16;
    -
    345  _coeff = -(dminus1>>1) + (dminus1squared>>2) - (((dminus1squared*dminus1)>>16)>>3);
    -
    346  }
    +
    332  // 20-25us
    +
    333  inline
    +
    334  void setDelayTimeCells(Q16n16 delaytime_cells, Int2Type<ALLPASS>)
    +
    335  {
    +
    336  /*
    +
    337  integer optimisation/approximation from
    +
    338  Van Duyne, Jaffe, Scandalis, Stilson 1997
    +
    339  http://www.scandalis.com/Jarrah/Documents/DelayLine.pdf
    +
    340  //coeff = -((d-1)>1) + (((d-1)*(d-1))>>2) - (((d-1)*(d-1)*(d-1))>>3) , d is fractional part
    +
    341  */
    +
    342  _delaytime_cells = delaytime_cells>>16; // whole integer part
    +
    343  Q15n16 dminus1 = - Q15n16_FIX1 + (unsigned int) delaytime_cells;
    +
    344  Q15n16 dminus1squared = (dminus1)*(dminus1)>>16;
    +
    345  _coeff = -(dminus1>>1) + (dminus1squared>>2) - (((dminus1squared*dminus1)>>16)>>3);
    +
    346  }
    347 
    348 
    -
    349  // 100us
    -
    350  inline
    -
    351  void setDelayTimeCells(float delaytime_cells, Int2Type<ALLPASS>)
    -
    352  {
    -
    353  //coeff = (1-d)/(1+d)
    -
    354  _delaytime_cells = (unsigned int) delaytime_cells;
    +
    349  // 100us
    +
    350  inline
    +
    351  void setDelayTimeCells(float delaytime_cells, Int2Type<ALLPASS>)
    +
    352  {
    +
    353  //coeff = (1-d)/(1+d)
    +
    354  _delaytime_cells = (unsigned int) delaytime_cells;
    355 
    -
    356  float fraction = delaytime_cells - _delaytime_cells;
    +
    356  float fraction = delaytime_cells - _delaytime_cells;
    357 
    -
    358  // modified from stk DelayA.cpp
    -
    359  float alpha_ = 1.0f + fraction; // fractional part
    -
    360  if ( alpha_ < 0.5f ) {
    -
    361  // (stk): The optimal range for alpha is about 0.5 - 1.5 in order to
    -
    362  // achieve the flattest phase delay response.
    +
    358  // modified from stk DelayA.cpp
    +
    359  float alpha_ = 1.0f + fraction; // fractional part
    +
    360  if ( alpha_ < 0.5f ) {
    +
    361  // (stk): The optimal range for alpha is about 0.5 - 1.5 in order to
    +
    362  // achieve the flattest phase delay response.
    363 
    -
    364  // something's not right about how I use _delaytime_cells and
    -
    365  // NUM_BUFFER_SAMPLES etc. in my ringbuffer compared to stk
    -
    366  _delaytime_cells += 1;
    -
    367  if ( _delaytime_cells >= NUM_BUFFER_SAMPLES ) _delaytime_cells -= NUM_BUFFER_SAMPLES;
    -
    368  alpha_ += 1.0f;
    -
    369  }
    -
    370  // otherwise this would use fraction instead of alpha
    -
    371  _coeff = float_to_Q15n16((1.f-alpha_)/(1.f+alpha_));
    -
    372  }
    +
    364  // something's not right about how I use _delaytime_cells and
    +
    365  // NUM_BUFFER_SAMPLES etc. in my ringbuffer compared to stk
    +
    366  _delaytime_cells += 1;
    +
    367  if ( _delaytime_cells >= NUM_BUFFER_SAMPLES ) _delaytime_cells -= NUM_BUFFER_SAMPLES;
    +
    368  alpha_ += 1.0f;
    +
    369  }
    +
    370  // otherwise this would use fraction instead of alpha
    +
    371  _coeff = float_to_Q15n16((1.f-alpha_)/(1.f+alpha_));
    +
    372  }
    373 
    -
    374  // Retrieve the signal in the delay line at the position delaytime_cells.
    -
    375  // It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
    -
    376  // param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
    -
    377  //
    -
    378  // inline
    -
    379  // int read(unsigned int delaytime_cells, Int2Type<LINEAR>)
    -
    380  // {
    -
    381  // unsigned int read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    -
    382  // int delay_sig = delay_array[read_pos]; // read the delay buffer
    -
    383  //
    -
    384  // return delay_sig;
    -
    385  // }
    +
    374  // Retrieve the signal in the delay line at the position delaytime_cells.
    +
    375  // It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
    +
    376  // param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
    +
    377  //
    +
    378  // inline
    +
    379  // int read(unsigned int delaytime_cells, Int2Type<LINEAR>)
    +
    380  // {
    +
    381  // unsigned int read_pos = (write_pos - delaytime_cells) & (NUM_BUFFER_SAMPLES - 1);
    +
    382  // int delay_sig = delay_array[read_pos]; // read the delay buffer
    +
    383  //
    +
    384  // return delay_sig;
    +
    385  // }
    386 
    -
    391  inline
    -
    392  int read(Q16n16 delaytime_cells, Int2Type<LINEAR>)
    -
    393  {
    -
    394  unsigned int index = delaytime_cells >> 16;
    -
    395  unsigned int fraction = (unsigned int) delaytime_cells; // keeps low word
    +
    387  /** Retrieve the signal in the delay line at the interpolated fractional position delaytime_cells.
    +
    388  It doesn't change the stored internal value of _delaytime_cells or feedback the output to the input.
    +
    389  @param delaytime_cells indicates the delay time in terms of cells in the delay buffer.
    +
    390  */
    +
    391  inline
    +
    392  int read(Q16n16 delaytime_cells, Int2Type<LINEAR>)
    +
    393  {
    +
    394  unsigned int index = delaytime_cells >> 16;
    +
    395  unsigned int fraction = (unsigned int) delaytime_cells; // keeps low word
    396 
    -
    397  unsigned int read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
    -
    398  int delay_sig1 = delay_array[read_pos1]; // read the delay buffer
    +
    397  unsigned int read_pos1 = (write_pos - index) & (NUM_BUFFER_SAMPLES - 1);
    +
    398  int delay_sig1 = delay_array[read_pos1]; // read the delay buffer
    399 
    -
    400  unsigned int read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
    -
    401  int delay_sig2 = delay_array[read_pos2]; // read the delay buffer
    +
    400  unsigned int read_pos2 = (write_pos - (index+1)) & (NUM_BUFFER_SAMPLES - 1);
    +
    401  int delay_sig2 = delay_array[read_pos2]; // read the delay buffer
    402 
    -
    403  /*
    -
    404  int difference = delay_sig2 - delay_sig1;
    -
    405  int delay_sig_fraction = ((long) fraction * difference) >> 16;
    +
    403  /*
    +
    404  int difference = delay_sig2 - delay_sig1;
    +
    405  int delay_sig_fraction = ((long) fraction * difference) >> 16;
    406 
    -
    407  int delay_sig = delay_sig1+delay_sig_fraction;
    -
    408  */
    -
    409  int delay_sig = delay_sig1 + ((long)delay_sig2*fraction)>>16;
    +
    407  int delay_sig = delay_sig1+delay_sig_fraction;
    +
    408  */
    +
    409  int delay_sig = delay_sig1 + ((long)delay_sig2*fraction)>>16;
    410 
    -
    411  return delay_sig;
    -
    412  }
    +
    411  return delay_sig;
    +
    412  }
    413 
    414 };
    415 
    -
    416 #endif // #ifndef AUDIODELAY_FEEDBACK_H_
    +
    416 #endif // #ifndef AUDIODELAY_FEEDBACK_H_
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    AutoRange.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  AutoRange< T >
     Keeps a running calculation of the range of the input values it receives. More...
     
    + + + + + + + +

    +Variables

    class AutoRange range_max
     
    class AutoRange range_min
     
    class AutoRange range
     
    +

    Variable Documentation

    + +
    +
    + + + + +
    class AutoRange range
    +
    + +
    +
    + +
    +
    + + + + +
    class AutoRange range_max
    +
    + +
    +
    + +
    +
    + + + + +
    class AutoRange range_min
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_auto_range_8h.js b/doc/html/_auto_range_8h.js new file mode 100644 index 000000000..cc4226553 --- /dev/null +++ b/doc/html/_auto_range_8h.js @@ -0,0 +1,7 @@ +var _auto_range_8h = +[ + [ "AutoRange", "class_auto_range.html", "class_auto_range" ], + [ "range", "_auto_range_8h.html#a9a3a29c8a124cdee9308e487710410ae", null ], + [ "range_max", "_auto_range_8h.html#a7da2ac4c79ee4e685d982f288bb48d85", null ], + [ "range_min", "_auto_range_8h.html#a93c42e2c0cdaa0940ebde6994d7a830c", null ] +]; \ No newline at end of file diff --git a/doc/html/_auto_range_8h_source.html b/doc/html/_auto_range_8h_source.html index d44e6bb71..25cf5b254 100644 --- a/doc/html/_auto_range_8h_source.html +++ b/doc/html/_auto_range_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,9 +110,9 @@
    AutoRange.h
    -
    1 #ifndef AUTORANGE_H
    -
    2 #define AUTORANGE_H
    -
    3 
    +Go to the documentation of this file.
    1 #ifndef AUTORANGE_H
    +
    2 #define AUTORANGE_H
    +
    3 
    4 /*
    5  * AutoRange.h
    6  *
    @@ -128,27 +136,36 @@
    24  */
    25 
    26 
    +
    27 /**
    +
    28 Keeps a running calculation of the range of the input values it receives.
    +
    29 */
    30 template <class T>
    31 class
    -
    32  AutoRange {
    +
    32  AutoRange {
    33 
    34 public:
    -
    38  AutoRange(T min_expected, T max_expected):range_min(max_expected),range_max(min_expected),range(0)
    -
    39  {}
    +
    35  /** Constructor.
    +
    36  @tparam T the type of numbers to to use, eg. int, unsigned int, float etc.
    +
    37  */
    +
    38  AutoRange(T min_expected, T max_expected):range_min(max_expected),range_max(min_expected),range(0)
    +
    39  {}
    40 
    41 
    +
    42  /** Updates and returns the current range.
    +
    43  @param n the next value to include in the range.
    +
    44  */
    45 T next(T n){
    46  if (n > range_max) {
    47  range_max = n;
    48  range = range_max - range_min;
    49  }
    50  }else{
    -
    51  if (n< range_min) {
    -
    52  range_min = n;
    -
    53  range = range_max - range_min;
    +
    51  if (n< range_min) {
    +
    52  range_min = n;
    +
    54  }
    55  }
    -
    56  return range;
    +
    56  return range;
    57 }
    58 
    59 private:
    @@ -156,15 +173,14 @@
    61 
    62 };
    63 
    -
    64 #endif // #ifndef AUTORANGE_H
    -
    65 
    +
    64 #endif // #ifndef AUTORANGE_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    ControlDelay.h File Reference
    +
    +
    +
    #include "AudioDelay.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  ControlDelay< NUM_BUFFER_SAMPLES, T >
     Control-rate delay line for delaying control signals. More...
     
    +
    +
    + + + + diff --git a/doc/html/_control_delay_8h_source.html b/doc/html/_control_delay_8h_source.html index 3223fc33e..89e805b0f 100644 --- a/doc/html/_control_delay_8h_source.html +++ b/doc/html/_control_delay_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    ControlDelay.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * ControlDelay.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,26 +132,41 @@
    20  *
    21  */
    22 
    -
    23 #ifndef CONTROLDELAY_H_
    -
    24 #define CONTROLDELAY_H_
    -
    25 
    -
    26 #include "AudioDelay.h"
    +
    23 #ifndef CONTROLDELAY_H_
    +
    24 #define CONTROLDELAY_H_
    +
    25 
    +
    26 #include "AudioDelay.h"
    27 
    -
    38 template <unsigned int NUM_BUFFER_SAMPLES, class T = char>
    -
    39 class ControlDelay: public AudioDelay<NUM_BUFFER_SAMPLES, T>
    -
    40 {
    -
    41  ;
    -
    42 };
    -
    43 
    -
    49 #endif // #ifndef CONTROLDELAY_H_
    -
    50 
    +
    28 /**
    +
    29 @brief Control-rate delay line for delaying control signals.
    +
    30 For example, this could be used to produce echo-like effects using multiple
    +
    31 instances of the same voice, when AudioDelay would be too short for an actual
    +
    32 audio echo. This is in fact just a wrapper of the AudioDelay code.
    +
    33 @tparam NUM_BUFFER_SAMPLES is the length of the delay buffer in samples. This should
    +
    34 be a power of two.
    +
    35 @tparam the type of numbers to use for the signal in the delay. The default is char, but int could be useful
    +
    36 when adding manual feedback. When using int, the input should be limited to 15 bits width, ie. -16384 to 16383.
    +
    37 */
    +
    38 
    +
    39 template <unsigned int NUM_BUFFER_SAMPLES, class T = char>
    +
    40 class ControlDelay: public AudioDelay<NUM_BUFFER_SAMPLES, T>
    +
    41 {
    +
    42  ;
    +
    43 };
    +
    44 
    +
    45 /**
    +
    46 @example _02_control/Control_Echo_Theremin/Control_Echo_Theremin.ino
    +
    47 This is an example of how to use the ControlDelay class.
    +
    48 */
    +
    49 
    +
    50 #endif // #ifndef CONTROLDELAY_H_
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    DCfilter.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  DCfilter
     A DC-blocking filter useful for highlighting changes in control signals. More...
     
    +
    +
    + + + + diff --git a/doc/html/_d_cfilter_8h_source.html b/doc/html/_d_cfilter_8h_source.html index c4c14adc1..69b03a7bb 100644 --- a/doc/html/_d_cfilter_8h_source.html +++ b/doc/html/_d_cfilter_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    DCfilter.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * DCfilter.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -123,10 +131,10 @@
    19  * along with Mozzi. If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  */
    -
    22 
    -
    23 #ifndef DCFILTER_H
    -
    24 #define DCFILTER_H
    -
    25 
    +
    22 
    +
    23 #ifndef DCFILTER_H
    +
    24 #define DCFILTER_H
    +
    25 
    26 /*
    27 tb2010 adapted from:
    28 robert bristow-johnson, DSP Trick: Fixed-Point DC Blocking Filter with Noise-Shaping
    @@ -136,58 +144,72 @@
    32 
    33 Where y[n] is the output at the current time n, and x[n] is the input at the current time n.
    34  */
    -
    35 
    -
    41 class DCfilter {
    +
    35 
    +
    36 /**
    +
    37 A DC-blocking filter useful for highlighting changes in control signals.
    +
    38 The output of the filter settles to 0 if the incoming signal stays constant. If the input changes, the
    +
    39 filter output swings to track the change and eventually settles back to 0.
    +
    40 */
    +
    41 class DCfilter {
    42 public:
    -
    48  DCfilter(float pole):acc(0),prev_x(0),prev_y(0)
    -
    49  {
    -
    50  A = (int)(32768.0*(1.0 - pole));
    -
    51  }
    -
    52 
    +
    43 /**
    +
    44 Instantiate a DC-blocking filter.
    +
    45 @param pole sets the responsiveness of the filter,
    +
    46 how long it takes to settle to 0 if the input signal levels out at a constant value.
    +
    47 */
    +
    48  DCfilter(float pole):acc(0),prev_x(0),prev_y(0)
    +
    49  {
    +
    50  A = (int)(32768.0*(1.0 - pole));
    +
    51  }
    +
    52 
    53 /* almost original
    -
    54  // timing: 20us
    -
    55  int next(int x)
    -
    56  {
    -
    57  setPin13High();
    -
    58  acc -= prev_x;
    -
    59  prev_x = (long)x<<15;
    -
    60  acc += prev_x;
    -
    61  acc -= A*prev_y;
    -
    62  prev_y = acc>>15; // quantization happens here
    -
    63  int filtered = (int)prev_y;
    -
    64  // acc has y[n] in upper 17 bits and -e[n] in lower 15 bits
    -
    65  setPin13Low();
    -
    66  return filtered;
    -
    67  }
    -
    68  */
    +
    54  // timing: 20us
    +
    55  int next(int x)
    +
    56  {
    +
    57  setPin13High();
    +
    58  acc -= prev_x;
    +
    59  prev_x = (long)x<<15;
    +
    60  acc += prev_x;
    +
    61  acc -= A*prev_y;
    +
    62  prev_y = acc>>15; // quantization happens here
    +
    63  int filtered = (int)prev_y;
    +
    64  // acc has y[n] in upper 17 bits and -e[n] in lower 15 bits
    +
    65  setPin13Low();
    +
    66  return filtered;
    +
    67  }
    +
    68  */
    69 
    -
    75  // timing :8us
    -
    76  inline
    -
    77  int next(int x)
    -
    78  {
    -
    79  acc += ((long)(x-prev_x)<<16)>>1;
    -
    80  prev_x = x;
    -
    81  acc -= (long)A*prev_y; // acc has y[n] in upper 17 bits and -e[n] in lower 15 bits
    -
    82  prev_y = (acc>>16)<<1; // faster than >>15 but loses bit 0
    -
    83  if (acc & 32784) prev_y += 1; // adds 1 if it was in the 0 bit position lost in the shifts above
    -
    84  return prev_y;
    -
    85  }
    +
    70  /**
    +
    71  Filter the incoming value and return the result.
    +
    72  @param x the value to filter
    +
    73  @return filtered signal
    +
    74  */
    +
    75  // timing :8us
    +
    76  inline
    +
    77  int next(int x)
    +
    78  {
    +
    79  acc += ((long)(x-prev_x)<<16)>>1;
    +
    80  prev_x = x;
    +
    81  acc -= (long)A*prev_y; // acc has y[n] in upper 17 bits and -e[n] in lower 15 bits
    +
    82  prev_y = (acc>>16)<<1; // faster than >>15 but loses bit 0
    +
    83  if (acc & 32784) prev_y += 1; // adds 1 if it was in the 0 bit position lost in the shifts above
    +
    84  return prev_y;
    +
    85  }
    86 
    87 private:
    -
    88  long acc;
    -
    89  int prev_x, prev_y,A;
    +
    88  long acc;
    +
    89  int prev_x, prev_y,A;
    90 };
    91 
    92 
    -
    93 #endif // #ifndef DCFILTER_H
    -
    94 
    +
    93 #endif // #ifndef DCFILTER_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Ead.h File Reference
    +
    +
    +
    #include "math.h"
    +#include "mozzi_fixmath.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Ead
     Exponential attack decay envelope. More...
     
    +
    +
    + + + + diff --git a/doc/html/_ead_8h_source.html b/doc/html/_ead_8h_source.html index a1cc5d03d..e21db3235 100644 --- a/doc/html/_ead_8h_source.html +++ b/doc/html/_ead_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Ead.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Ead.h
    3  *
    4  * Adapted from ead~.c puredata external (creb library)
    @@ -127,123 +135,166 @@
    23  *
    24  */
    25 
    -
    26 #ifndef EAD_H_
    -
    27 #define EAD_H_
    -
    28 
    -
    29 #include "math.h"
    -
    30 #include "mozzi_fixmath.h"
    +
    26 #ifndef EAD_H_
    +
    27 #define EAD_H_
    +
    28 
    +
    29 #include "math.h"
    +
    30 #include "mozzi_fixmath.h"
    31 
    32 
    -
    40 class Ead
    +
    33 /** Exponential attack decay envelope. This produces a natural sounding
    +
    34 envelope. It calculates a new value each time next() is called, which can be
    +
    35 mapped to other parameters to change the amplitude or timbre of a sound.
    +
    36 @note Currently doesn't work at audio rate... may need larger number
    +
    37 types for Q8n8attack and Q8n8decay ?
    +
    38 */
    +
    39 
    +
    40 class Ead
    41 {
    42 
    43 public:
    44 
    -
    52  Ead(unsigned int update_rate) : UPDATE_RATE(update_rate)
    -
    53  {
    -
    54  ;
    -
    55  }
    +
    45  /** Constructor
    +
    46  @param update_rate
    +
    47  Usually this will be CONTROL_RATE or AUDIO_RATE, unless you
    +
    48  design another scheme for updating. One such alternative scheme could take turns
    +
    49  for various control changes in a rotating schedule to spread out calculations
    +
    50  made in successive updateControl() routines.
    +
    51  */
    +
    52  Ead(unsigned int update_rate) : UPDATE_RATE(update_rate)
    +
    53  {
    +
    54  ;
    +
    55  }
    56 
    -
    61  inline
    -
    62  void setAttack(unsigned int attack_ms)
    -
    63  {
    -
    64  Q8n8attack = float_to_Q8n8(millisToOneMinusRealPole(attack_ms));
    -
    65  }
    +
    57  /** Set the attack time in milliseconds.
    +
    58  @param attack_ms The time taken for values returned by successive calls of
    +
    59  the next() method to change from 0 to 255.
    +
    60  */
    +
    61  inline
    +
    62  void setAttack(unsigned int attack_ms)
    +
    63  {
    +
    64  Q8n8attack = float_to_Q8n8(millisToOneMinusRealPole(attack_ms));
    +
    65  }
    66 
    67 
    -
    72  inline
    -
    73  void setDecay(unsigned int decay_ms)
    -
    74  {
    -
    75  Q8n8decay = float_to_Q8n8(millisToOneMinusRealPole(decay_ms));
    -
    76  }
    +
    68  /** Set the decay time in milliseconds.
    +
    69  @param decay_ms The time taken for values returned by successive calls of
    +
    70  the next() method to change from 255 to 0.
    +
    71  */
    +
    72  inline
    +
    73  void setDecay(unsigned int decay_ms)
    +
    74  {
    +
    75  Q8n8decay = float_to_Q8n8(millisToOneMinusRealPole(decay_ms));
    +
    76  }
    77 
    78 
    -
    85  inline
    -
    86  void set(unsigned int attack_ms, unsigned int decay_ms)
    -
    87  {
    -
    88  setAttack(attack_ms);
    -
    89  setDecay(decay_ms);
    -
    90  }
    +
    79  /** Set attack and decay times in milliseconds.
    +
    80  @param attack_ms The time taken for values returned by successive calls of
    +
    81  the next() method to change from 0 to 255.
    +
    82  @param decay_ms The time taken for values returned by successive calls of
    +
    83  the next() method to change from 255 to 0.
    +
    84  */
    +
    85  inline
    +
    86  void set(unsigned int attack_ms, unsigned int decay_ms)
    +
    87  {
    +
    88  setAttack(attack_ms);
    +
    89  setDecay(decay_ms);
    +
    90  }
    91 
    92 
    -
    96  inline
    -
    97  void start()
    -
    98  {
    -
    99  Q8n24state = 0;
    -
    100  attack_phase = true;
    -
    101  }
    +
    93  /** Start the envelope from the beginning. This can be used at any
    +
    94  time, even if the previous envelope is not finished.
    +
    95  */
    +
    96  inline
    +
    97  void start()
    +
    98  {
    +
    99  Q8n24state = 0;
    +
    100  attack_phase = true;
    +
    101  }
    102 
    103 
    -
    112  inline
    -
    113  void start(unsigned int attack_ms, unsigned int decay_ms)
    -
    114  {
    -
    115  set(attack_ms, decay_ms);
    -
    116  Q8n24state = 0;
    -
    117  attack_phase = true;
    -
    118  }
    +
    104  /** Set attack and decay times in milliseconds, and start the envelope from
    +
    105  the beginning. This can be used at any time, even if the previous envelope
    +
    106  is not finished.
    +
    107  @param attack_ms The time taken for values returned by successive calls of
    +
    108  the next() method to change from 0 to 255.
    +
    109  @param decay_ms The time taken for values returned by successive calls of
    +
    110  the next() method to change from 255 to 0.
    +
    111  */
    +
    112  inline
    +
    113  void start(unsigned int attack_ms, unsigned int decay_ms)
    +
    114  {
    +
    115  set(attack_ms, decay_ms);
    +
    116  Q8n24state = 0;
    +
    117  attack_phase = true;
    +
    118  }
    119 
    120 
    -
    125  inline
    -
    126  unsigned char next()
    -
    127  {
    -
    128  if(attack_phase)
    -
    129  {
    -
    130  // signed multiply A(a1,b1) * A(a2,b2)=A(a1 +a2 +1,b1 +b2)
    -
    131  Q8n24state += ((Q8n24_FIX1 - Q8n24state) * Q8n8attack) >> 8; // Q8n24, shifts all back into n24
    -
    132  if (Q8n24state >= Q8n24_FIX1-256)
    -
    133  {
    -
    134  Q8n24state = Q8n24_FIX1-256;
    -
    135  attack_phase = false;
    -
    136  }
    -
    137  }else{ /* decay phase */
    -
    138  Q8n24state -= (Q8n24state * Q8n8decay)>>8;
    -
    139  }
    -
    140  return Q8n24_to_Q0n8(Q8n24state);
    -
    141  }
    +
    121  /** Calculate and return the next envelope value, in the range -128 to 127
    +
    122  @note Timing: 5us
    +
    123  */
    +
    124 
    +
    125  inline
    +
    126  unsigned char next()
    +
    127  {
    +
    128  if(attack_phase)
    +
    129  {
    +
    130  // signed multiply A(a1,b1) * A(a2,b2)=A(a1 +a2 +1,b1 +b2)
    +
    131  Q8n24state += ((Q8n24_FIX1 - Q8n24state) * Q8n8attack) >> 8; // Q8n24, shifts all back into n24
    +
    132  if (Q8n24state >= Q8n24_FIX1-256)
    +
    133  {
    +
    134  Q8n24state = Q8n24_FIX1-256;
    +
    135  attack_phase = false;
    +
    136  }
    +
    137  }else{ /* decay phase */
    +
    138  Q8n24state -= (Q8n24state * Q8n8decay)>>8;
    +
    139  }
    +
    140  return Q8n24_to_Q0n8(Q8n24state);
    +
    141  }
    142 
    143 
    144 private:
    145 
    -
    146  Q8n8 Q8n8attack;
    -
    147  Q8n8 Q8n8decay;
    -
    148  Q8n24 Q8n24state;
    -
    149  bool attack_phase;
    -
    150  const unsigned int UPDATE_RATE;
    +
    146  Q8n8 Q8n8attack;
    +
    147  Q8n8 Q8n8decay;
    +
    148  Q8n24 Q8n24state;
    +
    149  bool attack_phase;
    +
    150  const unsigned int UPDATE_RATE;
    151 
    152 
    -
    153  /* convert milliseconds to 1-p, with p a real pole */
    -
    154  inline
    -
    155  float millisToOneMinusRealPole(unsigned int milliseconds)
    -
    156  {
    -
    157  static const float NUMERATOR = 1000.0f * log(0.001f);
    -
    158  return -expm1(NUMERATOR / ((float)UPDATE_RATE * milliseconds));
    -
    159  }
    +
    153  /* convert milliseconds to 1-p, with p a real pole */
    +
    154  inline
    +
    155  float millisToOneMinusRealPole(unsigned int milliseconds)
    +
    156  {
    +
    157  static const float NUMERATOR = 1000.0f * log(0.001f);
    +
    158  return -expm1(NUMERATOR / ((float)UPDATE_RATE * milliseconds));
    +
    159  }
    160 
    161 
    -
    162  // Compute exp(x) - 1 without loss of precision for small values of x.
    -
    163  inline
    -
    164  float expm1(float x)
    -
    165  {
    -
    166  if (fabs(x) < 1e-5)
    -
    167  {
    -
    168  return x + 0.5*x*x;
    -
    169  }
    -
    170  else
    -
    171  {
    -
    172  return exp(x) - 1.0;
    -
    173  }
    -
    174  }
    +
    162  // Compute exp(x) - 1 without loss of precision for small values of x.
    +
    163  inline
    +
    164  float expm1(float x)
    +
    165  {
    +
    166  if (fabs(x) < 1e-5)
    +
    167  {
    +
    168  return x + 0.5*x*x;
    +
    169  }
    +
    170  else
    +
    171  {
    +
    172  return exp(x) - 1.0;
    +
    173  }
    +
    174  }
    175 
    176 };
    177 
    -
    178 #endif /* EAD_H_ */
    +
    178 #endif /* EAD_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    EventDelay.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  EventDelay< UPDATE_RATE >
     A non-blocking replacement for Arduino's delay() function (which is disabled by Mozzi). More...
     
    +
    +
    + + + + diff --git a/doc/html/_event_delay_8h_source.html b/doc/html/_event_delay_8h_source.html index 32a54e314..642859217 100644 --- a/doc/html/_event_delay_8h_source.html +++ b/doc/html/_event_delay_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    EventDelay.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * EventDelay.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,67 +132,90 @@
    20  *
    21  */
    22 
    -
    23 #ifndef EVENTDELAY_H_
    -
    24 #define EVENTDELAY_H_
    -
    25 
    +
    23 #ifndef EVENTDELAY_H_
    +
    24 #define EVENTDELAY_H_
    +
    25 
    26 
    +
    27 /** A non-blocking replacement for Arduino's delay() function (which is disabled by Mozzi). EventDelay can be
    +
    28 set() to wait for a number of milliseconds, then after calling start(), calling ready() will return true when the time is up.
    +
    29 @tparam update_rate is how frequently you'll check if the EventDelay is ready().
    +
    30 This would be CONTROL_RATE if ready() is used simply in updateControl().
    +
    31 */
    32 template <unsigned int UPDATE_RATE>
    - +
    34 {
    35 
    36 public:
    -
    42  EventDelay(): counter(0), micros_per_update(1000000/UPDATE_RATE)
    -
    43  {
    -
    44  ;
    -
    45  }
    -
    46 
    +
    37  /** Constructor.
    +
    38  Declare an EventDelay object with UPDATE_RATE template parameter.
    +
    39  UPDATE_RATE is how frequently you'll check if the EventDelay is ready().
    +
    40  This would be CONTROL_RATE if ready() is used simply in updateControl().
    +
    41  */
    +
    42  EventDelay(): counter(0), micros_per_update(1000000/UPDATE_RATE)
    +
    43  {
    +
    44  ;
    +
    45  }
    +
    46 
    47 
    -
    51  inline
    -
    52  void set(unsigned int delay_milliseconds)
    -
    53  {
    -
    54  counter_start_value = ((long)delay_milliseconds*1000)/micros_per_update;
    -
    55  }
    +
    48  /** Set the delay time. This setting is persistent, until you change it by using set() again.
    +
    49  @param delay_milliseconds delay time in milliseconds.
    +
    50  */
    +
    51  inline
    +
    52  void set(unsigned int delay_milliseconds)
    +
    53  {
    +
    54  counter_start_value = ((long)delay_milliseconds*1000)/micros_per_update;
    +
    55  }
    56 
    57 
    -
    62  inline
    -
    63  void start()
    -
    64  {
    -
    65  counter = counter_start_value;
    -
    66  }
    -
    67 
    -
    68 
    -
    72  inline
    -
    73  void start(unsigned int delay_milliseconds)
    -
    74  {
    -
    75  set(delay_milliseconds);
    -
    76  start();
    -
    77  }
    +
    58  /** Start the delay.
    +
    59  @todo have a parameter to set whether it's single or repeating, so start doesn't have to be called for repeats.
    +
    60  Pro: simpler user programming. Con: would require an if..then every time ready() is called.
    +
    61  */
    +
    62  inline
    +
    63  void start()
    +
    64  {
    +
    65  counter = counter_start_value;
    +
    66  }
    +
    67 
    +
    68 
    +
    69  /** Set the delay time and start the delay.
    +
    70  @param delay_milliseconds delay time in milliseconds.
    +
    71  */
    +
    72  inline
    +
    73  void start(unsigned int delay_milliseconds)
    +
    74  {
    +
    75  set(delay_milliseconds);
    +
    76  start();
    +
    77  }
    78 
    79 
    -
    83  inline
    -
    84  bool ready()
    -
    85  {
    -
    86  return (--counter<0);
    -
    87  }
    +
    80  /** Call this in updateControl() or updateAudio() to check if the delay time is up.
    +
    81  @return true if the time is up.
    +
    82  */
    +
    83  inline
    +
    84  bool ready()
    +
    85  {
    +
    86  return (--counter<0);
    +
    87  }
    88 
    89 
    90 private:
    91 
    -
    92  long counter; // long so even at a control rate of 2048 you can have >15seconds
    -
    93  long counter_start_value;
    -
    94  const unsigned int micros_per_update;
    +
    92  long counter; // long so even at a control rate of 2048 you can have >15seconds
    +
    93  long counter_start_value;
    +
    94  const unsigned int micros_per_update;
    95 
    96 };
    97 
    98 
    -
    99 #endif /* EVENTDELAY_H_ */
    +
    99 #endif /* EVENTDELAY_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    FAQ.md File Reference
    +
    + +
    + + + + diff --git a/doc/html/_f_a_q_8md_source.html b/doc/html/_f_a_q_8md_source.html new file mode 100644 index 000000000..76d5941c1 --- /dev/null +++ b/doc/html/_f_a_q_8md_source.html @@ -0,0 +1,151 @@ + + + + + + +Mozzi: FAQ.md Source File + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    FAQ.md
    +
    +
    +Go to the documentation of this file.
    1 ###My patch was working and now it sounds horrible!
    +
    2 Has the AUDIO_MODE changed in mozzi_config.h?
    +
    3 Is the processor having trouble keeping up with the amount of calculations it's doing?
    +
    4 Has a signed or unsigned variable been cast to the wrong sign?
    +
    5 Is there a data type overflowing somewhere?
    +
    6 
    +
    7 ###Why should I try to used fixed point maths?
    +
    8 
    +
    9 ###How can I optimise my code to get the most out of Mozzi?
    +
    10 Read the Atmel document on code optimisation, but a quick summary:
    +
    11 use the smallest data sizes you can
    +
    12 
    +
    13 ###How can I extend Mozzi?
    +
    14 
    +
    15 ###Why can't I use the Arduino time functions?
    +
    16 
    +
    17 ###I don't get it
    +
    18 
    +
    19 ###Can you make it work on x?
    +
    20 
    +
    21 ###Why do I have to dig into the Mozzi/mozzi_config.h file to set options?
    +
    22 
    +
    23 
    +
    24 ###What is the difference between STANDARD and HIFI modes?
    +
    25 
    +
    26 ###Why is the audio sample rate set at 16384 (or optionally 32768 in HIFI mode?)
    +
    +
    + + + + diff --git a/doc/html/_frequency_timer2_8cpp.html b/doc/html/_frequency_timer2_8cpp.html new file mode 100644 index 000000000..e67dc5032 --- /dev/null +++ b/doc/html/_frequency_timer2_8cpp.html @@ -0,0 +1,127 @@ + + + + + + +My Project: FrequencyTimer2.cpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    FrequencyTimer2.cpp File Reference
    +
    +
    +
    #include <FrequencyTimer2.h>
    +#include <avr/interrupt.h>
    +
    +

    Go to the source code of this file.

    +
    +
    + + + + diff --git a/doc/html/_frequency_timer2_8cpp_source.html b/doc/html/_frequency_timer2_8cpp_source.html new file mode 100644 index 000000000..ee9610a6f --- /dev/null +++ b/doc/html/_frequency_timer2_8cpp_source.html @@ -0,0 +1,349 @@ + + + + + + +My Project: FrequencyTimer2.cpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    FrequencyTimer2.cpp
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  FrequencyTimer2.h - A frequency generator and interrupt generator library
    +
    3  Author: Jim Studt, jim@federated.com
    +
    4  Copyright (c) 2007 David A. Mellis. All right reserved.
    +
    5 
    +
    6  http://www.arduino.cc/playground/Code/FrequencyTimer2
    +
    7 
    +
    8  Version 2 - updated by Paul Stoffregen, paul@pjrc.com
    +
    9  for compatibility with newer hardware and Arduino 1.0
    +
    10 
    +
    11  Modified by Tim Barrass 2013,
    +
    12  -added support for ATMEGA32U4 processors (Leonardo,Teensy2.0)
    +
    13  using Timer 4 instead of Timer 2
    +
    14  - commented out ISR for use with Mozzi which defines its own
    +
    15 
    +
    16  This library is free software; you can redistribute it and/or
    +
    17  modify it under the terms of the GNU Lesser General Public
    +
    18  License as published by the Free Software Foundation; either
    +
    19  version 2.1 of the License, or (at your option) any later version.
    +
    20 
    +
    21  This library is distributed in the hope that it will be useful,
    +
    22  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    23  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    24  Lesser General Public License for more details.
    +
    25 
    +
    26  You should have received a copy of the GNU Lesser General Public
    +
    27  License along with this library; if not, write to the Free Software
    +
    28  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    +
    29 */
    +
    30 
    +
    31 
    +
    32 #include <FrequencyTimer2.h>
    +
    33 
    +
    34 #include <avr/interrupt.h>
    +
    35 
    +
    36 void (*FrequencyTimer2::onOverflow)() = 0;
    +
    37 uint8_t FrequencyTimer2::enabled = 0;
    +
    38 
    +
    39 /*
    +
    40 #if defined(TIMER2_COMPA_vect)
    +
    41 ISR(TIMER2_COMPA_vect)
    +
    42 #elif defined(TIMER2_COMP_vect)
    +
    43 ISR(TIMER2_COMP_vect)
    +
    44 #elif defined(TIMER4_COMPA_vect)
    +
    45 ISR(TIMER4_COMPA_vect)
    +
    46 #else
    +
    47 #error "This board does not have a hardware timer which is compatible with FrequencyTimer2"
    +
    48 void dummy_function(void)
    +
    49 #endif
    +
    50 {
    +
    51  static uint8_t inHandler = 0; // protect us from recursion if our handler enables interrupts
    +
    52 
    +
    53  if ( !inHandler && FrequencyTimer2::onOverflow) {
    +
    54  inHandler = 1;
    +
    55  (*FrequencyTimer2::onOverflow)();
    +
    56  inHandler = 0;
    +
    57  }
    +
    58 }
    +
    59 */
    +
    60 
    +
    61 void FrequencyTimer2::setOnOverflow( void (*func)() )
    +
    62 {
    + +
    64 #if defined(TIMSK2)
    +
    65  // enable compare match interrupt
    +
    66  if ( func) TIMSK2 |= _BV(OCIE2A);
    +
    67  else TIMSK2 &= ~_BV(OCIE2A);
    +
    68 #elif defined(TIMSK)
    +
    69  if ( func) TIMSK |= _BV(OCIE2);
    +
    70  else TIMSK &= ~_BV(OCIE2);
    +
    71 #elif defined(TIMSK4)
    +
    72  // output compare interrupt enable 4A
    +
    73  if ( func) TIMSK4 = _BV(OCIE4A);
    +
    74  else TIMSK4 = 0;
    +
    75 #endif
    +
    76 }
    +
    77 
    +
    78 
    + +
    80 {
    +
    81  uint8_t pre, top;
    +
    82 
    +
    83  if ( period == 0) period = 1;
    +
    84  period *= clockCyclesPerMicrosecond();
    +
    85  period /= 2; // we work with half-cycles before the toggle
    +
    86 
    +
    87 #if defined(TCCR2A) || defined(TCCR2)
    +
    88  if ( period <= 256) {
    +
    89  pre = 1;
    +
    90  top = period-1;
    +
    91  } else if ( period <= 256L*8) { // this for AUDIO_RATE 16384, pre=2 is a bitfield 010 which means prescaler = 8
    +
    92  pre = 2;
    +
    93  top = period/8-1;
    +
    94  } else if ( period <= 256L*32) {
    +
    95  pre = 3;
    +
    96  top = period/32-1;
    +
    97  } else if ( period <= 256L*64) {
    +
    98  pre = 4;
    +
    99  top = period/64-1;
    +
    100  } else if ( period <= 256L*128) {
    +
    101  pre = 5;
    +
    102  top = period/128-1;
    +
    103  } else if ( period <= 256L*256) {
    +
    104  pre = 6;
    +
    105  top = period/256-1;
    +
    106  } else if ( period <= 256L*1024) {
    +
    107  pre = 7;
    +
    108  top = period/1024-1;
    +
    109  } else {
    +
    110  pre = 7;
    +
    111  top = 255;
    +
    112  }
    +
    113 #elif defined(TCCR4A)
    +
    114  unsigned long prescaler = 1;
    +
    115  for(int i=1; i<=16; i++){
    +
    116  if ( period <= 256*prescaler){
    +
    117  pre = i;
    +
    118  top = period/prescaler -1;
    +
    119  break;
    +
    120  }
    +
    121  prescaler *= 2;
    +
    122  }
    +
    123 
    +
    124  //pre = 4; // this for AUDIO_RATE 16384, pre=4 is a bitfield 100 which means prescaler = 8
    +
    125  //top = period/8-1;
    +
    126 #endif
    +
    127 
    +
    128 #if defined(TCCR2A)
    +
    129  TCCR2B = 0;
    +
    130  TCCR2A = 0;
    +
    131  TCNT2 = 0;
    +
    132 #if defined(ASSR) && defined(AS2)
    +
    133  ASSR &= ~_BV(AS2); // use clock, not T2 pin
    +
    134 #endif
    +
    135  OCR2A = top;
    +
    136  //Clear Timer on Compare Match (CTC) mode
    +
    137  TCCR2A = (_BV(WGM21) | ( FrequencyTimer2::enabled ? _BV(COM2A0) : 0));
    +
    138  TCCR2B = pre;
    +
    139 #elif defined(TCCR2)
    +
    140  TCCR2 = 0;
    +
    141  TCNT2 = 0;
    +
    142  ASSR &= ~_BV(AS2); // use clock, not T2 pin
    +
    143  OCR2 = top;
    +
    144  TCCR2 = (_BV(WGM21) | ( FrequencyTimer2::enabled ? _BV(COM20) : 0) | pre);
    +
    145 #elif defined(TCCR4A) // TB2013 for 32u4 (leonardo,teensy)
    +
    146  TCCR4A = 0;
    +
    147  TCCR4B = 0;
    +
    148  TCCR4C = 0;
    +
    149  TCCR4D = 0;
    +
    150  TCCR4E = 0;
    +
    151  TCNT4 = 0;
    +
    152  OCR4C= top; // Table 15-19
    +
    153  //TCCR4A = _BV(COM4A1);
    +
    154  TCCR4B = pre ;
    +
    155  TIMSK4 = FrequencyTimer2::enabled ? _BV(OCIE4A) : 0;
    +
    156 #endif
    +
    157 }
    +
    158 
    +
    159 
    + +
    161 {
    +
    162 #if defined(TCCR2B)
    +
    163  uint8_t p = (TCCR2B & 7);
    +
    164  unsigned long v = OCR2A;
    +
    165 #elif defined(TCCR)
    +
    166  uint8_t p = (TCCR2 & 7);
    +
    167  unsigned long v = OCR2;
    +
    168 #elif defined(TCCR4B)
    +
    169  uint8_t p = (TCCR4B & 7);
    +
    170  unsigned long v = OCR4C;
    +
    171 #endif
    +
    172  uint8_t shift;
    +
    173 
    +
    174  switch(p) {
    +
    175  case 0 ... 1:
    +
    176  shift = 0;
    +
    177  break;
    +
    178  case 2:
    +
    179  shift = 3;
    +
    180  break;
    +
    181  case 3:
    +
    182  shift = 5;
    +
    183  break;
    +
    184  case 4:
    +
    185  shift = 6;
    +
    186  break;
    +
    187  case 5:
    +
    188  shift = 7;
    +
    189  break;
    +
    190  case 6:
    +
    191  shift = 8;
    +
    192  break;
    +
    193  case 7:
    +
    194  shift = 10;
    +
    195  break;
    +
    196  }
    +
    197  return (((v+1) << (shift+1)) + 1) / clockCyclesPerMicrosecond(); // shift+1 converts from half-period to period
    +
    198 }
    +
    199 
    +
    200 
    + +
    202 {
    +
    203  FrequencyTimer2::enabled = 1;
    +
    204 #if defined(TCCR2A)
    +
    205  //Toggle OC2A on Compare Match
    +
    206  TCCR2A |= _BV(COM2A0);
    +
    207 #elif defined(TCCR2)
    +
    208  TCCR2 |= _BV(COM20);
    +
    209 #elif defined(TCCR4A)
    +
    210  //TCCR4A |= _BV(COM4A0);
    +
    211  TIMSK4 = _BV(OCIE4A);
    +
    212 #endif
    +
    213 }
    +
    214 
    + +
    216 {
    +
    217  FrequencyTimer2::enabled = 0;
    +
    218 #if defined(TCCR2A)
    +
    219  TCCR2A &= ~_BV(COM2A0);
    +
    220 #elif defined(TCCR2)
    +
    221  TCCR2 &= ~_BV(COM20);
    +
    222 #elif defined(TCCR4A)
    +
    223  //TCCR4A &= ~_BV(COM4A0);
    +
    224  TIMSK4 = 0;
    +
    225 #endif
    +
    226 }
    +
    +
    + + + + diff --git a/doc/html/_frequency_timer2_8h.html b/doc/html/_frequency_timer2_8h.html new file mode 100644 index 000000000..eabfa0b8e --- /dev/null +++ b/doc/html/_frequency_timer2_8h.html @@ -0,0 +1,134 @@ + + + + + + +My Project: FrequencyTimer2.h File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    FrequencyTimer2.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Classes

    class  FrequencyTimer2
     
    +
    +
    + + + + diff --git a/doc/html/_frequency_timer2_8h_source.html b/doc/html/_frequency_timer2_8h_source.html new file mode 100644 index 000000000..01101e291 --- /dev/null +++ b/doc/html/_frequency_timer2_8h_source.html @@ -0,0 +1,189 @@ + + + + + + +My Project: FrequencyTimer2.h Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    FrequencyTimer2.h
    +
    +
    +Go to the documentation of this file.
    1 #ifndef FREQUENCYTIMER2_IS_IN
    +
    2 #define FREQUENCYTIMER2_IS_IN
    +
    3 
    +
    4 /*
    +
    5  FrequencyTimer2.h - A frequency generator and interrupt generator library
    +
    6  Author: Jim Studt, jim@federated.com
    +
    7  Copyright (c) 2007 David A. Mellis. All right reserved.
    +
    8 
    +
    9  http://www.arduino.cc/playground/Code/FrequencyTimer2
    +
    10 
    +
    11  This library is free software; you can redistribute it and/or
    +
    12  modify it under the terms of the GNU Lesser General Public
    +
    13  License as published by the Free Software Foundation; either
    +
    14  version 2.1 of the License, or (at your option) any later version.
    +
    15 
    +
    16  This library is distributed in the hope that it will be useful,
    +
    17  but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    19  Lesser General Public License for more details.
    +
    20 
    +
    21  You should have received a copy of the GNU Lesser General Public
    +
    22  License along with this library; if not, write to the Free Software
    +
    23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    +
    24 */
    +
    25 
    +
    26 #if ARDUINO >= 100
    +
    27 #include "Arduino.h"
    +
    28 #else
    +
    29 #include "WProgram.h"
    +
    30 #endif
    +
    31 
    +
    32 /*
    +
    33 // Arduino Mega
    +
    34 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    +
    35 #define FREQUENCYTIMER2_PIN 10
    +
    36 
    +
    37 // Teensy++
    +
    38 #elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
    +
    39 #define FREQUENCYTIMER2_PIN 24
    +
    40 
    +
    41 // Sanguino
    +
    42 #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
    +
    43 #define FREQUENCYTIMER2_PIN 15
    +
    44 
    +
    45 // Arduino Uno, Duemilanove, Diecimila, etc
    +
    46 #else
    +
    47 #define FREQUENCYTIMER2_PIN 11
    +
    48 #endif
    +
    49 */
    +
    50 
    + +
    52 {
    +
    53  private:
    +
    54  static uint8_t enabled;
    +
    55  public:
    +
    56  static void (*onOverflow)(); // not really public, but I can't work out the 'friend' for the SIGNAL
    +
    57 
    +
    58  public:
    +
    59  static void setPeriod(unsigned long);
    +
    60  static unsigned long getPeriod();
    +
    61  static void setOnOverflow( void (*)() );
    +
    62  static void enable();
    +
    63  static void disable();
    +
    64 };
    +
    65 
    +
    66 #endif
    +
    +
    + + + + diff --git a/doc/html/_line_8h.html b/doc/html/_line_8h.html new file mode 100644 index 000000000..71d024f2a --- /dev/null +++ b/doc/html/_line_8h.html @@ -0,0 +1,138 @@ + + + + + + +Mozzi: Line.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Line.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <util/atomic.h>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Line< T >
     For linear changes with a minimum of calculation at each step. More...
     
    +
    +
    + + + + diff --git a/doc/html/_line_8h_source.html b/doc/html/_line_8h_source.html index 6d30fd4c6..96bf6cf7a 100644 --- a/doc/html/_line_8h_source.html +++ b/doc/html/_line_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Line.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Line.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,74 +132,110 @@
    20  *
    21  */
    22 
    -
    23 #ifndef LINE_H_
    -
    24 #define LINE_H_
    -
    25 
    -
    26 #if ARDUINO >= 100
    -
    27  #include "Arduino.h"
    -
    28 #else
    -
    29  #include "WProgram.h"
    -
    30 #endif
    -
    31 #include <util/atomic.h>
    +
    23 #ifndef LINE_H_
    +
    24 #define LINE_H_
    +
    25 
    +
    26 #if ARDUINO >= 100
    +
    27  #include "Arduino.h"
    +
    28 #else
    +
    29  #include "WProgram.h"
    +
    30 #endif
    +
    31 #include <util/atomic.h>
    32 
    +
    33 /** For linear changes with a minimum of calculation at each step. For instance,
    +
    34 you can use Line to make an oscillator glide from one frequency to another,
    +
    35 pre-calculating the required phase increments for each end and then letting your
    +
    36 Line change the phase increment with only a simple addition at each step.
    +
    37 @tparam T the type of numbers to use. For example, Line <int> myline; makes a
    +
    38 Line which uses ints.
    +
    39 @note Watch out for underflows in the internal calcualtion of Line() if you're not
    +
    40 using floats (but on the other hand try to avoid lots of floats, they're too slow!).
    +
    41 If it seems like the Line() is not working, there's a good chance you need to
    +
    42 scale up the numbers you're using, so internal calculations don't get truncated
    +
    43 away. Use Mozzi's fixed-point number types in mozzi_fixmath.h, which enable you to
    +
    44 represent fractional numbers. Google "fixed point arithmetic" if this is new to
    +
    45 you.
    +
    46 */
    +
    47 
    48 template <class T>
    -
    49 class Line
    +
    49 class Line
    50 {
    51 private:
    -
    52  volatile T current_value; // volatile because it could be set in control interrupt and updated in audio
    -
    53  T step_size;
    +
    52  volatile T current_value; // volatile because it could be set in control interrupt and updated in audio
    +
    53  T step_size;
    54 
    55 public:
    -
    59  Line ()
    -
    60  {
    -
    61  ;
    -
    62  }
    +
    56  /** Constructor. Use the template parameter to set the type of numbers you
    +
    57  want to use. For example, Line <int> myline; makes a Line which uses ints.
    +
    58  */
    +
    59  Line ()
    +
    60  {
    +
    61  ;
    +
    62  }
    63 
    -
    67  inline
    -
    68  T next()
    -
    69  {
    -
    70  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    71  {
    -
    72  current_value += step_size;
    -
    73  }
    -
    74  return current_value;
    -
    75  }
    +
    64  /** Increments one step along the line.
    +
    65  @return the next value.
    +
    66  */
    +
    67  inline
    +
    68  T next()
    +
    69  {
    +
    70  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    71  {
    +
    72  current_value += step_size;
    +
    73  }
    +
    74  return current_value;
    +
    75  }
    76 
    77 
    78 
    -
    83  inline
    -
    84  void set(T value)
    -
    85  {
    -
    86  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    87  {
    -
    88  current_value=value;
    -
    89  }
    -
    90  }
    +
    79  /** Set the current value of the line. The Line will continue incrementing from this
    +
    80  value using any previously calculated step size.
    +
    81  @param value the number to set the Line's current_value to.
    +
    82  */
    +
    83  inline
    +
    84  void set(T value)
    +
    85  {
    +
    86  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    87  {
    +
    88  current_value=value;
    +
    89  }
    +
    90  }
    91 
    92 
    93 
    -
    99  inline
    -
    100  void set(T targetvalue, T num_steps)
    -
    101  {
    -
    102  step_size=(T)((((float)targetvalue-current_value)/num_steps));
    -
    103  }
    +
    94  /** Given a target value and the number of steps to take on the way, this calculates
    +
    95  the step size needed to get there from the current value.
    +
    96  @param targetvalue the value to move towards.
    +
    97  @param num_steps how many steps to take to reach the target.
    +
    98  */
    +
    99  inline
    +
    100  void set(T targetvalue, T num_steps)
    +
    101  {
    +
    102  step_size=(T)((((float)targetvalue-current_value)/num_steps));
    +
    103  }
    104 
    -
    111  inline
    -
    112  void set(T startvalue, T targetvalue, T num_steps)
    -
    113  {
    -
    114  set(startvalue);
    -
    115  set(targetvalue, num_steps);
    -
    116  }
    +
    105  /** Given a new starting value, target value and the number of steps to take on the way,
    +
    106  this sets the step size needed to get there.
    +
    107  @param startvalue the number to set the Line's current_value to.
    +
    108  @param targetvalue the value to move towards.
    +
    109  @param num_steps how many steps to take to reach the target.
    +
    110  */
    +
    111  inline
    +
    112  void set(T startvalue, T targetvalue, T num_steps)
    +
    113  {
    +
    114  set(startvalue);
    +
    115  set(targetvalue, num_steps);
    +
    116  }
    117 };
    118 
    -
    119 #endif /* LINE_H_ */
    +
    119 #endif /* LINE_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    LowPassFilter.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  LowPassFilter
     A resonant low pass filter for audio signals. More...
     
    + + + + + +

    +Macros

    #define FX_SHIFT   8
     
    #define SHIFTED_1   ((unsigned char) 255)
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define FX_SHIFT   8
    +
    + +

    Definition at line 43 of file LowPassFilter.h.

    + +
    +
    + +
    +
    + + + + +
    #define SHIFTED_1   ((unsigned char) 255)
    +
    + +

    Definition at line 44 of file LowPassFilter.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_low_pass_filter_8h.js b/doc/html/_low_pass_filter_8h.js new file mode 100644 index 000000000..4d9f23f0e --- /dev/null +++ b/doc/html/_low_pass_filter_8h.js @@ -0,0 +1,6 @@ +var _low_pass_filter_8h = +[ + [ "LowPassFilter", "class_low_pass_filter.html", "class_low_pass_filter" ], + [ "FX_SHIFT", "_low_pass_filter_8h.html#a9636ab99608c6d1d88c6da7075d4a67b", null ], + [ "SHIFTED_1", "_low_pass_filter_8h.html#a5a34c652d5f67554323e1bb4d2cd9190", null ] +]; \ No newline at end of file diff --git a/doc/html/_low_pass_filter_8h_source.html b/doc/html/_low_pass_filter_8h_source.html index 8acadfa71..2b0da84c5 100644 --- a/doc/html/_low_pass_filter_8h_source.html +++ b/doc/html/_low_pass_filter_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    LowPassFilter.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * LowPassFilter.h
    3  *
    4  * Copyright 2012 Tim Barrass
    @@ -124,9 +132,9 @@
    20  *
    21  */
    22 
    -
    23 #ifndef LOWPASS_H_
    -
    24 #define LOWPASS_H_
    -
    25 
    +
    23 #ifndef LOWPASS_H_
    +
    24 #define LOWPASS_H_
    +
    25 
    26 /*
    27 simple resonant filter posted to musicdsp.org by Paul Kellett http://www.musicdsp.org/archive.php?classid=3#259
    28 
    @@ -144,89 +152,105 @@
    40 
    41 
    42 // we are using .n fixed point (n bits for the fractional part)
    -
    43 #define FX_SHIFT 8
    -
    44 #define SHIFTED_1 ((unsigned char) 255)
    -
    45 
    - +
    43 #define FX_SHIFT 8
    +
    44 #define SHIFTED_1 ((unsigned char) 255)
    +
    45 
    +
    46 /** A resonant low pass filter for audio signals.
    +
    47 */
    +
    49 {
    50 
    51 public:
    52 
    53 
    - -
    57  }
    +
    54  /** Constructor.
    +
    55  */
    + +
    57  }
    58 
    59 
    -
    64  void setCutoffFreq(unsigned char cutoff)
    -
    65  {
    -
    66  f = cutoff;
    -
    67  fb = q+ucfxmul(q, SHIFTED_1 - cutoff);
    -
    68  }
    +
    60  /** Set the cut off frequency,
    +
    61  @param cutoff use the range 0-255 to represent 0-8192 Hz (AUDIO_RATE/2).
    +
    62  Be careful of distortion at the lower end, especially with high resonance.
    +
    63  */
    +
    64  void setCutoffFreq(unsigned char cutoff)
    +
    65  {
    +
    66  f = cutoff;
    +
    67  fb = q+ucfxmul(q, SHIFTED_1 - cutoff);
    +
    68  }
    69 
    70 
    -
    74  void setResonance(unsigned char resonance)
    -
    75  {
    -
    76  q = resonance;
    -
    77  }
    +
    71  /** Set the resonance. If you hear unwanted distortion, back off the resonance.
    +
    72  @param resonance in the range 0-255.
    +
    73  */
    +
    74  void setResonance(unsigned char resonance)
    +
    75  {
    +
    76  q = resonance;
    +
    77  }
    78 
    -
    84  // 10.5 to 12.5 us, mostly 10.5 us (was 14us)
    -
    85  inline
    -
    86  int next(int in)
    -
    87  {
    -
    88  //setPin13High();
    -
    89  buf0+=fxmul(((in - buf0) + fxmul(fb, buf0-buf1)), f);
    -
    90  buf1+=ifxmul(buf0-buf1, f); // could overflow if input changes fast
    -
    91  //setPin13Low();
    -
    92  return buf1;
    -
    93  }
    +
    79  /** Calculate the next sample, given an input signal.
    +
    80  @param in the signal input.
    +
    81  @return the signal output.
    +
    82  @note Timing: about 11us.
    +
    83  */
    +
    84  // 10.5 to 12.5 us, mostly 10.5 us (was 14us)
    +
    85  inline
    +
    86  int next(int in)
    +
    87  {
    +
    88  //setPin13High();
    +
    89  buf0+=fxmul(((in - buf0) + fxmul(fb, buf0-buf1)), f);
    +
    90  buf1+=ifxmul(buf0-buf1, f); // could overflow if input changes fast
    +
    91  //setPin13Low();
    +
    92  return buf1;
    +
    93  }
    94 
    95 
    96 private:
    -
    97  unsigned char q;
    -
    98  unsigned char f;
    -
    99  unsigned int fb;
    -
    100  int buf0,buf1;
    +
    97  unsigned char q;
    +
    98  unsigned char f;
    +
    99  unsigned int fb;
    +
    100  int buf0,buf1;
    101 
    102 
    -
    103  // // multiply two fixed point numbers (returns fixed point)
    -
    104  // inline
    -
    105  // long fxmul(long a, long b)
    -
    106  // {
    -
    107  // return (a*b)>>FX_SHIFT;
    -
    108  // }
    +
    103  // // multiply two fixed point numbers (returns fixed point)
    +
    104  // inline
    +
    105  // long fxmul(long a, long b)
    +
    106  // {
    +
    107  // return (a*b)>>FX_SHIFT;
    +
    108  // }
    109 
    -
    110  // multiply two fixed point numbers (returns fixed point)
    -
    111  inline
    -
    112  unsigned int ucfxmul(unsigned char a, unsigned char b)
    -
    113  {
    -
    114  return (((unsigned int)a*b)>>FX_SHIFT);
    -
    115  }
    -
    116 
    -
    117  // multiply two fixed point numbers (returns fixed point)
    -
    118  inline
    -
    119  int ifxmul(int a, unsigned char b)
    -
    120  {
    -
    121  return ((a*b)>>FX_SHIFT);
    -
    122  }
    -
    123 
    -
    124  // multiply two fixed point numbers (returns fixed point)
    -
    125  inline
    -
    126  long fxmul(long a, int b)
    -
    127  {
    -
    128  return ((a*b)>>FX_SHIFT);
    -
    129  }
    +
    110  // multiply two fixed point numbers (returns fixed point)
    +
    111  inline
    +
    112  unsigned int ucfxmul(unsigned char a, unsigned char b)
    +
    113  {
    +
    114  return (((unsigned int)a*b)>>FX_SHIFT);
    +
    115  }
    +
    116 
    +
    117  // multiply two fixed point numbers (returns fixed point)
    +
    118  inline
    +
    119  int ifxmul(int a, unsigned char b)
    +
    120  {
    +
    121  return ((a*b)>>FX_SHIFT);
    +
    122  }
    +
    123 
    +
    124  // multiply two fixed point numbers (returns fixed point)
    +
    125  inline
    +
    126  long fxmul(long a, int b)
    +
    127  {
    +
    128  return ((a*b)>>FX_SHIFT);
    +
    129  }
    130 
    131 
    132 };
    133 
    -
    134 #endif /* LOWPASS_H_ */
    +
    134 #endif /* LOWPASS_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    MozziGuts.cpp File Reference
    +
    +
    +
    #include "mozzi_config.h"
    +#include "MozziGuts.h"
    +#include "mozzi_utils.h"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define BUFFER_NUM_CELLS   256
     
    + + + + + + + + + + + + + + + + + + +

    +Functions

    void audioHook ()
     This is required in Arduino's loop(). More...
     
     ISR (TIMER1_OVF_vect, ISR_BLOCK)
     
    void startMozzi (int control_rate_hz)
     Sets up the timers for audio and control rate processes, storing the timer registers so they can be restored when Mozzi stops. More...
     
    void pauseMozzi ()
     Stops audio and control interrupts and restores the timers to the values they had before Mozzi was started. More...
     
    void unPauseMozzi ()
     Restores Mozzi audio and control interrupts, if they have been temporarily disabled with pauseMozzi(). More...
     
    unsigned long mozziMicros ()
     A replacement for Arduino micros() which is disabled by Mozzi which takes over Timer 0 for control interrupts. More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BUFFER_NUM_CELLS   256
    +
    + +

    Definition at line 54 of file MozziGuts.cpp.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    ISR (TIMER1_OVF_vect ,
    ISR_BLOCK  
    )
    +
    + +

    Definition at line 196 of file MozziGuts.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_mozzi_guts_8cpp.js b/doc/html/_mozzi_guts_8cpp.js new file mode 100644 index 000000000..f78225b31 --- /dev/null +++ b/doc/html/_mozzi_guts_8cpp.js @@ -0,0 +1,10 @@ +var _mozzi_guts_8cpp = +[ + [ "BUFFER_NUM_CELLS", "_mozzi_guts_8cpp.html#ae0ff2ce3329f62bb39166d246475e8a3", null ], + [ "audioHook", "_mozzi_guts_8cpp.html#ga2fca37b988ab369e2f3c3108c683e59d", null ], + [ "ISR", "_mozzi_guts_8cpp.html#ae4bb889d011ea82c5218b8d671716f51", null ], + [ "mozziMicros", "_mozzi_guts_8cpp.html#gaaa6a42d80c5297407a45ca8bf3c1c7fe", null ], + [ "pauseMozzi", "_mozzi_guts_8cpp.html#ga0dc2dc3b2c20b081df4d55ad039f64e5", null ], + [ "startMozzi", "_mozzi_guts_8cpp.html#ga75aa9f4a501f4b167343b8caac8c6837", null ], + [ "unPauseMozzi", "_mozzi_guts_8cpp.html#ga1718c5f0bbb56cc4b2db55702750f43f", null ] +]; \ No newline at end of file diff --git a/doc/html/_mozzi_guts_8cpp_source.html b/doc/html/_mozzi_guts_8cpp_source.html index 72b07ac4b..f1d4d7e6f 100644 --- a/doc/html/_mozzi_guts_8cpp_source.html +++ b/doc/html/_mozzi_guts_8cpp_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    MozziGuts.cpp
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * MozziGuts.cpp
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,10 +132,10 @@
    20  *
    21  */
    22 
    -
    23 #include "mozzi_config.h" // at the top of all MozziGuts and analog files
    -
    24 #include "MozziGuts.h"
    +
    23 #include "mozzi_config.h" // at the top of all MozziGuts and analog files
    +
    24 #include "MozziGuts.h"
    25 //#include <util/atomic.h>
    -
    26 #include "mozzi_utils.h"
    +
    26 #include "mozzi_utils.h"
    27 
    28 
    29 /*
    @@ -155,8 +163,8 @@
    51 
    52 //-----------------------------------------------------------------------------------------------------------------
    53 // ring buffer for audio output
    -
    54 #define BUFFER_NUM_CELLS 256
    -
    55 static unsigned int output_buffer[BUFFER_NUM_CELLS];
    +
    54 #define BUFFER_NUM_CELLS 256
    +
    55 static unsigned int output_buffer[BUFFER_NUM_CELLS];
    56 static volatile unsigned long output_buffer_tail; // shared by audioHook() (in loop()), and outputAudio() (in audio interrupt), where it is changed
    57 
    58 //-----------------------------------------------------------------------------------------------------------------
    @@ -165,22 +173,22 @@
    61 static byte pre_mozzi_TCCR0A, pre_mozzi_TCCR0B, pre_mozzi_OCR0A, pre_mozzi_TIMSK0;
    62 static byte pre_mozzi_TCCR1A, pre_mozzi_TCCR1B, pre_mozzi_OCR1A, pre_mozzi_TIMSK1;
    63 
    -
    64 #if (AUDIO_MODE == HIFI)
    -
    65 #if defined(TCCR2A)
    -
    66 static byte pre_mozzi_TCCR2A, pre_mozzi_TCCR2B, pre_mozzi_OCR2A, pre_mozzi_TIMSK2;
    -
    67 #elif defined(TCCR2)
    -
    68 static byte pre_mozzi_TCCR2, pre_mozzi_OCR2, pre_mozzi_TIMSK;
    -
    69 #elif defined(TCCR4A)
    -
    70 static byte pre_mozzi_TCCR4A, pre_mozzi_TCCR4B, pre_mozzi_TCCR4C, pre_mozzi_TCCR4D, pre_mozzi_TCCR4E, pre_mozzi_OCR4C, pre_mozzi_TIMSK4;
    -
    71 #endif
    -
    72 #endif
    -
    73 
    +
    64 #if (AUDIO_MODE == HIFI)
    +
    65 #if defined(TCCR2A)
    +
    66 static byte pre_mozzi_TCCR2A, pre_mozzi_TCCR2B, pre_mozzi_OCR2A, pre_mozzi_TIMSK2;
    +
    67 #elif defined(TCCR2)
    +
    68 static byte pre_mozzi_TCCR2, pre_mozzi_OCR2, pre_mozzi_TIMSK;
    +
    69 #elif defined(TCCR4A)
    +
    70 static byte pre_mozzi_TCCR4A, pre_mozzi_TCCR4B, pre_mozzi_TCCR4C, pre_mozzi_TCCR4D, pre_mozzi_TCCR4E, pre_mozzi_OCR4C, pre_mozzi_TIMSK4;
    +
    71 #endif
    +
    72 #endif
    +
    73 
    74 static void backupPreMozziTimer1(){
    -
    75  // backup pre-mozzi register values for pausing later
    -
    76  pre_mozzi_TCCR1A = TCCR1A;
    -
    77  pre_mozzi_TCCR1B = TCCR1B;
    -
    78  pre_mozzi_OCR1A = OCR1A;
    -
    79  pre_mozzi_TIMSK1 = TIMSK1;
    +
    75  // backup pre-mozzi register values for pausing later
    +
    76  pre_mozzi_TCCR1A = TCCR1A;
    +
    77  pre_mozzi_TCCR1B = TCCR1B;
    +
    78  pre_mozzi_OCR1A = OCR1A;
    +
    79  pre_mozzi_TIMSK1 = TIMSK1;
    80 }
    81 
    82 //-----------------------------------------------------------------------------------------------------------------
    @@ -189,46 +197,46 @@
    85 static byte mozzi_TCCR0A, mozzi_TCCR0B, mozzi_OCR0A, mozzi_TIMSK0;
    86 static byte mozzi_TCCR1A, mozzi_TCCR1B, mozzi_OCR1A, mozzi_TIMSK1;
    87 
    -
    88 #if (AUDIO_MODE == HIFI)
    -
    89 #if defined(TCCR2A)
    -
    90 static byte mozzi_TCCR2A, mozzi_TCCR2B, mozzi_OCR2A, mozzi_TIMSK2;
    -
    91 #elif defined(TCCR2)
    -
    92 static byte mozzi_TCCR2, mozzi_OCR2, mozzi_TIMSK;
    -
    93 #elif defined(TCCR4A)
    -
    94 static byte mozzi_TCCR4A, mozzi_TCCR4B, mozzi_TCCR4C, mozzi_TCCR4D, mozzi_TCCR4E, mozzi_OCR4C, mozzi_TIMSK4;
    -
    95 #endif
    -
    96 #endif
    -
    97 
    +
    88 #if (AUDIO_MODE == HIFI)
    +
    89 #if defined(TCCR2A)
    +
    90 static byte mozzi_TCCR2A, mozzi_TCCR2B, mozzi_OCR2A, mozzi_TIMSK2;
    +
    91 #elif defined(TCCR2)
    +
    92 static byte mozzi_TCCR2, mozzi_OCR2, mozzi_TIMSK;
    +
    93 #elif defined(TCCR4A)
    +
    94 static byte mozzi_TCCR4A, mozzi_TCCR4B, mozzi_TCCR4C, mozzi_TCCR4D, mozzi_TCCR4E, mozzi_OCR4C, mozzi_TIMSK4;
    +
    95 #endif
    +
    96 #endif
    +
    97 
    98 static void backupMozziTimer1(){
    -
    99  // backup mozzi register values for unpausing later
    -
    100  mozzi_TCCR1A = TCCR1A;
    -
    101  mozzi_TCCR1B = TCCR1B;
    -
    102  mozzi_OCR1A = OCR1A;
    -
    103  mozzi_TIMSK1 = TIMSK1;
    +
    99  // backup mozzi register values for unpausing later
    +
    100  mozzi_TCCR1A = TCCR1A;
    +
    101  mozzi_TCCR1B = TCCR1B;
    +
    102  mozzi_OCR1A = OCR1A;
    +
    103  mozzi_TIMSK1 = TIMSK1;
    104 }
    105 
    106 //-----------------------------------------------------------------------------------------------------------------
    107 
    -
    108 #if USE_AUDIO_INPUT
    -
    109 
    -
    110 #include "mozzi_analog.h"
    +
    108 #if USE_AUDIO_INPUT
    +
    109 
    +
    110 #include "mozzi_analog.h"
    111 
    112 static void adcSetupAudioInput(){
    - - -
    115  adcSetChannel(0);
    +
    113  adcEnableInterrupt();
    +
    114  setupFastAnalogRead();
    +
    115  adcSetChannel(0);
    116 }
    117 
    118 static volatile long input_gap;
    119 static volatile unsigned long input_buffer_head;
    120 static volatile int input_buffer[BUFFER_NUM_CELLS];
    -
    121 static boolean do_update_audio;
    +
    121 static boolean do_update_audio;
    122 static int audio_input; // holds the latest audio from input_buffer
    123 
    124 
    -
    125 int getAudioInput()
    +
    125 int getAudioInput()
    126 {
    -
    127  return audio_input;
    +
    127  return audio_input;
    128 }
    129 
    130 
    @@ -236,310 +244,310 @@
    132 */
    133 ISR(ADC_vect, ISR_BLOCK)
    134 {
    -
    135  // gets here about 16us after being set audio output isr
    -
    136  input_buffer_head++;
    -
    137  input_buffer[input_buffer_head & (BUFFER_NUM_CELLS-1)] = ADC; // put new data into input_buffer, don't worry about overwriting old, as guarding would also cause a glitch
    -
    138  if (input_gap > (BUFFER_NUM_CELLS/2)) {
    -
    139  do_update_audio = true;
    -
    140  }else{
    -
    141  do_update_audio = false;
    -
    142  }
    +
    135  // gets here about 16us after being set audio output isr
    +
    136  input_buffer_head++;
    +
    137  input_buffer[input_buffer_head & (BUFFER_NUM_CELLS-1)] = ADC; // put new data into input_buffer, don't worry about overwriting old, as guarding would also cause a glitch
    +
    138  if (input_gap > (BUFFER_NUM_CELLS/2)) {
    +
    139  do_update_audio = true;
    +
    140  }else{
    +
    141  do_update_audio = false;
    +
    142  }
    143 }
    144 
    -
    145 #endif
    -
    146 
    +
    145 #endif
    +
    146 
    147 
    148 
    149 void audioHook() // 2us excluding updateAudio()
    150 {
    -
    151  static unsigned long output_buffer_head = 0;
    -
    152  long output_gap = output_buffer_head - output_buffer_tail; // wraps to a big number if it's negative, and will take a long time to wrap
    +
    151  static unsigned long output_buffer_head = 0;
    +
    152  long output_gap = output_buffer_head - output_buffer_tail; // wraps to a big number if it's negative, and will take a long time to wrap
    153 
    -
    154 #if USE_AUDIO_INPUT // 3us
    -
    155 
    -
    156  static unsigned long input_buffer_tail =0;
    -
    157  input_gap = input_buffer_head - input_buffer_tail; // wraps to a big number if it's negative, and will take a long time to wrap
    -
    158  if ((output_gap < BUFFER_NUM_CELLS) && do_update_audio) {
    -
    159  input_buffer_tail++;
    -
    160  audio_input = input_buffer[input_buffer_tail & (BUFFER_NUM_CELLS-1)];
    +
    154 #if USE_AUDIO_INPUT // 3us
    +
    155 
    +
    156  static unsigned long input_buffer_tail =0;
    +
    157  input_gap = input_buffer_head - input_buffer_tail; // wraps to a big number if it's negative, and will take a long time to wrap
    +
    158  if ((output_gap < BUFFER_NUM_CELLS) && do_update_audio) {
    +
    159  input_buffer_tail++;
    +
    160  audio_input = input_buffer[input_buffer_tail & (BUFFER_NUM_CELLS-1)];
    161 
    -
    162 #else
    -
    163 
    -
    164  if(output_gap < BUFFER_NUM_CELLS) // prevent writing over cells which haven't been output yet
    -
    165  {
    +
    162 #else
    +
    163 
    +
    164  if(output_gap < BUFFER_NUM_CELLS) // prevent writing over cells which haven't been output yet
    +
    165  {
    166 
    -
    167 #endif
    -
    168  output_buffer_head++;
    -
    169  output_buffer[(unsigned char)output_buffer_head & (unsigned char)(BUFFER_NUM_CELLS-1)] = (unsigned int) (updateAudio() + AUDIO_BIAS);
    -
    170  }
    +
    167 #endif
    +
    168  output_buffer_head++;
    +
    169  output_buffer[(unsigned char)output_buffer_head & (unsigned char)(BUFFER_NUM_CELLS-1)] = (unsigned int) (updateAudio() + AUDIO_BIAS);
    +
    170  }
    171 
    -
    172  }
    +
    172  }
    173 
    174 
    -
    175  //-----------------------------------------------------------------------------------------------------------------
    -
    176 #if (AUDIO_MODE == STANDARD)
    -
    177 
    -
    178  static void startAudioStandard(){
    -
    179  backupPreMozziTimer1();
    +
    175  //-----------------------------------------------------------------------------------------------------------------
    +
    176 #if (AUDIO_MODE == STANDARD)
    +
    177 
    +
    178  static void startAudioStandard(){
    +
    179  backupPreMozziTimer1();
    180 
    -
    181  pinMode(AUDIO_CHANNEL_1_PIN, OUTPUT); // set pin to output for audio
    -
    182  Timer1.initialize(1000000UL/AUDIO_RATE, PHASE_FREQ_CORRECT); // set period, phase and frequency correct
    -
    183  Timer1.pwm(AUDIO_CHANNEL_1_PIN, AUDIO_BIAS); // pwm pin, 50% of Mozzi's duty cycle, ie. 0 signal
    -
    184  TIMSK1 = _BV(TOIE1); // Overflow Interrupt Enable (when not using Timer1.attachInterrupt())
    +
    181  pinMode(AUDIO_CHANNEL_1_PIN, OUTPUT); // set pin to output for audio
    +
    182  Timer1.initialize(1000000UL/AUDIO_RATE, PHASE_FREQ_CORRECT); // set period, phase and frequency correct
    +
    183  Timer1.pwm(AUDIO_CHANNEL_1_PIN, AUDIO_BIAS); // pwm pin, 50% of Mozzi's duty cycle, ie. 0 signal
    +
    184  TIMSK1 = _BV(TOIE1); // Overflow Interrupt Enable (when not using Timer1.attachInterrupt())
    185 
    -
    186  backupMozziTimer1();
    +
    186  backupMozziTimer1();
    187 
    -
    188 #if USE_AUDIO_INPUT
    -
    189  adcSetupAudioInput();
    -
    190 #endif
    -
    191  }
    +
    188 #if USE_AUDIO_INPUT
    +
    189  adcSetupAudioInput();
    +
    190 #endif
    +
    191  }
    192 
    193 
    -
    194  /* Interrupt service routine moves sound data from the output buffer to the
    -
    195  Arduino output register, running at AUDIO_RATE. */
    -
    196  ISR(TIMER1_OVF_vect, ISR_BLOCK) {
    -
    197 #if USE_AUDIO_INPUT
    -
    198  sbi(ADCSRA, ADSC); // start next adc conversion
    -
    199 #endif
    -
    200  output_buffer_tail++;
    -
    201  AUDIO_CHANNEL_1_OUTPUT_REGISTER = output_buffer[(unsigned char)output_buffer_tail & (unsigned char)(BUFFER_NUM_CELLS-1)]; // 1us, 2.5us with longs
    -
    202  }
    +
    194  /* Interrupt service routine moves sound data from the output buffer to the
    +
    195  Arduino output register, running at AUDIO_RATE. */
    + +
    197 #if USE_AUDIO_INPUT
    +
    198  sbi(ADCSRA, ADSC); // start next adc conversion
    +
    199 #endif
    +
    200  output_buffer_tail++;
    +
    201  AUDIO_CHANNEL_1_OUTPUT_REGISTER = output_buffer[(unsigned char)output_buffer_tail & (unsigned char)(BUFFER_NUM_CELLS-1)]; // 1us, 2.5us with longs
    +
    202  }
    203 
    -
    204  // end STANDARD
    +
    204  // end STANDARD
    205 
    -
    206  //-----------------------------------------------------------------------------------------------------------------
    -
    207 #elif (AUDIO_MODE == HIFI)
    -
    208 
    -
    209  static void startAudioHiFi(){
    -
    210  backupPreMozziTimer1();
    +
    206  //-----------------------------------------------------------------------------------------------------------------
    +
    207 #elif (AUDIO_MODE == HIFI)
    +
    208 
    +
    209  static void startAudioHiFi(){
    +
    210  backupPreMozziTimer1();
    211 
    -
    212  // pwm on timer 1
    -
    213  pinMode(AUDIO_CHANNEL_1_HIGHBYTE_PIN, OUTPUT); // set pin to output for audio, use 3.9k resistor
    -
    214  pinMode(AUDIO_CHANNEL_1_LOWBYTE_PIN, OUTPUT); // set pin to output for audio, use 1M resistor
    +
    212  // pwm on timer 1
    +
    213  pinMode(AUDIO_CHANNEL_1_HIGHBYTE_PIN, OUTPUT); // set pin to output for audio, use 3.9k resistor
    +
    214  pinMode(AUDIO_CHANNEL_1_LOWBYTE_PIN, OUTPUT); // set pin to output for audio, use 1M resistor
    215 
    -
    216  Timer1.initialize(1000000UL/125000, FAST); // set period for 125000 Hz fast pwm carrier frequency = 14 bits
    +
    216  Timer1.initialize(1000000UL/125000, FAST); // set period for 125000 Hz fast pwm carrier frequency = 14 bits
    217 
    -
    218  Timer1.pwm(AUDIO_CHANNEL_1_HIGHBYTE_PIN, 0); // pwm pin, 0% duty cycle, ie. 0 signal
    -
    219  Timer1.pwm(AUDIO_CHANNEL_1_LOWBYTE_PIN, 0); // pwm pin, 0% duty cycle, ie. 0 signal
    +
    218  Timer1.pwm(AUDIO_CHANNEL_1_HIGHBYTE_PIN, 0); // pwm pin, 0% duty cycle, ie. 0 signal
    +
    219  Timer1.pwm(AUDIO_CHANNEL_1_LOWBYTE_PIN, 0); // pwm pin, 0% duty cycle, ie. 0 signal
    220 
    -
    221  backupMozziTimer1();
    +
    221  backupMozziTimer1();
    222 
    -
    223  // audio output interrupt on timer 2, sets the pwm levels of timer 1
    -
    224  setupTimer2();
    +
    223  // audio output interrupt on timer 2, sets the pwm levels of timer 1
    +
    224  setupTimer2();
    225 
    -
    226 #if USE_AUDIO_INPUT
    -
    227  adcSetupAudioInput();
    -
    228 #endif
    -
    229  }
    +
    226 #if USE_AUDIO_INPUT
    +
    227  adcSetupAudioInput();
    +
    228 #endif
    +
    229  }
    230 
    -
    231  /* set up Timer 2 using modified FrequencyTimer2 library */
    -
    232  void dummy(){}
    +
    231  /* set up Timer 2 using modified FrequencyTimer2 library */
    +
    232  void dummy(){}
    233 
    -
    234  static void setupTimer2(){
    -
    235  //backup Timer2 register values
    -
    236 #if defined(TCCR2A)
    -
    237  pre_mozzi_TCCR2A = TCCR2A;
    -
    238  pre_mozzi_TCCR2B = TCCR2B;
    -
    239  pre_mozzi_OCR2A = OCR2A;
    -
    240  pre_mozzi_TIMSK2 = TIMSK2;
    -
    241 #elif defined(TCCR2)
    -
    242  pre_mozzi_TCCR2 = TCCR2;
    -
    243  pre_mozzi_OCR2 = OCR2;
    -
    244  pre_mozzi_TIMSK = TIMSK;
    -
    245 #elif defined(TCCR4A)
    -
    246  pre_mozzi_TCCR4B = TCCR4A;
    -
    247  pre_mozzi_TCCR4B = TCCR4B;
    -
    248  pre_mozzi_TCCR4B = TCCR4C;
    -
    249  pre_mozzi_TCCR4B = TCCR4D;
    -
    250  pre_mozzi_TCCR4B = TCCR4E;
    -
    251  pre_mozzi_OCR4C = OCR4C;
    -
    252  pre_mozzi_TIMSK4 = TIMSK4;
    -
    253 #endif
    -
    254 
    -
    255  // audio output interrupt on timer 2 (or 4 on ATMEGA32U4 cpu), sets the pwm levels of timer 1
    +
    234  static void setupTimer2(){
    +
    235  //backup Timer2 register values
    +
    236 #if defined(TCCR2A)
    +
    237  pre_mozzi_TCCR2A = TCCR2A;
    +
    238  pre_mozzi_TCCR2B = TCCR2B;
    +
    239  pre_mozzi_OCR2A = OCR2A;
    +
    240  pre_mozzi_TIMSK2 = TIMSK2;
    +
    241 #elif defined(TCCR2)
    +
    242  pre_mozzi_TCCR2 = TCCR2;
    +
    243  pre_mozzi_OCR2 = OCR2;
    +
    244  pre_mozzi_TIMSK = TIMSK;
    +
    245 #elif defined(TCCR4A)
    +
    246  pre_mozzi_TCCR4B = TCCR4A;
    +
    247  pre_mozzi_TCCR4B = TCCR4B;
    +
    248  pre_mozzi_TCCR4B = TCCR4C;
    +
    249  pre_mozzi_TCCR4B = TCCR4D;
    +
    250  pre_mozzi_TCCR4B = TCCR4E;
    +
    251  pre_mozzi_OCR4C = OCR4C;
    +
    252  pre_mozzi_TIMSK4 = TIMSK4;
    +
    253 #endif
    +
    254 
    +
    255  // audio output interrupt on timer 2 (or 4 on ATMEGA32U4 cpu), sets the pwm levels of timer 1
    256 
    -
    257  FrequencyTimer2::setPeriod(2000000UL/AUDIO_RATE); // gives a period half of what's provided, for some reason
    -
    258  FrequencyTimer2::setOnOverflow(dummy);
    -
    259  FrequencyTimer2::enable();
    +
    257  FrequencyTimer2::setPeriod(2000000UL/AUDIO_RATE); // gives a period half of what's provided, for some reason
    +
    258  FrequencyTimer2::setOnOverflow(dummy);
    +
    259  FrequencyTimer2::enable();
    260 
    -
    261  // backup mozzi register values for unpausing later
    -
    262 #if defined(TCCR2A)
    -
    263  mozzi_TCCR2A = TCCR2A;
    -
    264  mozzi_TCCR2B = TCCR2B;
    -
    265  mozzi_OCR2A = OCR2A;
    -
    266  mozzi_TIMSK2 = TIMSK2;
    -
    267 #elif defined(TCCR2)
    -
    268  mozzi_TCCR2 = TCCR2;
    -
    269  mozzi_OCR2 = OCR2;
    -
    270  mozzi_TIMSK = TIMSK;
    -
    271 #elif defined(TCCR4A)
    -
    272  mozzi_TCCR4B = TCCR4A;
    -
    273  mozzi_TCCR4B = TCCR4B;
    -
    274  mozzi_TCCR4B = TCCR4C;
    -
    275  mozzi_TCCR4B = TCCR4D;
    -
    276  mozzi_TCCR4B = TCCR4E;
    -
    277  mozzi_OCR4C = OCR4C;
    -
    278  mozzi_TIMSK4 = TIMSK4;
    -
    279 #endif
    -
    280  }
    +
    261  // backup mozzi register values for unpausing later
    +
    262 #if defined(TCCR2A)
    +
    263  mozzi_TCCR2A = TCCR2A;
    +
    264  mozzi_TCCR2B = TCCR2B;
    +
    265  mozzi_OCR2A = OCR2A;
    +
    266  mozzi_TIMSK2 = TIMSK2;
    +
    267 #elif defined(TCCR2)
    +
    268  mozzi_TCCR2 = TCCR2;
    +
    269  mozzi_OCR2 = OCR2;
    +
    270  mozzi_TIMSK = TIMSK;
    +
    271 #elif defined(TCCR4A)
    +
    272  mozzi_TCCR4B = TCCR4A;
    +
    273  mozzi_TCCR4B = TCCR4B;
    +
    274  mozzi_TCCR4B = TCCR4C;
    +
    275  mozzi_TCCR4B = TCCR4D;
    +
    276  mozzi_TCCR4B = TCCR4E;
    +
    277  mozzi_OCR4C = OCR4C;
    +
    278  mozzi_TIMSK4 = TIMSK4;
    +
    279 #endif
    +
    280  }
    281 
    -
    282  #if defined(TIMER2_COMPA_vect)
    -
    283  ISR(TIMER2_COMPA_vect)
    -
    284 #elif defined(TIMER2_COMP_vect)
    -
    285  ISR(TIMER2_COMP_vect)
    -
    286 #elif defined(TIMER4_COMPA_vect)
    -
    287  ISR(TIMER4_COMPA_vect)
    -
    288 #else
    -
    289 #error "This board does not have a hardware timer which is compatible with FrequencyTimer2"
    -
    290  void dummy_function(void)
    -
    291 #endif
    -
    292  {
    -
    293 #if USE_AUDIO_INPUT
    -
    294  sbi(ADCSRA, ADSC); // start next adc conversion
    -
    295 #endif
    -
    296 
    -
    297  output_buffer_tail++;
    -
    298  unsigned int out = output_buffer[(unsigned char)output_buffer_tail & (unsigned char)(BUFFER_NUM_CELLS-1)]; // 1us, 2.5us with longs
    +
    282  #if defined(TIMER2_COMPA_vect)
    +
    283  ISR(TIMER2_COMPA_vect)
    +
    284 #elif defined(TIMER2_COMP_vect)
    +
    285  ISR(TIMER2_COMP_vect)
    +
    286 #elif defined(TIMER4_COMPA_vect)
    +
    287  ISR(TIMER4_COMPA_vect)
    +
    288 #else
    +
    289 #error "This board does not have a hardware timer which is compatible with FrequencyTimer2"
    +
    290  void dummy_function(void)
    +
    291 #endif
    +
    292  {
    +
    293 #if USE_AUDIO_INPUT
    +
    294  sbi(ADCSRA, ADSC); // start next adc conversion
    +
    295 #endif
    +
    296 
    +
    297  output_buffer_tail++;
    +
    298  unsigned int out = output_buffer[(unsigned char)output_buffer_tail & (unsigned char)(BUFFER_NUM_CELLS-1)]; // 1us, 2.5us with longs
    299 
    -
    300  // read about dual pwm at http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/
    -
    301  // sketches at http://wiki.openmusiclabs.com/wiki/PWMDAC, http://wiki.openmusiclabs.com/wiki/MiniArDSP
    +
    300  // read about dual pwm at http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/
    +
    301  // sketches at http://wiki.openmusiclabs.com/wiki/PWMDAC, http://wiki.openmusiclabs.com/wiki/MiniArDSP
    302 
    -
    303  // 14 bit - this sounds better than 12 bit, it's cleaner, less bitty, don't notice aliasing
    -
    304  AUDIO_CHANNEL_1_HIGHBYTE_REGISTER = out >> 7; // B11111110000000 becomes B1111111
    -
    305  AUDIO_CHANNEL_1_LOWBYTE_REGISTER = out & 127; // B001111111
    +
    303  // 14 bit - this sounds better than 12 bit, it's cleaner, less bitty, don't notice aliasing
    +
    304  AUDIO_CHANNEL_1_HIGHBYTE_REGISTER = out >> 7; // B11111110000000 becomes B1111111
    +
    305  AUDIO_CHANNEL_1_LOWBYTE_REGISTER = out & 127; // B001111111
    306 
    -
    307  }
    +
    307  }
    308 
    -
    309  // end of HIFI
    +
    309  // end of HIFI
    310 
    -
    311 #endif
    -
    312 
    +
    311 #endif
    +
    312 
    313 
    -
    314  //-----------------------------------------------------------------------------------------------------------------
    +
    314  //-----------------------------------------------------------------------------------------------------------------
    315 
    -
    316  /* Sets up Timer 0 for control interrupts. This is the same for all output
    -
    317  options Using Timer0 for control disables Arduino's time functions but also
    -
    318  saves on the interrupts and blocking action of those functions. May add a config
    -
    319  option for Using Timer2 instead if needed. (MozziTimer2 can be re-introduced for
    -
    320  that). */
    -
    321  static void startControl(unsigned int control_rate_hz)
    -
    322  {
    -
    323  // backup pre-mozzi register values
    -
    324  pre_mozzi_TCCR0A = TCCR0A;
    -
    325  pre_mozzi_TCCR0B = TCCR0B;
    -
    326  pre_mozzi_OCR0A = OCR0A;
    -
    327  pre_mozzi_TIMSK0 = TIMSK0;
    +
    316  /* Sets up Timer 0 for control interrupts. This is the same for all output
    +
    317  options Using Timer0 for control disables Arduino's time functions but also
    +
    318  saves on the interrupts and blocking action of those functions. May add a config
    +
    319  option for Using Timer2 instead if needed. (MozziTimer2 can be re-introduced for
    +
    320  that). */
    +
    321  static void startControl(unsigned int control_rate_hz)
    +
    322  {
    +
    323  // backup pre-mozzi register values
    +
    324  pre_mozzi_TCCR0A = TCCR0A;
    +
    325  pre_mozzi_TCCR0B = TCCR0B;
    +
    326  pre_mozzi_OCR0A = OCR0A;
    +
    327  pre_mozzi_TIMSK0 = TIMSK0;
    328 
    -
    329  TimerZero::init(1000000/control_rate_hz,updateControl); // set period, attach updateControl()
    -
    330  TimerZero::start();
    +
    329  TimerZero::init(1000000/control_rate_hz,updateControl); // set period, attach updateControl()
    +
    330  TimerZero::start();
    331 
    -
    332  // backup mozzi register values for unpausing later
    -
    333  mozzi_TCCR0A = TCCR0A;
    -
    334  mozzi_TCCR0B = TCCR0B;
    -
    335  mozzi_OCR0A = OCR0A;
    -
    336  mozzi_TIMSK0 = TIMSK0;
    -
    337  }
    +
    332  // backup mozzi register values for unpausing later
    +
    333  mozzi_TCCR0A = TCCR0A;
    +
    334  mozzi_TCCR0B = TCCR0B;
    +
    335  mozzi_OCR0A = OCR0A;
    +
    336  mozzi_TIMSK0 = TIMSK0;
    +
    337  }
    338 
    339 
    -
    340  void startMozzi(int control_rate_hz)
    -
    341  {
    -
    342  startControl(control_rate_hz);
    -
    343 #if (AUDIO_MODE == STANDARD)
    -
    344  startAudioStandard();
    -
    345 #elif (AUDIO_MODE == HIFI)
    -
    346  startAudioHiFi();
    -
    347 #endif
    -
    348  }
    +
    340  void startMozzi(int control_rate_hz)
    +
    341  {
    +
    342  startControl(control_rate_hz);
    +
    343 #if (AUDIO_MODE == STANDARD)
    +
    344  startAudioStandard();
    +
    345 #elif (AUDIO_MODE == HIFI)
    +
    346  startAudioHiFi();
    +
    347 #endif
    +
    348  }
    349 
    350 
    -
    351  void pauseMozzi(){
    -
    352  // restore backed up register values
    -
    353  TCCR0A = pre_mozzi_TCCR0A;
    -
    354  TCCR0B = pre_mozzi_TCCR0B;
    -
    355  OCR0A = pre_mozzi_OCR0A;
    -
    356  TIMSK0 = pre_mozzi_TIMSK0;
    +
    351  void pauseMozzi(){
    +
    352  // restore backed up register values
    +
    353  TCCR0A = pre_mozzi_TCCR0A;
    +
    354  TCCR0B = pre_mozzi_TCCR0B;
    +
    355  OCR0A = pre_mozzi_OCR0A;
    +
    356  TIMSK0 = pre_mozzi_TIMSK0;
    357 
    -
    358  TCCR1A = pre_mozzi_TCCR1A;
    -
    359  TCCR1B = pre_mozzi_TCCR1B;
    -
    360  OCR1A = pre_mozzi_OCR1A;
    -
    361  TIMSK1 = pre_mozzi_TIMSK1;
    +
    358  TCCR1A = pre_mozzi_TCCR1A;
    +
    359  TCCR1B = pre_mozzi_TCCR1B;
    +
    360  OCR1A = pre_mozzi_OCR1A;
    +
    361  TIMSK1 = pre_mozzi_TIMSK1;
    362 
    -
    363 #if (AUDIO_MODE == HIFI)
    -
    364 #if defined(TCCR2A)
    -
    365  TCCR2A = pre_mozzi_TCCR2A;
    -
    366  TCCR2B = pre_mozzi_TCCR2B;
    -
    367  OCR2A = pre_mozzi_OCR2A;
    -
    368  TIMSK2 = pre_mozzi_TIMSK2;
    -
    369 #elif defined(TCCR2)
    -
    370  TCCR2 = pre_mozzi_TCCR2;
    -
    371  OCR2 = pre_mozzi_OCR2;
    -
    372  TIMSK = pre_mozzi_TIMSK;
    -
    373 #elif defined(TCCR4A)
    -
    374  TCCR4B = pre_mozzi_TCCR4A;
    -
    375  TCCR4B = pre_mozzi_TCCR4B;
    -
    376  TCCR4B = pre_mozzi_TCCR4C;
    -
    377  TCCR4B = pre_mozzi_TCCR4D;
    -
    378  TCCR4B = pre_mozzi_TCCR4E;
    -
    379  OCR4C = pre_mozzi_OCR4C;
    -
    380  TIMSK4 = pre_mozzi_TIMSK4;
    -
    381 #endif
    -
    382 #endif
    -
    383  }
    +
    363 #if (AUDIO_MODE == HIFI)
    +
    364 #if defined(TCCR2A)
    +
    365  TCCR2A = pre_mozzi_TCCR2A;
    +
    366  TCCR2B = pre_mozzi_TCCR2B;
    +
    367  OCR2A = pre_mozzi_OCR2A;
    +
    368  TIMSK2 = pre_mozzi_TIMSK2;
    +
    369 #elif defined(TCCR2)
    +
    370  TCCR2 = pre_mozzi_TCCR2;
    +
    371  OCR2 = pre_mozzi_OCR2;
    +
    372  TIMSK = pre_mozzi_TIMSK;
    +
    373 #elif defined(TCCR4A)
    +
    374  TCCR4B = pre_mozzi_TCCR4A;
    +
    375  TCCR4B = pre_mozzi_TCCR4B;
    +
    376  TCCR4B = pre_mozzi_TCCR4C;
    +
    377  TCCR4B = pre_mozzi_TCCR4D;
    +
    378  TCCR4B = pre_mozzi_TCCR4E;
    +
    379  OCR4C = pre_mozzi_OCR4C;
    +
    380  TIMSK4 = pre_mozzi_TIMSK4;
    +
    381 #endif
    +
    382 #endif
    +
    383  }
    384 
    385 
    -
    386  void unPauseMozzi(){
    -
    387  // restore backed up register values
    -
    388  TCCR0A = mozzi_TCCR0A;
    -
    389  TCCR0B = mozzi_TCCR0B;
    -
    390  OCR0A = mozzi_OCR0A;
    -
    391  TIMSK0 = mozzi_TIMSK0;
    +
    386  void unPauseMozzi(){
    +
    387  // restore backed up register values
    +
    388  TCCR0A = mozzi_TCCR0A;
    +
    389  TCCR0B = mozzi_TCCR0B;
    +
    390  OCR0A = mozzi_OCR0A;
    +
    391  TIMSK0 = mozzi_TIMSK0;
    392 
    -
    393  TCCR1A = mozzi_TCCR1A;
    -
    394  TCCR1B = mozzi_TCCR1B;
    -
    395  OCR1A = mozzi_OCR1A;
    -
    396  TIMSK1 = mozzi_TIMSK1;
    +
    393  TCCR1A = mozzi_TCCR1A;
    +
    394  TCCR1B = mozzi_TCCR1B;
    +
    395  OCR1A = mozzi_OCR1A;
    +
    396  TIMSK1 = mozzi_TIMSK1;
    397 
    -
    398 #if (AUDIO_MODE == HIFI)
    -
    399 #if defined(TCCR2A)
    -
    400  TCCR2A = mozzi_TCCR2A;
    -
    401  TCCR2B = mozzi_TCCR2B;
    -
    402  OCR2A = mozzi_OCR2A;
    -
    403  TIMSK2 = mozzi_TIMSK2;
    -
    404 #elif defined(TCCR2)
    -
    405  TCCR2 = mozzi_TCCR2;
    -
    406  OCR2 = mozzi_OCR2;
    -
    407  TIMSK = mozzi_TIMSK;
    -
    408 #elif defined(TCCR4A)
    -
    409  TCCR4B = mozzi_TCCR4A;
    -
    410  TCCR4B = mozzi_TCCR4B;
    -
    411  TCCR4B = mozzi_TCCR4C;
    -
    412  TCCR4B = mozzi_TCCR4D;
    -
    413  TCCR4B = mozzi_TCCR4E;
    -
    414  OCR4C = mozzi_OCR4C;
    -
    415  TIMSK4 = mozzi_TIMSK4;
    -
    416 #endif
    -
    417 #endif
    -
    418  }
    -
    419 
    +
    398 #if (AUDIO_MODE == HIFI)
    +
    399 #if defined(TCCR2A)
    +
    400  TCCR2A = mozzi_TCCR2A;
    +
    401  TCCR2B = mozzi_TCCR2B;
    +
    402  OCR2A = mozzi_OCR2A;
    +
    403  TIMSK2 = mozzi_TIMSK2;
    +
    404 #elif defined(TCCR2)
    +
    405  TCCR2 = mozzi_TCCR2;
    +
    406  OCR2 = mozzi_OCR2;
    +
    407  TIMSK = mozzi_TIMSK;
    +
    408 #elif defined(TCCR4A)
    +
    409  TCCR4B = mozzi_TCCR4A;
    +
    410  TCCR4B = mozzi_TCCR4B;
    +
    411  TCCR4B = mozzi_TCCR4C;
    +
    412  TCCR4B = mozzi_TCCR4D;
    +
    413  TCCR4B = mozzi_TCCR4E;
    +
    414  OCR4C = mozzi_OCR4C;
    +
    415  TIMSK4 = mozzi_TIMSK4;
    +
    416 #endif
    +
    417 #endif
    +
    418  }
    +
    419 
    420 
    -
    421  unsigned long mozziMicros(){
    -
    422  return output_buffer_tail / MICROS_PER_AUDIO_TICK;
    -
    423  }
    +
    421  unsigned long mozziMicros(){
    +
    422  return output_buffer_tail / MICROS_PER_AUDIO_TICK;
    +
    423  }
    424 
    -
    425  // Unmodified TimerOne.cpp has TIMER3_OVF_vect.
    -
    426  // Watch out if you update the library file.
    -
    427  // The symptom will be no sound.
    -
    428  // ISR(TIMER1_OVF_vect)
    -
    429  // {
    -
    430  // Timer1.isrCallback();
    -
    431  // }
    +
    425  // Unmodified TimerOne.cpp has TIMER3_OVF_vect.
    +
    426  // Watch out if you update the library file.
    +
    427  // The symptom will be no sound.
    +
    428  // ISR(TIMER1_OVF_vect)
    +
    429  // {
    +
    430  // Timer1.isrCallback();
    +
    431  // }
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    MozziGuts.h File Reference
    +
    +
    +
    #include "mozzi_config.h"
    +#include "TimerZero.h"
    +#include "TimerOne.h"
    +#include "FrequencyTimer2.h"
    +#include "AudioConfigStandard9bitPwm.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + +

    +Macros

    #define CONTROL_RATE   64
     Control rate setting. More...
     
    #define STANDARD   0
     Used to set AUDIO_MODE to STANDARD. More...
     
    #define HIFI   1
     Used to set AUDIO_MODE to HIFI. More...
     
    #define AUDIO_RATE_AS_LSHIFT   14
     
    #define MICROS_PER_AUDIO_TICK   61
     
    + + + + + + + +

    +Typedefs

    typedef unsigned char uchar
     
    typedef unsigned int uint
     
    typedef unsigned long ulong
     
    + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void startMozzi (int control_rate_hz=CONTROL_RATE)
     Sets up the timers for audio and control rate processes, storing the timer registers so they can be restored when Mozzi stops. More...
     
    void pauseMozzi ()
     Stops audio and control interrupts and restores the timers to the values they had before Mozzi was started. More...
     
    void unPauseMozzi ()
     Restores Mozzi audio and control interrupts, if they have been temporarily disabled with pauseMozzi(). More...
     
    int updateAudio ()
     This is where you put your audio code. More...
     
    void updateControl ()
     This is where you put your control code. More...
     
    void audioHook ()
     This is required in Arduino's loop(). More...
     
    int getAudioInput ()
     This returns audio input from the input buffer, if #define USE_AUDIO_INPUT true is in the Mozzi/mozzi_config.h file. More...
     
    unsigned long mozziMicros ()
     A replacement for Arduino micros() which is disabled by Mozzi which takes over Timer 0 for control interrupts. More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define AUDIO_RATE_AS_LSHIFT   14
    +
    + +

    Definition at line 146 of file MozziGuts.h.

    + +
    +
    + +
    +
    + + + + +
    #define MICROS_PER_AUDIO_TICK   61
    +
    + +

    Definition at line 147 of file MozziGuts.h.

    + +
    +
    +

    Typedef Documentation

    + +
    +
    + + + + +
    typedef unsigned char uchar
    +
    + +

    Definition at line 161 of file MozziGuts.h.

    + +
    +
    + +
    +
    + + + + +
    typedef unsigned int uint
    +
    + +

    Definition at line 162 of file MozziGuts.h.

    + +
    +
    + +
    +
    + + + + +
    typedef unsigned long ulong
    +
    + +

    Definition at line 163 of file MozziGuts.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_mozzi_guts_8h.js b/doc/html/_mozzi_guts_8h.js new file mode 100644 index 000000000..f22a24dc5 --- /dev/null +++ b/doc/html/_mozzi_guts_8h.js @@ -0,0 +1,19 @@ +var _mozzi_guts_8h = +[ + [ "AUDIO_RATE_AS_LSHIFT", "_mozzi_guts_8h.html#a4185aa30186b5d63775b5e1d50df1df9", null ], + [ "CONTROL_RATE", "_mozzi_guts_8h.html#gae5d737db8bc97ecf08d2ea3121782d26", null ], + [ "HIFI", "_mozzi_guts_8h.html#gae99eb43cb29bb03d862ae829999916c4", null ], + [ "MICROS_PER_AUDIO_TICK", "_mozzi_guts_8h.html#a25f09c512cd3a187d19eb7fd1d54d558", null ], + [ "STANDARD", "_mozzi_guts_8h.html#ga0b8ca8ad62b88c01b639bad62eafcbf1", null ], + [ "uchar", "_mozzi_guts_8h.html#a65f85814a8290f9797005d3b28e7e5fc", null ], + [ "uint", "_mozzi_guts_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14", null ], + [ "ulong", "_mozzi_guts_8h.html#a718b4eb2652c286f4d42dc18a8e71a1a", null ], + [ "audioHook", "_mozzi_guts_8h.html#ga2fca37b988ab369e2f3c3108c683e59d", null ], + [ "getAudioInput", "_mozzi_guts_8h.html#ga3f15eb8d6694020d170ebcbedb645de7", null ], + [ "mozziMicros", "_mozzi_guts_8h.html#gaaa6a42d80c5297407a45ca8bf3c1c7fe", null ], + [ "pauseMozzi", "_mozzi_guts_8h.html#ga0dc2dc3b2c20b081df4d55ad039f64e5", null ], + [ "startMozzi", "_mozzi_guts_8h.html#ga75aa9f4a501f4b167343b8caac8c6837", null ], + [ "unPauseMozzi", "_mozzi_guts_8h.html#ga1718c5f0bbb56cc4b2db55702750f43f", null ], + [ "updateAudio", "_mozzi_guts_8h.html#gaab0d2c840c1aac4bb5f9b8ef5df30f6a", null ], + [ "updateControl", "_mozzi_guts_8h.html#ga59d187b915b2e366c88489e52801951a", null ] +]; \ No newline at end of file diff --git a/doc/html/_mozzi_guts_8h_source.html b/doc/html/_mozzi_guts_8h_source.html index a35ae3237..211a5ebb2 100644 --- a/doc/html/_mozzi_guts_8h_source.html +++ b/doc/html/_mozzi_guts_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    MozziGuts.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * MozziGuts.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,99 +132,290 @@
    20  *
    21  */
    22 
    -
    23 #ifndef MOZZIGUTS_H_
    -
    24 #define MOZZIGUTS_H_
    -
    25 
    -
    26 #if F_CPU != 16000000
    -
    27 #error Mozzi expects a cpu clock speed of 16MHz!
    -
    28 #endif
    -
    29 
    +
    23 #ifndef MOZZIGUTS_H_
    +
    24 #define MOZZIGUTS_H_
    +
    25 
    +
    26 #if F_CPU != 16000000
    +
    27 #error Mozzi expects a cpu clock speed of 16MHz!
    +
    28 #endif
    +
    29 
    30 
    -
    31 #include "mozzi_config.h" // User can change the config file to set audio mode
    -
    32 #include "TimerZero.h"
    -
    33 #include "TimerOne.h"
    -
    34 #include "FrequencyTimer2.h"
    +
    31 #include "mozzi_config.h" // User can change the config file to set audio mode
    +
    32 #include "TimerZero.h"
    +
    33 #include "TimerOne.h"
    +
    34 #include "FrequencyTimer2.h"
    35 
    -
    89 #define CONTROL_RATE 64
    -
    90 
    -
    91 
    -
    92 
    -
    121 #define STANDARD 0
    -
    122 
    -
    123 
    -
    124 
    -
    178 #define HIFI 1
    -
    179 
    -
    180 
    -
    181 #if (AUDIO_MODE == STANDARD) && (AUDIO_RATE == 32768)
    -
    182 #error AUDIO_RATE 32768 does not work when AUDIO_MODE is STANDARD, check settings in Mozzi/mozzi_config.h
    -
    183 #endif
    -
    184 
    -
    185 
    -
    186 #if AUDIO_RATE == 16384
    -
    187 #define AUDIO_RATE_AS_LSHIFT 14
    -
    188 #define MICROS_PER_AUDIO_TICK 61 // 1000000 / 16384 = 61.035, ...* 256 = 15625
    -
    189 #elif AUDIO_RATE == 32768
    -
    190 #define AUDIO_RATE_AS_LSHIFT 15
    -
    191 #define MICROS_PER_AUDIO_TICK 31 // = 1000000 / 32768 = 30.518, ...* 256 = 7812.6
    -
    192 #endif
    -
    193 
    -
    194 
    -
    195 #if AUDIO_MODE == STANDARD
    -
    196 #include "AudioConfigStandard9bitPwm.h"
    -
    197 #elif AUDIO_MODE == HIFI
    -
    198 #include "AudioConfigHiSpeed14bitPwm.h"
    -
    199 #endif
    -
    200 
    -
    201 // common abbreviations
    -
    202 typedef unsigned char uchar;
    -
    203 typedef unsigned int uint;
    -
    204 typedef unsigned long ulong;
    -
    205 
    -
    206 
    -
    207 
    -
    208 
    -
    236 void startMozzi(int control_rate_hz = CONTROL_RATE);
    -
    237 
    -
    238 
    -
    239 
    -
    256 void pauseMozzi();
    -
    257 
    -
    258 
    -
    259 
    -
    266 void unPauseMozzi();
    -
    267 
    -
    275 int updateAudio();
    -
    276 
    -
    277 
    -
    284 void updateControl();
    -
    285 
    -
    286 
    -
    301 void audioHook();
    -
    302 
    -
    303 
    -
    304 
    -
    319 #if (USE_AUDIO_INPUT == true)
    -
    320 int getAudioInput();
    -
    321 #endif
    -
    322 
    -
    323 
    -
    331 unsigned long mozziMicros();
    -
    332 
    -
    333 
    -
    334 // internal use
    -
    335 #if (AUDIO_MODE == HIFI)
    -
    336 static void setupTimer2();
    -
    337 #endif
    -
    338 
    -
    339 #endif /* MOZZIGUTS_H_ */
    +
    36 
    +
    37 /** @ingroup core
    +
    38 Control rate setting.
    +
    39 Mozzi's CONTROL_RATE sets how many times per second updateControl() is called.
    +
    40 It can be any power of 2 greater than 64, and the largest value where it starts
    +
    41 to become impractical is around 1024. 64, 128, 256 and sometimes 512 are all
    +
    42 usable values. Try to keep it as low as you can, for efficiency, though higher
    +
    43 rates can sometimes give smoother results, avoiding the need to interpolate
    +
    44 sensitive variables at audio rate in updateAudio(). CONTROL_RATE has a default
    +
    45 of 64 Hz, but it can be changed at the top of your sketch, after the \#includes,
    +
    46 for example: \#define CONTROL_RATE 256
    +
    47 */
    +
    48 #define CONTROL_RATE 64
    +
    49 
    +
    50 
    +
    51 
    +
    52 /** @ingroup core
    +
    53 Used to set AUDIO_MODE to STANDARD.
    +
    54 Use \#define AUDIO_MODE STANDARD in Mozzi/config.h to select Mozzi's original audio
    +
    55 output configuration, which is nearly 9 bit sound (-244 to 243) at 16384 Hz and
    +
    56 16384 Hz pwm rate. It uses Timer 1 to output samples at AUDIO_RATE 16384 Hz,
    +
    57 with an interrupt being called once every PWM cycle to set the timer's own pwm
    +
    58 level.
    +
    59 
    +
    60 Advantages: Only uses one timer for audio, and one output pin
    +
    61 Disadvantages: low dynamic range, some people can hear pwm carrier frequency, may need simple hardware filter.
    +
    62 
    +
    63 Below is a list of the Digital Pins used by Mozzi for STANDARD mode PWM audio out on different boards.
    +
    64 Those which have been tested and reported to work have an x.
    +
    65 Feedback about others is welcome.
    +
    66 
    +
    67 x....9........Arduino Uno \n
    +
    68 x....9........Arduino Duemilanove \n
    +
    69 x....9........Arduino Nano \n
    +
    70 x....9........Arduino Leonardo \n
    +
    71 x....9........Ardweeny \n
    +
    72 x....9........Boarduino \n
    +
    73 x...11.......Freetronics EtherMega \n
    +
    74 x...11.......Arduino Mega \n
    +
    75 ....14........Teensy \n
    +
    76 x..B5........Teensy2 \n
    +
    77 x..B5(25)..Teensy2++ \n
    +
    78 ....13 .......Sanguino \n
    +
    79 */
    +
    80 #define STANDARD 0
    +
    81 
    +
    82 
    +
    83 
    +
    84 /** @ingroup core
    +
    85 Used to set AUDIO_MODE to HIFI.
    +
    86 Use \#define AUDIO_MODE HIFI in Mozzi/config.h to set the audio mode to HIFI for output 14 bit sound at 16384 Hz sample rate and 125kHz PWM rate.
    +
    87 The high PWM rate of HIFI mode places the carrier frequency beyond audible range,
    +
    88 overcoming one of the disadvantages of STANDARD mode.
    +
    89 
    +
    90 Also, 14 bits of dynamic range in HIFI mode provides more definition than the nearly 9 bits in STANDARD mode.
    +
    91 HIFI mode takes about the same amount of processing time as STANDARD mode, and sounds clearer and brighter.
    +
    92 However, it requires an extra timer to be used on the Arduino, which could increase the chances of
    +
    93 conflicts with other libraries or processes if they rely on Timer 2.
    +
    94 
    +
    95 Timer 1 is used to provide the PWM output at 125kHz.
    +
    96 Timer 2 generates an interrupt at AUDIO_RATE 16384 Hz, which sets the Timer1 PWM levels.
    +
    97 HIFI mode uses 2 output pins, and sums their outputs with resistors, so is slightly less convenient for
    +
    98 rapid prototyping where you could listen to STANDARD mode by connecting the single output pin
    +
    99 directly to a speaker or audio input (though a resistor of about 100 ohms is recommended).
    +
    100 
    +
    101 The resistors needed for HIFI output are 3.9k and 1M, with 1% or better tolerance.
    +
    102 Use a multimeter to test a group of 1% resistors to find the most accurate.
    +
    103 
    +
    104 On 328 based Arduino boards, output is on Timer1, with the low byte on Pin 10 and high byte on Pin 9.
    +
    105 Add the signals through a 3.9k resistor on high byte pin (9) and 1M resistor on low byte pin (10).
    +
    106 Also, a 4.7nF capacitor is recommended between the summing junction of the resistors and ground.
    +
    107 
    +
    108 This dual PWM technique is discussed on http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/
    +
    109 Also, there are higher quality output circuits are on the site.
    +
    110 
    +
    111 Advantages: higher quality sound than STANDARD mode. Doesn't need a notch filter on
    +
    112 the audio signal because the carrier frequency is out of hearing range.
    +
    113 
    +
    114 Disadvantages: requires 2 pins, 2 resistors and a capacitor, so it's not so quick to set up compared
    +
    115 to a rough, direct single-pin output in STANDARD mode.
    +
    116 
    +
    117 Pins and where to put the resistors on various boards for HIFI mode.
    +
    118 Boards tested in HIFI mode have an x, though most of these have been tested in STANDARD mode
    +
    119 and there's no reason for them not to work in HIFI (unless the pin number is wrong or something).
    +
    120 Any reports are welcome. \n
    +
    121 
    +
    122 resistor.....3.9k......1M \n
    +
    123 x................9..........10...............Arduino Uno \n
    +
    124 x................9..........10...............Arduino Duemilanove \n
    +
    125 x................9..........10...............Arduino Nano \n
    +
    126 x................9..........10...............Arduino Leonardo \n
    +
    127 x................9..........10...............Ardweeny \n
    +
    128 x................9..........10...............Boarduino \n
    +
    129 x...............11.........12...............Freetronics EtherMega \n
    +
    130 .................11.........12...............Arduino Mega \n
    +
    131 .................14.........15...............Teensy \n
    +
    132 .............B5(14)...B6(15)...........Teensy2 \n
    +
    133 x...........B5(25)...B6(26)...........Teensy2++ \n
    +
    134 .................13.........12...............Sanguino \n
    +
    135 
    +
    136 */
    +
    137 #define HIFI 1
    +
    138 
    +
    139 
    +
    140 #if (AUDIO_MODE == STANDARD) && (AUDIO_RATE == 32768)
    +
    141 #error AUDIO_RATE 32768 does not work when AUDIO_MODE is STANDARD, check settings in Mozzi/mozzi_config.h
    +
    142 #endif
    +
    143 
    +
    144 
    +
    145 #if AUDIO_RATE == 16384
    +
    146 #define AUDIO_RATE_AS_LSHIFT 14
    +
    147 #define MICROS_PER_AUDIO_TICK 61 // 1000000 / 16384 = 61.035, ...* 256 = 15625
    +
    148 #elif AUDIO_RATE == 32768
    +
    149 #define AUDIO_RATE_AS_LSHIFT 15
    +
    150 #define MICROS_PER_AUDIO_TICK 31 // = 1000000 / 32768 = 30.518, ...* 256 = 7812.6
    +
    151 #endif
    +
    152 
    +
    153 
    +
    154 #if AUDIO_MODE == STANDARD
    + +
    156 #elif AUDIO_MODE == HIFI
    +
    157 #include "AudioConfigHiSpeed14bitPwm.h"
    +
    158 #endif
    +
    159 
    +
    160 // common abbreviations
    +
    161 typedef unsigned char uchar;
    +
    162 typedef unsigned int uint;
    +
    163 typedef unsigned long ulong;
    +
    164 
    +
    165 
    +
    166 
    +
    167 
    +
    168 /** @ingroup core
    +
    169 Sets up the timers for audio and control rate processes, storing the timer
    +
    170 registers so they can be restored when Mozzi stops. startMozzi() goes in your sketch's
    +
    171 setup() routine.
    +
    172 
    +
    173 In STANDARD and HIFI modes, Mozzi uses Timer 0 for control interrupts 0, disabling Arduino
    +
    174 delay(), millis(), micros() and delayMicroseconds.
    +
    175 For delaying events, you can use Mozzi's EventDelay() unit instead (not to be confused with AudioDelay()).
    +
    176 
    +
    177 In STANDARD mode, startMozzi() starts Timer 1 for PWM output and audio output interrupts,
    +
    178 and in HIFI mode, Mozzi uses Timer 1 for PWM and Timer2 for audio interrupts.
    +
    179 
    +
    180 The audio rate is currently fixed at 16384 Hz.
    +
    181 
    +
    182 @param control_rate_hz Sets how often updateControl() is called. It can be any
    +
    183 power of 2 above and including 64. The practical upper limit for control rate
    +
    184 depends on how busy the processor is, and you might need to do some tests to
    +
    185 find the best setting.
    +
    186 
    +
    187 It's good to define CONTROL_RATE in your
    +
    188 sketches (eg. \#define CONTROL_RATE 128) because the literal numeric value is
    +
    189 necessary for Oscils to work properly, and it also helps to keep the
    +
    190 calculations in your sketch clear.
    +
    191 
    +
    192 @todo See if there is any advantage to using 8 bit port, without pwm, with a resistor ladder
    +
    193 (maybe use readymade resistor networks).
    +
    194 */
    +
    195 void startMozzi(int control_rate_hz = CONTROL_RATE);
    +
    196 
    +
    197 
    +
    198 
    +
    199 /** @ingroup core
    +
    200 Stops audio and control interrupts and restores the timers to the values they
    +
    201 had before Mozzi was started. This will enable the standard Arduino time
    +
    202 functions millis(), micros(), delay(), and delayMicroseconds(). This could be
    +
    203 useful when using sensor libraries which depend on the same timers as Mozzi.
    +
    204 
    +
    205 A potentially better option for resolving timer conflicts involves using
    +
    206 non-blocking methods, such as demonstrated by the twowire_nonblock code in the
    +
    207 forked version of Mozzi on github, so sound production can continue while
    +
    208 reading sensors.
    +
    209 
    +
    210 As it is, pauseMozzi restores all the Timers used by Mozzi to their previous
    +
    211 settings. Another scenario which could be easily hacked in MozziGuts.cpp could
    +
    212 involve individually saving and restoring particular Timer registers depending
    +
    213 on which one(s) are required for other tasks, so for example the control
    +
    214 interrupt (Timer 0) could be suspended while audio continues.*/
    +
    215 void pauseMozzi();
    +
    216 
    +
    217 
    +
    218 
    +
    219 /** @ingroup core
    +
    220 Restores Mozzi audio and control interrupts, if they have been temporarily
    +
    221 disabled with pauseMozzi(). This once more takes over Timer 0, and stops the
    +
    222 Arduino time functions millis(), micros(), delay(), and delayMicroseconds() from
    +
    223 working.
    +
    224 */
    +
    225 void unPauseMozzi();
    +
    226 
    +
    227 /** @ingroup core
    +
    228 This is where you put your audio code. updateAudio() has to keep up with the
    +
    229 AUDIO_RATE of 16384 Hz, so to keep things running smoothly, avoid doing any
    +
    230 calculations here which could be done in setup() or updateControl().
    +
    231 @return an audio sample. In STANDARD mode this is between -244 and 243 inclusive.
    +
    232 In HIFI mode, it's a 14 bit number between -16384 and 16383 inclusive.
    +
    233 */
    +
    234 int updateAudio();
    +
    235 
    +
    236 
    +
    237 /** @ingroup core
    +
    238 This is where you put your control code. You need updateControl() somewhere in
    +
    239 your sketch, even if it's empty. updateControl() is called at the control rate
    +
    240 you set in startMozzi(). To save processor load, avoid any calculations here
    +
    241 which could be done in setup().
    +
    242 */
    +
    243 void updateControl();
    +
    244 
    +
    245 
    +
    246 /** @ingroup core
    +
    247 This is required in Arduino's loop(). If there is room in Mozzi's output buffer,
    +
    248 audioHook() calls updateAudio() once and puts the result into the output
    +
    249 buffer. Also, if \#define USE_AUDIO_INPUT true is in Mozzi/mozzi_config.h,
    +
    250 audioHook() takes care of moving audio input from the input buffer so it can be
    +
    251 accessed with getAudioInput() in your updateAudio() routine.
    +
    252 If other functions are called in loop() along with audioHook(), see if
    +
    253 they can be called less often by moving them into updateControl(),
    +
    254 to save processing power. Otherwise it may be most efficient to
    +
    255 calculate a block of samples at a time by putting audioHook() in a loop of its
    +
    256 own, rather than calculating only 1 sample for each time your other functions
    +
    257 are called.
    +
    258 @todo Try pre-decrement positions and swap gap calc around
    +
    259 */
    +
    260 void audioHook();
    +
    261 
    +
    262 
    +
    263 
    +
    264 /** @ingroup analog
    +
    265 This returns audio input from the input buffer, if
    +
    266 \#define USE_AUDIO_INPUT true is in the Mozzi/mozzi_config.h file.
    +
    267 Audio input is currently restricted to analog pin 0 (this may change in future).
    +
    268 The audio signal needs to be in the range 0 to 5 volts.
    +
    269 Circuits and discussions about biasing a signal
    +
    270 in the middle of this range can be found at
    +
    271 http://electronics.stackexchange.com/questions/14404/dc-biasing-audio-signal
    +
    272 and
    +
    273 http://interface.khm.de/index.php/lab/experiments/arduino-realtime-audio-processing/ .
    +
    274 A circuit and instructions for amplifying and biasing a microphone signal can be found at
    +
    275 http://www.instructables.com/id/Arduino-Audio-Input/?ALLSTEPS
    +
    276 @return audio data from the input buffer
    +
    277 */
    +
    278 #if (USE_AUDIO_INPUT == true)
    +
    279 int getAudioInput();
    +
    280 #endif
    +
    281 
    +
    282 
    +
    283 /** @ingroup core
    +
    284 A replacement for Arduino micros() which is disabled by Mozzi which takes over
    +
    285 Timer 0 for control interrupts. mozziMicros is updated each time an audio sample
    +
    286 is output, so the resolution is 1/AUDIO_RATE (61 microseconds when AUDIO_RATE is
    +
    287 16384 Hz).
    +
    288 @return the approximate number of microseconds since the program began.
    +
    289 @todo incorporate mozziMicros() in a more accurate EventDelay()?
    +
    290 */
    +
    291 unsigned long mozziMicros();
    +
    292 
    +
    293 
    +
    294 // internal use
    +
    295 #if (AUDIO_MODE == HIFI)
    +
    296 static void setupTimer2();
    +
    297 #endif
    +
    298 
    +
    299 #endif /* MOZZIGUTS_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Oscil.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include "MozziGuts.h"
    +#include "mozzi_fixmath.h"
    +#include <util/atomic.h>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Oscil< NUM_TABLE_CELLS, UPDATE_RATE >
     Oscil plays a wavetable, cycling through the table to generate an audio or control signal. More...
     
    + + + + + + + +

    +Macros

    #define OSCIL_F_BITS   16
     
    #define OSCIL_F_BITS_AS_MULTIPLIER   65536
     
    #define OSCIL_PHMOD_BITS   16
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define OSCIL_F_BITS   16
    +
    + +

    Definition at line 43 of file Oscil.h.

    + +
    +
    + +
    +
    + + + + +
    #define OSCIL_F_BITS_AS_MULTIPLIER   65536
    +
    + +

    Definition at line 44 of file Oscil.h.

    + +
    +
    + +
    +
    + + + + +
    #define OSCIL_PHMOD_BITS   16
    +
    + +

    Definition at line 48 of file Oscil.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_oscil_8h.js b/doc/html/_oscil_8h.js new file mode 100644 index 000000000..9f39ba7de --- /dev/null +++ b/doc/html/_oscil_8h.js @@ -0,0 +1,7 @@ +var _oscil_8h = +[ + [ "Oscil", "class_oscil.html", "class_oscil" ], + [ "OSCIL_F_BITS", "_oscil_8h.html#ac56378fc562b31f0577239f247bb77de", null ], + [ "OSCIL_F_BITS_AS_MULTIPLIER", "_oscil_8h.html#a1def188e920ba47ca3f20db2d050197a", null ], + [ "OSCIL_PHMOD_BITS", "_oscil_8h.html#a31da948e750069ed5a88783a36cb9ec6", null ] +]; \ No newline at end of file diff --git a/doc/html/_oscil_8h_source.html b/doc/html/_oscil_8h_source.html index 14362883f..3c48c750d 100644 --- a/doc/html/_oscil_8h_source.html +++ b/doc/html/_oscil_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Oscil.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Oscil.h
    3  *
    4  * Oscil.h owes much to AF_precision_synthesis.pde, 2009, Adrian Freed.
    @@ -126,224 +134,334 @@
    22  *
    23  */
    24 
    -
    25 #ifndef OSCIL_H_
    -
    26 #define OSCIL_H_
    -
    27 
    -
    28 #if ARDUINO >= 100
    -
    29  #include "Arduino.h"
    -
    30 #else
    -
    31  #include "WProgram.h"
    -
    32 #endif
    -
    33 #include "MozziGuts.h"
    -
    34 #include "mozzi_fixmath.h"
    -
    35 #include <util/atomic.h>
    +
    25 #ifndef OSCIL_H_
    +
    26 #define OSCIL_H_
    +
    27 
    +
    28 #if ARDUINO >= 100
    +
    29  #include "Arduino.h"
    +
    30 #else
    +
    31  #include "WProgram.h"
    +
    32 #endif
    +
    33 #include "MozziGuts.h"
    +
    34 #include "mozzi_fixmath.h"
    +
    35 #include <util/atomic.h>
    36 
    37 
    -
    38 #ifdef OSCIL_DITHER_PHASE
    -
    39 #include "mozzi_rand.h"
    -
    40 #endif
    -
    41 
    +
    38 #ifdef OSCIL_DITHER_PHASE
    +
    39 #include "mozzi_rand.h"
    +
    40 #endif
    +
    41 
    42 // fractional bits for oscillator index precision
    -
    43 #define OSCIL_F_BITS 16
    -
    44 #define OSCIL_F_BITS_AS_MULTIPLIER 65536
    -
    45 
    +
    43 #define OSCIL_F_BITS 16
    +
    44 #define OSCIL_F_BITS_AS_MULTIPLIER 65536
    +
    45 
    46 // phmod_proportion is an 1n15 fixed-point number only using
    47 // the fractional part and the sign bit
    -
    48 #define OSCIL_PHMOD_BITS 16
    -
    49 
    +
    48 #define OSCIL_PHMOD_BITS 16
    +
    49 
    50 
    51 
    +
    52 /**
    +
    53 Oscil plays a wavetable, cycling through the table to generate an audio or
    +
    54 control signal. The frequency of the signal can be set or changed with
    +
    55 setFreq(), and the output of an Oscil can be produced with next() for a simple
    +
    56 cycling oscillator, or atIndex() for a particular sample in the table.
    +
    57 @tparam NUM_TABLE_CELLS This is defined in the table ".h" file the Oscil will be
    +
    58 using. It's important that it's a power of 2, and either a literal number (eg. "8192") or a
    +
    59 defined macro, rather than a const or int, for the Oscil to run fast enough.
    +
    60 @tparam UPDATE_RATE This will be AUDIO_RATE if the Oscil is updated in
    +
    61 updateAudio(), or CONTROL_RATE if it's updated each time updateControl() is
    +
    62 called. It could also be a fraction of CONTROL_RATE if you are doing some kind
    +
    63 of cyclic updating in updateControl(), for example, to spread out the processor load.
    +
    64 @todo Use conditional compilation to optimise setFreq() variations for different table
    +
    65 sizes.
    +
    66 @note If you #define OSCIL_DITHER_PHASE before you #include <Oscil.h>,
    +
    67 the phase increments will be dithered, which reduces spurious frequency spurs
    +
    68 in the audio output, at the cost of some extra processing and memory.
    +
    69 @section char2mozzi
    +
    70 Converting soundfiles for Mozzi
    +
    71 There is a python script called char2mozzi.py in the Mozzi/python folder.
    +
    72 The usage is:
    +
    73 python char2mozzi.py infilename outfilename tablename samplerate
    +
    74 */
    75 //template <unsigned int NUM_TABLE_CELLS, unsigned int UPDATE_RATE, bool DITHER_PHASE=false>
    76 template <unsigned int NUM_TABLE_CELLS, unsigned int UPDATE_RATE>
    -
    77 class Oscil
    +
    77 class Oscil
    78 {
    79 
    80 
    81 public:
    -
    87  Oscil(const char * TABLE_NAME):table(TABLE_NAME)
    -
    88  {}
    +
    82  /** Constructor.
    +
    83  @param TABLE_NAME the name of the array the Oscil will be using. This
    +
    84  can be found in the table ".h" file if you are using a table made for
    +
    85  Mozzi by the char2mozzi.py python script in Mozzi's python
    +
    86  folder.*/
    +
    87  Oscil(const char * TABLE_NAME):table(TABLE_NAME)
    +
    88  {}
    89 
    90 
    - -
    98  {}
    +
    91  /** Constructor.
    +
    92  Declare an Oscil with template TABLE_NUM_CELLS and UPDATE_RATE
    +
    93  parameters, without specifying a particular wave table for it to play.
    +
    94  The table can be set or changed on the fly with setTable(). Any tables
    +
    95  used by the Oscil must be the same size.
    +
    96  */
    + +
    98  {}
    99 
    100 
    -
    105  inline
    -
    106  char next()
    -
    107  {
    -
    108  incrementPhase();
    -
    109  return readTable();
    -
    110  }
    +
    101  /** Updates the phase according to the current frequency
    +
    102  and returns the sample at the new phase position.
    +
    103  @return the next sample.
    +
    104  */
    +
    105  inline
    +
    106  char next()
    +
    107  {
    +
    108  incrementPhase();
    +
    109  return readTable();
    +
    110  }
    111 
    112 
    -
    116  void setTable(const char * TABLE_NAME)
    -
    117  {
    -
    118  table = TABLE_NAME;
    -
    119  }
    +
    113  /** Change the sound table which will be played by the Oscil.
    +
    114  @param TABLE_NAME is the name of the array in the table ".h" file you're using.
    +
    115  */
    +
    116  void setTable(const char * TABLE_NAME)
    +
    117  {
    +
    118  table = TABLE_NAME;
    +
    119  }
    120 
    121 
    -
    126  // This could be called in the control interrupt, so phase_fractional should really be volatile,
    -
    127  // but that could limit optimisation. Since phase_fractional gets changed often in updateAudio()
    -
    128  // (in loop()), it's probably worth keeping it nonvolatile until it causes problems
    -
    129  void setPhase(unsigned int phase)
    -
    130  {
    -
    131  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    132  {
    -
    133  phase_fractional = (unsigned long)phase << OSCIL_F_BITS;
    -
    134  }
    -
    135  }
    +
    122  /** Set the phase of the Oscil. This does the same thing as Sample::start(offset). Just different ways of thinking about oscillators and samples.
    +
    123  @param phase a position in the wavetable.
    +
    124  @todo Test commenting out ATOMIC_BLOCK in setPhase(), setFreq(), etc.
    +
    125  */
    +
    126  // This could be called in the control interrupt, so phase_fractional should really be volatile,
    +
    127  // but that could limit optimisation. Since phase_fractional gets changed often in updateAudio()
    +
    128  // (in loop()), it's probably worth keeping it nonvolatile until it causes problems
    +
    129  void setPhase(unsigned int phase)
    +
    130  {
    +
    131  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    132  {
    +
    133  phase_fractional = (unsigned long)phase << OSCIL_F_BITS;
    +
    134  }
    +
    135  }
    136 
    -
    141  // This could be called in the control interrupt, so phase_fractional should really be volatile,
    -
    142  // but that could limit optimisation. Since phase_fractional gets changed often in updateAudio()
    -
    143  // (in loop()), it's probably worth keeping it nonvolatile until it causes problems
    -
    144  void setPhaseFractional(unsigned long phase)
    -
    145  {
    -
    146  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    147  {
    -
    148  phase_fractional = phase;
    -
    149  }
    -
    150  }
    +
    137  /** Set the phase of the Oscil. Might be useful with getPhaseFractional().
    +
    138  @param phase a position in the wavetable.
    +
    139  @todo Test commenting out ATOMIC_BLOCK in setPhase(), setFreq(), etc.
    +
    140  */
    +
    141  // This could be called in the control interrupt, so phase_fractional should really be volatile,
    +
    142  // but that could limit optimisation. Since phase_fractional gets changed often in updateAudio()
    +
    143  // (in loop()), it's probably worth keeping it nonvolatile until it causes problems
    +
    144  void setPhaseFractional(unsigned long phase)
    +
    145  {
    +
    146  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    147  {
    +
    148  phase_fractional = phase;
    +
    149  }
    +
    150  }
    151 
    152 
    -
    156  unsigned long getPhaseFractional()
    -
    157  {
    -
    158  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    159  {
    -
    160  return phase_fractional;
    -
    161  }
    -
    162  }
    +
    153  /** Get the phase of the Oscil in fractional format.
    +
    154  @return position in the wavetable, shifted left by OSCIL_F_BITS (which is 16 when this was written).
    +
    155  */
    +
    156  unsigned long getPhaseFractional()
    +
    157  {
    +
    158  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    159  {
    +
    160  return phase_fractional;
    +
    161  }
    +
    162  }
    163 
    164 
    165 
    -
    174  // PM: cos((angle += incr) + change)
    -
    175  // FM: cos(angle += (incr + change))
    -
    176  // The ratio of deviation to modulation frequency is called the "index of modulation". ( I = d / Fm )
    -
    177  inline
    -
    178  char phMod(Q15n16 phmod_proportion)
    -
    179  {
    -
    180  incrementPhase();
    -
    181  return (char)pgm_read_byte_near(table + (((phase_fractional+(phmod_proportion * NUM_TABLE_CELLS))>>OSCIL_F_BITS) & (NUM_TABLE_CELLS - 1)));
    -
    182  }
    +
    166  /** Returns the next sample given a phase modulation value.
    +
    167  @param phmod_proportion a phase modulation value given as a proportion of the wave. The
    +
    168  phmod_proportion parameter is a Q15n16 fixed-point number where the fractional
    +
    169  n16 part represents -1 to 1, modulating the phase by one whole table length in
    +
    170  each direction.
    +
    171  @return a sample from the table.
    +
    172  @todo does the phmod_proportion param need to be Q15n16, why not Q0n15 and cast to long for multiply?
    +
    173  */
    +
    174  // PM: cos((angle += incr) + change)
    +
    175  // FM: cos(angle += (incr + change))
    +
    176  // The ratio of deviation to modulation frequency is called the "index of modulation". ( I = d / Fm )
    +
    177  inline
    +
    178  char phMod(Q15n16 phmod_proportion)
    +
    179  {
    +
    180  incrementPhase();
    +
    181  return (char)pgm_read_byte_near(table + (((phase_fractional+(phmod_proportion * NUM_TABLE_CELLS))>>OSCIL_F_BITS) & (NUM_TABLE_CELLS - 1)));
    +
    182  }
    183 
    184 
    -
    192  inline
    -
    193  void setFreq (int frequency) {
    -
    194  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    195  {
    -
    196  phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)*frequency)/UPDATE_RATE) << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS);
    -
    197  }
    -
    198  }
    +
    185  /** Set the oscillator frequency with an unsigned int. This is faster than using a
    +
    186  float, so it's useful when processor time is tight, but it can be tricky with
    +
    187  low and high frequencies, depending on the size of the wavetable being used. If
    +
    188  you're not getting the results you expect, try explicitly using a float, or try
    +
    189  setFreq_Q24n8() or or setFreq_Q16n16().
    +
    190  @param frequency to play the wave table.
    +
    191  */
    +
    192  inline
    +
    193  void setFreq (int frequency) {
    +
    194  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    195  {
    +
    196  phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)*frequency)/UPDATE_RATE) << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS);
    +
    197  }
    +
    198  }
    199 
    200 
    -
    206  inline
    -
    207  void setFreq(float frequency)
    -
    208  { // 1 us - using float doesn't seem to incur measurable overhead with the oscilloscope
    -
    209  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    210  {
    -
    211  phase_increment_fractional = (unsigned long)((((float)NUM_TABLE_CELLS * frequency)/UPDATE_RATE) * OSCIL_F_BITS_AS_MULTIPLIER);
    -
    212  }
    -
    213  }
    +
    201  /** Set the oscillator frequency with a float. Using a float is the most reliable
    +
    202  way to set frequencies, -Might- be slower than using an int but you need either
    +
    203  this, setFreq_Q24n8() or setFreq_Q16n16() for fractional frequencies.
    +
    204  @param frequency to play the wave table.
    +
    205  */
    +
    206  inline
    +
    207  void setFreq(float frequency)
    +
    208  { // 1 us - using float doesn't seem to incur measurable overhead with the oscilloscope
    +
    209  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    210  {
    +
    211  phase_increment_fractional = (unsigned long)((((float)NUM_TABLE_CELLS * frequency)/UPDATE_RATE) * OSCIL_F_BITS_AS_MULTIPLIER);
    +
    212  }
    +
    213  }
    214 
    215 
    -
    223  inline
    -
    224  void setFreq_Q24n8(Q24n8 frequency)
    -
    225  {
    -
    226  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    227  {
    -
    228  //phase_increment_fractional = (frequency* (NUM_TABLE_CELLS>>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
    -
    229  phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)>>3)*frequency)/(UPDATE_RATE>>6))
    -
    230  << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
    -
    231  }
    -
    232  }
    +
    216  /** Set the frequency using Q24n8 fixed-point number format.
    +
    217  This might be faster than the float version for setting low frequencies such as
    +
    218  1.5 Hz, or other values which may not work well with your table size. A Q24n8
    +
    219  representation of 1.5 is 384 (ie. 1.5 * 256). Can't be used with UPDATE_RATE
    +
    220  less than 64 Hz.
    +
    221  @param frequency in Q24n8 fixed-point number format.
    +
    222  */
    +
    223  inline
    +
    224  void setFreq_Q24n8(Q24n8 frequency)
    +
    225  {
    +
    226  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    227  {
    +
    228  //phase_increment_fractional = (frequency* (NUM_TABLE_CELLS>>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
    +
    229  phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)>>3)*frequency)/(UPDATE_RATE>>6))
    +
    230  << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
    +
    231  }
    +
    232  }
    233 
    234 
    -
    242  inline
    -
    243  void setFreq_Q16n16(Q16n16 frequency)
    -
    244  {
    -
    245  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    246  {
    -
    247  //phase_increment_fractional = ((frequency * (NUM_TABLE_CELLS>>7))/(UPDATE_RATE>>6)) << (F_BITS-16+1);
    -
    248  phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)>>7)*frequency)/(UPDATE_RATE>>6))
    -
    249  << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - 16 + 1);
    +
    235  /** Set the frequency using Q16n16 fixed-point number format. This is useful in
    +
    236  combination with Q16n16_mtof(), a fast alternative to mtof(), using Q16n16
    +
    237  fixed-point format instead of floats.
    +
    238  @note This should work OK with tables 2048 cells or smaller and
    +
    239  frequencies up to 4096 Hz. Can't be used with UPDATE_RATE less than 64 Hz.
    +
    240  @param frequency in Q16n16 fixed-point number format.
    +
    241  */
    +
    242  inline
    +
    243  void setFreq_Q16n16(Q16n16 frequency)
    +
    244  {
    +
    245  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    246  {
    +
    247  //phase_increment_fractional = ((frequency * (NUM_TABLE_CELLS>>7))/(UPDATE_RATE>>6)) << (F_BITS-16+1);
    +
    248  phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)>>7)*frequency)/(UPDATE_RATE>>6))
    +
    249  << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - 16 + 1);
    250 
    -
    251  }
    -
    252  }
    +
    251  }
    +
    252  }
    253 /*
    -
    254  inline
    -
    255  void setFreqMidi(char note_num) {
    -
    256  setFreq_Q16n16(mtof(note_num));
    -
    257  }
    +
    254  inline
    +
    255  void setFreqMidi(char note_num) {
    +
    256  setFreq_Q16n16(mtof(note_num));
    +
    257  }
    258 */
    -
    264  inline
    -
    265  char atIndex(unsigned int index)
    -
    266  {
    -
    267  return (char)pgm_read_byte_near(table + (index & (NUM_TABLE_CELLS - 1)));
    -
    268  }
    +
    259  /** Returns the sample at the given table index.
    +
    260  @param index between 0 and the table size.The
    +
    261  index rolls back around to 0 if it's larger than the table size.
    +
    262  @return the sample at the given table index.
    +
    263  */
    +
    264  inline
    +
    265  char atIndex(unsigned int index)
    +
    266  {
    +
    267  return (char)pgm_read_byte_near(table + (index & (NUM_TABLE_CELLS - 1)));
    +
    268  }
    269 
    270 
    -
    281  inline
    -
    282  //const
    -
    283  unsigned long phaseIncFromFreq(int frequency)
    -
    284  {
    -
    285  return (((unsigned long)frequency * NUM_TABLE_CELLS)/UPDATE_RATE) << OSCIL_F_BITS;
    -
    286  }
    +
    271  /** phaseIncFromFreq() and setPhaseInc() are for saving processor time when sliding
    +
    272  between frequencies. Instead of recalculating the phase increment for each
    +
    273  frequency in between, you can just calculate the phase increment for each end
    +
    274  frequency with phaseIncFromFreq(), then use a Line to interpolate on the fly and
    +
    275  use setPhaseInc() to set the phase increment at each step. (Note: I should
    +
    276  really profile this with the oscilloscope to see if it's worth the extra
    +
    277  confusion!)
    +
    278  @param frequency for which you want to calculate a phase increment value.
    +
    279  @return the phase increment value which will produce a given frequency.
    +
    280  */
    +
    281  inline
    +
    282  //const
    +
    283  unsigned long phaseIncFromFreq(int frequency)
    +
    284  {
    +
    285  return (((unsigned long)frequency * NUM_TABLE_CELLS)/UPDATE_RATE) << OSCIL_F_BITS;
    +
    286  }
    287 
    288 
    -
    292  inline
    -
    293  void setPhaseInc(unsigned long phaseinc_fractional)
    -
    294  {
    -
    295  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    296  {
    -
    297  phase_increment_fractional = phaseinc_fractional;
    -
    298  }
    -
    299  }
    +
    289  /** Set a specific phase increment. See phaseIncFromFreq().
    +
    290  @param phaseinc_fractional a phase increment value as calculated by phaseIncFromFreq().
    +
    291  */
    +
    292  inline
    +
    293  void setPhaseInc(unsigned long phaseinc_fractional)
    +
    294  {
    +
    295  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    296  {
    +
    297  phase_increment_fractional = phaseinc_fractional;
    +
    298  }
    +
    299  }
    300 
    301 
    302 
    303 private:
    304 
    305 
    +
    306  /** Used for shift arithmetic in setFreq() and its variations.
    +
    307  */
    308 static const unsigned char ADJUST_FOR_NUM_TABLE_CELLS = (NUM_TABLE_CELLS<2048) ? 8 : 0;
    309 
    310 
    -
    313  inline
    -
    314  void incrementPhase()
    -
    315  {
    -
    316  //phase_fractional += (phase_increment_fractional | 1); // odd phase incr, attempt to reduce frequency spurs in output
    -
    317  phase_fractional += phase_increment_fractional;
    -
    318  }
    +
    311  /** Increments the phase of the oscillator without returning a sample.
    +
    312  */
    +
    313  inline
    +
    314  void incrementPhase()
    +
    315  {
    +
    316  //phase_fractional += (phase_increment_fractional | 1); // odd phase incr, attempt to reduce frequency spurs in output
    +
    317  phase_fractional += phase_increment_fractional;
    +
    318  }
    319 
    320 
    -
    323  inline
    -
    324  char readTable()
    -
    325  {
    -
    326 #ifdef OSCIL_DITHER_PHASE
    -
    327  return (char)pgm_read_byte_near(table + (((phase_fractional + ((int)(xorshift96()>>16))) >> OSCIL_F_BITS) & (NUM_TABLE_CELLS - 1)));
    -
    328 #else
    -
    329  return (char)pgm_read_byte_near(table + ((phase_fractional >> OSCIL_F_BITS) & (NUM_TABLE_CELLS - 1)));
    -
    330  //return (char)pgm_read_byte_near(table + (((phase_fractional >> OSCIL_F_BITS) | 1 ) & (NUM_TABLE_CELLS - 1))); odd phase, attempt to reduce frequency spurs in output
    -
    331 #endif
    -
    332  }
    +
    321  /** Returns the current sample.
    +
    322  */
    +
    323  inline
    +
    324  char readTable()
    +
    325  {
    +
    326 #ifdef OSCIL_DITHER_PHASE
    +
    327  return (char)pgm_read_byte_near(table + (((phase_fractional + ((int)(xorshift96()>>16))) >> OSCIL_F_BITS) & (NUM_TABLE_CELLS - 1)));
    +
    328 #else
    +
    329  return (char)pgm_read_byte_near(table + ((phase_fractional >> OSCIL_F_BITS) & (NUM_TABLE_CELLS - 1)));
    +
    330  //return (char)pgm_read_byte_near(table + (((phase_fractional >> OSCIL_F_BITS) | 1 ) & (NUM_TABLE_CELLS - 1))); odd phase, attempt to reduce frequency spurs in output
    +
    331 #endif
    +
    332  }
    333 
    334 
    -
    335  unsigned long phase_fractional;
    -
    336  volatile unsigned long phase_increment_fractional; // volatile with atomic access because it can
    -
    337  // be set in the updateControl() interrupt and
    -
    338  // used in updateAudio(), which is outside the
    -
    339  // interrupt.
    -
    340  const char * table;
    +
    335  unsigned long phase_fractional;
    +
    336  volatile unsigned long phase_increment_fractional; // volatile with atomic access because it can
    +
    337  // be set in the updateControl() interrupt and
    +
    338  // used in updateAudio(), which is outside the
    +
    339  // interrupt.
    +
    340  const char * table;
    341 
    342 };
    343 
    344 
    -
    345 #endif /* OSCIL_H_ */
    +
    345 #endif /* OSCIL_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Phasor.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include "mozzi_fixmath.h"
    +#include <util/atomic.h>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Phasor< UPDATE_RATE >
     Phasor repeatedly generates a high resolution ramp at a variable frequency. More...
     
    + + + +

    +Macros

    #define PHASOR_MAX_VALUE_UL   4294967295UL
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define PHASOR_MAX_VALUE_UL   4294967295UL
    +
    + +

    Definition at line 34 of file Phasor.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_phasor_8h.js b/doc/html/_phasor_8h.js new file mode 100644 index 000000000..bf56f720d --- /dev/null +++ b/doc/html/_phasor_8h.js @@ -0,0 +1,5 @@ +var _phasor_8h = +[ + [ "Phasor", "class_phasor.html", "class_phasor" ], + [ "PHASOR_MAX_VALUE_UL", "_phasor_8h.html#ae01ac7d628f7b096967017f97cb63f06", null ] +]; \ No newline at end of file diff --git a/doc/html/_phasor_8h_source.html b/doc/html/_phasor_8h_source.html index 3c1dd19a2..2407760d7 100644 --- a/doc/html/_phasor_8h_source.html +++ b/doc/html/_phasor_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Phasor.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Phasor.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,91 +132,129 @@
    20  *
    21  */
    22 
    -
    23 #ifndef PHASOR_H_
    -
    24 #define PHASOR_H_
    -
    25 
    -
    26 #if ARDUINO >= 100
    -
    27  #include "Arduino.h"
    -
    28 #else
    -
    29  #include "WProgram.h"
    -
    30 #endif
    -
    31 #include "mozzi_fixmath.h"
    -
    32 #include <util/atomic.h>
    +
    23 #ifndef PHASOR_H_
    +
    24 #define PHASOR_H_
    +
    25 
    +
    26 #if ARDUINO >= 100
    +
    27  #include "Arduino.h"
    +
    28 #else
    +
    29  #include "WProgram.h"
    +
    30 #endif
    +
    31 #include "mozzi_fixmath.h"
    +
    32 #include <util/atomic.h>
    33 
    -
    34 #define PHASOR_MAX_VALUE_UL 4294967295UL
    -
    35 
    +
    34 #define PHASOR_MAX_VALUE_UL 4294967295UL
    +
    35 
    +
    36 /** Phasor repeatedly generates a high resolution ramp at a variable frequency.
    +
    37 The output of Phasor.next() is an unsigned number between 0 and 4294967295, the
    +
    38 maximum that can be expressed by an unsigned long.
    +
    39 @tparam UPDATE_RATE the rate at which the Phasor will be updated,
    +
    40 usually CONTROL_RATE or AUDIO_RATE.
    +
    41 */
    +
    42 
    43 template <unsigned int UPDATE_RATE>
    -
    44 class Phasor
    +
    44 class Phasor
    45 {
    46 private:
    -
    47  unsigned long current_value;
    -
    48  volatile unsigned long step_size;
    +
    47  unsigned long current_value;
    +
    48  volatile unsigned long step_size;
    49 
    50 public:
    -
    54  Phasor (){
    -
    55  ;
    -
    56  }
    +
    51  /** Constructor. "Phasor <AUDIO_RATE> myphasor;"
    +
    52  makes a Phasor which updates at AUDIO_RATE.
    +
    53  */
    +
    54  Phasor (){
    +
    55  ;
    +
    56  }
    57 
    -
    61  inline
    -
    62  unsigned long next()
    -
    63  {
    -
    64  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    65  {
    -
    66  current_value += step_size; // will wrap
    -
    67  }
    -
    68  return current_value;
    -
    69  }
    +
    58  /** Increments one step along the phase.
    +
    59  @return the next value.
    +
    60  */
    +
    61  inline
    +
    62  unsigned long next()
    +
    63  {
    +
    64  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    65  {
    +
    66  current_value += step_size; // will wrap
    +
    67  }
    +
    68  return current_value;
    +
    69  }
    70 
    -
    74  inline
    -
    75  void set(unsigned long value)
    -
    76  {
    -
    77  current_value=value;
    -
    78  }
    +
    71  /** Set the current value of the phasor. The Phasor will continue incrementing from this
    +
    72  value using any previously calculated step size.
    +
    73  */
    +
    74  inline
    +
    75  void set(unsigned long value)
    +
    76  {
    +
    77  current_value=value;
    +
    78  }
    79 
    80 
    -
    86  inline
    -
    87  void setFreq( int frequency)
    -
    88  {
    -
    89  step_size = ((((unsigned long)((PHASOR_MAX_VALUE_UL>>8)+1))/(UPDATE_RATE))*frequency)<<8;
    -
    90  }
    -
    91 
    -
    92 
    -
    97  inline
    -
    98  void setFreq(float frequency)
    -
    99  { // 1 us - using float doesn't seem to incur measurable overhead with the oscilloscope
    -
    100  //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    101  //{
    -
    102  step_size = (unsigned long)(((float)PHASOR_MAX_VALUE_UL/UPDATE_RATE)*frequency);
    +
    81  /** Set the Phasor frequency with an unsigned int.
    +
    82  @param frequency is how many times per second to count from
    +
    83  0 to the maximum unsigned long value 4294967295.
    +
    84  @note Timing 8us
    +
    85  */
    +
    86  inline
    +
    87  void setFreq( int frequency)
    +
    88  {
    +
    89  step_size = ((((unsigned long)((PHASOR_MAX_VALUE_UL>>8)+1))/(UPDATE_RATE))*frequency)<<8;
    +
    90  }
    +
    91 
    +
    92 
    +
    93  /** Set the Phasor frequency with a float.
    +
    94  @param frequency is how many times per second to count from
    +
    95  0 to the maximum unsigned long value 4294967295.
    +
    96  */
    +
    97  inline
    +
    98  void setFreq(float frequency)
    +
    99  { // 1 us - using float doesn't seem to incur measurable overhead with the oscilloscope
    +
    100  //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    101  //{
    +
    102  step_size = (unsigned long)(((float)PHASOR_MAX_VALUE_UL/UPDATE_RATE)*frequency);
    103 
    -
    104  //}
    -
    105  }
    -
    106 
    -
    117  inline
    -
    118  unsigned long phaseIncFromFreq(int frequency)
    -
    119  {
    -
    120  return ((((unsigned long)((PHASOR_MAX_VALUE_UL>>8)+1))/(UPDATE_RATE))*frequency)<<8;
    -
    121  }
    +
    104  //}
    +
    105  }
    +
    106 
    +
    107  /** phaseIncFromFreq() and setPhaseInc() are for saving processor time when sliding
    +
    108  between frequencies. Instead of recalculating the phase increment for each
    +
    109  frequency in between, you can just calculate the phase increment for each end
    +
    110  frequency with phaseIncFromFreq(), then use a Line to interpolate on the fly and
    +
    111  use setPhaseInc() to set the phase increment at each step. (Note: I should
    +
    112  really profile this with the oscilloscope to see if it's worth the extra
    +
    113  confusion!)
    +
    114  @param frequency for which you want to calculate a phase increment value.
    +
    115  @return the phase increment value which will produce a given frequency.
    +
    116  */
    +
    117  inline
    +
    118  unsigned long phaseIncFromFreq(int frequency)
    +
    119  {
    +
    120  return ((((unsigned long)((PHASOR_MAX_VALUE_UL>>8)+1))/(UPDATE_RATE))*frequency)<<8;
    +
    121  }
    122 
    123 
    -
    127  inline
    -
    128  void setPhaseInc(unsigned long stepsize)
    -
    129  {
    -
    130  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    131  {
    -
    132  step_size = stepsize;
    -
    133  }
    -
    134  }
    -
    135 
    +
    124  /** Set a specific phase increment. See phaseIncFromFreq().
    +
    125  @param stepsize a phase increment value as calculated by phaseIncFromFreq().
    +
    126  */
    +
    127  inline
    +
    128  void setPhaseInc(unsigned long stepsize)
    +
    129  {
    +
    130  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    131  {
    +
    132  step_size = stepsize;
    +
    133  }
    +
    134  }
    +
    135 
    136 };
    137 
    -
    138 #endif /* PHASOR_H_ */
    +
    138 #endif /* PHASOR_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Portamento.h File Reference
    +
    +
    +
    #include "mozzi_midi.h"
    +#include "mozzi_fixmath.h"
    +#include "Line.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Portamento< CONTROL_UPDATE_RATE >
     A simple portamento (pitch slide from one note to the next) effect, useful for note-based applications. More...
     
    +
    +
    + + + + diff --git a/doc/html/_portamento_8h_source.html b/doc/html/_portamento_8h_source.html index 268fcc222..0be70fe44 100644 --- a/doc/html/_portamento_8h_source.html +++ b/doc/html/_portamento_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Portamento.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Portamento.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,85 +132,102 @@
    20  *
    21  */
    22 
    -
    23 #ifndef PORTAMENTO_H_
    -
    24 #define PORTAMENTO_H_
    -
    25 
    -
    26 #include "mozzi_midi.h"
    -
    27 #include "mozzi_fixmath.h"
    -
    28 #include "Line.h"
    +
    23 #ifndef PORTAMENTO_H_
    +
    24 #define PORTAMENTO_H_
    +
    25 
    +
    26 #include "mozzi_midi.h"
    +
    27 #include "mozzi_fixmath.h"
    +
    28 #include "Line.h"
    29 
    +
    30 /** A simple portamento (pitch slide from one note to the next) effect, useful for note-based applications.
    +
    31 */
    32 template <unsigned int CONTROL_UPDATE_RATE>
    33 class
    -
    34  Portamento {
    -
    35 
    +
    34  Portamento {
    +
    35 
    36 public:
    37 
    - -
    41  MICROS_PER_CONTROL_STEP(1000000/CONTROL_UPDATE_RATE)
    -
    42  {
    -
    43  }
    -
    44 
    -
    48  inline
    -
    49  void setTime(unsigned int milliseconds){
    -
    50  //control_steps_per_portamento = ((long)milliseconds*1000)/MICROS_PER_CONTROL_STEP; // more accurate but slower
    -
    51  control_steps_per_portamento = convertMsecToControlSteps(milliseconds);
    -
    52  }
    +
    38  /** Constructor.
    +
    39  */
    + +
    41  MICROS_PER_CONTROL_STEP(1000000/CONTROL_UPDATE_RATE)
    +
    42  {
    +
    43  }
    +
    44 
    +
    45  /** Set how long it will take to slide from note to note, in milliseconds.
    +
    46  @param milliseconds
    +
    47  */
    +
    48  inline
    +
    49  void setTime(unsigned int milliseconds){
    +
    50  //control_steps_per_portamento = ((long)milliseconds*1000)/MICROS_PER_CONTROL_STEP; // more accurate but slower
    +
    51  control_steps_per_portamento = convertMsecToControlSteps(milliseconds);
    +
    52  }
    53 
    -
    57  inline
    -
    58  void start(unsigned char note) {
    -
    59  target_freq = Q16n16_mtof(Q8n0_to_Q16n16(note));
    -
    60  aPortamentoLine.set(target_freq, control_steps_per_portamento);
    -
    61  countdown = control_steps_per_portamento;
    -
    62  portamento_on=true;
    -
    63  }
    -
    64 
    -
    68  inline
    -
    69  void start(Q16n16 note) {
    -
    70  target_freq = Q16n16_mtof(note);
    -
    71  aPortamentoLine.set(target_freq, control_steps_per_portamento);
    -
    72  countdown = control_steps_per_portamento;
    -
    73  portamento_on=true;
    -
    74  }
    -
    75 
    +
    54  /** Call this at note-on, it initialises the portamento.
    +
    55  @param note a midi note number, a whole number.
    +
    56  */
    +
    57  inline
    +
    58  void start(unsigned char note) {
    +
    59  target_freq = Q16n16_mtof(Q8n0_to_Q16n16(note));
    +
    60  aPortamentoLine.set(target_freq, control_steps_per_portamento);
    +
    61  countdown = control_steps_per_portamento;
    +
    62  portamento_on=true;
    +
    63  }
    +
    64 
    +
    65  /** Call this at note-on, it initialises the portamento.
    +
    66  @param note a midi note number in Q16n16 fractional format. This is useful for non-whole note or detuned values.
    +
    67  */
    +
    68  inline
    +
    69  void start(Q16n16 note) {
    +
    70  target_freq = Q16n16_mtof(note);
    +
    71  aPortamentoLine.set(target_freq, control_steps_per_portamento);
    +
    72  countdown = control_steps_per_portamento;
    +
    73  portamento_on=true;
    +
    74  }
    +
    75 
    76 
    -
    81  inline
    - -
    83  if (portamento_on==true){
    -
    84  if(--countdown < 0) {
    -
    85  // stay level when portamento has finished
    -
    86  aPortamentoLine.set(target_freq, target_freq, control_steps_per_portamento);
    -
    87  portamento_on=false;
    -
    88  }
    -
    89  }
    -
    90  return aPortamentoLine.next();
    -
    91  }
    -
    92 
    -
    93  private:
    +
    77  /** Use this in updateControl() to provide a frequency to the oscillator it's controlling, for example:
    +
    78  myOscil.setFreq_Q16n16(myPortamento.next());
    +
    79  @return a Q16n16 fractional frequency value, progressing smoothly between successive notes.
    +
    80  */
    +
    81  inline
    +
    82  Q16n16 next() {
    +
    83  if (portamento_on==true){
    +
    84  if(--countdown < 0) {
    +
    85  // stay level when portamento has finished
    +
    86  aPortamentoLine.set(target_freq, target_freq, control_steps_per_portamento);
    +
    87  portamento_on=false;
    +
    88  }
    +
    89  }
    +
    90  return aPortamentoLine.next();
    +
    91  }
    +
    92 
    +
    93  private:
    94 
    -
    95  int countdown;
    -
    96  int control_steps_per_portamento;
    -
    97  Q16n16 target_freq;
    -
    98  bool portamento_on;
    -
    99  const unsigned int MICROS_PER_CONTROL_STEP;
    -
    100  Line <Q16n16> aPortamentoLine;
    +
    95  int countdown;
    +
    96  int control_steps_per_portamento;
    +
    97  Q16n16 target_freq;
    +
    98  bool portamento_on;
    +
    99  const unsigned int MICROS_PER_CONTROL_STEP;
    +
    100  Line <Q16n16> aPortamentoLine;
    101 
    -
    102 
    -
    103  // copied from ADSR.h
    -
    104  inline
    -
    105  static const unsigned int convertMsecToControlSteps(unsigned int msec){
    -
    106  return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
    -
    107  }
    +
    102 
    +
    103  // copied from ADSR.h
    +
    104  inline
    +
    105  static const unsigned int convertMsecToControlSteps(unsigned int msec){
    +
    106  return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
    +
    107  }
    108 
    109 };
    110 
    -
    111 #endif /* PORTAMENTO_H_ */
    +
    111 #endif /* PORTAMENTO_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    RCpoll.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  RCpoll< SENSOR_PIN >
     A class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime. More...
     
    +
    +
    + + + + diff --git a/doc/html/_r_cpoll_8h_source.html b/doc/html/_r_cpoll_8h_source.html index 2efd79de8..3fce50580 100644 --- a/doc/html/_r_cpoll_8h_source.html +++ b/doc/html/_r_cpoll_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,56 +110,68 @@
    RCpoll.h
    -
    1 #ifndef RCPOLL_H
    -
    2 #define RCPOLL_H
    -
    3 
    +Go to the documentation of this file.
    1 #ifndef RCPOLL_H
    +
    2 #define RCPOLL_H
    +
    3 
    4 
    +
    5 /**
    +
    6 A class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime.
    +
    7 This is designed to be used in updateControl(). Each time it is called, it checks if a capacitor has charged,
    +
    8 and returns an output reflecting how long it took for the most recent charge.
    +
    9 */
    +
    10 
    11 template <unsigned char SENSOR_PIN>
    -
    12 class RCpoll
    +
    12 class RCpoll
    13 {
    14 
    15 public:
    -
    18  RCpoll():result(0),rc_cued(true), output(0)
    -
    19  {
    -
    20  ;
    -
    21  }
    +
    16  /** Constructor.
    +
    17  */
    +
    18  RCpoll():result(0),rc_cued(true), output(0)
    +
    19  {
    +
    20  ;
    +
    21  }
    22 
    -
    28  inline
    -
    29  unsigned int next(){
    -
    30  if (rc_cued){
    -
    31  pinMode(SENSOR_PIN, INPUT); // turn pin into an input and time till pin goes low
    -
    32  digitalWrite(SENSOR_PIN, LOW); // turn pullups off - or it won't work
    -
    33  rc_cued = false;
    -
    34  }
    -
    35  if(digitalRead(SENSOR_PIN)){ // wait for pin to go low
    -
    36  result++;
    -
    37  }
    -
    38  else{
    -
    39  output = result;
    -
    40  result = 0;
    -
    41  pinMode(SENSOR_PIN, OUTPUT); // make pin OUTPUT
    -
    42  digitalWrite(SENSOR_PIN, HIGH); // make pin HIGH to discharge capacitor - see the schematic
    -
    43  rc_cued = true;
    -
    44  }
    -
    45  return output;
    -
    46  }
    +
    23  /** Checks whether the capacitor has charged, and returns how long it took for the most recent charge.
    +
    24  This would preferably be called in updateControl(), but if the resolution isn't fine enough or the
    +
    25  pin charges too fast for updateControl() to catch, try it in updateAudio().
    +
    26  @return the sensor value, reflected in how many checking cycles it took to charge the capacitor.
    +
    27  */
    +
    28  inline
    +
    29  unsigned int next(){
    +
    30  if (rc_cued){
    +
    31  pinMode(SENSOR_PIN, INPUT); // turn pin into an input and time till pin goes low
    +
    32  digitalWrite(SENSOR_PIN, LOW); // turn pullups off - or it won't work
    +
    33  rc_cued = false;
    +
    34  }
    +
    35  if(digitalRead(SENSOR_PIN)){ // wait for pin to go low
    +
    36  result++;
    +
    37  }
    +
    38  else{
    +
    39  output = result;
    +
    40  result = 0;
    +
    41  pinMode(SENSOR_PIN, OUTPUT); // make pin OUTPUT
    +
    42  digitalWrite(SENSOR_PIN, HIGH); // make pin HIGH to discharge capacitor - see the schematic
    +
    43  rc_cued = true;
    +
    44  }
    +
    45  return output;
    +
    46  }
    47 
    48 private:
    -
    49  unsigned int result;
    -
    50  boolean rc_cued;
    -
    51  unsigned int output;
    +
    49  unsigned int result;
    +
    50  boolean rc_cued;
    +
    51  unsigned int output;
    52 
    53 };
    54 
    -
    55 #endif // #ifndef RCPOLL_H
    -
    56 
    +
    55 #endif // #ifndef RCPOLL_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    README.md File Reference
    +
    + +
    + + + + diff --git a/doc/html/_r_e_a_d_m_e_8md_source.html b/doc/html/_r_e_a_d_m_e_8md_source.html new file mode 100644 index 000000000..4200ecb45 --- /dev/null +++ b/doc/html/_r_e_a_d_m_e_8md_source.html @@ -0,0 +1,270 @@ + + + + + + +Mozzi: README.md Source File + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    README.md
    +
    +
    +Go to the documentation of this file.
    1 Mozzi
    +
    2 =====
    +
    3 sound synthesis library for Arduino
    +
    4 ------------------------------------
    +
    5 
    +
    6 Version 0.01.2c
    +
    7 Tim Barrass 2010-13
    +
    8 
    +
    9 
    +
    10 Currently your Arduino can only beep like a microwave oven. Mozzi brings
    +
    11 your Arduino to life by allowing it to produce much more complex and interesting
    +
    12 growls, sweeps and chorusing atmospherics. These sounds can be quickly and easily
    +
    13 constructed from familiar synthesis units like oscillators, delays, filters and
    +
    14 envelopes.
    +
    15 
    +
    16 You can use Mozzi to generate algorithmic music for an installation or
    +
    17 performance, or make interactive sonifications of sensors, on a small, modular
    +
    18 and super cheap Arduino, without the need for additional shields, message
    +
    19 passing or external synths.
    +
    20 
    +
    21 Mozzi is designed to be easy to use, open source and extendable.
    +
    22 
    +
    23 If you enjoy using Mozzi for a project, or have extended it, we would be
    +
    24 pleased to hear about it and provide support wherever possible. Contribute
    +
    25 suggestions, improvements and bug fixes to the Mozzi wiki on Github, or
    +
    26 Fork it to contribute directly to future developments.
    +
    27 
    +
    28 Mozzi is a development of research into Mobile Sonification in the
    +
    29 [SweatSonics](http://stephenbarrass.wordpress.com/tag/sweatsonics/) project.
    +
    30 
    +
    31 
    +
    32 
    +
    33 ### Features
    +
    34 
    +
    35 - 16384 Hz sample rate, with 8 bit or 14 bit audio output modes.
    +
    36 - Variable control rate from 64 Hz upwards.
    +
    37 - Useful basic audio toolkit: oscillators, samples, lines, envelopes, scheduling, filtering.
    +
    38 - Fast ADC and other cpu-efficient code utilities to help keep audio running smoothly.
    +
    39 - Example sketches for easy modification.
    +
    40 - Readymade wavetables and a script to convert your own soundfiles for Mozzi.
    +
    41 
    +
    42 
    +
    43 ### Installation
    +
    44 
    +
    45 Download Mozzi and unzip it. It will probably have a name like
    +
    46 "sensorium-Mozzi-2bee818". Rename the unzipped folder "Mozzi".
    +
    47 Then, following the instructions from the Arduino libraries page:
    +
    48 Open your Arduino sketchbook folder. If there is already a folder there called
    +
    49 libraries, place the library folder in there. If not, create a folder called
    +
    50 libraries in the sketchbook folder, and drop the Mozzi folder in there. Then
    +
    51 re-start the Arduino programming environment, and you should see Mozzi in the
    +
    52 Sketch > Import Library menu.
    +
    53 
    +
    54 
    +
    55 ### Quick Start
    +
    56 
    +
    57 To hear Mozzi, connect a 3.5mm audio jack with the centre wire to the PWM
    +
    58 output on the Digital Pin for your board according to the table below.
    +
    59 Use this as a line out which you can plug into your computer and listen
    +
    60 to with a sound program like Audacity. Try some examples from the
    +
    61 File > Examples > Mozzi menu.
    +
    62 
    +
    63 Below is a list of the Digital Pins used by Mozzi for STANDARD mode PWM audio out on different boards.
    +
    64 Those which have been tested and reported to work have an x.
    +
    65 Feedback about others is welcome.
    +
    66 
    +
    67 x 9 Arduino Uno
    +
    68 x 9 Arduino Duemilanove
    +
    69 x 9 Arduino Nano
    +
    70 x 9 Arduino Pro Mini
    +
    71 x 9 Arduino Leonardo
    +
    72 x 11 Arduino Mega
    +
    73 x 11 Freetronics EtherMega
    +
    74 x 9 Ardweeny
    +
    75 x 9 Boarduino
    +
    76 ..14 Teensy
    +
    77 x B5 Teensy2
    +
    78 x B5(25) Teensy2++
    +
    79 ..13 Sanguino
    +
    80 
    +
    81 
    +
    82 For details about HIFI mode, read the [Mozzi core module documentation](http://sensorium.github.com/Mozzi/doc/html/group__core.html#gae99eb43cb29bb03d862ae829999916c4).
    +
    83 
    +
    84 ### Using Mozzi
    +
    85 
    +
    86 Here's a template for an empty Mozzi sketch:
    +
    87 
    +
    88  #include <MozziGuts.h> // at the top of your sketch
    +
    89  #define CONTROL_RATE 64 // or some other power of 2
    +
    90 
    +
    91  void setup() {
    +
    92  startMozzi(CONTROL_RATE);
    +
    93  }
    +
    94 
    +
    95  void loop() {
    +
    96  audioHook();
    +
    97  }
    +
    98 
    +
    99  int updateAudio(){
    +
    100  // your audio code which returns an int between -244 and 243
    +
    101  // actually, a char is fine
    +
    102  }
    +
    103 
    +
    104  void updateControl(){
    +
    105  // your control code
    +
    106  }
    +
    107 
    +
    108 
    +
    109 ### Documentation
    +
    110 
    +
    111 There's documentation in the doc folder in the Mozzi download and [online] (http://sensorium.github.com/Mozzi/doc/html/index.html).
    +
    112 There are hints and tips and more help on the Mozzi [wiki] (https://github.com/sensorium/Mozzi/wiki/Hints-and-Tips).
    +
    113 Start or look up a topic on the Mozzi [users forum] (https://groups.google.com/forum/#!forum/mozzi-users).
    +
    114 Also, feel free to submit any issues on the [GitHub Mozzi site] (https://github.com/sensorium/Mozzi/issues).
    +
    115 Share [code snippets] (https://github.com/sensorium/Mozzi/wiki/Code-Snippets-to-Share).
    +
    116 Check for code and usage changes in NEWS.txt.
    +
    117 Also, there are recordings of the examples inside their sketch folders.
    +
    118 
    +
    119 
    +
    120 ### Caveats
    +
    121 
    +
    122 While Mozzi is running, the Arduino time functions millis(), micros(), delay(), and
    +
    123 delayMicroseconds() are disabled. Instead, Mozzi provides mozziMicros() for timing, with 61us resolution (in STANDARD mode), and
    +
    124 EventDelay() for scheduling. Also, Mozzi can be paused (pauseMozzi()/unpauseMozzi()) if the Arduino timers are required for other things.
    +
    125 
    +
    126 
    +
    127 ###Contributions / Included Dependencies
    +
    128 
    +
    129 Mozzi makes use of the following code:
    +
    130 
    +
    131 [TimerOne library] (http://www.pjrc.com/teensy/td_libs_TimerOne.html)
    +
    132 [FrequencyTimer2 library] (http://www.pjrc.com/teensy/td_libs_FrequencyTimer2.html) - now a [fork with support for ATmega32u4 processors](https://github.com/sensorium/FrequencyTimer2)
    +
    133 [xorshift] (http://www.jstatsoft.org/v08/i14/xorshift.pdf) random number generator, George Marsaglia, (2003)
    +
    134 
    +
    135 
    +
    136 Mozzi has also drawn on and been influenced by (among many others):
    +
    137 
    +
    138 ead~.c puredata external (creb library) Copyright (c) 2000-2003 by Tom Schouten (GPL2)
    +
    139 [AF_precision_synthesis](http://adrianfreed.com/content/arduino-sketch-high-frequency-precision-sine-wave-tone-sound-synthesis)
    +
    140 by Adrian Freed, 2009
    +
    141 [Resonant filter](http://www.musicdsp.org/archive.php?classid=3#259) posted to musicdsp.org by Paul Kellett,
    +
    142 and fixed point version of the filter on [dave's blog of art and programming] (http://www.pawfal.org/dave/blog/2011/09/)
    +
    143 State Variable filter pseudocode at [musicdsp.org] (http://www.musicdsp.org/showone.php?id=23 and http://www.musicdsp.org/showone.php?id=142)
    +
    144 Various examples from [Pure Data](http://puredata.info/) by Miller Puckette
    +
    145 [Practical synthesis tutorials](http://www.obiwannabe.co.uk/) by Andy Farnell
    +
    +
    + + + + diff --git a/doc/html/_recent_average_8h.html b/doc/html/_recent_average_8h.html new file mode 100644 index 000000000..a75c45eef --- /dev/null +++ b/doc/html/_recent_average_8h.html @@ -0,0 +1,136 @@ + + + + + + +Mozzi: RecentAverage.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    RecentAverage.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  RecentAverage< T, NUM_READINGS >
     Calculates a running average over a specified number of the most recent readings. More...
     
    +
    +
    + + + + diff --git a/doc/html/_recent_average_8h_source.html b/doc/html/_recent_average_8h_source.html index 9a741bbe3..1deee168e 100644 --- a/doc/html/_recent_average_8h_source.html +++ b/doc/html/_recent_average_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,9 +110,9 @@
    RecentAverage.h
    -
    1 #ifndef RECENTAVERAGE_H
    -
    2 #define RECENTAVERAGE_H
    -
    3 
    +Go to the documentation of this file.
    1 #ifndef RECENTAVERAGE_H
    +
    2 #define RECENTAVERAGE_H
    +
    3 
    4 /*
    5  * RecentAverage.h
    6  *
    @@ -137,194 +145,237 @@
    33 
    34 
    35 
    +
    36 /**
    +
    37  Calculates a running average over a
    +
    38  specified number of the most recent readings.
    +
    39  Like Smooth(), this is good for smoothing analog inputs in updateControl().
    +
    40 */
    41 template <class T, int NUM_READINGS>
    42 class
    - +
    44 
    45 public:
    -
    55  RecentAverage():index(0),total(0)
    -
    56  {
    -
    57  // initialize all the readings to 0:
    -
    58  for (int thisReading = 0; thisReading < NUM_READINGS; thisReading++)
    -
    59  readings[thisReading] = 0;
    -
    60  switch(NUM_READINGS)
    -
    61  {
    -
    62  case 256:
    -
    63  num_readings_as_rshift = 8;
    -
    64  break;
    -
    65  case 128:
    -
    66  num_readings_as_rshift = 7;
    -
    67  break;
    -
    68  case 64:
    -
    69  num_readings_as_rshift = 6;
    -
    70  break;
    -
    71  case 32:
    -
    72  num_readings_as_rshift = 5;
    -
    73  break;
    -
    74  case 16:
    -
    75  num_readings_as_rshift = 4;
    -
    76  break;
    -
    77  case 8:
    -
    78  num_readings_as_rshift = 3;
    -
    79  break;
    -
    80  case 4:
    -
    81  num_readings_as_rshift = 2;
    -
    82  break;
    -
    83  case 2:
    -
    84  num_readings_as_rshift = 1;
    -
    85  break;
    -
    86  //default:
    -
    87  // if nothing else matches, do the default
    -
    88  // default is optional
    -
    89  }
    -
    90  }
    +
    46  /** Constructor.
    +
    47  @tparam T the type of numbers to average, eg. int, unsigned int, float etc. It will be relatively slow with
    +
    48  floating point numbers, as it will use a divide operation for the averaging.
    +
    49  Nevertheless, there might be a time when it's useful.
    +
    50  @tparam NUM_READINGS the number of readings to keep track of. It must be a power of two (unless
    +
    51  you're averaging floats). The higher the number, the more the readings will be
    +
    52  smoothed, but the slower the output will respond to the input.
    +
    53  @note Watch out for overflows if you are averaging a long number types!
    +
    54  */
    +
    55  RecentAverage():index(0),total(0)
    +
    56  {
    +
    57  // initialize all the readings to 0:
    +
    58  for (int thisReading = 0; thisReading < NUM_READINGS; thisReading++)
    +
    59  readings[thisReading] = 0;
    +
    60  switch(NUM_READINGS)
    +
    61  {
    +
    62  case 256:
    +
    63  num_readings_as_rshift = 8;
    +
    64  break;
    +
    65  case 128:
    +
    66  num_readings_as_rshift = 7;
    +
    67  break;
    +
    68  case 64:
    +
    69  num_readings_as_rshift = 6;
    +
    70  break;
    +
    71  case 32:
    +
    72  num_readings_as_rshift = 5;
    +
    73  break;
    +
    74  case 16:
    +
    75  num_readings_as_rshift = 4;
    +
    76  break;
    +
    77  case 8:
    +
    78  num_readings_as_rshift = 3;
    +
    79  break;
    +
    80  case 4:
    +
    81  num_readings_as_rshift = 2;
    +
    82  break;
    +
    83  case 2:
    +
    84  num_readings_as_rshift = 1;
    +
    85  break;
    +
    86  //default:
    +
    87  // if nothing else matches, do the default
    +
    88  // default is optional
    +
    89  }
    +
    90  }
    91 
    92 
    93 
    -
    98  T next(T input)
    -
    99  {
    -
    100  // out with the old
    -
    101  total -= readings[index];
    -
    102  // in with the new
    -
    103  total += input;
    -
    104  readings[index] = input;
    +
    94  /** Give the average of the last NUM_READINGS.
    +
    95  @param input a control signal such as an analog input which needs smoothing.
    +
    96  @return the smoothed result.
    +
    97  */
    +
    98  T next(T input)
    +
    99  {
    +
    100  // out with the old
    +
    101  total -= readings[index];
    +
    102  // in with the new
    +
    103  total += input;
    +
    104  readings[index] = input;
    105 
    -
    106  // advance and wrap index
    -
    107  ++index &= NUM_READINGS -1;
    +
    106  // advance and wrap index
    +
    107  ++index &= NUM_READINGS -1;
    108 
    -
    109  // calculate the average:
    -
    110  return total>>num_readings_as_rshift;
    -
    111  }
    +
    109  // calculate the average:
    +
    110  return total>>num_readings_as_rshift;
    +
    111  }
    112 
    113 
    114 private:
    -
    115  T readings[NUM_READINGS]; // the readings from the analog input
    -
    116  unsigned char index; // the index of the current reading
    -
    117  long total; // the running total
    -
    118  unsigned char num_readings_as_rshift;
    +
    115  T readings[NUM_READINGS]; // the readings from the analog input
    +
    116  unsigned char index; // the index of the current reading
    +
    117  long total; // the running total
    +
    118  unsigned char num_readings_as_rshift;
    119 
    120 };
    121 
    122 
    123 
    -
    124  // doxygen can ignore the specialisations
    +
    124 
    +
    125 /** @cond */ // doxygen can ignore the specialisations
    126 
    127 
    128 // not sure why this template is neccessary now..
    129 
    +
    130 /** unsigned int partial specialisation of RecentAverage template*/
    131 template <int NUM_READINGS>
    -
    132 class RecentAverage <unsigned int, NUM_READINGS>
    +
    132 class RecentAverage <unsigned int, NUM_READINGS>
    133 {
    134 public:
    -
    142  RecentAverage():index(0),total(0)
    -
    143  {
    -
    144  // initialize all the readings to 0:
    -
    145  for (int thisReading = 0; thisReading < NUM_READINGS; thisReading++)
    -
    146  readings[thisReading] = 0;
    -
    147  switch(NUM_READINGS)
    -
    148  {
    -
    149  case 256:
    -
    150  num_readings_as_rshift = 8;
    -
    151  break;
    -
    152  case 128:
    -
    153  num_readings_as_rshift = 7;
    -
    154  break;
    -
    155  case 64:
    -
    156  num_readings_as_rshift = 6;
    -
    157  break;
    -
    158  case 32:
    -
    159  num_readings_as_rshift = 5;
    -
    160  break;
    -
    161  case 16:
    -
    162  num_readings_as_rshift = 4;
    -
    163  break;
    -
    164  case 8:
    -
    165  num_readings_as_rshift = 3;
    -
    166  break;
    -
    167  case 4:
    -
    168  num_readings_as_rshift = 2;
    -
    169  break;
    -
    170  case 2:
    -
    171  num_readings_as_rshift = 1;
    -
    172  break;
    -
    173  //default:
    -
    174  // if nothing else matches, do the default
    -
    175  // default is optional
    -
    176  }
    -
    177  }
    +
    135  /** Constructor.
    +
    136  @tparam NUM_READINGS A power of two, the number of readings to keep track of.
    +
    137  The higher the number, the more the readings will be smoothed, but the slower the output will
    +
    138  respond to the input.
    +
    139  @note The internal total of all the values being averaged is held in a long (4 byte) integer, to avoid overflowing.
    +
    140  However, watch out for overflows if you are averaging a long number types!
    +
    141  */
    +
    142  RecentAverage():index(0),total(0)
    +
    143  {
    +
    144  // initialize all the readings to 0:
    +
    145  for (int thisReading = 0; thisReading < NUM_READINGS; thisReading++)
    +
    146  readings[thisReading] = 0;
    +
    147  switch(NUM_READINGS)
    +
    148  {
    +
    149  case 256:
    +
    150  num_readings_as_rshift = 8;
    +
    151  break;
    +
    152  case 128:
    +
    153  num_readings_as_rshift = 7;
    +
    154  break;
    +
    155  case 64:
    +
    156  num_readings_as_rshift = 6;
    +
    157  break;
    +
    158  case 32:
    +
    159  num_readings_as_rshift = 5;
    +
    160  break;
    +
    161  case 16:
    +
    162  num_readings_as_rshift = 4;
    +
    163  break;
    +
    164  case 8:
    +
    165  num_readings_as_rshift = 3;
    +
    166  break;
    +
    167  case 4:
    +
    168  num_readings_as_rshift = 2;
    +
    169  break;
    +
    170  case 2:
    +
    171  num_readings_as_rshift = 1;
    +
    172  break;
    +
    173  //default:
    +
    174  // if nothing else matches, do the default
    +
    175  // default is optional
    +
    176  }
    +
    177  }
    178 
    -
    183  unsigned int next(unsigned int input)
    -
    184  {
    -
    185  // out with the old
    -
    186  total -= readings[index];
    -
    187  // in with the new
    -
    188  total += input;
    -
    189  readings[index] = input;
    +
    179  /** Give the average of the last NUM_READINGS.
    +
    180  @param a control signal such as an analog input which needs smoothing.
    +
    181  @return the smoothed result.
    +
    182  */
    +
    183  unsigned int next(unsigned int input)
    +
    184  {
    +
    185  // out with the old
    +
    186  total -= readings[index];
    +
    187  // in with the new
    +
    188  total += input;
    +
    189  readings[index] = input;
    190 
    -
    191  // advance and wrap index
    -
    192  ++index &= NUM_READINGS -1;
    +
    191  // advance and wrap index
    +
    192  ++index &= NUM_READINGS -1;
    193 
    -
    194  // calculate the average:
    -
    195  return (unsigned) total>>num_readings_as_rshift;
    -
    196  }
    +
    194  // calculate the average:
    +
    195  return (unsigned) total>>num_readings_as_rshift;
    +
    196  }
    197 
    198 
    199 private:
    -
    200  unsigned int readings[NUM_READINGS]; // the readings from the analog input
    -
    201  unsigned char index; // the index of the current reading
    -
    202  long total; // the running total
    -
    203  unsigned char num_readings_as_rshift;
    +
    200  unsigned int readings[NUM_READINGS]; // the readings from the analog input
    +
    201  unsigned char index; // the index of the current reading
    +
    202  long total; // the running total
    +
    203  unsigned char num_readings_as_rshift;
    204 
    205 };
    206 
    207 
    208 
    209 
    +
    210 /** float partial specialisation of RecentAverage template*/
    211 template <int NUM_READINGS>
    -
    212 class RecentAverage <float, NUM_READINGS>
    +
    212 class RecentAverage <float, NUM_READINGS>
    213 {
    214 public:
    -
    222  RecentAverage():index(0),total(0)
    -
    223  {
    -
    224  // initialize all the readings to 0:
    -
    225  for (int thisReading = 0; thisReading < NUM_READINGS; thisReading++)
    -
    226  readings[thisReading] = 0;
    -
    227  }
    +
    215  /** Constructor.
    +
    216  @tparam NUM_READINGS A power of two, the number of readings to keep track of.
    +
    217  The higher the number, the more the readings will be smoothed, but the slower the output will
    +
    218  respond to the input.
    +
    219  @note The internal total of all the values being averaged is held in a long (4 byte) integer, to avoid overflowing.
    +
    220  However, watch out for overflows if you are averaging a long number types!
    +
    221  */
    +
    222  RecentAverage():index(0),total(0)
    +
    223  {
    +
    224  // initialize all the readings to 0:
    +
    225  for (int thisReading = 0; thisReading < NUM_READINGS; thisReading++)
    +
    226  readings[thisReading] = 0;
    +
    227  }
    228 
    -
    233  unsigned int next(unsigned int input)
    -
    234  {
    -
    235  // out with the old
    -
    236  total -= readings[index];
    -
    237  // in with the new
    -
    238  total += input;
    -
    239  readings[index] = input;
    +
    229  /** Give the average of the last NUM_READINGS.
    +
    230  @param a control signal such as an analog input which needs smoothing.
    +
    231  @return the smoothed result.
    +
    232  */
    +
    233  unsigned int next(unsigned int input)
    +
    234  {
    +
    235  // out with the old
    +
    236  total -= readings[index];
    +
    237  // in with the new
    +
    238  total += input;
    +
    239  readings[index] = input;
    240 
    -
    241  // advance and wrap index
    -
    242  ++index &= NUM_READINGS -1;
    +
    241  // advance and wrap index
    +
    242  ++index &= NUM_READINGS -1;
    243 
    -
    244  // calculate the average:
    -
    245  // this unsigned cast is the only difference between the int and unsigned int specialisations
    -
    246  // it tells the shift not to sign extend in from the left
    -
    247  return total/NUM_READINGS;
    -
    248  }
    +
    244  // calculate the average:
    +
    245  // this unsigned cast is the only difference between the int and unsigned int specialisations
    +
    246  // it tells the shift not to sign extend in from the left
    +
    247  return total/NUM_READINGS;
    +
    248  }
    249 
    250 
    251 private:
    -
    252  float readings[NUM_READINGS]; // the readings from the analog input
    -
    253  unsigned char index; // the index of the current reading
    -
    254  float total; // the running total
    +
    252  float readings[NUM_READINGS]; // the readings from the analog input
    +
    253  unsigned char index; // the index of the current reading
    +
    254  float total; // the running total
    255 
    256 };
    257 
    258 
    -
    259 #endif // #ifndef RECENTAVERAGE_H
    +
    259 #endif // #ifndef RECENTAVERAGE_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    ReverbTank.h File Reference
    +
    +
    +
    #include "AudioDelay.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  ReverbTank
     A reverb which sounds like the inside of a tin can. More...
     
    +
    +
    + + + + diff --git a/doc/html/_reverb_tank_8h_source.html b/doc/html/_reverb_tank_8h_source.html index ee6bcdf03..48ad83520 100644 --- a/doc/html/_reverb_tank_8h_source.html +++ b/doc/html/_reverb_tank_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,9 +110,9 @@
    ReverbTank.h
    -
    1 #ifndef REVERBTANK_H
    -
    2 #define REVERBTANK_H
    -
    3 
    +Go to the documentation of this file.
    1 #ifndef REVERBTANK_H
    +
    2 #define REVERBTANK_H
    +
    3 
    4 /*
    5  * ReverbTank.h
    6  *
    @@ -127,84 +135,126 @@
    23  *
    24  */
    25 
    -
    26 #include "AudioDelay.h"
    +
    26 #include "AudioDelay.h"
    +
    27 /**
    +
    28 A reverb which sounds like the inside of a tin can.
    +
    29 ReverbTank is small enough to fit on the Arduino Nano, which for some reason
    +
    30 wasn't able to fit a larger version which did fit on other 328 based boards. For
    +
    31 simplicity, ReverbTank has hardcoded maximum delay sizes but also has default
    +
    32 delay times which can be changed in the constructor or by setting during run
    +
    33 time to allow live tweaking.
    +
    34 This is a highly simplified design drawing on and probably misinterpreting
    +
    35 Miller Puckette's G08.reverb recirculating reverb example for Pure Data.
    +
    36 
    +
    37 The room size according to the maximum delay lengths corresponds to:
    +
    38 
    +
    39 early reflections and recirculating delay 1: 128/16384 seconds * 340.29 m/s speed of sound = 3.5 metres
    +
    40 recirculating delay 2: 7 metres
    +
    41 It looks bigger on paper than it sounds.
    +
    42 */
    43 class
    -
    44  ReverbTank {
    +
    44  ReverbTank {
    45 
    46 public:
    - -
    57  char early_reflection1 = 37,
    -
    58  char early_reflection2 = 77,
    -
    59  char early_reflection3 = 127,
    -
    60  char loop1_delay=117,
    -
    61  unsigned char loop2_delay=255,
    -
    62  char feedback_level = 85):
    -
    63  _early_reflection1(early_reflection1),_early_reflection2(early_reflection3),_early_reflection3(early_reflection3),
    -
    64  _feedback_level(feedback_level)
    -
    65  {
    -
    66  aLoopDel1.set(loop1_delay);
    -
    67  aLoopDel2.set(loop2_delay);
    -
    68  }
    +
    47  /** Constructor. This has default values for the early reflection times, recirculating delay lengths and feedback level,
    +
    48  which can be changed here in the constructor or set with other functions during run time.
    +
    49  @param early_reflection1 how long in delay cells till the first early reflection, from 0 to 127
    +
    50  @param early_reflection2 how long in delay cells till the second early reflection, from early_reflection1 to 127
    +
    51  @param early_reflection3 how long in delay cells till the third early reflection, from early_reflection2 to 127
    +
    52  @param loop1_delay how long in delay cells for the first recirculating delay, form 0 to 127
    +
    53  @param loop2_delay how long in delay cells for the first recirculating delay, form 0 to 255
    +
    54  @param feedback_level how much recirculation, from -128 to 127
    +
    55  */
    + +
    57  char early_reflection1 = 37,
    +
    58  char early_reflection2 = 77,
    +
    59  char early_reflection3 = 127,
    +
    60  char loop1_delay=117,
    +
    61  unsigned char loop2_delay=255,
    +
    62  char feedback_level = 85):
    +
    63  _early_reflection1(early_reflection1),_early_reflection2(early_reflection3),_early_reflection3(early_reflection3),
    +
    64  _feedback_level(feedback_level)
    +
    65  {
    +
    66  aLoopDel1.set(loop1_delay);
    +
    67  aLoopDel2.set(loop2_delay);
    +
    68  }
    69 
    70 
    -
    76  int next(int input){
    -
    77  static int recycle1, recycle2;
    +
    71  /** Process the next audio sample and return the reverbed signal. This returns only the "wet" signal,
    +
    72  which can be combined with the dry input signal in the sketch.
    +
    73  @param input the audio signal to process
    +
    74  @return the processed signal
    +
    75  */
    +
    76  int next(int input){
    +
    77  static int recycle1, recycle2;
    78 
    -
    79  // early reflections
    -
    80  int asig = aLoopDel0.next(input, _early_reflection1);
    -
    81  asig += aLoopDel0.read(_early_reflection2);
    -
    82  asig += aLoopDel0.read(_early_reflection3);
    -
    83  asig >>= 2;
    +
    79  // early reflections
    +
    80  int asig = aLoopDel0.next(input, _early_reflection1);
    +
    81  asig += aLoopDel0.read(_early_reflection2);
    +
    82  asig += aLoopDel0.read(_early_reflection3);
    +
    83  asig >>= 2;
    84 
    -
    85  // recirculating delays
    -
    86  char feedback_sig1 = (char) min(max(((recycle1 * _feedback_level)>>7),-128),127); // feedback clipped
    -
    87  char feedback_sig2 = (char) min(max(((recycle2 * _feedback_level)>>7),-128),127); // feedback clipped
    -
    88  int sig3 = aLoopDel1.next(asig+feedback_sig1);
    -
    89  int sig4 = aLoopDel2.next(asig+feedback_sig2);
    -
    90  recycle1 = sig3 + sig4;
    -
    91  recycle2 = sig3 - sig4;
    +
    85  // recirculating delays
    +
    86  char feedback_sig1 = (char) min(max(((recycle1 * _feedback_level)>>7),-128),127); // feedback clipped
    +
    87  char feedback_sig2 = (char) min(max(((recycle2 * _feedback_level)>>7),-128),127); // feedback clipped
    +
    88  int sig3 = aLoopDel1.next(asig+feedback_sig1);
    +
    89  int sig4 = aLoopDel2.next(asig+feedback_sig2);
    +
    90  recycle1 = sig3 + sig4;
    +
    91  recycle2 = sig3 - sig4;
    92 
    -
    93  return recycle1;
    -
    94  }
    +
    93  return recycle1;
    +
    94  }
    95 
    96 
    -
    102  void setEarlyReflections(char early_reflection1, char early_reflection2, char early_reflection3){
    -
    103  _early_reflection1=early_reflection1;
    -
    104  _early_reflection2=early_reflection2;
    -
    105  _early_reflection3=early_reflection3;
    -
    106  }
    +
    97  /** Set the early reflection times in terms of delay cells.
    +
    98  @param early_reflection1 how long in delay cells till the first early reflection, from 0 to 127
    +
    99  @param early_reflection2 how long in delay cells till the second early reflection, from early_reflection1 to 127
    +
    100  @param early_reflection3 how long in delay cells till the third early reflection, from early_reflection2 to 127
    +
    101  */
    +
    102  void setEarlyReflections(char early_reflection1, char early_reflection2, char early_reflection3){
    +
    103  _early_reflection1=early_reflection1;
    +
    104  _early_reflection2=early_reflection2;
    +
    105  _early_reflection3=early_reflection3;
    +
    106  }
    107 
    108 
    -
    113  void setLoopDelays(char loop1_delay, unsigned char loop2_delay){
    -
    114  aLoopDel1.set(loop1_delay);
    -
    115  aLoopDel2.set(loop2_delay);
    -
    116  }
    +
    109  /** Set the loop delay times in terms of delay cells.
    +
    110  @param loop1_delay how long in delay cells for the first recirculating delay, form 0 to 127
    +
    111  @param loop2_delay how long in delay cells for the first recirculating delay, form 0 to 255
    +
    112  */
    +
    113  void setLoopDelays(char loop1_delay, unsigned char loop2_delay){
    +
    114  aLoopDel1.set(loop1_delay);
    +
    115  aLoopDel2.set(loop2_delay);
    +
    116  }
    117 
    -
    121  void setFeebackLevel(char feedback_level){
    -
    122  _feedback_level=feedback_level;
    -
    123  }
    +
    118  /** Set the feedback level for the recirculating delays.
    +
    119  @param feedback_level how much recirculation, from -128 to 127
    +
    120  */
    +
    121  void setFeebackLevel(char feedback_level){
    +
    122  _feedback_level=feedback_level;
    +
    123  }
    124 
    125 
    126 private:
    -
    127  char _early_reflection1;
    -
    128  char _early_reflection2;
    -
    129  char _early_reflection3;
    +
    127  char _early_reflection1;
    +
    128  char _early_reflection2;
    +
    129  char _early_reflection3;
    130 
    -
    131  char _feedback_level;
    +
    131  char _feedback_level;
    132 
    -
    133  AudioDelay <128> aLoopDel0; // 128/16384 seconds * 340.29 m/s speed of sound = 3.5 metres
    -
    134  AudioDelay <128,int> aLoopDel1;
    -
    135  AudioDelay <256,int> aLoopDel2; // 7 metres
    +
    133  AudioDelay <128> aLoopDel0; // 128/16384 seconds * 340.29 m/s speed of sound = 3.5 metres
    +
    134  AudioDelay <128,int> aLoopDel1;
    +
    135  AudioDelay <256,int> aLoopDel2; // 7 metres
    136 
    137 };
    -
    138 #endif // #ifndef REVERBTANK_H
    +
    138 #endif // #ifndef REVERBTANK_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Sample.h File Reference
    +
    +
    +
    #include "Arduino.h"
    +#include "MozziGuts.h"
    +#include "mozzi_fixmath.h"
    +#include <util/atomic.h>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Sample< NUM_TABLE_CELLS, UPDATE_RATE >
     Sample is like Oscil, it plays a wavetable. More...
     
    + + + + + + + +

    +Macros

    #define SAMPLE_F_BITS   16
     
    #define SAMPLE_F_BITS_AS_MULTIPLIER   65536
     
    #define SAMPLE_PHMOD_BITS   16
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAMPLE_F_BITS   16
    +
    + +

    Definition at line 35 of file Sample.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAMPLE_F_BITS_AS_MULTIPLIER   65536
    +
    + +

    Definition at line 36 of file Sample.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAMPLE_PHMOD_BITS   16
    +
    + +

    Definition at line 40 of file Sample.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_sample_8h.js b/doc/html/_sample_8h.js new file mode 100644 index 000000000..4d033b145 --- /dev/null +++ b/doc/html/_sample_8h.js @@ -0,0 +1,7 @@ +var _sample_8h = +[ + [ "Sample", "class_sample.html", "class_sample" ], + [ "SAMPLE_F_BITS", "_sample_8h.html#a8eba4424fc276faa39413faf92670505", null ], + [ "SAMPLE_F_BITS_AS_MULTIPLIER", "_sample_8h.html#acb82d9d796d11da458308b170beca908", null ], + [ "SAMPLE_PHMOD_BITS", "_sample_8h.html#a6fccc0a5a1ba5aab43138c6ca0c4b194", null ] +]; \ No newline at end of file diff --git a/doc/html/_sample_8h_source.html b/doc/html/_sample_8h_source.html index 50e58f0d8..8cd45e7e0 100644 --- a/doc/html/_sample_8h_source.html +++ b/doc/html/_sample_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Sample.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Sample.h
    3  *
    4  * Oscil.h owes much to AF_precision_synthesis.pde, 2009, Adrian Freed.
    @@ -126,236 +134,336 @@
    22  *
    23  */
    24 
    -
    25 #ifndef SAMPLE_H_
    -
    26 #define SAMPLE_H_
    -
    27 
    -
    28 #include "Arduino.h"
    -
    29 #include "MozziGuts.h"
    -
    30 #include "mozzi_fixmath.h"
    -
    31 #include <util/atomic.h>
    +
    25 #ifndef SAMPLE_H_
    +
    26 #define SAMPLE_H_
    +
    27 
    +
    28 #include "Arduino.h"
    +
    29 #include "MozziGuts.h"
    +
    30 #include "mozzi_fixmath.h"
    +
    31 #include <util/atomic.h>
    32 
    33 
    34 // fractional bits for sample index precision
    -
    35 #define SAMPLE_F_BITS 16
    -
    36 #define SAMPLE_F_BITS_AS_MULTIPLIER 65536
    -
    37 
    +
    35 #define SAMPLE_F_BITS 16
    +
    36 #define SAMPLE_F_BITS_AS_MULTIPLIER 65536
    +
    37 
    38 // phmod_proportion is an 1n15 fixed-point number only using
    39 // the fractional part and the sign bit
    -
    40 #define SAMPLE_PHMOD_BITS 16
    -
    41 
    +
    40 #define SAMPLE_PHMOD_BITS 16
    +
    41 
    42 
    +
    43 /** Sample is like Oscil, it plays a wavetable. However, Sample can be
    +
    44 set to play once through only, with variable start and end points,
    +
    45 or can loop, also with variable start and end points.
    +
    46 It defaults to playing once through the whole sound table, from start to finish.
    +
    47 @tparam NUM_TABLE_CELLS This is defined in the table ".h" file the Sample will be
    +
    48 using. The sound table can be arbitrary length for Sample.
    +
    49 It's important that NUM_TABLE_CELLS is either a literal number (eg. "8192") or a
    +
    50 defined macro, rather than a const or int, for the Sample to run fast enough.
    +
    51 @tparam UPDATE_RATE This will be AUDIO_RATE if the Sample is updated in
    +
    52 updateAudio(), or CONTROL_RATE if it's updated each time updateControl() is
    +
    53 called. It could also be a fraction of CONTROL_RATE if you are doing some kind
    +
    54 of cyclic updating in updateControl(), for example, to spread out the processor load.
    +
    55 @section char2mozzi
    +
    56 Converting soundfiles for Mozzi.
    +
    57 There is a python script called char2mozzi.py in the Mozzi/python folder.
    +
    58 The script converts raw sound data saved from a program like Audacity.
    +
    59 Instructions are in the char2mozzi.py file.
    +
    60 */
    61 template <unsigned int NUM_TABLE_CELLS, unsigned int UPDATE_RATE>
    -
    62 class Sample
    +
    62 class Sample
    63 {
    64 
    65 public:
    66 
    -
    73  Sample(const char * TABLE_NAME):table(TABLE_NAME),endpos_fractional((unsigned long) NUM_TABLE_CELLS << SAMPLE_F_BITS) // so isPlaying() will work
    -
    74  {
    -
    75  setLoopingOff();
    -
    76  //rangeWholeSample();
    -
    77  }
    +
    67  /** Constructor.
    +
    68  @param TABLE_NAME the name of the array the Sample will be using. This
    +
    69  can be found in the table ".h" file if you are using a table made for
    +
    70  Mozzi by the char2mozzi.py python script in Mozzi's python
    +
    71  folder. Sound tables can be of arbitrary lengths for Sample().
    +
    72  */
    +
    73  Sample(const char * TABLE_NAME):table(TABLE_NAME),endpos_fractional((unsigned long) NUM_TABLE_CELLS << SAMPLE_F_BITS) // so isPlaying() will work
    +
    74  {
    + +
    76  //rangeWholeSample();
    +
    77  }
    78 
    79 
    80 
    -
    85  Sample():endpos_fractional(4294967295UL) // biggest UL number so isPlaying() will work
    -
    86  {
    -
    87  setLoopingOff();
    -
    88  //rangeWholeSample();
    -
    89  }
    +
    81  /** Constructor.
    +
    82  Declare a Sample with template TABLE_NUM_CELLS and UPDATE_RATE parameters, without specifying a particular wave table for it to play.
    +
    83  The table can be set or changed on the fly with setTable().
    +
    84  */
    +
    85  Sample():endpos_fractional(4294967295UL) // biggest UL number so isPlaying() will work
    +
    86  {
    + +
    88  //rangeWholeSample();
    +
    89  }
    90 
    91 
    -
    95  inline
    -
    96  void setTable(const char * TABLE_NAME)
    -
    97  {
    -
    98  table = TABLE_NAME;
    -
    99  }
    +
    92  /** Change the sound table which will be played by the Sample.
    +
    93  @param TABLE_NAME is the name of the array in the table ".h" file you're using.
    +
    94  */
    +
    95  inline
    +
    96  void setTable(const char * TABLE_NAME)
    +
    97  {
    +
    98  table = TABLE_NAME;
    +
    99  }
    100 
    101 
    -
    105  inline
    -
    106  void setStart(unsigned int startpos)
    -
    107  {
    -
    108  startpos_fractional = (unsigned long) start << SAMPLE_F_BITS;
    -
    109  }
    +
    102  /** Sets the starting position in samples.
    +
    103  @param startpos offset position in samples.
    +
    104  */
    +
    105  inline
    +
    106  void setStart(unsigned int startpos)
    +
    107  {
    +
    108  startpos_fractional = (unsigned long) start << SAMPLE_F_BITS;
    +
    109  }
    110 
    111 
    -
    114  inline
    -
    115  void start()
    -
    116  {
    -
    117  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    118  {
    -
    119  phase_fractional = startpos_fractional;
    -
    120  }
    -
    121  }
    +
    112  /** Resets the phase (the playhead) to the start position, which will be 0 unless set to another value with setStart();
    +
    113  */
    +
    114  inline
    +
    115  void start()
    +
    116  {
    +
    117  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    118  {
    +
    119  phase_fractional = startpos_fractional;
    +
    120  }
    +
    121  }
    122 
    123 
    -
    127  inline
    -
    128  void start(unsigned int startpos)
    -
    129  {
    -
    130  setStart(startpos);
    -
    131  start();
    -
    132  }
    +
    124  /** Sets the a new start position and sets the phase (the playhead) to that position.
    +
    125  @param startpos position in samples from the beginning of the sound.
    +
    126  */
    +
    127  inline
    +
    128  void start(unsigned int startpos)
    +
    129  {
    +
    130  setStart(startpos);
    +
    131  start();
    +
    132  }
    133 
    134 
    -
    138  inline
    -
    139  void setEnd(unsigned int end)
    -
    140  {
    -
    141  endpos_fractional = (unsigned long) end << SAMPLE_F_BITS;
    -
    142  }
    +
    135  /** Sets the end position in samples from the beginning of the sound.
    +
    136  @param end position in samples.
    +
    137  */
    +
    138  inline
    +
    139  void setEnd(unsigned int end)
    +
    140  {
    +
    141  endpos_fractional = (unsigned long) end << SAMPLE_F_BITS;
    +
    142  }
    143 
    144 
    -
    147  inline
    - -
    149  {
    -
    150  startpos_fractional = 0;
    -
    151  endpos_fractional = (unsigned long) NUM_TABLE_CELLS << SAMPLE_F_BITS;
    -
    152  }
    +
    145  /** Sets the start and end points to include the range of the whole sound table.
    +
    146  */
    +
    147  inline
    + +
    149  {
    +
    150  startpos_fractional = 0;
    +
    151  endpos_fractional = (unsigned long) NUM_TABLE_CELLS << SAMPLE_F_BITS;
    +
    152  }
    153 
    154 
    -
    157  inline
    - -
    159  {
    -
    160  looping=true;
    -
    161  }
    +
    155  /** Turns looping on, with the whole sample length as the loop range.
    +
    156  */
    +
    157  inline
    + +
    159  {
    +
    160  looping=true;
    +
    161  }
    162 
    163 
    -
    166  inline
    - -
    168  {
    -
    169  looping=false;
    -
    170  }
    +
    164  /** Turns looping off.
    +
    165  */
    +
    166  inline
    + +
    168  {
    +
    169  looping=false;
    +
    170  }
    171 
    172 
    -
    180  inline
    -
    181  char next() // 4us
    -
    182  {
    -
    183  char out = 0;
    -
    184  if (!looping)
    -
    185  {
    -
    186  if (phase_fractional<endpos_fractional){
    -
    187  out = (char)pgm_read_byte_near(table + (phase_fractional >> SAMPLE_F_BITS));
    -
    188  incrementPhase();
    -
    189  }
    -
    190  }
    -
    191  else
    -
    192  {
    -
    193  if (phase_fractional>endpos_fractional)
    -
    194  phase_fractional = startpos_fractional + (phase_fractional - endpos_fractional);
    +
    173  /**
    +
    174  Returns the sample at the current phase position, or 0 if looping is off
    +
    175  and the phase overshoots the end of the sample. Updates the phase
    +
    176  according to the current frequency.
    +
    177  @return the next sample value from the table, or 0 if it's finished playing.
    +
    178  @todo in next(), incrementPhase() happens in a different position than for Oscil - check if it can be standardised
    +
    179  */
    +
    180  inline
    +
    181  char next() // 4us
    +
    182  {
    +
    183  char out = 0;
    +
    184  if (!looping)
    +
    185  {
    +
    186  if (phase_fractional<endpos_fractional){
    +
    187  out = (char)pgm_read_byte_near(table + (phase_fractional >> SAMPLE_F_BITS));
    +
    188  incrementPhase();
    +
    189  }
    +
    190  }
    +
    191  else
    +
    192  {
    +
    193  if (phase_fractional>endpos_fractional)
    +
    194  phase_fractional = startpos_fractional + (phase_fractional - endpos_fractional);
    195 
    -
    196  out = (char)pgm_read_byte_near(table + (phase_fractional >> SAMPLE_F_BITS));
    -
    197  incrementPhase();
    -
    198  }
    -
    199  return out;
    -
    200  }
    +
    196  out = (char)pgm_read_byte_near(table + (phase_fractional >> SAMPLE_F_BITS));
    +
    197  incrementPhase();
    +
    198  }
    +
    199  return out;
    +
    200  }
    201 
    202 
    -
    206  inline
    -
    207  boolean isPlaying(){
    -
    208  return phase_fractional<endpos_fractional;
    -
    209  }
    +
    203  /** Checks if the sample is playing by seeing if the phase is within the limits of its end position.
    +
    204  @return true if the sample is playing
    +
    205  */
    +
    206  inline
    + +
    208  return phase_fractional<endpos_fractional;
    +
    209  }
    210 
    211 
    -
    212  // Not readjusted for arbitrary table length yet
    -
    213  //
    -
    214  // Returns the next sample given a phase modulation value.
    -
    215  // @param phmod_proportion phase modulation value given as a proportion of the wave. The
    -
    216  // phmod_proportion parameter is a Q15n16 fixed-point number where to fractional
    -
    217  // n16 part represents -1 to 1, modulating the phase by one whole table length in
    -
    218  // each direction.
    -
    219  // @return a sample from the table.
    -
    220  //
    -
    221  // inline
    -
    222  // char phMod(long phmod_proportion)
    -
    223  // {
    -
    224  // incrementPhase();
    -
    225  // return (char)pgm_read_byte_near(table + (((phase_fractional+(phmod_proportion * NUM_TABLE_CELLS))>>SAMPLE_SAMPLE_F_BITS) & (NUM_TABLE_CELLS - 1)));
    -
    226  // }
    +
    212  // Not readjusted for arbitrary table length yet
    +
    213  //
    +
    214  // Returns the next sample given a phase modulation value.
    +
    215  // @param phmod_proportion phase modulation value given as a proportion of the wave. The
    +
    216  // phmod_proportion parameter is a Q15n16 fixed-point number where to fractional
    +
    217  // n16 part represents -1 to 1, modulating the phase by one whole table length in
    +
    218  // each direction.
    +
    219  // @return a sample from the table.
    +
    220  //
    +
    221  // inline
    +
    222  // char phMod(long phmod_proportion)
    +
    223  // {
    +
    224  // incrementPhase();
    +
    225  // return (char)pgm_read_byte_near(table + (((phase_fractional+(phmod_proportion * NUM_TABLE_CELLS))>>SAMPLE_SAMPLE_F_BITS) & (NUM_TABLE_CELLS - 1)));
    +
    226  // }
    227 
    228 
    229 
    -
    237  inline
    -
    238  void setFreq (int frequency) {
    -
    239  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    240  {
    -
    241  phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)*frequency)/UPDATE_RATE) << (SAMPLE_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS);
    -
    242  }
    -
    243  }
    +
    230  /** Set the oscillator frequency with an unsigned int.
    +
    231  This is faster than using a float, so it's useful when processor time is tight,
    +
    232  but it can be tricky with low and high frequencies, depending on the size of the
    +
    233  wavetable being used. If you're not getting the results you expect, try
    +
    234  explicitly using a float, or try setFreq_Q24n8.
    +
    235  @param frequency to play the wave table.
    +
    236  */
    +
    237  inline
    +
    238  void setFreq (int frequency) {
    +
    239  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    240  {
    +
    241  phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)*frequency)/UPDATE_RATE) << (SAMPLE_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS);
    +
    242  }
    +
    243  }
    244 
    245 
    -
    251  inline
    -
    252  void setFreq(float frequency)
    -
    253  { // 1 us - using float doesn't seem to incur measurable overhead with the oscilloscope
    -
    254  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    255  {
    -
    256  phase_increment_fractional = (unsigned long)((((float)NUM_TABLE_CELLS * frequency)/UPDATE_RATE) * SAMPLE_F_BITS_AS_MULTIPLIER);
    -
    257  }
    -
    258  }
    +
    246  /** Set the sample frequency with a float. Using a float is the most reliable
    +
    247  way to set frequencies, -Might- be slower than using an int but you need either
    +
    248  this or setFreq_Q24n8 for fractional frequencies.
    +
    249  @param frequency to play the wave table.
    +
    250  */
    +
    251  inline
    +
    252  void setFreq(float frequency)
    +
    253  { // 1 us - using float doesn't seem to incur measurable overhead with the oscilloscope
    +
    254  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    255  {
    +
    256  phase_increment_fractional = (unsigned long)((((float)NUM_TABLE_CELLS * frequency)/UPDATE_RATE) * SAMPLE_F_BITS_AS_MULTIPLIER);
    +
    257  }
    +
    258  }
    259 
    260 
    -
    269  inline
    -
    270  void setFreq_Q24n8(Q24n8 frequency)
    -
    271  {
    -
    272  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    273  {
    -
    274  //phase_increment_fractional = (frequency* (NUM_TABLE_CELLS>>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
    -
    275  phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)>>3)*frequency)/(UPDATE_RATE>>6))
    -
    276  << (SAMPLE_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
    -
    277  }
    -
    278  }
    +
    261  /** Set the frequency using Q24n8 fixed-point number format.
    +
    262  This might be faster than the float version for setting low frequencies
    +
    263  such as 1.5 Hz, or other values which may not work well with your table
    +
    264  size. Note: use with caution because it's prone to overflow with higher
    +
    265  frequencies and larger table sizes. An Q24n8 representation of 1.5 is 384
    +
    266  (ie. 1.5 * 256).
    +
    267  @param frequency in Q24n8 fixed-point number format.
    +
    268  */
    +
    269  inline
    +
    270  void setFreq_Q24n8(Q24n8 frequency)
    +
    271  {
    +
    272  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    273  {
    +
    274  //phase_increment_fractional = (frequency* (NUM_TABLE_CELLS>>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
    +
    275  phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<<ADJUST_FOR_NUM_TABLE_CELLS)>>3)*frequency)/(UPDATE_RATE>>6))
    +
    276  << (SAMPLE_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
    +
    277  }
    +
    278  }
    279 
    280 
    -
    286  inline
    -
    287  char atIndex(unsigned int index)
    -
    288  {
    -
    289  return (char)pgm_read_byte_near(table + (index & (NUM_TABLE_CELLS - 1)));
    -
    290  }
    +
    281  /** Returns the sample at the given table index.
    +
    282  @param index between 0 and the table size.The
    +
    283  index rolls back around to 0 if it's larger than the table size.
    +
    284  @return the sample at the given table index.
    +
    285  */
    +
    286  inline
    +
    287  char atIndex(unsigned int index)
    +
    288  {
    +
    289  return (char)pgm_read_byte_near(table + (index & (NUM_TABLE_CELLS - 1)));
    +
    290  }
    291 
    292 
    -
    303  inline
    -
    304  unsigned long phaseIncFromFreq(unsigned int frequency)
    -
    305  {
    -
    306  return (((unsigned long)frequency * NUM_TABLE_CELLS)/UPDATE_RATE) << SAMPLE_F_BITS;
    -
    307  }
    +
    293  /** phaseIncFromFreq() and setPhaseInc() are for saving processor time when sliding
    +
    294  between frequencies. Instead of recalculating the phase increment for each
    +
    295  frequency in between, you can just calculate the phase increment for each end
    +
    296  frequency with phaseIncFromFreq(), then use a Line to interpolate on the fly and
    +
    297  use setPhaseInc() to set the phase increment at each step. (Note: I should
    +
    298  really profile this with the oscilloscope to see if it's worth the extra
    +
    299  confusion!)
    +
    300  @param frequency for which you want to calculate a phase increment value.
    +
    301  @return the phase increment value which will produce a given frequency.
    +
    302  */
    +
    303  inline
    +
    304  unsigned long phaseIncFromFreq(unsigned int frequency)
    +
    305  {
    +
    306  return (((unsigned long)frequency * NUM_TABLE_CELLS)/UPDATE_RATE) << SAMPLE_F_BITS;
    +
    307  }
    308 
    309 
    -
    313  inline
    -
    314  void setPhaseInc(unsigned long phaseinc_fractional)
    -
    315  {
    -
    316  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    317  {
    -
    318  phase_increment_fractional = phaseinc_fractional;
    -
    319  }
    -
    320  }
    +
    310  /** Set a specific phase increment. See phaseIncFromFreq().
    +
    311  @param phaseinc_fractional a phase increment value as calculated by phaseIncFromFreq().
    +
    312  */
    +
    313  inline
    +
    314  void setPhaseInc(unsigned long phaseinc_fractional)
    +
    315  {
    +
    316  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    317  {
    +
    318  phase_increment_fractional = phaseinc_fractional;
    +
    319  }
    +
    320  }
    321 
    322 
    323 private:
    324 
    325 
    +
    326  /** Used for shift arithmetic in setFreq() and its variations.
    +
    327  */
    328 static const unsigned char ADJUST_FOR_NUM_TABLE_CELLS = (NUM_TABLE_CELLS<2048) ? 8 : 0;
    329 
    330 
    -
    333  inline
    -
    334  void incrementPhase()
    -
    335  {
    -
    336  phase_fractional += phase_increment_fractional;
    -
    337  }
    +
    331  /** Increments the phase of the oscillator without returning a sample.
    +
    332  */
    +
    333  inline
    +
    334  void incrementPhase()
    +
    335  {
    +
    336  phase_fractional += phase_increment_fractional;
    +
    337  }
    338 
    339 
    -
    340  volatile unsigned long phase_fractional;
    -
    341  volatile unsigned long phase_increment_fractional;
    -
    342  const char * table;
    -
    343  bool looping;
    -
    344  unsigned long startpos_fractional, endpos_fractional;
    +
    340  volatile unsigned long phase_fractional;
    +
    341  volatile unsigned long phase_increment_fractional;
    +
    342  const char * table;
    +
    343  bool looping;
    +
    344  unsigned long startpos_fractional, endpos_fractional;
    345 };
    346 
    -
    347 #endif /* SAMPLE_H_ */
    +
    347 #endif /* SAMPLE_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    Smooth.h File Reference
    +
    +
    +
    #include "Arduino.h"
    +#include "mozzi_fixmath.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  Smooth< T >
     A simple infinite impulse response low pass filter for smoothing control signals. More...
     
    +
    +
    + + + + diff --git a/doc/html/_smooth_8h_source.html b/doc/html/_smooth_8h_source.html index 5c986dee8..a21239227 100644 --- a/doc/html/_smooth_8h_source.html +++ b/doc/html/_smooth_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    Smooth.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Smooth.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,141 +132,219 @@
    20  *
    21  */
    22 
    -
    23 #ifndef SMOOTH_H_
    -
    24 #define SMOOTH_H_
    -
    25 
    -
    26 #include "Arduino.h"
    -
    27 #include "mozzi_fixmath.h"
    +
    23 #ifndef SMOOTH_H_
    +
    24 #define SMOOTH_H_
    +
    25 
    +
    26 #include "Arduino.h"
    +
    27 #include "mozzi_fixmath.h"
    28 
    +
    29 /** A simple infinite impulse response low pass filter for smoothing control signals.
    +
    30 This algorithm comes from http://en.wikipedia.org/wiki/Low-pass_filter:
    +
    31 y[i] := y[i-1] + α * (x[i] - y[i-1]),
    +
    32 translated as
    +
    33 out = last_out + a * (in - last_out).
    +
    34 It's not calibrated to any real-world update rate, so if you use it at
    +
    35 CONTROL_RATE and you change CONTROL_RATE, you'll need to adjust the smoothness
    +
    36 value to suit.
    +
    37 @tparam T the type of numbers being smoothed. Watch out for numbers overflowing the
    +
    38 internal calculations. Some experimentation is recommended.
    +
    39 @note Timing: ~5us for 16 bit types, ~1us for 8 bit types.
    +
    40 @todo Check if 8 bit templates can work efficiently with a higher res smoothness -
    +
    41  as is they don't have enough resolution to work well at audio rate. See if Line might be
    +
    42  more useful in most cases.
    +
    43 */
    +
    44 
    45 template <class T>
    -
    46 class Smooth
    +
    46 class Smooth
    47 {
    48 private:
    -
    49  long last_out;
    -
    50  Q0n16 a;
    +
    49  long last_out;
    +
    50  Q0n16 a;
    51 
    52 public:
    -
    58  Smooth(float smoothness)
    -
    59  {
    -
    60  setSmoothness(smoothness);
    -
    61  }
    +
    53  /** Constructor.
    +
    54  @param smoothness sets how much smoothing the filter will apply to
    +
    55  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    56  very smooth.
    +
    57  */
    +
    58  Smooth(float smoothness)
    +
    59  {
    +
    60  setSmoothness(smoothness);
    +
    61  }
    62 
    -
    67  inline
    -
    68  T next(T in)
    -
    69  {
    -
    70  long out = ((((((long)in - (last_out>>8)) * a))>>8) + last_out);
    -
    71  last_out = out;
    -
    72  return (T)(out>>8);
    -
    73  }
    +
    63  /** Filters the input and returns the filtered value.
    +
    64  @param in the signal to be smoothed.
    +
    65  @return the filtered signal.
    +
    66  */
    +
    67  inline
    +
    68  T next(T in)
    +
    69  {
    +
    70  long out = ((((((long)in - (last_out>>8)) * a))>>8) + last_out);
    +
    71  last_out = out;
    +
    72  return (T)(out>>8);
    +
    73  }
    74 
    -
    80  inline
    -
    81  void setSmoothness(float smoothness)
    -
    82  {
    -
    83  a=float_to_Q0n16(1.f-smoothness);
    -
    84  }
    +
    75  /** Sets how much smoothing the filter will apply to its input.
    +
    76  @param smoothness sets how much smoothing the filter will apply to
    +
    77  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    78  very smooth.
    +
    79  */
    +
    80  inline
    +
    81  void setSmoothness(float smoothness)
    +
    82  {
    +
    83  a=float_to_Q0n16(1.f-smoothness);
    +
    84  }
    85 
    86 };
    87 
    -
    88  // doxygen can ignore the specialisations
    +
    88 
    +
    89 /** @cond */ // doxygen can ignore the specialisations
    90 
    +
    91 /** unsigned char specialisation of Smooth template*/
    92 template <>
    -
    93 class Smooth <unsigned char>
    +
    93 class Smooth <unsigned char>
    94 {
    95 private:
    -
    96  unsigned int last_out;
    -
    97  Q0n8 a;
    +
    96  unsigned int last_out;
    +
    97  Q0n8 a;
    98 
    99 public:
    -
    105  Smooth(float smoothness)
    -
    106  {
    -
    107  setSmoothness(smoothness);
    -
    108  }
    +
    100  /** Constructor.
    +
    101  @param smoothness sets how much smoothing the filter will apply to
    +
    102  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    103  very smooth.
    +
    104  */
    +
    105  Smooth(float smoothness)
    +
    106  {
    +
    107  setSmoothness(smoothness);
    +
    108  }
    109 
    -
    114  inline
    -
    115  unsigned char next(unsigned char in)
    -
    116  {
    -
    117  unsigned int out = (((((int)in - (last_out>>8)) * a)) + last_out);
    -
    118  last_out = out;
    -
    119  return (unsigned char)(out>>8);
    -
    120  }
    +
    110  /** Filters the input and returns the filtered value.
    +
    111  @param in the signal to be smoothed.
    +
    112  @return the filtered signal.
    +
    113  */
    +
    114  inline
    +
    115  unsigned char next(unsigned char in)
    +
    116  {
    +
    117  unsigned int out = (((((int)in - (last_out>>8)) * a)) + last_out);
    +
    118  last_out = out;
    +
    119  return (unsigned char)(out>>8);
    +
    120  }
    121 
    -
    127  inline
    -
    128  void setSmoothness(float smoothness)
    -
    129  {
    -
    130  a=float_to_Q0n8(1.f-smoothness);
    -
    131  }
    +
    122  /** Sets how much smoothing the filter will apply to its input.
    +
    123  @param smoothness sets how much smoothing the filter will apply to
    +
    124  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    125  very smooth.
    +
    126  */
    +
    127  inline
    +
    128  void setSmoothness(float smoothness)
    +
    129  {
    +
    130  a=float_to_Q0n8(1.f-smoothness);
    +
    131  }
    132 
    133 };
    134 
    135 
    +
    136 /** char specialisation of Smooth template*/
    137 template <>
    -
    138 class Smooth <char>
    +
    138 class Smooth <char>
    139 {
    140 private:
    -
    141  int last_out;
    -
    142  Q0n8 a;
    +
    141  int last_out;
    +
    142  Q0n8 a;
    143 
    144 public:
    -
    150  Smooth(float smoothness)
    -
    151  {
    -
    152  setSmoothness(smoothness);
    -
    153  }
    +
    145  /** Constructor.
    +
    146  @param smoothness sets how much smoothing the filter will apply to
    +
    147  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    148  very smooth.
    +
    149  */
    +
    150  Smooth(float smoothness)
    +
    151  {
    +
    152  setSmoothness(smoothness);
    +
    153  }
    154 
    -
    159  inline
    -
    160  char next(char in)
    -
    161  {
    -
    162  int out = (((((int)in - (last_out>>8)) * a)) + last_out);
    -
    163  last_out = out;
    -
    164  return (char)(out>>8);
    -
    165  }
    +
    155  /** Filters the input and returns the filtered value.
    +
    156  @param in the signal to be smoothed.
    +
    157  @return the filtered signal.
    +
    158  */
    +
    159  inline
    +
    160  char next(char in)
    +
    161  {
    +
    162  int out = (((((int)in - (last_out>>8)) * a)) + last_out);
    +
    163  last_out = out;
    +
    164  return (char)(out>>8);
    +
    165  }
    166 
    -
    172  inline
    -
    173  void setSmoothness(float smoothness)
    -
    174  {
    -
    175  a=float_to_Q0n8(1.f-smoothness);
    -
    176  }
    +
    167  /** Sets how much smoothing the filter will apply to its input.
    +
    168  @param smoothness sets how much smoothing the filter will apply to
    +
    169  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    170  very smooth.
    +
    171  */
    +
    172  inline
    +
    173  void setSmoothness(float smoothness)
    +
    174  {
    +
    175  a=float_to_Q0n8(1.f-smoothness);
    +
    176  }
    177 
    178 };
    179 
    +
    180 /** float specialisation of Smooth template*/
    181 template <>
    -
    182 class Smooth <float>
    +
    182 class Smooth <float>
    183 {
    184 private:
    -
    185  float last_out;
    -
    186  float a;
    +
    185  float last_out;
    +
    186  float a;
    187 
    188 public:
    -
    194  Smooth(float smoothness)
    -
    195  {
    -
    196  setSmoothness(smoothness);
    -
    197  }
    +
    189  /** Constructor.
    +
    190  @param smoothness sets how much smoothing the filter will apply to
    +
    191  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    192  very smooth.
    +
    193  */
    +
    194  Smooth(float smoothness)
    +
    195  {
    +
    196  setSmoothness(smoothness);
    +
    197  }
    198 
    -
    203  inline
    -
    204  float next(float in)
    -
    205  {
    -
    206  float out = last_out + a * (in - last_out);
    -
    207  //float out = (in - last_out * a) + last_out;
    -
    208  last_out = out;
    -
    209  return out;
    -
    210  }
    +
    199  /** Filters the input and returns the filtered value.
    +
    200  @param in the signal to be smoothed.
    +
    201  @return the filtered signal.
    +
    202  */
    +
    203  inline
    +
    204  float next(float in)
    +
    205  {
    +
    206  float out = last_out + a * (in - last_out);
    +
    207  //float out = (in - last_out * a) + last_out;
    +
    208  last_out = out;
    +
    209  return out;
    +
    210  }
    211 
    -
    217  inline
    -
    218  void setSmoothness(float smoothness)
    -
    219  {
    -
    220  a=1.f-smoothness;
    -
    221  }
    +
    212  /** Sets how much smoothing the filter will apply to its input.
    +
    213  @param smoothness sets how much smoothing the filter will apply to
    +
    214  its input. Use a float in the range 0~1, where 0 is not very smooth and 0.99 is
    +
    215  very smooth.
    +
    216  */
    +
    217  inline
    +
    218  void setSmoothness(float smoothness)
    +
    219  {
    +
    220  a=1.f-smoothness;
    +
    221  }
    222 
    223 };
    224 
    225 
    -
    228 #endif /* SMOOTH_H_ */
    +
    226 /** @endcond */
    +
    227 
    +
    228 #endif /* SMOOTH_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    StateVariable.h File Reference
    +
    +
    +
    #include "Arduino.h"
    +#include "util/atomic.h"
    +#include "mozzi_fixmath.h"
    +#include "math.h"
    +#include "mozzi_utils.h"
    +#include "meta.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  StateVariable< FILTER_TYPE >
     A State Variable filter which offers 12db resonant low, high, bandpass and notch modes. More...
     
    + + + + +

    +Enumerations

    enum  filter_types { LOWPASS, +BANDPASS, +HIGHPASS, +NOTCH + }
     State Variable Filter (approximation of Chamberlin version) Informed by pseudocode at http://www.musicdsp.org/showone.php?id=23 and http://www.musicdsp.org/showone.php?id=142. More...
     
    +

    Enumeration Type Documentation

    + +
    +
    + + + + +
    enum filter_types
    +
    +

    References : Hal Chamberlin, Musical Applications of Microprocessors, 2nd Ed, Hayden Book Company 1985. pp 490-492. Jon Dattorro, Effect Design Part 1, J. Audio Eng. Soc., Vol 45, No. 9, 1997 September

    + + + + + +
    Enumerator
    LOWPASS  +
    BANDPASS  +
    HIGHPASS  +
    NOTCH  +
    + +

    Definition at line 43 of file StateVariable.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_state_variable_8h.js b/doc/html/_state_variable_8h.js new file mode 100644 index 000000000..b32a06784 --- /dev/null +++ b/doc/html/_state_variable_8h.js @@ -0,0 +1,10 @@ +var _state_variable_8h = +[ + [ "StateVariable", "class_state_variable.html", "class_state_variable" ], + [ "filter_types", "_state_variable_8h.html#a6fc9fcb59c5ae9d9cd6af2c7aa71061f", [ + [ "LOWPASS", "_state_variable_8h.html#a6fc9fcb59c5ae9d9cd6af2c7aa71061fa0f056d1892baa220efdb9afeca443025", null ], + [ "BANDPASS", "_state_variable_8h.html#a6fc9fcb59c5ae9d9cd6af2c7aa71061fa60d0e520c793b6739bad2b1c2470ee47", null ], + [ "HIGHPASS", "_state_variable_8h.html#a6fc9fcb59c5ae9d9cd6af2c7aa71061fa2ef4633b5cfe5eacaff1e7cef80a56e8", null ], + [ "NOTCH", "_state_variable_8h.html#a6fc9fcb59c5ae9d9cd6af2c7aa71061fad0682496c50c56ab8dc39c36724aa97a", null ] + ] ] +]; \ No newline at end of file diff --git a/doc/html/_state_variable_8h_source.html b/doc/html/_state_variable_8h_source.html index a7d1d6a9c..0f52c28f5 100644 --- a/doc/html/_state_variable_8h_source.html +++ b/doc/html/_state_variable_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    StateVariable.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * StateVariable.h
    3  *
    4  * This implementation copyright 2012 Tim Barrass.
    @@ -125,146 +133,202 @@
    21  */
    22 
    23 
    -
    32 #ifndef STATEVARIABLE_H_
    -
    33 #define STATEVARIABLE_H_
    -
    34 
    -
    35 #include "Arduino.h"
    -
    36 #include "util/atomic.h"
    -
    37 #include "mozzi_fixmath.h"
    -
    38 #include "math.h"
    -
    39 #include "mozzi_utils.h"
    -
    40 #include "meta.h"
    +
    24 /**
    +
    25 State Variable Filter (approximation of Chamberlin version)
    +
    26 Informed by pseudocode at http://www.musicdsp.org/showone.php?id=23 and http://www.musicdsp.org/showone.php?id=142.
    +
    27 References :
    +
    28 Hal Chamberlin, Musical Applications of Microprocessors, 2nd Ed, Hayden Book Company 1985. pp 490-492.
    +
    29 Jon Dattorro, Effect Design Part 1, J. Audio Eng. Soc., Vol 45, No. 9, 1997 September
    +
    30 */
    +
    31 
    +
    32 #ifndef STATEVARIABLE_H_
    +
    33 #define STATEVARIABLE_H_
    +
    34 
    +
    35 #include "Arduino.h"
    +
    36 #include "util/atomic.h"
    +
    37 #include "mozzi_fixmath.h"
    +
    38 #include "math.h"
    +
    39 #include "mozzi_utils.h"
    +
    40 #include "meta.h"
    41 
    42 
    -
    43 enum filter_types {LOWPASS,BANDPASS,HIGHPASS,NOTCH};
    +
    44 
    +
    45 /** A State Variable filter which offers 12db resonant low, high, bandpass and notch modes.
    +
    46 @tparam FILTER_TYPE choose between LOWPASS, BANDPASS, HIGHPASS and NOTCH.
    +
    47 @note To save processing time, this version of the filter does not saturate internally,
    +
    48 so any resonant peaks are unceremoniously truncated. It may be worth adding code to
    +
    49 constrain the internal variables to enable resonant saturating effects.
    +
    50 @todo Try adding code to constrain the internal variables to enable resonant
    +
    51 saturating effects.
    +
    52 */
    53 template <char FILTER_TYPE>
    - +
    55 {
    56 
    57 public:
    58 
    59 
    - -
    63  {
    -
    64  }
    +
    60  /** Constructor.
    +
    61  */
    + +
    63  {
    +
    64  }
    65 
    66 
    67 
    -
    75  void setResonance(Q0n8 resonance){
    -
    76  // qvalue goes from 255 to 0, representing .999 to 0 in fixed point
    -
    77  // lower q, more resonance
    -
    78  q = resonance;
    -
    79  //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    80  //{
    -
    81  scale = (Q0n8)sqrt((unsigned int) resonance<<8);
    -
    82  //}
    -
    83  }
    +
    68  /** Set how resonant the filter will be.
    +
    69  @param resonance a byte value between 1 and 255.
    +
    70  The lower this value is, the more resonant the filter.
    +
    71  At very low values, the filter can output loud peaks which can exceed
    +
    72  Mozzi's output range, so you may need to attenuate the output in your sketch.
    +
    73  @note Timing < 500 ns
    +
    74  */
    +
    75  void setResonance(Q0n8 resonance){
    +
    76  // qvalue goes from 255 to 0, representing .999 to 0 in fixed point
    +
    77  // lower q, more resonance
    +
    78  q = resonance;
    +
    79  //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    80  //{
    +
    81  scale = (Q0n8)sqrt((unsigned int) resonance<<8);
    +
    82  //}
    +
    83  }
    84 
    85 
    86 
    -
    93  /*
    -
    94  void setCentreFreq(unsigned int centre_freq){
    -
    95  // simple frequency tuning with error towards nyquist
    -
    96  // F is the filter's center frequency
    -
    97  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    98  {
    -
    99  f = (Q1n15)(((Q16n16_2PI*centre_freq)>>AUDIO_RATE_AS_LSHIFT)>>1);
    -
    100  }
    -
    101  }
    +
    87  /** Set the centre or corner frequency of the filter.
    +
    88  @param centre_freq 20 - 4096 Hz (AUDIO_RATE/4).
    +
    89  This will be the cut-off frequency for LOWPASS and HIGHPASS, and the
    +
    90  centre frequency to pass or reduce for BANDPASS and NOTCH.
    +
    91  @note Timing 25-30us
    +
    92  */
    +
    93  /*
    +
    94  void setCentreFreq(unsigned int centre_freq){
    +
    95  // simple frequency tuning with error towards nyquist
    +
    96  // F is the filter's center frequency
    +
    97  ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    98  {
    +
    99  f = (Q1n15)(((Q16n16_2PI*centre_freq)>>AUDIO_RATE_AS_LSHIFT)>>1);
    +
    100  }
    +
    101  }
    102 */
    -
    103  void setCentreFreq(unsigned int centre_freq){
    -
    104  // simple frequency tuning with error towards nyquist
    -
    105  // F is the filter's center frequency
    -
    106  //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    -
    107  //{
    -
    108  //f = (Q1n15)(((Q16n16_2PI*centre_freq)>>AUDIO_RATE_AS_LSHIFT)>>1);
    -
    109  f = (Q1n15)((Q16n16_2PI*centre_freq)>>(AUDIO_RATE_AS_LSHIFT+1));
    -
    110  //}
    -
    111  }
    +
    103  void setCentreFreq(unsigned int centre_freq){
    +
    104  // simple frequency tuning with error towards nyquist
    +
    105  // F is the filter's center frequency
    +
    106  //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    +
    107  //{
    +
    108  //f = (Q1n15)(((Q16n16_2PI*centre_freq)>>AUDIO_RATE_AS_LSHIFT)>>1);
    +
    109  f = (Q1n15)((Q16n16_2PI*centre_freq)>>(AUDIO_RATE_AS_LSHIFT+1));
    +
    110  //}
    +
    111  }
    112 
    113 
    -
    119  inline
    -
    120  int next(int input)
    -
    121  {
    -
    122  // chooses a different next() function depending on whether the
    -
    123  // filter is declared as LOWPASS, BANDPASS, HIGHPASS or NOTCH.
    -
    124  // See meta.h.
    -
    125  return next(input, Int2Type<FILTER_TYPE>());
    -
    126  }
    +
    114  /** Calculate the next sample, given an input signal.
    +
    115  @param input the signal input.
    +
    116  @return the signal output.
    +
    117  @note Timing: 16 - 20 us
    +
    118  */
    +
    119  inline
    +
    120  int next(int input)
    +
    121  {
    +
    122  // chooses a different next() function depending on whether the
    +
    123  // filter is declared as LOWPASS, BANDPASS, HIGHPASS or NOTCH.
    +
    124  // See meta.h.
    +
    125  return next(input, Int2Type<FILTER_TYPE>());
    +
    126  }
    127 
    128 
    129 
    130 
    131 private:
    -
    132  int low, band;
    -
    133  Q0n8 q,scale;
    -
    134  volatile Q1n15 f;
    +
    132  int low, band;
    +
    133  Q0n8 q,scale;
    +
    134  volatile Q1n15 f;
    135 
    136 
    -
    142  inline
    -
    143  int next(int input, Int2Type<LOWPASS>)
    -
    144  {
    -
    145  //SET_PIN13_HIGH;
    -
    146  low += (((long)band * f)>>15);
    -
    147  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    -
    148  band += (((long)high * f)>>15);
    -
    149  //int notch = high + low;
    -
    150  //SET_PIN13_LOW;
    -
    151  return low;
    -
    152  }
    +
    137  /** Calculate the next sample, given an input signal.
    +
    138  @param in the signal input.
    +
    139  @return the signal output.
    +
    140  @note Timing: 16 - 20 us
    +
    141  */
    +
    142  inline
    +
    143  int next(int input, Int2Type<LOWPASS>)
    +
    144  {
    +
    145  //SET_PIN13_HIGH;
    +
    146  low += (((long)band * f)>>15);
    +
    147  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    +
    148  band += (((long)high * f)>>15);
    +
    149  //int notch = high + low;
    +
    150  //SET_PIN13_LOW;
    +
    151  return low;
    +
    152  }
    153 
    154 
    -
    160  inline
    -
    161  int next(int input, Int2Type<BANDPASS>)
    -
    162  {
    -
    163  //SET_PIN13_HIGH;
    -
    164  low += (((long)band * f)>>15);
    -
    165  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    -
    166  band += (((long)high * f)>>15);
    -
    167  //int notch = high + low;
    -
    168  //SET_PIN13_LOW;
    -
    169  return band;
    -
    170  }
    +
    155  /** Calculate the next sample, given an input signal.
    +
    156  @param input the signal input.
    +
    157  @return the signal output.
    +
    158  @note Timing:
    +
    159  */
    +
    160  inline
    +
    161  int next(int input, Int2Type<BANDPASS>)
    +
    162  {
    +
    163  //SET_PIN13_HIGH;
    +
    164  low += (((long)band * f)>>15);
    +
    165  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    +
    166  band += (((long)high * f)>>15);
    +
    167  //int notch = high + low;
    +
    168  //SET_PIN13_LOW;
    +
    169  return band;
    +
    170  }
    171 
    172 
    173 
    -
    179  inline
    -
    180  int next(int input, Int2Type<HIGHPASS>)
    -
    181  {
    -
    182  //SET_PIN13_HIGH;
    -
    183  low += (((long)band * f)>>15);
    -
    184  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    -
    185  band += (((long)high * f)>>15);
    -
    186  //int notch = high + low;
    -
    187  //SET_PIN13_LOW;
    -
    188  return high;
    -
    189  }
    +
    174  /** Calculate the next sample, given an input signal.
    +
    175  @param input the signal input.
    +
    176  @return the signal output.
    +
    177  @note Timing:
    +
    178  */
    +
    179  inline
    +
    180  int next(int input, Int2Type<HIGHPASS>)
    +
    181  {
    +
    182  //SET_PIN13_HIGH;
    +
    183  low += (((long)band * f)>>15);
    +
    184  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    +
    185  band += (((long)high * f)>>15);
    +
    186  //int notch = high + low;
    +
    187  //SET_PIN13_LOW;
    +
    188  return high;
    +
    189  }
    190 
    191 
    192 
    -
    198  inline
    -
    199  int next(int input, Int2Type<NOTCH>)
    -
    200  {
    -
    201  //SET_PIN13_HIGH;
    -
    202  low += (((long)band * f)>>15);
    -
    203  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    -
    204  band += (((long)high * f)>>15);
    -
    205  int notch = high + low;
    -
    206  //SET_PIN13_LOW;
    -
    207  return notch;
    -
    208  }
    +
    193  /** Calculate the next sample, given an input signal.
    +
    194  @param input the signal input.
    +
    195  @return the signal output.
    +
    196  @note Timing: 16 - 20 us
    +
    197  */
    +
    198  inline
    +
    199  int next(int input, Int2Type<NOTCH>)
    +
    200  {
    +
    201  //SET_PIN13_HIGH;
    +
    202  low += (((long)band * f)>>15);
    +
    203  int high = (((long)input - low - (((long)band * q)>>8))*scale)>>8;
    +
    204  band += (((long)high * f)>>15);
    +
    205  int notch = high + low;
    +
    206  //SET_PIN13_LOW;
    +
    207  return notch;
    +
    208  }
    209 
    210 };
    211 
    -
    212 #endif /* STATEVARIABLE_H_ */
    +
    212 #endif /* STATEVARIABLE_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + +
    +
    My Project +
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    TimerOne.cpp File Reference
    +
    +
    +
    #include "TimerOne.h"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Variables

    TimerOne Timer1
     
    +

    Variable Documentation

    + +
    +
    + + + + +
    TimerOne Timer1
    +
    + +

    Definition at line 18 of file TimerOne.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_timer_one_8cpp.js b/doc/html/_timer_one_8cpp.js new file mode 100644 index 000000000..0a763ce5e --- /dev/null +++ b/doc/html/_timer_one_8cpp.js @@ -0,0 +1,4 @@ +var _timer_one_8cpp = +[ + [ "Timer1", "_timer_one_8cpp.html#a01cb8b6a2d56e5846df4659968af2731", null ] +]; \ No newline at end of file diff --git a/doc/html/_timer_one_8cpp_source.html b/doc/html/_timer_one_8cpp_source.html new file mode 100644 index 000000000..aac335ad1 --- /dev/null +++ b/doc/html/_timer_one_8cpp_source.html @@ -0,0 +1,155 @@ + + + + + + +My Project: TimerOne.cpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    TimerOne.cpp
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * Interrupt and PWM utilities for 16 bit Timer3 on ATmega168/328
    +
    3  * Original code by Jesse Tane for http://labs.ideo.com August 2008
    +
    4  * Modified March 2009 by Jérôme Despatis and Jesse Tane for ATmega328 support
    +
    5  * Modified June 2009 by Michael Polli and Jesse Tane to fix a bug in setPeriod() which caused the timer to stop
    +
    6  * Modified Oct 2009 by Dan Clemens to work with timer3 of the ATMega1280 or Arduino Mega
    +
    7  * Modified April 2012 by Paul Stoffregen
    +
    8  *
    +
    9  * This is free software. You can redistribute it and/or modify it under
    +
    10  * the terms of Creative Commons Attribution 3.0 United States License.
    +
    11  * To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/us/
    +
    12  * or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
    +
    13  *
    +
    14  */
    +
    15 
    +
    16 #include "TimerOne.h"
    +
    17 
    +
    18 TimerOne Timer1; // preinstatiate
    +
    19 
    +
    20 unsigned int TimerOne::pwmPeriod = 0;
    +
    21 unsigned char TimerOne::clockSelectBits = 0;
    +
    22 
    +
    23 // TB 15-2-2013 removed this and added the more direct version in MozziGuts.cpp
    +
    24 // saves about 1us per ISR, at 16384Hz that's 16ms per second saved. Seems worth it.
    +
    25 /*
    +
    26 // interrupt service routine that wraps a user defined function supplied by attachInterrupt
    +
    27 ISR(TIMER1_OVF_vect)
    +
    28 { //SET_PIN13_HIGH;
    +
    29  Timer1.isrCallback();
    +
    30  //SET_PIN13_LOW; // 2us
    +
    31 }
    +
    32 */
    +
    +
    + + + + diff --git a/doc/html/_timer_one_8h.html b/doc/html/_timer_one_8h.html new file mode 100644 index 000000000..8f8b9a113 --- /dev/null +++ b/doc/html/_timer_one_8h.html @@ -0,0 +1,209 @@ + + + + + + +My Project: TimerOne.h File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    TimerOne.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include "config/known_16bit_timers.h"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Classes

    class  TimerOne
     
    + + + + + + + +

    +Macros

    #define TIMER1_RESOLUTION   65536UL
     
    #define FAST   0
     
    #define PHASE_FREQ_CORRECT   1
     
    + + + +

    +Variables

    TimerOne Timer1
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define FAST   0
    +
    + +

    Definition at line 45 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + +
    #define PHASE_FREQ_CORRECT   1
    +
    + +

    Definition at line 46 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + +
    #define TIMER1_RESOLUTION   65536UL
    +
    + +

    Definition at line 26 of file TimerOne.h.

    + +
    +
    +

    Variable Documentation

    + +
    +
    + + + + +
    TimerOne Timer1
    +
    + +

    Definition at line 18 of file TimerOne.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_timer_one_8h.js b/doc/html/_timer_one_8h.js new file mode 100644 index 000000000..5aa67a74b --- /dev/null +++ b/doc/html/_timer_one_8h.js @@ -0,0 +1,8 @@ +var _timer_one_8h = +[ + [ "TimerOne", "class_timer_one.html", "class_timer_one" ], + [ "FAST", "_timer_one_8h.html#a8091c2bcff55cbe0a4a145fd5fb7c22d", null ], + [ "PHASE_FREQ_CORRECT", "_timer_one_8h.html#ac6ad03a1c932839be238cc5ec19b91fe", null ], + [ "TIMER1_RESOLUTION", "_timer_one_8h.html#a70ae183b494fdeeec787237adfdc9755", null ], + [ "Timer1", "_timer_one_8h.html#a01cb8b6a2d56e5846df4659968af2731", null ] +]; \ No newline at end of file diff --git a/doc/html/_timer_one_8h_source.html b/doc/html/_timer_one_8h_source.html new file mode 100644 index 000000000..b1f90321f --- /dev/null +++ b/doc/html/_timer_one_8h_source.html @@ -0,0 +1,375 @@ + + + + + + +My Project: TimerOne.h Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    TimerOne.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * Interrupt and PWM utilities for 16 bit Timer1 on ATmega168/328
    +
    3  * Original code by Jesse Tane for http://labs.ideo.com August 2008
    +
    4  * Modified March 2009 by Jérôme Despatis and Jesse Tane for ATmega328 support
    +
    5  * Modified June 2009 by Michael Polli and Jesse Tane to fix a bug in setPeriod() which caused the timer to stop
    +
    6  * Modified April 2012 by Paul Stoffregen - portable to other AVR chips, use inline functions
    +
    7  * Modified March 2013 by Tim Barrass to use fast PWM for Mozzi, instead of phase and frequency correct.
    +
    8  * This is free software. You can redistribute it and/or modify it under
    +
    9  * the terms of Creative Commons Attribution 3.0 United States License.
    +
    10  * To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/us/
    +
    11  * or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
    +
    12  *
    +
    13  */
    +
    14 
    +
    15 #ifndef TimerOne_h_
    +
    16 #define TimerOne_h_
    +
    17 
    +
    18 #if defined(ARDUINO) && ARDUINO >= 100
    +
    19 #include "Arduino.h"
    +
    20 #else
    +
    21 #include "WProgram.h"
    +
    22 #endif
    +
    23 
    + +
    25 
    +
    26 #define TIMER1_RESOLUTION 65536UL // Timer1 is 16 bit
    +
    27 
    +
    28 
    +
    29 // Placing nearly all the code in this .h file allows the functions to be
    +
    30 // inlined by the compiler. In the very common case with constant values
    +
    31 // the compiler will perform all calculations and simply write constants
    +
    32 // to the hardware registers (for example, setPeriod).
    +
    33 
    +
    34 // TB2013
    +
    35 // Modes are in ATmega48P/88P/168P/328P technical notes, Table 13-4
    +
    36 // PWM, Phase and Frequency Correct, TOP is ICR1
    +
    37 //#define TCCR1B_PWM_MODE_BITS _BV(WGM13)
    +
    38 
    +
    39 // Fast PWM, PWM, TOP is ICR1 ( this should go twice as fast
    +
    40 //#define TCCR1B_PWM_MODE_BITS _BV(WGM13) | _BV(WGM12)
    +
    41 //#define TCCR1A_PWM_MODE_BITS _BV(WGM11)
    +
    42 //const unsigned char TCCR1B_PWM_MODE_BITS = _BV(WGM13) | _BV(WGM12);
    +
    43 //const unsigned char TCCR1A_PWM_MODE_BITS = _BV(WGM11);
    +
    44 // TB2013 todo (to improve the Library): make the mode set-able instead of hard-coded
    +
    45 #define FAST 0
    +
    46 #define PHASE_FREQ_CORRECT 1
    +
    47 
    +
    48 class TimerOne
    +
    49 {
    +
    50 public:
    +
    51  //****************************
    +
    52  // Configuration
    +
    53  //****************************
    +
    54  void initialize(unsigned long microseconds=1000000, unsigned char mode = PHASE_FREQ_CORRECT) __attribute__((always_inline))
    +
    55  {
    +
    56  //TB2013
    +
    57  _mode = mode;
    +
    58  if (_mode == FAST){
    +
    59  TCCR1B_PWM_MODE_BITS = _BV(WGM13) | _BV(WGM12);
    +
    60  TCCR1A_PWM_MODE_BITS = _BV(WGM11);
    +
    61  }else if (_mode == PHASE_FREQ_CORRECT){
    +
    62  TCCR1B_PWM_MODE_BITS = _BV(WGM13);
    + +
    64  }
    +
    65  TCCR1B = TCCR1B_PWM_MODE_BITS; // set mode as fast or phase and frequency correct pwm, stop the timer
    +
    66  TCCR1A = TCCR1A_PWM_MODE_BITS; // set control register A
    +
    67  // end TB2013
    +
    68  setPeriod(microseconds);
    +
    69  }
    +
    70  void setPeriod(unsigned long microseconds) __attribute__((always_inline))
    +
    71  {
    +
    72  unsigned long cycles;
    +
    73  // TB2013
    +
    74  if (_mode == FAST){
    +
    75  cycles = (F_CPU / 1000000) * microseconds; // adjusted for fast pwm
    +
    76  }else if (_mode == PHASE_FREQ_CORRECT){
    +
    77  cycles = (F_CPU / 2000000) * microseconds;
    +
    78  }
    +
    79  // end TB2013
    +
    80 
    +
    81  if (cycles < TIMER1_RESOLUTION)
    +
    82  {
    +
    83  clockSelectBits = _BV(CS10);
    +
    84  pwmPeriod = cycles;
    +
    85  }
    +
    86  else
    +
    87  if (cycles < TIMER1_RESOLUTION * 8)
    +
    88  {
    +
    89  clockSelectBits = _BV(CS11);
    +
    90  pwmPeriod = cycles / 8;
    +
    91  }
    +
    92  else
    +
    93  if (cycles < TIMER1_RESOLUTION * 64)
    +
    94  {
    +
    95  clockSelectBits = _BV(CS11) | _BV(CS10);
    +
    96  pwmPeriod = cycles / 64;
    +
    97  }
    +
    98  else
    +
    99  if (cycles < TIMER1_RESOLUTION * 256)
    +
    100  {
    +
    101  clockSelectBits = _BV(CS12);
    +
    102  pwmPeriod = cycles / 256;
    +
    103  }
    +
    104  else
    +
    105  if (cycles < TIMER1_RESOLUTION * 1024)
    +
    106  {
    +
    107  clockSelectBits = _BV(CS12) | _BV(CS10);
    +
    108  pwmPeriod = cycles / 1024;
    +
    109  }
    +
    110  else
    +
    111  {
    +
    112  clockSelectBits = _BV(CS12) | _BV(CS10);
    + +
    114  }
    +
    115  ICR1 = pwmPeriod;
    + +
    117  }
    +
    118 
    +
    119  //****************************
    +
    120  // Run Control
    +
    121  //****************************
    +
    122  void start() __attribute__((always_inline))
    +
    123  {
    +
    124  TCCR1B = 0;
    +
    125  TCNT1 = 0; // TODO: does this cause an undesired interrupt?
    + +
    127  }
    +
    128  void stop() __attribute__((always_inline))
    +
    129  {
    +
    130  TCCR1B = TCCR1B_PWM_MODE_BITS;
    +
    131  }
    +
    132  void restart() __attribute__((always_inline))
    +
    133  {
    +
    134  TCCR1B = 0;
    +
    135  TCNT1 = 0;
    + +
    137  }
    +
    138  void resume() __attribute__((always_inline))
    +
    139  {
    + +
    141  }
    +
    142 
    +
    143  //****************************
    +
    144  // PWM outputs
    +
    145  //****************************
    +
    146  void setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline))
    +
    147  {
    +
    148  unsigned long dutyCycle = pwmPeriod;
    +
    149  dutyCycle *= duty;
    +
    150  dutyCycle >>= 10;
    +
    151  if (pin == TIMER1_A_PIN)
    +
    152  OCR1A = dutyCycle;
    +
    153 #ifdef TIMER1_B_PIN
    +
    154 
    +
    155  else if (pin == TIMER1_B_PIN)
    +
    156  OCR1B = dutyCycle;
    +
    157 #endif
    +
    158  #ifdef TIMER1_C_PIN
    +
    159 
    +
    160  else if (pin == TIMER1_C_PIN)
    +
    161  OCR1C = dutyCycle;
    +
    162 #endif
    +
    163 
    +
    164  }
    +
    165  void pwm(char pin, unsigned int duty) __attribute__((always_inline))
    +
    166  {
    +
    167  if (pin == TIMER1_A_PIN)
    +
    168  {
    +
    169  pinMode(TIMER1_A_PIN, OUTPUT);
    +
    170  TCCR1A |= _BV(COM1A1) | TCCR1A_PWM_MODE_BITS;
    +
    171  }
    +
    172 #ifdef TIMER1_B_PIN
    +
    173  else if (pin == TIMER1_B_PIN)
    +
    174  {
    +
    175  pinMode(TIMER1_B_PIN, OUTPUT);
    +
    176  TCCR1A |= _BV(COM1B1) | TCCR1A_PWM_MODE_BITS;
    +
    177  }
    +
    178 #endif
    +
    179  #ifdef TIMER1_C_PIN
    +
    180  else if (pin == TIMER1_C_PIN)
    +
    181  {
    +
    182  pinMode(TIMER1_C_PIN, OUTPUT);
    +
    183  TCCR1A |= _BV(COM1C1) | TCCR1A_PWM_MODE_BITS;
    +
    184  }
    +
    185 #endif
    +
    186  setPwmDuty(pin, duty);
    + +
    188  }
    +
    189  void pwm(char pin, unsigned int duty, unsigned long microseconds) __attribute__((always_inline))
    +
    190  {
    +
    191  if (microseconds > 0)
    +
    192  setPeriod(microseconds);
    +
    193  pwm(pin, duty);
    +
    194  }
    +
    195  void disablePwm(char pin) __attribute__((always_inline))
    +
    196  {
    +
    197  if (pin == TIMER1_A_PIN) {
    +
    198  TCCR1A &= ~_BV(COM1A1);
    +
    199  TCCR1A &= ~TCCR1A_PWM_MODE_BITS; }
    +
    200 #ifdef TIMER1_B_PIN
    +
    201 
    +
    202  else if (pin == TIMER1_B_PIN) {
    +
    203  TCCR1A &= ~_BV(COM1B1);
    +
    204  TCCR1A &= ~TCCR1A_PWM_MODE_BITS; }
    +
    205 #endif
    +
    206  #ifdef TIMER1_C_PIN
    +
    207 
    +
    208  else if (pin == TIMER1_C_PIN) {
    +
    209  TCCR1A &= ~_BV(COM1C1);
    +
    210  TCCR1A &= ~TCCR1A_PWM_MODE_BITS; }
    +
    211 #endif
    +
    212 
    +
    213  }
    +
    214 
    +
    215  //****************************
    +
    216  // Interrupt Function
    +
    217  //****************************
    +
    218  void attachInterrupt(void (*isr)()) __attribute__((always_inline))
    +
    219  {
    +
    220  isrCallback = isr;
    +
    221  TIMSK1 = _BV(TOIE1);
    +
    222  }
    +
    223  void attachInterrupt(void (*isr)(), unsigned long microseconds) __attribute__((always_inline))
    +
    224  {
    +
    225  if(microseconds > 0)
    +
    226  setPeriod(microseconds);
    +
    227  attachInterrupt(isr);
    +
    228  }
    +
    229  void detachInterrupt() __attribute__((always_inline))
    +
    230  {
    +
    231  TIMSK1 = 0;
    +
    232  }
    +
    233  void (*isrCallback)();
    +
    234 
    +
    235  unsigned int getPeriod(){
    +
    236  return pwmPeriod;
    +
    237  }
    +
    238 
    +
    239 protected:
    +
    240  // properties
    +
    241  static unsigned int pwmPeriod;
    +
    242  static unsigned char clockSelectBits;
    +
    243  // TB2013
    +
    244  unsigned char _mode;
    +
    245  unsigned char TCCR1B_PWM_MODE_BITS;
    +
    246  unsigned char TCCR1A_PWM_MODE_BITS;
    +
    247 };
    +
    248 
    +
    249 extern TimerOne Timer1;
    +
    250 
    +
    251 #endif
    +
    252 
    +
    +
    + + + + diff --git a/doc/html/_timer_zero_8cpp.html b/doc/html/_timer_zero_8cpp.html new file mode 100644 index 000000000..4775ba50f --- /dev/null +++ b/doc/html/_timer_zero_8cpp.html @@ -0,0 +1,251 @@ + + + + + + +My Project: TimerZero.cpp File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    TimerZero.cpp File Reference
    +
    +
    +
    #include <avr/pgmspace.h>
    +#include <avr/interrupt.h>
    +#include <TimerZero.h>
    +#include <Arduino.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + +

    +Macros

    #define PS1   (1 << CS00)
     
    #define PS8   (1 << CS01)
     
    #define PS64   (1 << CS01) | (1 << CS00)
     
    #define PS256   (1 << CS02)
     
    #define PS1024   (1 << CS02) | (1 << CS00)
     
    + + + +

    +Functions

     ISR (TIMER0_COMPA_vect, ISR_NOBLOCK)
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define PS1   (1 << CS00)
    +
    + +

    Definition at line 47 of file TimerZero.cpp.

    + +
    +
    + +
    +
    + + + + +
    #define PS1024   (1 << CS02) | (1 << CS00)
    +
    + +

    Definition at line 51 of file TimerZero.cpp.

    + +
    +
    + +
    +
    + + + + +
    #define PS256   (1 << CS02)
    +
    + +

    Definition at line 50 of file TimerZero.cpp.

    + +
    +
    + +
    +
    + + + + +
    #define PS64   (1 << CS01) | (1 << CS00)
    +
    + +

    Definition at line 49 of file TimerZero.cpp.

    + +
    +
    + +
    +
    + + + + +
    #define PS8   (1 << CS01)
    +
    + +

    Definition at line 48 of file TimerZero.cpp.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    ISR (TIMER0_COMPA_vect ,
    ISR_NOBLOCK  
    )
    +
    + +

    Definition at line 114 of file TimerZero.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_timer_zero_8cpp.js b/doc/html/_timer_zero_8cpp.js new file mode 100644 index 000000000..04480237d --- /dev/null +++ b/doc/html/_timer_zero_8cpp.js @@ -0,0 +1,9 @@ +var _timer_zero_8cpp = +[ + [ "PS1", "_timer_zero_8cpp.html#aa94bedb911ff5c835c247834683ee858", null ], + [ "PS1024", "_timer_zero_8cpp.html#aa0e170ca42f6d9b09e30d2aa0cf71bc7", null ], + [ "PS256", "_timer_zero_8cpp.html#a7707dccfae4292e096d31e12a9ccf9c4", null ], + [ "PS64", "_timer_zero_8cpp.html#af22c8a095ad0e435a8cf005ec60586ad", null ], + [ "PS8", "_timer_zero_8cpp.html#a604071e940d47d08efbf390126b11150", null ], + [ "ISR", "_timer_zero_8cpp.html#a5684e7576dcad5908944beef595160c4", null ] +]; \ No newline at end of file diff --git a/doc/html/_timer_zero_8cpp_source.html b/doc/html/_timer_zero_8cpp_source.html new file mode 100644 index 000000000..3bd40bfa8 --- /dev/null +++ b/doc/html/_timer_zero_8cpp_source.html @@ -0,0 +1,259 @@ + + + + + + +My Project: TimerZero.cpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    TimerZero.cpp
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * TimerZero.cpp
    +
    3  *
    +
    4  * Copyright 2012 Tim Barrass
    +
    5  *
    +
    6  * This file is part of TimerZero, a library for Arduino.
    +
    7  *
    +
    8  * TimerZero is free software: you can redistribute it and/or modify
    +
    9  * it under the terms of the GNU General Public License as published by
    +
    10  * the Free Software Foundation, either version 3 of the License, or
    +
    11  * (at your option) any later version.
    +
    12  *
    +
    13  * TimerZero is distributed in the hope that it will be useful,
    +
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    +
    16  * GNU General Public License for more details.
    +
    17  *
    +
    18  * You should have received a copy of the GNU General Public License
    +
    19  * along with TimerZero. If not, see <http://www.gnu.org/licenses/>.
    +
    20  *
    +
    21  */
    +
    22 
    +
    23 // Based on TimerTwo,
    +
    24 // downloaded from https://bitbucket.org/johnmccombs, 4/2/2012
    +
    25 //
    +
    26 // TB2012 added Arduino.h include
    +
    27 // TB2012 replaced Timer 2 prescale factors with ones for Timer 0
    +
    28 // TB2012 replaced all Timer 2 register names with ones for timer 0
    +
    29 // TB2012 search/replaced TimerTwo with TimerZero
    +
    30 // TB2012 changed preScale array to suit Timer0
    +
    31 
    +
    32 #include <avr/pgmspace.h>
    +
    33 #include <avr/interrupt.h>
    +
    34 #include <TimerZero.h>
    +
    35 #include <Arduino.h>
    +
    36 
    +
    37 // allowed prescale factors
    +
    38 /*
    +
    39 #define PS1 (1 << CS20)
    +
    40 #define PS8 (1 << CS21)
    +
    41 #define PS32 (1 << CS21) | (1 << CS20)
    +
    42 #define PS64 (1 << CS22)
    +
    43 #define PS128 (1 << CS22) | (1 << CS20)
    +
    44 #define PS256 (1 << CS22) | (1 << CS21)
    +
    45 #define PS1024 (1 << CS22) | (1 << CS21) | (1 << CS20)
    +
    46 */
    +
    47 #define PS1 (1 << CS00)
    +
    48 #define PS8 (1 << CS01)
    +
    49 #define PS64 (1 << CS01) | (1 << CS00)
    +
    50 #define PS256 (1 << CS02)
    +
    51 #define PS1024 (1 << CS02) | (1 << CS00)
    +
    52 
    +
    53 // table by prescale = 2^n where n is the table index
    +
    54 static const unsigned char __attribute__((progmem)) preScale[] =
    +
    55  {
    +
    56  PS1, 0, 0, PS8, 0, 0, PS64, 0, PS256, 0, PS1024
    +
    57  };
    +
    58 
    + +
    60 void (*TimerZero::f_)();
    + +
    62 //------------------------------------------------------------------------------
    +
    63 // initialize timer 0
    +
    64 unsigned char TimerZero::init(unsigned usec, void (*f)(), bool reset)
    +
    65 {
    +
    66  f_ = f;
    +
    67  reset_ = reset;
    +
    68  // assume F_CPU is a multiple of 1000000
    +
    69  // number of clock ticks to delay usec microseconds
    +
    70  unsigned long ticks = usec * (F_CPU/1000000);
    +
    71  // determine prescale factor and TOP/OCR2A value
    +
    72  // use minimum prescale factor
    +
    73  unsigned char ps, i;
    +
    74  for (i = 0; i < sizeof(preScale); i++)
    +
    75  {
    +
    76  ps = pgm_read_byte(&preScale[i]);
    +
    77  if (ps && (ticks >> i) <= 256)
    +
    78  break;
    +
    79  }
    +
    80  //return error if usec is too large
    +
    81  if (i == sizeof(preScale))
    +
    82  return false;
    +
    83  period_ = ((long)(ticks >> i) * (1 << i))/ (F_CPU /1000000);
    +
    84  // Serial.println(i, DEC);
    +
    85  // disable timer 0 interrupts
    +
    86  TIMSK0 = 0;
    +
    87  // use system clock (clkI/O)
    +
    88  //ASSR &= ~(1 << AS2);
    +
    89  // Clear Timer on Compare Match (CTC) mode
    +
    90  TCCR0A = (1 << WGM01);
    +
    91 
    +
    92  // only need prescale bits in TCCR0B
    +
    93  TCCR0B = ps;
    +
    94 
    +
    95  // set TOP so timer period is (ticks >> i)
    +
    96  OCR0A = (ticks >> i) - 1;
    +
    97  return true;
    +
    98 }
    +
    99 //------------------------------------------------------------------------------
    +
    100 // Start timer zero interrupts
    + +
    102 {
    +
    103  TIMSK0 |= (1 << OCIE0A);
    +
    104 }
    +
    105 //------------------------------------------------------------------------------
    +
    106 // Stop timer 2 interrupts
    + +
    108 {
    +
    109  TIMSK0 = 0;
    +
    110 }
    +
    111 //------------------------------------------------------------------------------
    +
    112 // ISR for timer 0 Compare A interrupt
    +
    113 // TB2012 added ISR_NOBLOCK so it can be interrupted by Timer 1 (audio)
    +
    114 ISR(TIMER0_COMPA_vect, ISR_NOBLOCK)
    +
    115 {
    +
    116  // disable timer 0 interrupts
    +
    117  TIMSK0 = 0;
    +
    118  // call user function
    +
    119  (*TimerZero::f_)();
    +
    120  // in case f_ enabled interrupts
    +
    121  cli();
    +
    122  // clear counter if reset_ is true
    +
    123  if (TimerZero::reset_)
    +
    124  {
    +
    125  // reset counter
    +
    126  TCNT0 = 0;
    +
    127  // clear possible pending interrupt
    +
    128  TIFR0 |= (1 << OCF0A);
    +
    129  }
    +
    130  // enable timer 2 COMPA interrupt
    +
    131  TIMSK0 |= (1 << OCIE0A);
    +
    132 }
    +
    133 
    +
    134 
    +
    135 
    +
    136 
    +
    +
    + + + + diff --git a/doc/html/_timer_zero_8h.html b/doc/html/_timer_zero_8h.html new file mode 100644 index 000000000..d697f45a4 --- /dev/null +++ b/doc/html/_timer_zero_8h.html @@ -0,0 +1,161 @@ + + + + + + +My Project: TimerZero.h File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    TimerZero.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     TimerZero
     
    + + + +

    +Constant Groups

     TimerZero
     
    + + + + + + + + + +

    +Functions

    unsigned char TimerZero::init (unsigned usec, void(*f)(), bool reset=false)
     
    unsigned TimerZero::period ()
     
    void TimerZero::start ()
     
    void TimerZero::stop ()
     
    + + + + + + + +

    +Variables

    unsigned TimerZero::period_
     
    bool TimerZero::reset_
     
    void(* TimerZero::f_ )()
     
    +
    +
    + + + + diff --git a/doc/html/_timer_zero_8h.js b/doc/html/_timer_zero_8h.js new file mode 100644 index 000000000..798364032 --- /dev/null +++ b/doc/html/_timer_zero_8h.js @@ -0,0 +1,10 @@ +var _timer_zero_8h = +[ + [ "init", "_timer_zero_8h.html#ac06d9e9819fe3fc3604c049f62c1c29b", null ], + [ "period", "_timer_zero_8h.html#a763c42da685c2c781ef1f1627eb84d74", null ], + [ "start", "_timer_zero_8h.html#aedb93b2dfaf95a1e3e48a2d883f7e4f6", null ], + [ "stop", "_timer_zero_8h.html#aaf2e9bdc4015c2598417b52035038762", null ], + [ "f_", "_timer_zero_8h.html#a138d1b549166576a8b315dfefa2e5302", null ], + [ "period_", "_timer_zero_8h.html#adec754fda8ec83f97cf7aefaaac9c1b0", null ], + [ "reset_", "_timer_zero_8h.html#a84da5eb45416b7efc074bd3d8406a44d", null ] +]; \ No newline at end of file diff --git a/doc/html/_timer_zero_8h_source.html b/doc/html/_timer_zero_8h_source.html new file mode 100644 index 000000000..73655a96f --- /dev/null +++ b/doc/html/_timer_zero_8h_source.html @@ -0,0 +1,177 @@ + + + + + + +My Project: TimerZero.h Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    TimerZero.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * TimerZero.h
    +
    3  *
    +
    4  * Copyright 2012 Tim Barrass, adapted from TimerTwo by John McCombs (date?).
    +
    5  *
    +
    6  * This file is part of TimerZero, a library for Arduino.
    +
    7  *
    +
    8  * TimerZero is free software: you can redistribute it and/or modify
    +
    9  * it under the terms of the GNU General Public License as published by
    +
    10  * the Free Software Foundation, either version 3 of the License, or
    +
    11  * (at your option) any later version.
    +
    12  *
    +
    13  * TimerZero is distributed in the hope that it will be useful,
    +
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    +
    16  * GNU General Public License for more details.
    +
    17  *
    +
    18  * You should have received a copy of the GNU General Public License
    +
    19  * along with TimerZero. If not, see <http://www.gnu.org/licenses/>.
    +
    20  *
    +
    21  */
    +
    22 
    +
    23 // Based on TimerTwo,
    +
    24 // downloaded from https://bitbucket.org/johnmccombs, 4/2/2012
    +
    25 //
    +
    26 // TB2012 search/replaced TimerTwo with TimerZero
    +
    27 
    +
    28 #ifndef TimerZero_h
    +
    29 #define TimerZero_h
    +
    30 
    +
    31 namespace TimerZero
    +
    32 {
    +
    33 extern unsigned period_;
    +
    34 // timer reset flag
    +
    35 extern bool reset_;
    +
    36 // user function
    +
    37 extern void (*f_)();
    +
    38 // call f every usec microseconds if reset == false
    +
    39 // call f after delay of usec microseconds from call return if reset == true
    +
    40 // max delay is 256*1024 clock cycles or 16,384 microseconds for a 16 MHz CPU
    +
    41 unsigned char init(unsigned usec, void (*f)(), bool reset = false);
    +
    42 // period in usec
    +
    43 inline unsigned period()
    +
    44 {
    +
    45  return period_;
    +
    46 }
    +
    47 // start calls
    +
    48 void start();
    +
    49 // stop calls
    +
    50 void stop();
    +
    51 }
    +
    52 
    +
    53 #endif // TimerZero
    +
    54 
    +
    +
    + + + + diff --git a/doc/html/_wave_packet_8h.html b/doc/html/_wave_packet_8h.html new file mode 100644 index 000000000..c6e92e447 --- /dev/null +++ b/doc/html/_wave_packet_8h.html @@ -0,0 +1,172 @@ + + + + + + +Mozzi: WavePacket.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    WavePacket.h File Reference
    +
    +
    +
    #include <MozziGuts.h>
    +#include <Oscil.h>
    +#include <tables/cos8192_int8.h>
    +#include <mozzi_fixmath.h>
    +#include <Phasor.h>
    +#include <Line.h>
    +#include <meta.h>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  WavePacket< ALGORITHM >
     Wavepacket synthesis, with two overlapping streams of wave packets. More...
     
    + + + +

    +Enumerations

    enum  algorithms { SINGLE, +DOUBLE + }
     
    +

    Enumeration Type Documentation

    + +
    +
    + + + + +
    enum algorithms
    +
    + + + +
    Enumerator
    SINGLE  +
    DOUBLE  +
    + +

    Definition at line 37 of file WavePacket.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/_wave_packet_8h.js b/doc/html/_wave_packet_8h.js new file mode 100644 index 000000000..e62a5f62e --- /dev/null +++ b/doc/html/_wave_packet_8h.js @@ -0,0 +1,8 @@ +var _wave_packet_8h = +[ + [ "WavePacket", "class_wave_packet.html", "class_wave_packet" ], + [ "algorithms", "_wave_packet_8h.html#ad28a1b6c64625a10e04b25f75d2e7b51", [ + [ "SINGLE", "_wave_packet_8h.html#ad28a1b6c64625a10e04b25f75d2e7b51a3388f7110f6f25a54e215eb75d5d7516", null ], + [ "DOUBLE", "_wave_packet_8h.html#ad28a1b6c64625a10e04b25f75d2e7b51a33465d1d419b1074fb259ef444609e92", null ] + ] ] +]; \ No newline at end of file diff --git a/doc/html/_wave_packet_8h_source.html b/doc/html/_wave_packet_8h_source.html index a28b6d26f..ef07e73fb 100644 --- a/doc/html/_wave_packet_8h_source.html +++ b/doc/html/_wave_packet_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    WavePacket.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * WavePacket.h
    3  *
    4  * Copyright 2013 Tim Barrass.
    @@ -125,155 +133,190 @@
    21  */
    22 
    23 
    -
    24 #ifndef WAVEPACKET_H
    -
    25 #define WAVEPACKET_H
    -
    26 
    -
    27 #include <MozziGuts.h>
    -
    28 #include <Oscil.h>
    -
    29 #include <tables/cos8192_int8.h>
    -
    30 #include <mozzi_fixmath.h>
    -
    31 #include <Phasor.h>
    -
    32 #include <Line.h>
    -
    33 #include <meta.h>
    +
    24 #ifndef WAVEPACKET_H
    +
    25 #define WAVEPACKET_H
    +
    26 
    +
    27 #include <MozziGuts.h>
    +
    28 #include <Oscil.h>
    +
    29 #include <tables/cos8192_int8.h>
    +
    30 #include <mozzi_fixmath.h>
    +
    31 #include <Phasor.h>
    +
    32 #include <Line.h>
    +
    33 #include <meta.h>
    34 //#include <mozzi_utils.h>
    35 //#include <mozzi_analog.h>
    36 
    -
    37 enum algorithms {SINGLE,DOUBLE};
    +
    38 
    +
    39 /**
    +
    40 Wavepacket synthesis, with two overlapping streams of wave packets. Draws on
    +
    41 Miller Puckette's Pure Data example, F14.wave.packet.pd. Each packet is an
    +
    42 enveloped grain of a sin (or cos) wave. The frequency of the wave, the width of
    +
    43 the envelopes and the rate of release of envelopes are the parameters which can
    +
    44 be changed.
    +
    45 */
    46 template <char ALGORITHM>
    - +
    48 {
    49 public:
    50 
    -
    53  WavePacket():AUDIO_STEPS_PER_CONTROL(AUDIO_RATE / CONTROL_RATE)
    -
    54  {
    -
    55  aCos.setTable(COS8192_DATA);
    -
    56  }
    +
    51  /** Constructor.
    +
    52  */
    +
    53  WavePacket():AUDIO_STEPS_PER_CONTROL(AUDIO_RATE / CONTROL_RATE)
    +
    54  {
    + +
    56  }
    57 
    58 
    -
    67  inline
    -
    68  void set(int fundamental, int bandwidth, int centrefreq)
    -
    69  {
    -
    70  setFundamental(fundamental);
    -
    71  setBandwidth(bandwidth);
    -
    72  setCentreFreq(centrefreq);
    -
    73  }
    +
    59  /** Set all the parameters for the synthesis.
    +
    60  The function is designed so that usable ranges for parameters can come from analog inputs, ie. 0-1023.
    +
    61  @param fundamental the rate at which packets are produced.
    +
    62  @param bandwidth the width of each packet. A lower value allows more
    +
    63  of the centre frequency to be audible, a rounder sound.
    +
    64  A higher value produces narrower packets, a more buzzing sound.
    +
    65  @param centrefreq the oscillation frequency within each packet.
    +
    66  */
    +
    67  inline
    +
    68  void set(int fundamental, int bandwidth, int centrefreq)
    +
    69  {
    +
    70  setFundamental(fundamental);
    +
    71  setBandwidth(bandwidth);
    +
    72  setCentreFreq(centrefreq);
    +
    73  }
    74 
    75 
    -
    80  inline
    -
    81  void setFundamental(int fundamental)
    -
    82  {
    -
    83  aPhasor.setFreq(fundamental);
    -
    84  invFreq = Q8n24_FIX1 / fundamental;
    -
    85  }
    +
    76  /** Set the fundamental frequency.
    +
    77  The function is designed so that usable ranges for parameters can come from analog inputs, ie. 0-1023.
    +
    78  @param fundamental the rate at which packets are produced.
    +
    79  */
    +
    80  inline
    +
    81  void setFundamental(int fundamental)
    +
    82  {
    +
    83  aPhasor.setFreq(fundamental);
    +
    84  invFreq = Q8n24_FIX1 / fundamental;
    +
    85  }
    86 
    87 
    88 
    -
    95  inline
    -
    96  void setBandwidth(int bandwidth)
    -
    97  {
    -
    98  Q15n16 bw = invFreq*bandwidth;
    -
    99  bw >>= 9;
    -
    100  bw = max(bw, Q15n16_FIX1>>3);
    -
    101  aBandwidth.set(bw, AUDIO_STEPS_PER_CONTROL);
    -
    102  }
    +
    89  /** Set the bandwidth.
    +
    90  The function is designed so that usable ranges for parameters can come from analog inputs, ie. 0-1023.
    +
    91  @param bandwidth the width of each packet. A lower value allows more of the
    +
    92  centre frequency to be audible, a rounder sound.
    +
    93  A higher value produces narrower packets, a more buzzing sound.
    +
    94  */
    +
    95  inline
    +
    96  void setBandwidth(int bandwidth)
    +
    97  {
    +
    98  Q15n16 bw = invFreq*bandwidth;
    +
    99  bw >>= 9;
    +
    100  bw = max(bw, Q15n16_FIX1>>3);
    +
    101  aBandwidth.set(bw, AUDIO_STEPS_PER_CONTROL);
    +
    102  }
    103 
    104 
    105 
    -
    110  inline
    -
    111  void setCentreFreq(int centrefreq)
    -
    112  {
    -
    113  Q15n16 cf = invFreq * centrefreq;
    -
    114  cf >>= 3;
    -
    115  aCentrefreq.set(cf, AUDIO_STEPS_PER_CONTROL);
    -
    116  }
    +
    106  /** Set the centre frequency.
    +
    107  The function is designed so that usable ranges for parameters can come from analog inputs, ie. 0-1023.
    +
    108  @param centrefreq the oscillation frequency within each packet.
    +
    109  */
    +
    110  inline
    +
    111  void setCentreFreq(int centrefreq)
    +
    112  {
    +
    113  Q15n16 cf = invFreq * centrefreq;
    +
    114  cf >>= 3;
    +
    115  aCentrefreq.set(cf, AUDIO_STEPS_PER_CONTROL);
    +
    116  }
    117 
    118 
    -
    123  inline
    -
    124  int next()
    -
    125  {
    -
    126  gcentrefreq = aCentrefreq.next();
    -
    127  gbandwidth = aBandwidth.next();
    -
    128  int phase1 = aPhasor.next()>>16; // -0.5 to 0.5, 0n15
    -
    129  if (ALGORITHM == DOUBLE) {
    -
    130  return (signalPath(params1, phase1)+signalPath(params2, phase1+32768))>>1;
    -
    131  } else {
    -
    132  return signalPath(params1, phase1);
    -
    133  }
    -
    134  }
    +
    119 /** Calculate the next synthesised sample.
    +
    120 @return a full-scale 16 bit value, which needs to be scaled to suit your sketch. If you're using it straight as the sketch output,
    +
    121 then that will be yourThing.next()>>2 for HIFI 14 bit output, or >>8 for STANDARD 8+ bit output.
    +
    122 */
    +
    123  inline
    +
    124  int next()
    +
    125  {
    +
    126  gcentrefreq = aCentrefreq.next();
    +
    127  gbandwidth = aBandwidth.next();
    +
    128  int phase1 = aPhasor.next()>>16; // -0.5 to 0.5, 0n15
    +
    129  if (ALGORITHM == DOUBLE) {
    +
    130  return (signalPath(params1, phase1)+signalPath(params2, phase1+32768))>>1;
    +
    131  } else {
    +
    132  return signalPath(params1, phase1);
    +
    133  }
    +
    134  }
    135 
    136 
    137 private:
    -
    138  //Q15n16 fundamental; // range 4 to 6271 in pd patch, 13 integer bits
    -
    139  Q8n24 invFreq;
    -
    140  Q15n16 gcentrefreq; // range 0 to 3068, 12 integer bits
    -
    141  Q15n16 gbandwidth; // range 1 to 3068, 12 integer bits
    +
    138  //Q15n16 fundamental; // range 4 to 6271 in pd patch, 13 integer bits
    +
    139  Q8n24 invFreq;
    +
    140  Q15n16 gcentrefreq; // range 0 to 3068, 12 integer bits
    +
    141  Q15n16 gbandwidth; // range 1 to 3068, 12 integer bits
    142 
    -
    143  // Lines to interpolate controls at audio rate
    -
    144  Line <Q15n16> aCentrefreq;
    -
    145  Line <Q16n16> aBandwidth;
    -
    146  Line <Q16n16> aFreq;
    +
    143  // Lines to interpolate controls at audio rate
    +
    144  Line <Q15n16> aCentrefreq;
    +
    145  Line <Q16n16> aBandwidth;
    +
    146  Line <Q16n16> aFreq;
    147 
    -
    148  // different sets of params for each audio phase stream
    -
    149  struct parameters
    -
    150  {
    -
    151  int previous_phase;
    -
    152  Q15n16 centrefreq;
    -
    153  Q23n8 bandwidth;
    -
    154  }
    -
    155  params1,params2;
    +
    148  // different sets of params for each audio phase stream
    +
    149  struct parameters
    +
    150  {
    +
    151  int previous_phase;
    +
    152  Q15n16 centrefreq;
    +
    153  Q23n8 bandwidth;
    +
    154  }
    +
    155  params1,params2;
    156 
    -
    157  // the number of audio steps the line has to take to reach the next control value
    -
    158  const unsigned int AUDIO_STEPS_PER_CONTROL;
    +
    157  // the number of audio steps the line has to take to reach the next control value
    +
    158  const unsigned int AUDIO_STEPS_PER_CONTROL;
    159 
    - -
    161  Phasor <AUDIO_RATE> aPhasor;
    + +
    161  Phasor <AUDIO_RATE> aPhasor;
    162 
    163 
    -
    164  inline
    -
    165  int signalPath(struct parameters &param, int phase) // 25us? * 2
    -
    166  {
    -
    167  //setPin13High();
    -
    168  int index;
    +
    164  inline
    +
    165  int signalPath(struct parameters &param, int phase) // 25us? * 2
    +
    166  {
    +
    167  //setPin13High();
    +
    168  int index;
    169 
    -
    170  if(phase<param.previous_phase)
    -
    171  {
    -
    172  param.centrefreq = gcentrefreq>>8;
    -
    173  param.bandwidth = Q15n16_to_Q23n8(gbandwidth);
    -
    174  }
    -
    175  param.previous_phase = phase;
    +
    170  if(phase<param.previous_phase)
    +
    171  {
    +
    172  param.centrefreq = gcentrefreq>>8;
    +
    173  param.bandwidth = Q15n16_to_Q23n8(gbandwidth);
    +
    174  }
    +
    175  param.previous_phase = phase;
    176 
    -
    177  // oscillation
    -
    178  index = (param.centrefreq * phase)>>16;
    -
    179  // hack to make peak in middle of packet, otherwise it centres around a zero-crossing..
    -
    180  index += COS8192_NUM_CELLS>>1;
    -
    181  index &= COS8192_NUM_CELLS-1;
    -
    182  char sig1 = aCos.atIndex(index);
    +
    177  // oscillation
    +
    178  index = (param.centrefreq * phase)>>16;
    +
    179  // hack to make peak in middle of packet, otherwise it centres around a zero-crossing..
    +
    180  index += COS8192_NUM_CELLS>>1;
    +
    181  index &= COS8192_NUM_CELLS-1;
    +
    182  char sig1 = aCos.atIndex(index);
    183 
    -
    184  // packet envelope
    -
    185  Q23n8 bwphase = (param.bandwidth * phase)>>8;
    -
    186  bwphase += COS8192_NUM_CELLS>>1;
    -
    187  index = constrain(bwphase, 0, (COS8192_NUM_CELLS-1));
    -
    188  unsigned char packet_width = 128 + aCos.atIndex(index);
    -
    189  // if (AUDIO_MODE == HIFI){
    -
    190  // return ((int) sig1 * packet_width)>>3; // scaled to fit HIFI updateAudio output
    -
    191  // }else{
    -
    192  // return ((int) sig1 * packet_width)>>8; // scaled to fit STANDARD updateAudio output
    -
    193  // }
    -
    194 
    -
    195  return ((int) sig1 * packet_width);
    -
    196  }
    +
    184  // packet envelope
    +
    185  Q23n8 bwphase = (param.bandwidth * phase)>>8;
    +
    186  bwphase += COS8192_NUM_CELLS>>1;
    +
    187  index = constrain(bwphase, 0, (COS8192_NUM_CELLS-1));
    +
    188  unsigned char packet_width = 128 + aCos.atIndex(index);
    +
    189  // if (AUDIO_MODE == HIFI){
    +
    190  // return ((int) sig1 * packet_width)>>3; // scaled to fit HIFI updateAudio output
    +
    191  // }else{
    +
    192  // return ((int) sig1 * packet_width)>>8; // scaled to fit STANDARD updateAudio output
    +
    193  // }
    +
    194 
    +
    195  return ((int) sig1 * packet_width);
    +
    196  }
    197 
    198 };
    199 
    -
    200 #endif // #ifndef WAVEPACKET_H
    +
    200 #endif // #ifndef WAVEPACKET_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    WaveShaper.h File Reference
    +
    +
    +
    #include "Arduino.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  WaveShaper< T >
     WaveShaper maps values from its input to values in a table, which are returned as output. More...
     
    +
    +
    + + + + diff --git a/doc/html/_wave_shaper_8h_source.html b/doc/html/_wave_shaper_8h_source.html index 9e0d24eb0..4ecc0f67f 100644 --- a/doc/html/_wave_shaper_8h_source.html +++ b/doc/html/_wave_shaper_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    WaveShaper.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * WaveShaper.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -124,72 +132,104 @@
    20  *
    21  */
    22 
    -
    23 #ifndef WAVESHAPER_H_
    -
    24 #define WAVESHAPER_H_
    -
    25 
    -
    26 #include "Arduino.h"
    +
    23 #ifndef WAVESHAPER_H_
    +
    24 #define WAVESHAPER_H_
    +
    25 
    +
    26 #include "Arduino.h"
    27 
    +
    28 /** WaveShaper maps values from its input to values in a table, which are returned as output.
    +
    29 @tparam T the type of numbers being input to be shaped, chosen to match the table.
    +
    30 */
    +
    31 
    32 template <class T>
    - -
    34  {}
    + +
    34  {}
    35 ;
    -
    36  // doxygen can ignore the specialisations
    +
    36 
    +
    37 /** @cond */ // doxygen can ignore the specialisations
    38 
    +
    39 /** char specialisation of WaveShaper template*/
    40 template <>
    -
    41 class WaveShaper < char>
    +
    41 class WaveShaper < char>
    42 {
    43 
    44 public:
    -
    50  WaveShaper(const char * TABLE_NAME):table(TABLE_NAME)
    -
    51  {
    -
    52  ;
    -
    53  }
    +
    45  /** Constructor. Use the template parameter to set type of numbers being mapped. For
    +
    46  example, WaveShaper <int> myWaveShaper; makes a WaveShaper which uses ints.
    +
    47  @tparam T the type of numbers being input to be shaped, chosen to match the table.
    +
    48  @param TABLE_NAME the name of the table being used, which can be found in the
    +
    49  ".h" file containing the table. */
    +
    50  WaveShaper(const char * TABLE_NAME):table(TABLE_NAME)
    +
    51  {
    +
    52  ;
    +
    53  }
    54 
    55 
    -
    63  inline
    -
    64  char next(unsigned char in)
    -
    65  {
    -
    66  return (char) pgm_read_byte_near(table + in);
    -
    67  }
    +
    56  /** Maps input to output, transforming it according to the table being used.
    +
    57  @param in the input signal. For flexibility, it's up to you to give the correct offset
    +
    58  to your input signal. So if you're mapping a signed 8-bit signal (such as the output of
    +
    59  an Oscil) into a 256 cell table centred around cell 128, add 128 to offset the
    +
    60  input value.
    +
    61  @return the shaped signal.
    +
    62  */
    +
    63  inline
    +
    64  char next(unsigned char in)
    +
    65  {
    +
    66  return (char) pgm_read_byte_near(table + in);
    +
    67  }
    68 
    69 private:
    -
    70  const char * table;
    +
    70  const char * table;
    71 };
    72 
    73 
    74 
    +
    75 /** int specialisation of WaveShaper template*/
    76 template <>
    -
    77 class WaveShaper <int>
    +
    77 class WaveShaper <int>
    78 {
    79 
    80 public:
    -
    86  WaveShaper(const int __attribute__((progmem)) * TABLE_NAME):table(TABLE_NAME)
    -
    87  {
    -
    88  ;
    -
    89  }
    +
    81  /** Constructor. Use the template parameter to set type of numbers being mapped. For
    +
    82  example, WaveShaper <int> myWaveShaper; makes a WaveShaper which uses ints.
    +
    83  @tparam T the type of numbers being input to be shaped, chosen to match the table.
    +
    84  @param TABLE_NAME the name of the table being used, which can be found in the
    +
    85  ".h" file containing the table. */
    +
    86  WaveShaper(const int __attribute__((progmem)) * TABLE_NAME):table(TABLE_NAME)
    +
    87  {
    +
    88  ;
    +
    89  }
    90 
    91 
    -
    102  inline
    -
    103  int next(int in)
    -
    104  {
    -
    105  return (unsigned int) pgm_read_word_near(table + in);
    -
    106  }
    +
    92  /** Maps input to output, transforming it according to the table being used.
    +
    93  @param in the input signal. For flexibility, it's up to you to give the
    +
    94  correct offset to your input signal. So if you're mapping a signed 9-bit signal
    +
    95  (such as the sum of 2 8-bit Oscils) into a 512 cell table centred around
    +
    96  cell 256, add 256 to offset the input value. With a sigmoid table, this
    +
    97  may be useful for compressing a bigger signal into the -244 to 243
    +
    98  output range of Mozzi, rather than dividing the signal and returning a
    +
    99  char from updateAudio().
    +
    100  @return the shaped signal.
    +
    101  */
    +
    102  inline
    +
    103  int next(int in)
    +
    104  {
    +
    105  return (unsigned int) pgm_read_word_near(table + in);
    +
    106  }
    107 
    108 private:
    -
    109  const int __attribute__((progmem)) * table;
    +
    109  const int __attribute__((progmem)) * table;
    110 };
    111 
    112 
    -
    113 #endif /* WAVESHAPER_H_ */
    -
    114 
    -
    115 
    +
    113 #endif /* WAVESHAPER_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    abomb16384_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define ABOMB_NUM_CELLS   16384
     
    #define ABOMB_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) ABOMB_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define ABOMB_NUM_CELLS   16384
    +
    + +

    Definition at line 11 of file abomb16384_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define ABOMB_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file abomb16384_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/abomb16384__int8_8h.js b/doc/html/abomb16384__int8_8h.js new file mode 100644 index 000000000..bb839eba7 --- /dev/null +++ b/doc/html/abomb16384__int8_8h.js @@ -0,0 +1,6 @@ +var abomb16384__int8_8h = +[ + [ "ABOMB_NUM_CELLS", "abomb16384__int8_8h.html#aaae29e69acec708e11157a5b1e7d28a8", null ], + [ "ABOMB_SAMPLERATE", "abomb16384__int8_8h.html#a134a2a270dfd96ffbb9ee85bd36ffcbf", null ], + [ "__attribute__", "abomb16384__int8_8h.html#aa0bb1dbceca399d68769f41c0a3b6329", null ] +]; \ No newline at end of file diff --git a/doc/html/abomb16384__int8_8h_source.html b/doc/html/abomb16384__int8_8h_source.html index 72ddf6894..2620dc767 100644 --- a/doc/html/abomb16384__int8_8h_source.html +++ b/doc/html/abomb16384__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/abomb16384_int8.h Source File +Mozzi: abomb16384_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    abomb16384_int8.h
    -
    1 #ifndef ABOMB_H_
    -
    2 #define ABOMB_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    -
    10 
    -
    11 #define ABOMB_NUM_CELLS 16384
    -
    12 #define ABOMB_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) ABOMB_DATA [] = {-11, -14, -16, -14, -9, -7,
    +Go to the documentation of this file.
    1 #ifndef ABOMB_H_
    +
    2 #define ABOMB_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    +
    10 
    +
    11 #define ABOMB_NUM_CELLS 16384
    +
    12 #define ABOMB_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) ABOMB_DATA [] = {-11, -14, -16, -14, -9, -7,
    15 -5, -1, 8, 13, 12, 10, 12, 16, 16, 16, 15, 15, 17, 14, 7, 3, 6, 4, 1, -1, -5,
    16 -4, -7, -10, -9, -12, -15, -17, -17, -15, -13, -13, -13, -13, -10, -4, -1, 1, 5,
    17 11, 13, 14, 15, 15, 15, 14, 15, 16, 15, 16, 13, 7, 10, 8, 0, -1, -1, -2, -3, -8,
    @@ -820,15 +828,15 @@
    716 2, 1, 1, 2, 2, 2, 2, 0, -1, -1, 1, 2, 2, 1, 0, 2, 2, 1, 2, 0, 1, 1, 2, 3, 3, 4,
    717 4, 1, 2, 3, 2, 1, 2, 3, 3, 2, 3, 1, 3, 4, 1, 1, 4, 4, 2, 1, 3, 3, 2, 3, 2, 3, 5,
    718 6, 4, 2, 3, 5, 4, 3, 2, 1, 3, 2, };
    -
    719 
    -
    720  #endif /* ABOMB_H_ */
    +
    719 
    +
    720  #endif /* ABOMB_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -112,33 +115,27 @@
    Here are the classes, structs, unions and interfaces with brief descriptions:
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +
    oNchar2mozzi
    oNchebyshev_int8
    oNfloat2mozzi
    oNfloat2mozzi_uint8
    oNsin1024_int8
    oNsin8192_uint8
    oNsin_multi_levels_int8
    oNtable_generator_template
    oCADSRA simple ADSR envelope generator
    oCAudioDelayAudio delay line for comb filter, flange, chorus and short echo effects
    oCAutoRangeKeeps a running calculation of the range of the input values it receives
    oCControlDelayControl-rate delay line for delaying control signals
    oCDCfilterA DC-blocking filter useful for highlighting changes in control signals
    oCEadExponential attack decay envelope
    oCEventDelayA non-blocking replacement for Arduino's delay() function (which is disabled by Mozzi)
    oCLineFor linear changes with a minimum of calculation at each step
    oCLowPassFilterA resonant low pass filter for audio signals
    oCOscilOscil plays a wavetable, cycling through the table to generate an audio or control signal
    oCPhasorPhasor repeatedly generates a high resolution ramp at a variable frequency
    oCPortamentoA simple portamento (pitch slide from one note to the next) effect, useful for note-based applications
    oCRCpollA class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime
    oCRecentAverageCalculates a running average over a specified number of the most recent readings
    oCReverbTankA reverb which sounds like the inside of a tin can
    oCSampleSample is like Oscil, it plays a wavetable
    oCSmoothA simple infinite impulse response low pass filter for smoothing control signals
    oCStateVariableA State Variable filter which offers 12db resonant low, high, bandpass and notch modes
    oCWavePacketWavepacket synthesis, with two overlapping streams of wave packets
    \CWaveShaperWaveShaper maps values from its input to values in a table, which are returned as output
    oCADSRA simple ADSR envelope generator
    oCAudioDelayAudio delay line for comb filter, flange, chorus and short echo effects
    oCAutoRangeKeeps a running calculation of the range of the input values it receives
    oCControlDelayControl-rate delay line for delaying control signals
    oCDCfilterA DC-blocking filter useful for highlighting changes in control signals
    oCEadExponential attack decay envelope
    oCEventDelayA non-blocking replacement for Arduino's delay() function (which is disabled by Mozzi)
    oCLineFor linear changes with a minimum of calculation at each step
    oCLowPassFilterA resonant low pass filter for audio signals
    oCOscilOscil plays a wavetable, cycling through the table to generate an audio or control signal
    oCPhasorPhasor repeatedly generates a high resolution ramp at a variable frequency
    oCPortamentoA simple portamento (pitch slide from one note to the next) effect, useful for note-based applications
    oCRCpollA class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime
    oCRecentAverageCalculates a running average over a specified number of the most recent readings
    oCReverbTankA reverb which sounds like the inside of a tin can
    oCSampleSample is like Oscil, it plays a wavetable
    oCsintest
    oCSmoothA simple infinite impulse response low pass filter for smoothing control signals
    oCStateVariableA State Variable filter which offers 12db resonant low, high, bandpass and notch modes
    oCWavePacketWavepacket synthesis, with two overlapping streams of wave packets
    \CWaveShaperWaveShaper maps values from its input to values in a table, which are returned as output
    @@ -146,7 +143,7 @@ +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_00_4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_00_4096_NUM_CELLS   4096
     
    #define BAMBOO_00_4096_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_00_4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_00_4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file bamboo_00_4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_00_4096_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_00_4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__00__4096__int8_8h.js b/doc/html/bamboo__00__4096__int8_8h.js new file mode 100644 index 000000000..164427c39 --- /dev/null +++ b/doc/html/bamboo__00__4096__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__00__4096__int8_8h = +[ + [ "BAMBOO_00_4096_NUM_CELLS", "bamboo__00__4096__int8_8h.html#a629c0946a354fb3136d10ab05bb85a2b", null ], + [ "BAMBOO_00_4096_SAMPLERATE", "bamboo__00__4096__int8_8h.html#a23cb49a1532a4a0c34a80c2f3f2add37", null ], + [ "__attribute__", "bamboo__00__4096__int8_8h.html#a5bb11154a70415a92a301f6f922beb39", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__00__4096__int8_8h_source.html b/doc/html/bamboo__00__4096__int8_8h_source.html index 2a14c9fc1..e930d95ee 100644 --- a/doc/html/bamboo__00__4096__int8_8h_source.html +++ b/doc/html/bamboo__00__4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_00_4096_int8.h Source File +Mozzi: bamboo_00_4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_00_4096_int8.h
    -
    1 #ifndef BAMBOO_00_4096_H_
    -
    2 #define BAMBOO_00_4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_00_4096_H_
    +
    2 #define BAMBOO_00_4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_00_4096_NUM_CELLS 4096
    -
    12 #define BAMBOO_00_4096_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_00_4096_DATA [] = {-1, 0, -1, 0, -1, 0, 1, 0, 0, 0, -1,
    +
    11 #define BAMBOO_00_4096_NUM_CELLS 4096
    +
    12 #define BAMBOO_00_4096_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_00_4096_DATA [] = {-1, 0, -1, 0, -1, 0, 1, 0, 0, 0, -1,
    15  1, 0, 0, 2, -2, -21, -66, -98, -56, 37, 60, 1, -31, 7, 72, 95, 90, 63, -1, -44,
    16  -72, -89, -28, 59, 92, 60, -12, -86, -125, -102, -32, 66, 123, 69, -19, -53,
    17  -61, -58, -20, 31, 74, 72, 6, -58, -65, -38, -9, 36, 69, 63, 22, -47, -78, -40,
    @@ -300,14 +308,14 @@
    196 
    197  };
    198 
    -
    199 #endif /* BAMBOO_00_4096_H_ */
    +
    199 #endif /* BAMBOO_00_4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_01_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_01_2048_NUM_CELLS   2048
     
    #define BAMBOO_01_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_01_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_01_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_01_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_01_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_01_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__01__2048__int8_8h.js b/doc/html/bamboo__01__2048__int8_8h.js new file mode 100644 index 000000000..399848a55 --- /dev/null +++ b/doc/html/bamboo__01__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__01__2048__int8_8h = +[ + [ "BAMBOO_01_2048_NUM_CELLS", "bamboo__01__2048__int8_8h.html#aa55c2d9838cf2872640063b9bbe7fe91", null ], + [ "BAMBOO_01_2048_SAMPLERATE", "bamboo__01__2048__int8_8h.html#a7eaf2bad6274c523c7b4092f9931cc6d", null ], + [ "__attribute__", "bamboo__01__2048__int8_8h.html#a712f5b31036d7802bac419cea6678642", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__01__2048__int8_8h_source.html b/doc/html/bamboo__01__2048__int8_8h_source.html index 95eed4619..005d3df59 100644 --- a/doc/html/bamboo__01__2048__int8_8h_source.html +++ b/doc/html/bamboo__01__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_01_2048_int8.h Source File +Mozzi: bamboo_01_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_01_2048_int8.h
    -
    1 #ifndef BAMBOO_01_2048_H_
    -
    2 #define BAMBOO_01_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_01_2048_H_
    +
    2 #define BAMBOO_01_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_01_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_01_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_01_2048_DATA [] = {0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0,
    +
    11 #define BAMBOO_01_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_01_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_01_2048_DATA [] = {0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0,
    15 -2, 0, -1, -1, -7, -29, -71, -96, -72, -16, 15, 12, 13, 53, 104, 126, 109, 34,
    16 -32, -50, -62, -46, -10, 29, 56, 29, -9, -56, -90, -72, -72, -28, 45, 82, 69, 1,
    17 -57, -86, -60, 15, 47, 71, 60, 17, -28, -61, -27, 1, 26, 63, 49, 43, 12, -53,
    @@ -211,14 +219,14 @@
    107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, -1,
    108 0, };
    109 
    -
    110  #endif /* BAMBOO_01_2048_H_ */
    +
    110  #endif /* BAMBOO_01_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_01_4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_01_4096_NUM_CELLS   4096
     
    #define BAMBOO_01_4096_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_01_4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_01_4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file bamboo_01_4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_01_4096_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_01_4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__01__4096__int8_8h.js b/doc/html/bamboo__01__4096__int8_8h.js new file mode 100644 index 000000000..2714ff9a9 --- /dev/null +++ b/doc/html/bamboo__01__4096__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__01__4096__int8_8h = +[ + [ "BAMBOO_01_4096_NUM_CELLS", "bamboo__01__4096__int8_8h.html#a7b146777a52ebf01dcddbe0a5dc26d49", null ], + [ "BAMBOO_01_4096_SAMPLERATE", "bamboo__01__4096__int8_8h.html#af034c51de17106532eddcc44b4bafeed", null ], + [ "__attribute__", "bamboo__01__4096__int8_8h.html#a83af28a0df3f1f97b120081fbc3d5382", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__01__4096__int8_8h_source.html b/doc/html/bamboo__01__4096__int8_8h_source.html index 85bf40786..d85efe20a 100644 --- a/doc/html/bamboo__01__4096__int8_8h_source.html +++ b/doc/html/bamboo__01__4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_01_4096_int8.h Source File +Mozzi: bamboo_01_4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_01_4096_int8.h
    -
    1 #ifndef BAMBOO_01_4096_H_
    -
    2 #define BAMBOO_01_4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_01_4096_H_
    +
    2 #define BAMBOO_01_4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_01_4096_NUM_CELLS 4096
    -
    12 #define BAMBOO_01_4096_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_01_4096_DATA [] = {0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0,
    +
    11 #define BAMBOO_01_4096_NUM_CELLS 4096
    +
    12 #define BAMBOO_01_4096_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_01_4096_DATA [] = {0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0,
    15  -1, 0, 0, -1, -6, -29, -70, -96, -71, -16, 15, 13, 13, 53, 105, 126, 110, 34,
    16  -32, -49, -62, -45, -10, 29, 56, 29, -8, -56, -89, -72, -71, -28, 46, 82, 70, 1,
    17  -57, -85, -60, 15, 48, 71, 61, 17, -27, -61, -27, 2, 26, 63, 50, 43, 13, -53,
    @@ -298,14 +306,14 @@
    194  0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1,
    195  0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, };
    196 
    -
    197 #endif /* BAMBOO_01_4096_H_ */
    +
    197 #endif /* BAMBOO_01_4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_02_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_02_2048_NUM_CELLS   2048
     
    #define BAMBOO_02_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_02_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_02_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_02_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_02_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_02_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__02__2048__int8_8h.js b/doc/html/bamboo__02__2048__int8_8h.js new file mode 100644 index 000000000..30d74b08b --- /dev/null +++ b/doc/html/bamboo__02__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__02__2048__int8_8h = +[ + [ "BAMBOO_02_2048_NUM_CELLS", "bamboo__02__2048__int8_8h.html#aabf3c83fcc70e5d82fa8a1e538b5dc26", null ], + [ "BAMBOO_02_2048_SAMPLERATE", "bamboo__02__2048__int8_8h.html#aa335d0109fcdaec3fd4f1df62dc38e05", null ], + [ "__attribute__", "bamboo__02__2048__int8_8h.html#a31a2e226ef6eed4a69fa9d30a57b1a55", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__02__2048__int8_8h_source.html b/doc/html/bamboo__02__2048__int8_8h_source.html index f92ceebb7..5f029824b 100644 --- a/doc/html/bamboo__02__2048__int8_8h_source.html +++ b/doc/html/bamboo__02__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_02_2048_int8.h Source File +Mozzi: bamboo_02_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_02_2048_int8.h
    -
    1 #ifndef BAMBOO_02_2048_H_
    -
    2 #define BAMBOO_02_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_02_2048_H_
    +
    2 #define BAMBOO_02_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_02_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_02_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_02_2048_DATA [] = {0, 0, -1, 0, -1, 1, 1, -1, 0, -1,
    +
    11 #define BAMBOO_02_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_02_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_02_2048_DATA [] = {0, 0, -1, 0, -1, 1, 1, -1, 0, -1,
    15 -1, -6, -27, -68, -96, -66, -5, 11, 2, 42, 113, 125, 67, 6, -22, -26, -5, 22,
    16 23, -7, -62, -90, -48, 5, 7, -1, -6, -45, -91, -37, 69, 90, 40, 2, -20, -26, -7,
    17 17, 36, 43, 19, -28, -19, 36, 50, 24, 0, -31, -43, -11, 35, 36, 8, -27, -68,
    @@ -212,14 +220,14 @@
    108 -1, -1, -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0,
    109 -1, 0, -1, };
    110 
    -
    111  #endif /* BAMBOO_02_2048_H_ */
    +
    111  #endif /* BAMBOO_02_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_02_4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_02_4096_NUM_CELLS   4096
     
    #define BAMBOO_02_4096_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_02_4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_02_4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file bamboo_02_4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_02_4096_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_02_4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__02__4096__int8_8h.js b/doc/html/bamboo__02__4096__int8_8h.js new file mode 100644 index 000000000..4a7ee53fa --- /dev/null +++ b/doc/html/bamboo__02__4096__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__02__4096__int8_8h = +[ + [ "BAMBOO_02_4096_NUM_CELLS", "bamboo__02__4096__int8_8h.html#a7c10f75e899c93fd689fc49e1343bb0d", null ], + [ "BAMBOO_02_4096_SAMPLERATE", "bamboo__02__4096__int8_8h.html#aaaac4f7706c05f9875f13543c8ec56b9", null ], + [ "__attribute__", "bamboo__02__4096__int8_8h.html#a2bb03496223f4a6697ec2d308f4ae702", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__02__4096__int8_8h_source.html b/doc/html/bamboo__02__4096__int8_8h_source.html index 852b0ce9e..b401ffa86 100644 --- a/doc/html/bamboo__02__4096__int8_8h_source.html +++ b/doc/html/bamboo__02__4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_02_4096_int8.h Source File +Mozzi: bamboo_02_4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_02_4096_int8.h
    -
    1 #ifndef BAMBOO_02_4096_H_
    -
    2 #define BAMBOO_02_4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_02_4096_H_
    +
    2 #define BAMBOO_02_4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_02_4096_NUM_CELLS 4096
    -
    12 #define BAMBOO_02_4096_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_02_4096_DATA [] = {0, 0, -1, 0, -1, 1, 1, -1, 0, -1,
    +
    11 #define BAMBOO_02_4096_NUM_CELLS 4096
    +
    12 #define BAMBOO_02_4096_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_02_4096_DATA [] = {0, 0, -1, 0, -1, 1, 1, -1, 0, -1,
    15  -1, -6, -26, -68, -95, -66, -4, 11, 2, 43, 113, 126, 67, 6, -21, -26, -5, 23,
    16  23, -7, -61, -90, -47, 5, 8, -1, -5, -45, -90, -37, 69, 90, 41, 2, -20, -25, -7,
    17  18, 36, 44, 19, -27, -19, 37, 50, 25, 0, -30, -43, -11, 35, 36, 8, -26, -68,
    @@ -299,14 +307,14 @@
    195  -1, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1,
    196  0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0 };
    197 
    -
    198 #endif /* BAMBOO_02_4096_H_ */
    +
    198 #endif /* BAMBOO_02_4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_03_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_03_2048_NUM_CELLS   2048
     
    #define BAMBOO_03_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_03_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_03_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_03_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_03_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_03_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__03__2048__int8_8h.js b/doc/html/bamboo__03__2048__int8_8h.js new file mode 100644 index 000000000..f552a458c --- /dev/null +++ b/doc/html/bamboo__03__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__03__2048__int8_8h = +[ + [ "BAMBOO_03_2048_NUM_CELLS", "bamboo__03__2048__int8_8h.html#ad8c3287ff9810ce534cca3b4dcd14cc8", null ], + [ "BAMBOO_03_2048_SAMPLERATE", "bamboo__03__2048__int8_8h.html#a5993c707dd6b7f1bc4279c794649056e", null ], + [ "__attribute__", "bamboo__03__2048__int8_8h.html#ac0ae9a67191425347b3b227d8f90b684", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__03__2048__int8_8h_source.html b/doc/html/bamboo__03__2048__int8_8h_source.html index 3fc53b347..b7526eb26 100644 --- a/doc/html/bamboo__03__2048__int8_8h_source.html +++ b/doc/html/bamboo__03__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_03_2048_int8.h Source File +Mozzi: bamboo_03_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_03_2048_int8.h
    -
    1 #ifndef BAMBOO_03_2048_H_
    -
    2 #define BAMBOO_03_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_03_2048_H_
    +
    2 #define BAMBOO_03_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_03_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_03_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_03_2048_DATA [] = {1, 1, -1, -1, 0, -1, 0, -1, -1, 2,
    +
    11 #define BAMBOO_03_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_03_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_03_2048_DATA [] = {1, 1, -1, -1, 0, -1, 0, -1, -1, 2,
    15 0, -22, -80, -128, -72, 38, 54, 23, 79, 124, 52, -22, -23, -2, 13, 39, 24, -41,
    16 -89, -92, -36, 18, -9, -54, -35, -11, 40, 91, 27, -37, -18, -1, 24, 73, 82, -6,
    17 -83, -30, 43, 55, 23, -18, -23, -27, -26, -6, 10, -11, -42, -23, 12, -1, -38,
    @@ -212,14 +220,14 @@
    108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0,
    109 };
    110 
    -
    111  #endif /* BAMBOO_03_2048_H_ */
    +
    111  #endif /* BAMBOO_03_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_03_4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_03_4096_NUM_CELLS   4096
     
    #define BAMBOO_03_4096_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_03_4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_03_4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file bamboo_03_4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_03_4096_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_03_4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__03__4096__int8_8h.js b/doc/html/bamboo__03__4096__int8_8h.js new file mode 100644 index 000000000..26ca6f93c --- /dev/null +++ b/doc/html/bamboo__03__4096__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__03__4096__int8_8h = +[ + [ "BAMBOO_03_4096_NUM_CELLS", "bamboo__03__4096__int8_8h.html#a0e67b7ced9eaed73f2dd41a782e5440a", null ], + [ "BAMBOO_03_4096_SAMPLERATE", "bamboo__03__4096__int8_8h.html#a0db509f26e1a69c8dd49f071ee3e692b", null ], + [ "__attribute__", "bamboo__03__4096__int8_8h.html#a757846ae1866c39c915a422d76af95f9", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__03__4096__int8_8h_source.html b/doc/html/bamboo__03__4096__int8_8h_source.html index ec0a2b4d5..4de68606d 100644 --- a/doc/html/bamboo__03__4096__int8_8h_source.html +++ b/doc/html/bamboo__03__4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_03_4096_int8.h Source File +Mozzi: bamboo_03_4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_03_4096_int8.h
    -
    1 #ifndef BAMBOO_03_4096_H_
    -
    2 #define BAMBOO_03_4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_03_4096_H_
    +
    2 #define BAMBOO_03_4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_03_4096_NUM_CELLS 4096
    -
    12 #define BAMBOO_03_4096_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_03_4096_DATA [] = {1, 1, -1, 0, 0, 0, 0, 0, 0, 2, 1,
    +
    11 #define BAMBOO_03_4096_NUM_CELLS 4096
    +
    12 #define BAMBOO_03_4096_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_03_4096_DATA [] = {1, 1, -1, 0, 0, 0, 0, 0, 0, 2, 1,
    15  -22, -80, -127, -72, 39, 54, 23, 80, 124, 53, -22, -22, -2, 13, 40, 24, -40,
    16  -89, -91, -36, 19, -9, -54, -35, -10, 40, 92, 27, -37, -17, -1, 25, 73, 82, -5,
    17  -83, -29, 43, 56, 23, -17, -23, -26, -26, -5, 10, -10, -42, -23, 12, -1, -38,
    @@ -300,14 +308,14 @@
    196  0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0,
    197  -1, 0,};
    198 
    -
    199 #endif /* BAMBOO_03_4096_H_ */
    +
    199 #endif /* BAMBOO_03_4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_04_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_04_2048_NUM_CELLS   2048
     
    #define BAMBOO_04_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_04_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_04_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_04_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_04_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_04_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__04__2048__int8_8h.js b/doc/html/bamboo__04__2048__int8_8h.js new file mode 100644 index 000000000..ae77f222b --- /dev/null +++ b/doc/html/bamboo__04__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__04__2048__int8_8h = +[ + [ "BAMBOO_04_2048_NUM_CELLS", "bamboo__04__2048__int8_8h.html#a421991005f1d7acd3dc193d899dc155c", null ], + [ "BAMBOO_04_2048_SAMPLERATE", "bamboo__04__2048__int8_8h.html#a076a4b7c15aa083584b5ee5373ed4d15", null ], + [ "__attribute__", "bamboo__04__2048__int8_8h.html#ab2ea8f55b676dcf55ff928e3cebe098d", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__04__2048__int8_8h_source.html b/doc/html/bamboo__04__2048__int8_8h_source.html index 9a2dbb664..27f5c1a94 100644 --- a/doc/html/bamboo__04__2048__int8_8h_source.html +++ b/doc/html/bamboo__04__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_04_2048_int8.h Source File +Mozzi: bamboo_04_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_04_2048_int8.h
    -
    1 #ifndef BAMBOO_04_2048_H_
    -
    2 #define BAMBOO_04_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_04_2048_H_
    +
    2 #define BAMBOO_04_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_04_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_04_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_04_2048_DATA [] = {0, -2, 1, 0, 1, 0, 0, 0, 0, 0, 0,
    +
    11 #define BAMBOO_04_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_04_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_04_2048_DATA [] = {0, -2, 1, 0, 1, 0, 0, 0, 0, 0, 0,
    15 -1, -1, -1, 0, -1, 0, 0, 0, -3, -16, -52, -92, -93, -40, 8, 38, 93, 126, 76, 12,
    16 -2, 11, 10, 8, -8, -63, -90, -66, -37, -3, 9, -12, -26, 2, 45, 29, -2, 11, 16,
    17 13, 58, 87, 36, -13, -9, -37, -60, -25, 14, 7, 3, -1, -37, -49, -30, -32, -24,
    @@ -212,14 +220,14 @@
    108 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 0, -1, 0,
    109 0, -1, 0, -1, 0, -1, 0, };
    110 
    -
    111  #endif /* BAMBOO_04_2048_H_ */
    +
    111  #endif /* BAMBOO_04_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_04_4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_04_4096_NUM_CELLS   4096
     
    #define BAMBOO_04_4096_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_04_4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_04_4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file bamboo_04_4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_04_4096_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_04_4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__04__4096__int8_8h.js b/doc/html/bamboo__04__4096__int8_8h.js new file mode 100644 index 000000000..7c1dfbda8 --- /dev/null +++ b/doc/html/bamboo__04__4096__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__04__4096__int8_8h = +[ + [ "BAMBOO_04_4096_NUM_CELLS", "bamboo__04__4096__int8_8h.html#a371e20c2266548b47a81c6058f30ecb5", null ], + [ "BAMBOO_04_4096_SAMPLERATE", "bamboo__04__4096__int8_8h.html#ae9e150c4fb29108650d8e58a747ac54b", null ], + [ "__attribute__", "bamboo__04__4096__int8_8h.html#aee0fee17d8e4b3cbf22a0075d1da28c7", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__04__4096__int8_8h_source.html b/doc/html/bamboo__04__4096__int8_8h_source.html index b3cfd3e68..7b5cd4aa4 100644 --- a/doc/html/bamboo__04__4096__int8_8h_source.html +++ b/doc/html/bamboo__04__4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_04_4096_int8.h Source File +Mozzi: bamboo_04_4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_04_4096_int8.h
    -
    1 #ifndef BAMBOO_04_4096_H_
    -
    2 #define BAMBOO_04_4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_04_4096_H_
    +
    2 #define BAMBOO_04_4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_04_4096_NUM_CELLS 4096
    -
    12 #define BAMBOO_04_4096_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_04_4096_DATA [] = {0, -1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0,
    +
    11 #define BAMBOO_04_4096_NUM_CELLS 4096
    +
    12 #define BAMBOO_04_4096_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_04_4096_DATA [] = {0, -1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0,
    15  -1, 0, 0, 0, 1, 0, 0, -2, -16, -51, -92, -93, -39, 8, 39, 93, 126, 77, 12, -1,
    16  11, 11, 8, -7, -63, -89, -66, -37, -2, 9, -11, -26, 2, 46, 29, -2, 12, 16, 14,
    17  58, 88, 36, -12, -9, -36, -60, -25, 14, 8, 3, 0, -37, -48, -30, -32, -23, -1,
    @@ -299,14 +307,14 @@
    195  -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
    196  -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0,};
    197 
    -
    198 #endif /* BAMBOO_04_4096_H_ */
    +
    198 #endif /* BAMBOO_04_4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_05_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_05_2048_NUM_CELLS   2048
     
    #define BAMBOO_05_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_05_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_05_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_05_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_05_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_05_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__05__2048__int8_8h.js b/doc/html/bamboo__05__2048__int8_8h.js new file mode 100644 index 000000000..16f1fe901 --- /dev/null +++ b/doc/html/bamboo__05__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__05__2048__int8_8h = +[ + [ "BAMBOO_05_2048_NUM_CELLS", "bamboo__05__2048__int8_8h.html#a071fd0b9f3bdf219a0a0b92ac5355106", null ], + [ "BAMBOO_05_2048_SAMPLERATE", "bamboo__05__2048__int8_8h.html#a607a9929f86612db836846bfd5f6660c", null ], + [ "__attribute__", "bamboo__05__2048__int8_8h.html#a0ad14eaf4253de50c860c88fcfe1fdfe", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__05__2048__int8_8h_source.html b/doc/html/bamboo__05__2048__int8_8h_source.html index 4bf4e9de3..049ac13a8 100644 --- a/doc/html/bamboo__05__2048__int8_8h_source.html +++ b/doc/html/bamboo__05__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_05_2048_int8.h Source File +Mozzi: bamboo_05_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_05_2048_int8.h
    -
    1 #ifndef BAMBOO_05_2048_H_
    -
    2 #define BAMBOO_05_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_05_2048_H_
    +
    2 #define BAMBOO_05_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_05_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_05_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_05_2048_DATA [] = {1, 0, 1, -1, 0, -1, 0, -1, 0, 0, 0,
    +
    11 #define BAMBOO_05_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_05_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_05_2048_DATA [] = {1, 0, 1, -1, 0, -1, 0, -1, 0, 0, 0,
    15 1, 0, 0, 0, 1, -1, 0, -2, 0, -2, 1, -1, -1, 1, -1, 1, -1, -1, 2, 0, -14, -68,
    16 -126, -100, 25, 94, 82, 109, 90, -30, -52, 15, 13, -18, -34, -68, -66, -8, 5,
    17 -3, -18, -39, 34, 102, 44, 10, 47, 16, -7, 20, -33, -57, 32, 38, -35, -67, -71,
    @@ -214,14 +222,14 @@
    110 -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    111 -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, };
    112 
    -
    113  #endif /* BAMBOO_05_2048_H_ */
    +
    113  #endif /* BAMBOO_05_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_05_4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_05_4096_NUM_CELLS   4096
     
    #define BAMBOO_05_4096_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_05_4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_05_4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file bamboo_05_4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_05_4096_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_05_4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__05__4096__int8_8h.js b/doc/html/bamboo__05__4096__int8_8h.js new file mode 100644 index 000000000..bf865902b --- /dev/null +++ b/doc/html/bamboo__05__4096__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__05__4096__int8_8h = +[ + [ "BAMBOO_05_4096_NUM_CELLS", "bamboo__05__4096__int8_8h.html#ad52d4ab5860d40f43730ab2a9aa536ce", null ], + [ "BAMBOO_05_4096_SAMPLERATE", "bamboo__05__4096__int8_8h.html#a4d0961d48e34c60891229dd688687d39", null ], + [ "__attribute__", "bamboo__05__4096__int8_8h.html#a046988523d014adf1c819899f5d91d1e", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__05__4096__int8_8h_source.html b/doc/html/bamboo__05__4096__int8_8h_source.html index 7f4452865..5620fbc2e 100644 --- a/doc/html/bamboo__05__4096__int8_8h_source.html +++ b/doc/html/bamboo__05__4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_05_4096_int8.h Source File +Mozzi: bamboo_05_4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_05_4096_int8.h
    -
    1 #ifndef BAMBOO_05_4096_H_
    -
    2 #define BAMBOO_05_4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_05_4096_H_
    +
    2 #define BAMBOO_05_4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_05_4096_NUM_CELLS 4096
    -
    12 #define BAMBOO_05_4096_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_05_4096_DATA [] = {1, 0, 1, -1, 0, 0, 0, 0, 0, 1, 0, 1,
    +
    11 #define BAMBOO_05_4096_NUM_CELLS 4096
    +
    12 #define BAMBOO_05_4096_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_05_4096_DATA [] = {1, 0, 1, -1, 0, 0, 0, 0, 0, 1, 0, 1,
    15  0, 0, 0, 1, 0, 0, -1, 0, -1, 1, 0, -1, 1, -1, 1, -1, 0, 2, 1, -14, -67, -126,
    16  -99, 25, 95, 82, 109, 90, -30, -52, 15, 13, -18, -34, -68, -66, -8, 5, -3, -18,
    17  -38, 34, 103, 44, 11, 47, 17, -7, 21, -33, -56, 32, 38, -34, -67, -71, -69, -6,
    @@ -302,14 +310,14 @@
    198  -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, -1,
    199  0, -1, 0, -1, 0, 0,};
    200 
    -
    201 #endif /* BAMBOO_05_4096_H_ */
    +
    201 #endif /* BAMBOO_05_4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_06_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_06_2048_NUM_CELLS   2048
     
    #define BAMBOO_06_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_06_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_06_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_06_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_06_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_06_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__06__2048__int8_8h.js b/doc/html/bamboo__06__2048__int8_8h.js new file mode 100644 index 000000000..fd926048c --- /dev/null +++ b/doc/html/bamboo__06__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__06__2048__int8_8h = +[ + [ "BAMBOO_06_2048_NUM_CELLS", "bamboo__06__2048__int8_8h.html#af3f05ab7df5918ea3dc20f28ebe69c6c", null ], + [ "BAMBOO_06_2048_SAMPLERATE", "bamboo__06__2048__int8_8h.html#acc0d95060adf82d913a91dc7cf1ebf5c", null ], + [ "__attribute__", "bamboo__06__2048__int8_8h.html#a640eb9b26712ad8ac35f340db5529cdc", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__06__2048__int8_8h_source.html b/doc/html/bamboo__06__2048__int8_8h_source.html index 000a437b7..5d6096e65 100644 --- a/doc/html/bamboo__06__2048__int8_8h_source.html +++ b/doc/html/bamboo__06__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_06_2048_int8.h Source File +Mozzi: bamboo_06_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_06_2048_int8.h
    -
    1 #ifndef BAMBOO_06_2048_H_
    -
    2 #define BAMBOO_06_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_06_2048_H_
    +
    2 #define BAMBOO_06_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_06_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_06_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_06_2048_DATA [] = {0, 0, 1, -1, 1, -1, 1, -1, 0, 0, 0,
    +
    11 #define BAMBOO_06_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_06_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_06_2048_DATA [] = {0, 0, 1, -1, 1, -1, 1, -1, 0, 0, 0,
    15  1, -1, 0, 0, -1, 1, -1, 0, 0, 0, 0, 1, -8, -46, -104, -119, -32, 81, 125, 113,
    16  65, -21, -48, 4, 9, -34, -45, -36, -28, -15, -34, -31, 15, 59, 86, 71, 34, 2,
    17  -16, -7, 2, 11, 12, -42, -114, -97, -14, 28, 35, 16, -25, -10, 41, 61, 58, 31,
    @@ -212,14 +220,14 @@
    108  0, 0, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0,
    109  -1, 0, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0,};
    110 
    -
    111 #endif /* BAMBOO_06_2048_H_ */
    +
    111 #endif /* BAMBOO_06_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_07_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_07_2048_NUM_CELLS   2048
     
    #define BAMBOO_07_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_07_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_07_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_07_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_07_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_07_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__07__2048__int8_8h.js b/doc/html/bamboo__07__2048__int8_8h.js new file mode 100644 index 000000000..29faef432 --- /dev/null +++ b/doc/html/bamboo__07__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__07__2048__int8_8h = +[ + [ "BAMBOO_07_2048_NUM_CELLS", "bamboo__07__2048__int8_8h.html#a0fc229e323d110846187d5d9481df164", null ], + [ "BAMBOO_07_2048_SAMPLERATE", "bamboo__07__2048__int8_8h.html#abada329562cccb1e0be4515a1c6d4c0c", null ], + [ "__attribute__", "bamboo__07__2048__int8_8h.html#afa9cfda889824596b53e8671f24f684c", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__07__2048__int8_8h_source.html b/doc/html/bamboo__07__2048__int8_8h_source.html index ad600ee2a..3fd9e2e44 100644 --- a/doc/html/bamboo__07__2048__int8_8h_source.html +++ b/doc/html/bamboo__07__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_07_2048_int8.h Source File +Mozzi: bamboo_07_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_07_2048_int8.h
    -
    1 #ifndef BAMBOO_07_2048_H_
    -
    2 #define BAMBOO_07_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_07_2048_H_
    +
    2 #define BAMBOO_07_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_07_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_07_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_07_2048_DATA [] = {1, -1, 0, 0, 1, 0, 0, -1, 0, 0, 0,
    +
    11 #define BAMBOO_07_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_07_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_07_2048_DATA [] = {1, -1, 0, 0, 1, 0, 0, -1, 0, 0, 0,
    15  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, -3, -15, -48, -89,
    16  -84, 0, 98, 124, 71, -8, -50, -19, 13, -2, -24, -39, -38, -21, -18, 5, 51, 65,
    17  53, 35, 21, 5, -29, -35, -3, -8, -51, -69, -56, -4, 42, 22, 7, 22, 43, 56, 31,
    @@ -211,14 +219,14 @@
    107  0, -1, 0, -1, -1, -1, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, 0, -1,
    108  0, 0,};
    109 
    -
    110 #endif /* BAMBOO_07_2048_H_ */
    +
    110 #endif /* BAMBOO_07_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_08_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_08_2048_NUM_CELLS   2048
     
    #define BAMBOO_08_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_08_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_08_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_08_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_08_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_08_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__08__2048__int8_8h.js b/doc/html/bamboo__08__2048__int8_8h.js new file mode 100644 index 000000000..75a8e355a --- /dev/null +++ b/doc/html/bamboo__08__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__08__2048__int8_8h = +[ + [ "BAMBOO_08_2048_NUM_CELLS", "bamboo__08__2048__int8_8h.html#a615fcc03c4e8795a2f29db8f181f4271", null ], + [ "BAMBOO_08_2048_SAMPLERATE", "bamboo__08__2048__int8_8h.html#a1b42553382e15fa7dfdf4e42f4559c95", null ], + [ "__attribute__", "bamboo__08__2048__int8_8h.html#a8e609a42d324541024de4e8a394aa40a", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__08__2048__int8_8h_source.html b/doc/html/bamboo__08__2048__int8_8h_source.html index 11550021e..8c5b4ba61 100644 --- a/doc/html/bamboo__08__2048__int8_8h_source.html +++ b/doc/html/bamboo__08__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_08_2048_int8.h Source File +Mozzi: bamboo_08_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_08_2048_int8.h
    -
    1 #ifndef BAMBOO_08_2048_H_
    -
    2 #define BAMBOO_08_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_08_2048_H_
    +
    2 #define BAMBOO_08_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_08_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_08_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_08_2048_DATA [] = {1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
    +
    11 #define BAMBOO_08_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_08_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_08_2048_DATA [] = {1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
    15  0, 1, 0, 0, 0, -6, -33, -86, -100, -11, 111, 125, 49, -15, -60, -49, -7, -7, -1,
    16  9, -27, -38, 21, 77, 80, 50, 0, -42, -46, -32, 3, -13, -91, -62, 44, 80, 36, -5,
    17  15, 47, 27, 5, -8, -60, -78, -34, -7, 12, 12, -7, 15, 51, 55, 43, 20, -24, -56,
    @@ -211,14 +219,14 @@
    107  0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0,
    108  -1, 0, -1, 0, 0, -1, 0, 0,};
    109 
    -
    110 #endif /* BAMBOO_08_2048_H_ */
    +
    110 #endif /* BAMBOO_08_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_09_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_09_2048_NUM_CELLS   2048
     
    #define BAMBOO_09_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_09_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_09_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_09_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_09_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_09_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__09__2048__int8_8h.js b/doc/html/bamboo__09__2048__int8_8h.js new file mode 100644 index 000000000..c3d6bd51b --- /dev/null +++ b/doc/html/bamboo__09__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__09__2048__int8_8h = +[ + [ "BAMBOO_09_2048_NUM_CELLS", "bamboo__09__2048__int8_8h.html#ac85fd99e6bb92ebd8fe5c4bc6cb29535", null ], + [ "BAMBOO_09_2048_SAMPLERATE", "bamboo__09__2048__int8_8h.html#af41dcd6a161e3851aed85e36fe6bc21c", null ], + [ "__attribute__", "bamboo__09__2048__int8_8h.html#a4bd2f7fa853f4501d4aaaf12ce92bd6b", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__09__2048__int8_8h_source.html b/doc/html/bamboo__09__2048__int8_8h_source.html index e8a747c68..d82a82bee 100644 --- a/doc/html/bamboo__09__2048__int8_8h_source.html +++ b/doc/html/bamboo__09__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_09_2048_int8.h Source File +Mozzi: bamboo_09_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_09_2048_int8.h
    -
    1 #ifndef BAMBOO_09_2048_H_
    -
    2 #define BAMBOO_09_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_09_2048_H_
    +
    2 #define BAMBOO_09_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_09_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_09_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_09_2048_DATA [] = {1, 0, 0, 0, -1, 1, -1, 1, 1, -1, 0,
    +
    11 #define BAMBOO_09_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_09_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_09_2048_DATA [] = {1, 0, 0, 0, -1, 1, -1, 1, 1, -1, 0,
    15  -3, -14, -44, -89, -91, 6, 125, 121, 31, -29, -40, -22, -25, -39, -16, -9, -4,
    16  51, 72, 55, 41, 0, -32, -33, -64, -91, -35, 24, 21, 18, 50, 72, 45, 7, -1, -19,
    17  -77, -90, -31, -7, -1, 33, 43, 54, 71, 42, -5, -30, -45, -62, -60, -41, -7, 16,
    @@ -211,14 +219,14 @@
    107  -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1,
    108  0, 0, -1, 0, -1, 0, 0, 0, };
    109 
    -
    110 #endif /* BAMBOO_09_2048_H_ */
    +
    110 #endif /* BAMBOO_09_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    bamboo_10_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BAMBOO_10_2048_NUM_CELLS   2048
     
    #define BAMBOO_10_2048_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BAMBOO_10_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BAMBOO_10_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file bamboo_10_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BAMBOO_10_2048_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file bamboo_10_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/bamboo__10__2048__int8_8h.js b/doc/html/bamboo__10__2048__int8_8h.js new file mode 100644 index 000000000..7d55dfa75 --- /dev/null +++ b/doc/html/bamboo__10__2048__int8_8h.js @@ -0,0 +1,6 @@ +var bamboo__10__2048__int8_8h = +[ + [ "BAMBOO_10_2048_NUM_CELLS", "bamboo__10__2048__int8_8h.html#a5f23921b5f600ffddc48c25fcbbfc529", null ], + [ "BAMBOO_10_2048_SAMPLERATE", "bamboo__10__2048__int8_8h.html#add99298147eaea1d6062dd26309d2d1f", null ], + [ "__attribute__", "bamboo__10__2048__int8_8h.html#af1191ae6d18b1d102a529b34100475e4", null ] +]; \ No newline at end of file diff --git a/doc/html/bamboo__10__2048__int8_8h_source.html b/doc/html/bamboo__10__2048__int8_8h_source.html index e8fc742d4..942cf6009 100644 --- a/doc/html/bamboo__10__2048__int8_8h_source.html +++ b/doc/html/bamboo__10__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/bamboo/bamboo_10_2048_int8.h Source File +Mozzi: bamboo_10_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    bamboo_10_2048_int8.h
    -
    1 #ifndef BAMBOO_10_2048_H_
    -
    2 #define BAMBOO_10_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BAMBOO_10_2048_H_
    +
    2 #define BAMBOO_10_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define BAMBOO_10_2048_NUM_CELLS 2048
    -
    12 #define BAMBOO_10_2048_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BAMBOO_10_2048_DATA [] = {0, 0, -1, 0, -1, 1, 0, -1, 0, 0, 0,
    +
    11 #define BAMBOO_10_2048_NUM_CELLS 2048
    +
    12 #define BAMBOO_10_2048_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BAMBOO_10_2048_DATA [] = {0, 0, -1, 0, -1, 1, 0, -1, 0, 0, 0,
    15  0, 0, -1, -2, -8, -27, -64, -83, -7, 123, 124, -7, -81, -45, 32, 14, -73, -23,
    16  43, 36, 87, 41, -70, -9, 5, -107, -55, 33, 11, 40, 77, 50, 7, -44, -48, -33,
    17  -70, -53, 38, 45, 61, 106, 14, -53, 0, -35, -111, -50, 27, 42, 64, 50, 30, 32,
    @@ -211,14 +219,14 @@
    107  -1, 0, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1,
    108  0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0,};
    109 
    -
    110 #endif /* BAMBOO_10_2048_H_ */
    +
    110 #endif /* BAMBOO_10_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    brownnoise8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BROWNNOISE8192_NUM_CELLS   8192
     
    #define BROWNNOISE8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BROWNNOISE8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BROWNNOISE8192_NUM_CELLS   8192
    +
    + +

    Definition at line 14 of file brownnoise8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BROWNNOISE8192_SAMPLERATE   8192
    +
    + +

    Definition at line 15 of file brownnoise8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/brownnoise8192__int8_8h.js b/doc/html/brownnoise8192__int8_8h.js new file mode 100644 index 000000000..6440ccdbf --- /dev/null +++ b/doc/html/brownnoise8192__int8_8h.js @@ -0,0 +1,6 @@ +var brownnoise8192__int8_8h = +[ + [ "BROWNNOISE8192_NUM_CELLS", "brownnoise8192__int8_8h.html#a25368ccc1ac0b1242d7a0fb84cc12a5d", null ], + [ "BROWNNOISE8192_SAMPLERATE", "brownnoise8192__int8_8h.html#a0a08850a10dee49928b1f1e637c6cef5", null ], + [ "__attribute__", "brownnoise8192__int8_8h.html#affa17d1748f646f4a1ae0d8e26595e4d", null ] +]; \ No newline at end of file diff --git a/doc/html/brownnoise8192__int8_8h_source.html b/doc/html/brownnoise8192__int8_8h_source.html index a4b14136f..7756f7e9e 100644 --- a/doc/html/brownnoise8192__int8_8h_source.html +++ b/doc/html/brownnoise8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/brownnoise8192_int8.h Source File +Mozzi: brownnoise8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    brownnoise8192_int8.h
    -
    1 #ifndef BROWNNOISE8192_H_
    -
    2 #define BROWNNOISE8192_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef BROWNNOISE8192_H_
    +
    2 #define BROWNNOISE8192_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* Brown noise generated in Audacity
    12 */
    13 
    -
    14 #define BROWNNOISE8192_NUM_CELLS 8192
    -
    15 #define BROWNNOISE8192_SAMPLERATE 8192
    -
    16 
    -
    17 const char __attribute__((progmem)) BROWNNOISE8192_DATA [] =
    +
    14 #define BROWNNOISE8192_NUM_CELLS 8192
    +
    15 #define BROWNNOISE8192_SAMPLERATE 8192
    +
    16 
    +
    17 const char __attribute__((progmem)) BROWNNOISE8192_DATA [] =
    18  {
    19  54, 75, 42, 8, 11, 63, 34, -6, 36,
    20  79, 36, 72, 108, 99, 59, 106, 70, 102, 60, 100, 101, 97, 95, 127, 127, 127, 127,
    @@ -607,14 +615,14 @@
    503  -42, -95, -112, -101, -61, -51, -65, -114, -96, -110, -116, -91,
    504  };
    505 
    -
    506 #endif /* BROWNNOISE8192_H_ */
    +
    506 #endif /* BROWNNOISE8192_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    burroughs1_18649_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define BURROUGHS1_18649_NUM_CELLS   18649
     
    #define BURROUGHS1_18649_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) BURROUGHS1_18649_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BURROUGHS1_18649_NUM_CELLS   18649
    +
    + +

    Definition at line 11 of file burroughs1_18649_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define BURROUGHS1_18649_SAMPLERATE   16384
    +
    + +

    Definition at line 12 of file burroughs1_18649_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/burroughs1__18649__int8_8h.js b/doc/html/burroughs1__18649__int8_8h.js new file mode 100644 index 000000000..6e28e2f4e --- /dev/null +++ b/doc/html/burroughs1__18649__int8_8h.js @@ -0,0 +1,6 @@ +var burroughs1__18649__int8_8h = +[ + [ "BURROUGHS1_18649_NUM_CELLS", "burroughs1__18649__int8_8h.html#ad2fde35de42a90991d51c5dbe1f96756", null ], + [ "BURROUGHS1_18649_SAMPLERATE", "burroughs1__18649__int8_8h.html#a6929814f024a969fdbdaeedbf4d76cd1", null ], + [ "__attribute__", "burroughs1__18649__int8_8h.html#a0c76830e9e20b2bb17abe44b0af442e0", null ] +]; \ No newline at end of file diff --git a/doc/html/burroughs1__18649__int8_8h_source.html b/doc/html/burroughs1__18649__int8_8h_source.html index 1794b5d49..3ddb7efaf 100644 --- a/doc/html/burroughs1__18649__int8_8h_source.html +++ b/doc/html/burroughs1__18649__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: samples/burroughs1_18649_int8.h Source File +Mozzi: burroughs1_18649_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    burroughs1_18649_int8.h
    -
    1 #ifndef BURROUGHS1_18649_H_
    -
    2 #define BURROUGHS1_18649_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    -
    10 
    -
    11 #define BURROUGHS1_18649_NUM_CELLS 18649
    -
    12 #define BURROUGHS1_18649_SAMPLERATE 16384
    -
    13 
    -
    14 const char __attribute__((progmem)) BURROUGHS1_18649_DATA [] = {8, 16, 9, 9, 7,
    +Go to the documentation of this file.
    1 #ifndef BURROUGHS1_18649_H_
    +
    2 #define BURROUGHS1_18649_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    +
    10 
    +
    11 #define BURROUGHS1_18649_NUM_CELLS 18649
    +
    12 #define BURROUGHS1_18649_SAMPLERATE 16384
    +
    13 
    +
    14 const char __attribute__((progmem)) BURROUGHS1_18649_DATA [] = {8, 16, 9, 9, 7,
    15 6, 9, 12, 18, 20, 24, 25, 23, 22, 20, 20, 18, 18, 19, 19, 21, 22, 26, 24, 19,
    16 14, 10, 12, 13, 16, 17, 20, 18, 15, 14, 12, 12, 8, 7, 4, 7, 8, 8, 8, 7, 6, -14,
    17 -32, -40, -28, -21, -23, -27, -25, -19, -28, -40, -48, -38, -32, -34, -36, -25,
    @@ -1101,15 +1109,15 @@
    997 7, 10, 11, 14, 14, 9, 2, -1, 3, 6, 11, 12, 18, 20, 21, 15, 11, 9, 9, 10, 7, 9,
    998 13, 19, 15, 13, 13, 12, 5, -5, -8, -5, 2, 3, -1, -3, -7, -12, -21, -28, -32,
    999 -32, -25, -19, -9, -5, -4, -9, -13, -15, -14, -11, -8, 0, 7, 16, 3, };
    -
    1000 
    -
    1001  #endif /* BURROUGHS1_18649_H_ */
    +
    1000 
    +
    1001  #endif /* BURROUGHS1_18649_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    char2mozzi.py File Reference
    +
    +
    + +

    A script for converting raw 8 bit sound data files to wavetables for Mozzi. +More...

    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     char2mozzi
     
    + + + +

    +Constant Groups

     char2mozzi
     
    + + + +

    +Functions

    def char2mozzi.char2mozzi
     
    +

    Detailed Description

    +
    Usage: 
    +>>>char2mozzi.py <infile outfile tablename samplerate>
    +
    Parameters
    + + + + + +
    infileThe file to convert.
    outfileThe file to save as output.
    tablenameThe name to give the table of converted data in the new file.
    samplerateThe samplerate the sound was recorded at. Choose what make sense for you, if it's not a normal recorded sample.
    +
    +
    +
    Note
    Using Audacity to prepare raw sound files for converting:
    For generated waveforms like sine or sawtooth, set the project
    +rate to the size of the wavetable you wish to create, which must
    +be a power of two (eg. 8192), and set the selection format
    +(beneath the editing window) to samples. Then you can generate
    +and save 1 second of a waveform and it will fit your table
    +length.
    +
    +For a recorded audio sample, set the project rate to the
    +Mozzi AUDIO_RATE (16384 in the current version). 
    +Samples can be any length, as long as they fit in your Arduino.
    +
    +Save by exporting with the format set to "Other uncompressed formats",
    +options set to "RAW(headerless)" and "Encoding 8 bit signed PCM".
    +
    +Now use the file you just exported, as the "infile" to convert.
    +
    +
    Author
    Tim Barrass 2010-12
    + +

    Definition in file char2mozzi.py.

    +
    +
    + + + + diff --git a/doc/html/char2mozzi_8py.js b/doc/html/char2mozzi_8py.js new file mode 100644 index 000000000..d1684fedc --- /dev/null +++ b/doc/html/char2mozzi_8py.js @@ -0,0 +1,4 @@ +var char2mozzi_8py = +[ + [ "char2mozzi", "char2mozzi_8py.html#a61b2b967d3c7374f1f6f5296471cc45c", null ] +]; \ No newline at end of file diff --git a/doc/html/char2mozzi_8py_source.html b/doc/html/char2mozzi_8py_source.html index 2a8cc1291..9d2ec9374 100644 --- a/doc/html/char2mozzi_8py_source.html +++ b/doc/html/char2mozzi_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/char2mozzi.py Source File +Mozzi: char2mozzi.py Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,99 +110,94 @@
    char2mozzi.py
    -
    1 ## char2mozzi.py
    -
    2 ## Created 2010-12 by Tim Barrass
    -
    3 
    -
    4 import sys, array, os, textwrap, random
    -
    5 
    -
    6 if len(sys.argv) != 5:
    -
    7  print 'Usage: char2mozzi.py <infile outfile "tablename" "samplerate">'
    -
    8  sys.exit(1)
    -
    9 
    -
    10 [infile, outfile, tablename, samplerate] = sys.argv[1:]
    -
    11 
    -
    12 def char2mozzi(infile, outfile, tablename, samplerate):
    -
    13  """
    -
    14  char2mozzi.py converts raw 8 bit sound data to wavetables for Mozzi.
    -
    15 
    -
    16  Usage: python char2mozzi.py <infile outfile "tablename" "samplerate">
    -
    17 
    -
    18  Using Audacity to prepare raw sound files for converting:
    -
    19 
    -
    20  Set your Audacity project sample rate:
    -
    21 
    -
    22  For generated waveforms like sine or sawtooth, set the project
    -
    23  rate to the size of the wavetable you wish to create, which must
    -
    24  be a power of two (eg. 8192), and set the selection format
    -
    25  (beneath the editing window) to samples. Then you can generate
    -
    26  and save 1 second of a waveform and it will fit your table
    -
    27  length.
    -
    28 
    -
    29  For a recorded audio sample, set the project rate to the
    -
    30  Mozzi AUDIO_RATE (16384 in the current version).
    -
    31  Samples can be any length, as long as they fit in your Arduino.
    -
    32 
    -
    33  Save by exporting with the format set to "Other uncompressed formats",
    -
    34  options set to "RAW(headerless)" and "Encoding 8 bit signed PCM".
    -
    35 
    -
    36  Now use the file you just exported, as the "infile" to convert.
    -
    37 
    -
    38  Args:
    -
    39  infile: The file to convert.
    -
    40  outfile: The file to save as output.
    -
    41  tablename: The name to give the table of converted data in the new file.
    -
    42  samplerate: The samplerate the sound was recorded at. Choose what make sense for you, if it's not a normal recorded sample.
    -
    43 
    -
    44  """
    -
    45 
    -
    46  fin = open(os.path.expanduser(infile), "rb")
    -
    47  print "opened " + infile
    -
    48  bytestoread = os.path.getsize(os.path.expanduser(infile))
    -
    49  ##print bytestoread
    -
    50  valuesfromfile = array.array('b') # array of signed char ints
    -
    51  try:
    -
    52  valuesfromfile.fromfile(fin, bytestoread)
    -
    53  finally:
    -
    54  fin.close()
    -
    55 
    -
    56  values=valuesfromfile.tolist()
    -
    57 ## print values[0]
    -
    58 ## print values[len(values)-1]
    -
    59 ## print len(values)
    -
    60  fout = open(os.path.expanduser(outfile), "w")
    -
    61  fout.write('#ifndef ' + tablename + '_H_' + '\n')
    -
    62  fout.write('#define ' + tablename + '_H_' + '\n \n')
    -
    63  fout.write('#if ARDUINO >= 100'+'\n')
    -
    64  fout.write('#include "Arduino.h"'+'\n')
    -
    65  fout.write('#else'+'\n')
    -
    66  fout.write('#include "WProgram.h"'+'\n')
    -
    67  fout.write('#endif'+'\n')
    -
    68  fout.write('#include <avr/pgmspace.h>'+'\n \n')
    -
    69  fout.write('#define ' + tablename + '_NUM_CELLS '+ str(len(values))+'\n')
    -
    70  fout.write('#define ' + tablename + '_SAMPLERATE '+ str(samplerate)+'\n \n')
    -
    71  outstring = 'const char __attribute__((progmem)) ' + tablename + '_DATA [] = {'
    -
    72  try:
    -
    73  for i in range(len(values)):
    -
    74  ## mega2560 boards won't upload if there is 33, 33, 33 in the array, so dither the 3rd 33 if there is one
    -
    75  if (values[i] == 33) and (values[i+1] == 33) and (values[i+2] == 33):
    -
    76  values[i+2] = random.choice([32, 34])
    -
    77  outstring += str(values[i]) + ", "
    -
    78  finally:
    -
    79  outstring += "};"
    -
    80  outstring = textwrap.fill(outstring, 80)
    -
    81  fout.write(outstring)
    -
    82  fout.write('\n \n #endif /* ' + tablename + '_H_ */\n')
    -
    83  fout.close()
    -
    84  print "wrote " + outfile
    -
    85 
    -
    86 char2mozzi(infile, outfile, tablename, samplerate)
    +Go to the documentation of this file.
    1 #!/usr/bin/env python
    +
    2 
    +
    3 ##@file char2mozzi.py
    +
    4 # A script for converting raw 8 bit sound data files to wavetables for Mozzi.
    +
    5 #
    +
    6 # Usage:
    +
    7 # >>>char2mozzi.py <infile outfile tablename samplerate>
    +
    8 #
    +
    9 # @param infile The file to convert.
    +
    10 # @param outfile The file to save as output.
    +
    11 # @param tablename The name to give the table of converted data in the new file.
    +
    12 # @param samplerate The samplerate the sound was recorded at. Choose what make sense for you, if it's not a normal recorded sample.
    +
    13 #
    +
    14 # @note Using Audacity to prepare raw sound files for converting:
    +
    15 #
    +
    16 # For generated waveforms like sine or sawtooth, set the project
    +
    17 # rate to the size of the wavetable you wish to create, which must
    +
    18 # be a power of two (eg. 8192), and set the selection format
    +
    19 # (beneath the editing window) to samples. Then you can generate
    +
    20 # and save 1 second of a waveform and it will fit your table
    +
    21 # length.
    +
    22 #
    +
    23 # For a recorded audio sample, set the project rate to the
    +
    24 # Mozzi AUDIO_RATE (16384 in the current version).
    +
    25 # Samples can be any length, as long as they fit in your Arduino.
    +
    26 #
    +
    27 # Save by exporting with the format set to "Other uncompressed formats",
    +
    28 # options set to "RAW(headerless)" and "Encoding 8 bit signed PCM".
    +
    29 #
    +
    30 # Now use the file you just exported, as the "infile" to convert.
    +
    31 #
    +
    32 # @author Tim Barrass 2010-12
    +
    33 # @fn char2mozzi
    +
    34 
    +
    35 import sys, array, os, textwrap, random
    +
    36 
    +
    37 if len(sys.argv) != 5:
    +
    38  print 'Usage: char2mozzi.py <infile outfile tablename samplerate>'
    +
    39  sys.exit(1)
    +
    40 
    +
    41 [infile, outfile, tablename, samplerate] = sys.argv[1:]
    +
    42 
    +
    43 def char2mozzi(infile, outfile, tablename, samplerate):
    +
    44  fin = open(os.path.expanduser(infile), "rb")
    +
    45  print "opened " + infile
    +
    46  bytestoread = os.path.getsize(os.path.expanduser(infile))
    +
    47  ##print bytestoread
    +
    48  valuesfromfile = array.array('b') # array of signed char ints
    +
    49  try:
    +
    50  valuesfromfile.fromfile(fin, bytestoread)
    +
    51  finally:
    +
    52  fin.close()
    +
    53 
    +
    54  values=valuesfromfile.tolist()
    +
    55  fout = open(os.path.expanduser(outfile), "w")
    +
    56  fout.write('#ifndef ' + tablename + '_H_' + '\n')
    +
    57  fout.write('#define ' + tablename + '_H_' + '\n \n')
    +
    58  fout.write('#if ARDUINO >= 100'+'\n')
    +
    59  fout.write('#include "Arduino.h"'+'\n')
    +
    60  fout.write('#else'+'\n')
    +
    61  fout.write('#include "WProgram.h"'+'\n')
    +
    62  fout.write('#endif'+'\n')
    +
    63  fout.write('#include <avr/pgmspace.h>'+'\n \n')
    +
    64  fout.write('#define ' + tablename + '_NUM_CELLS '+ str(len(values))+'\n')
    +
    65  fout.write('#define ' + tablename + '_SAMPLERATE '+ str(samplerate)+'\n \n')
    +
    66  outstring = 'const char __attribute__((progmem)) ' + tablename + '_DATA [] = {'
    +
    67  try:
    +
    68  for i in range(len(values)):
    +
    69  ## mega2560 boards won't upload if there is 33, 33, 33 in the array, so dither the 3rd 33 if there is one
    +
    70  if (values[i] == 33) and (values[i+1] == 33) and (values[i+2] == 33):
    +
    71  values[i+2] = random.choice([32, 34])
    +
    72  outstring += str(values[i]) + ", "
    +
    73  finally:
    +
    74  outstring += "};"
    +
    75  outstring = textwrap.fill(outstring, 80)
    +
    76  fout.write(outstring)
    +
    77  fout.write('\n\n#endif /* ' + tablename + '_H_ */\n')
    +
    78  fout.close()
    +
    79  print "wrote " + outfile
    +
    80 
    +
    81 char2mozzi(infile, outfile, tablename, samplerate)
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    chebyshev_int8.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     chebyshev_int8
     
    + + + +

    +Constant Groups

     chebyshev_int8
     
    + + + +

    +Functions

    def chebyshev_int8.chebyTable
     
    +
    +
    + + + + diff --git a/doc/html/chebyshev__int8_8py.js b/doc/html/chebyshev__int8_8py.js new file mode 100644 index 000000000..6d681f76b --- /dev/null +++ b/doc/html/chebyshev__int8_8py.js @@ -0,0 +1,4 @@ +var chebyshev__int8_8py = +[ + [ "chebyTable", "chebyshev__int8_8py.html#a5842ca2472120a48abac9d12bd3f73f8", null ] +]; \ No newline at end of file diff --git a/doc/html/chebyshev__int8_8py_source.html b/doc/html/chebyshev__int8_8py_source.html index 39b811f4d..7cb19d915 100644 --- a/doc/html/chebyshev__int8_8py_source.html +++ b/doc/html/chebyshev__int8_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/chebyshev_int8.py Source File +Mozzi: chebyshev_int8.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,42 +109,42 @@
    chebyshev_int8.py
    -
    1 ## generates chebyshev polynomial curve tables for WaveShaper
    +Go to the documentation of this file.
    1 ## generates chebyshev polynomial curve tables for WaveShaper
    2 
    3 import array,os,textwrap,math
    4 
    5 
    6 def chebyTable(outfile, tablename, tablelength, curvenum):
    -
    7 
    -
    8  """
    -
    9  Generates chebyshev polynomial curve tables for WaveShaper.
    -
    10 
    -
    11  Args:
    -
    12  outfile: The file to save as output.
    -
    13  tablename: The name to give the table of converted data in the new file.
    -
    14  tablelength: Use a power of two.
    -
    15  curvenum: The chebyshev polynomial curve number to chebyTable.
    -
    16 
    -
    17  Examples:
    -
    18  chebyTable("~/Desktop/waveshaper_chebyshev_3rd_256_int8.h", "CHEBYSHEV_3RD_256", 256, 3)
    -
    19  chebyTable("~/Desktop/waveshaper_chebyshev_4th_256_int8.h", "CHEBYSHEV_4TH_256", 256, 4)
    -
    20  chebyTable("~/Desktop/waveshaper_chebyshev_5th_256_int8.h", "CHEBYSHEV_5TH_256", 256, 5)
    -
    21  chebyTable("~/Desktop/waveshaper_chebyshev_6th_256_int8.h", "CHEBYSHEV_6TH_256", 256, 6)
    +
    7 
    +
    8  """
    +
    9  Generates chebyshev polynomial curve tables for WaveShaper.
    +
    10 
    +
    11  Args:
    +
    12  outfile: The file to save as output.
    +
    13  tablename: The name to give the table of converted data in the new file.
    +
    14  tablelength: Use a power of two.
    +
    15  curvenum: The chebyshev polynomial curve number to chebyTable.
    +
    16 
    +
    17  Examples:
    +
    18  chebyTable("~/Desktop/waveshaper_chebyshev_3rd_256_int8.h", "CHEBYSHEV_3RD_256", 256, 3)
    +
    19  chebyTable("~/Desktop/waveshaper_chebyshev_4th_256_int8.h", "CHEBYSHEV_4TH_256", 256, 4)
    +
    20  chebyTable("~/Desktop/waveshaper_chebyshev_5th_256_int8.h", "CHEBYSHEV_5TH_256", 256, 5)
    +
    21  chebyTable("~/Desktop/waveshaper_chebyshev_6th_256_int8.h", "CHEBYSHEV_6TH_256", 256, 6)
    22 
    -
    23  Resources:
    -
    24  http://www.obiwannabe.co.uk/html/music/6SS/six-waveshaper.html
    -
    25  http://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html
    -
    26  The first few Chebyshev polynomials of the first kind are
    -
    27  T_0(x) = 1
    -
    28  T_1(x) = x
    -
    29  T_2(x) = 2x^2-1
    -
    30  T_3(x) = 4x^3-3x
    -
    31  T_4(x) = 8x^4-8x^2+1
    -
    32  T_5(x) = 16x^5-20x^3+5x
    -
    33  T_6(x) = 32x^6-48x^4+18x^2-1
    -
    34 
    -
    35  """
    -
    36 
    +
    23  Resources:
    +
    24  http://www.obiwannabe.co.uk/html/music/6SS/six-waveshaper.html
    +
    25  http://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html
    +
    26  The first few Chebyshev polynomials of the first kind are
    +
    27  T_0(x) = 1
    +
    28  T_1(x) = x
    +
    29  T_2(x) = 2x^2-1
    +
    30  T_3(x) = 4x^3-3x
    +
    31  T_4(x) = 8x^4-8x^2+1
    +
    32  T_5(x) = 16x^5-20x^3+5x
    +
    33  T_6(x) = 32x^6-48x^4+18x^2-1
    +
    34 
    +
    35  """
    +
    36 
    37  fout = open(os.path.expanduser(outfile), "w")
    38  fout.write('#ifndef ' + tablename + '_H_' + '\n')
    39  fout.write('#define ' + tablename + '_H_' + '\n \n')
    @@ -150,7 +157,7 @@
    46  fout.write('#define ' + tablename + '_NUM_CELLS '+ str(tablelength) +'\n')
    47  outstring = 'const char __attribute__((progmem)) ' + tablename + '_DATA [] = {'
    48  try:
    -
    49  for num in range(tablelength):
    +
    49  for num in range(tablelength):
    50  ## range between -1 and 1 first
    51  x = 2*(float(num-(tablelength/2)))/tablelength
    52 
    @@ -179,8 +186,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    chum78_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define CHUM78_NUM_CELLS   8193
     
    #define CHUM78_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) CHUM78_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define CHUM78_NUM_CELLS   8193
    +
    + +

    Definition at line 14 of file chum78_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define CHUM78_SAMPLERATE   16384
    +
    + +

    Definition at line 15 of file chum78_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/chum78__int8_8h.js b/doc/html/chum78__int8_8h.js new file mode 100644 index 000000000..1963dac10 --- /dev/null +++ b/doc/html/chum78__int8_8h.js @@ -0,0 +1,6 @@ +var chum78__int8_8h = +[ + [ "CHUM78_NUM_CELLS", "chum78__int8_8h.html#a3ce1ad06c8ad74f732233c3ba63d9393", null ], + [ "CHUM78_SAMPLERATE", "chum78__int8_8h.html#abf0c6b3781fdc577ce4f9fa1afad6d14", null ], + [ "__attribute__", "chum78__int8_8h.html#aac01c750460ac0f201ade96f8b239cd9", null ] +]; \ No newline at end of file diff --git a/doc/html/chum78__int8_8h_source.html b/doc/html/chum78__int8_8h_source.html index 1d3808b47..3471f9b58 100644 --- a/doc/html/chum78__int8_8h_source.html +++ b/doc/html/chum78__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/chum78_int8.h Source File +Mozzi: chum78_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    chum78_int8.h
    -
    1 #ifndef CHUM78_H_
    -
    2 #define CHUM78_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef CHUM78_H_
    +
    2 #define CHUM78_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* A sampled guitar sound
    12 */
    13 
    -
    14 #define CHUM78_NUM_CELLS 8193
    -
    15 #define CHUM78_SAMPLERATE 16384
    -
    16 
    -
    17 const char __attribute__((progmem)) CHUM78_DATA [] =
    +
    14 #define CHUM78_NUM_CELLS 8193
    +
    15 #define CHUM78_SAMPLERATE 16384
    +
    16 
    +
    17 const char __attribute__((progmem)) CHUM78_DATA [] =
    18  {
    19  -12, -28, -24, -14, -15, -14, -15, -23, -21,
    20  -13, -10, -25, -47, -49, -37, -37, -47, -46, -35, -28, -30, -27, -27, -48, -57,
    @@ -587,14 +595,14 @@
    483  14, 7, 10, 25, 9, -17, -21, 0, 22, 6,
    484  };
    485 
    -
    486 #endif /* CHUM78_H_ */
    +
    486 #endif /* CHUM78_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    chum9_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define CHUM9_NUM_CELLS   8192
     
    #define CHUM9_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) CHUM9_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define CHUM9_NUM_CELLS   8192
    +
    + +

    Definition at line 14 of file chum9_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define CHUM9_SAMPLERATE   16384
    +
    + +

    Definition at line 15 of file chum9_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/chum9__int8_8h.js b/doc/html/chum9__int8_8h.js new file mode 100644 index 000000000..1fc39c0eb --- /dev/null +++ b/doc/html/chum9__int8_8h.js @@ -0,0 +1,6 @@ +var chum9__int8_8h = +[ + [ "CHUM9_NUM_CELLS", "chum9__int8_8h.html#ac2f070f91202e8870093d6512af654b4", null ], + [ "CHUM9_SAMPLERATE", "chum9__int8_8h.html#a9e6b5d0502daa37e423b3ef9085a3780", null ], + [ "__attribute__", "chum9__int8_8h.html#a72474b80a315f13976b86d282e297eb6", null ] +]; \ No newline at end of file diff --git a/doc/html/chum9__int8_8h_source.html b/doc/html/chum9__int8_8h_source.html index 2b6fcbbed..34ff51b16 100644 --- a/doc/html/chum9__int8_8h_source.html +++ b/doc/html/chum9__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/chum9_int8.h Source File +Mozzi: chum9_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    chum9_int8.h
    -
    1 #ifndef CHUM9_H_
    -
    2 #define CHUM9_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef CHUM9_H_
    +
    2 #define CHUM9_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* A sampled guitar sound
    12 */
    13 
    -
    14 #define CHUM9_NUM_CELLS 8192
    -
    15 #define CHUM9_SAMPLERATE 16384
    -
    16 
    -
    17 const char __attribute__((progmem)) CHUM9_DATA [] =
    +
    14 #define CHUM9_NUM_CELLS 8192
    +
    15 #define CHUM9_SAMPLERATE 16384
    +
    16 
    +
    17 const char __attribute__((progmem)) CHUM9_DATA [] =
    18  {
    19  29, 42, 43, 38, 44, 37, 44, 35, 42, 51, -108,
    20  -82, -34, -72, -50, -65, -57, -61, -53, -59, -60, -53, -56, -58, -55, -55, -57,
    @@ -570,14 +578,14 @@
    466  45, 44, 44, 43, 44, 44, 46, 44, 43, 44, 42, 45, 43, 44, 44, 42, 41, 40, 40,
    467  };
    468 
    -
    469 #endif /* CHUM9_H_ */
    +
    469 #endif /* CHUM9_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -117,13 +120,13 @@
  • - + - + - + - + @@ -132,7 +135,7 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    noteOff()ADSR< CONTROL_UPDATE_RATE >inline
    noteOn()ADSR< CONTROL_UPDATE_RATE >inline
    setADLevels(byte attack, byte decay)ADSR< CONTROL_UPDATE_RATE >inline
    setAttackLevel(byte value)ADSR< CONTROL_UPDATE_RATE >inline
    setAttackLevel(byte attack)ADSR< CONTROL_UPDATE_RATE >inline
    setAttackTime(unsigned int msec)ADSR< CONTROL_UPDATE_RATE >inline
    setDecayLevel(byte value)ADSR< CONTROL_UPDATE_RATE >inline
    setDecayLevel(byte decay)ADSR< CONTROL_UPDATE_RATE >inline
    setDecayTime(unsigned int msec)ADSR< CONTROL_UPDATE_RATE >inline
    setReleaseLevel(byte value)ADSR< CONTROL_UPDATE_RATE >inline
    setReleaseLevel(byte release)ADSR< CONTROL_UPDATE_RATE >inline
    setReleaseTime(unsigned int msec)ADSR< CONTROL_UPDATE_RATE >inline
    setSustainLevel(byte value)ADSR< CONTROL_UPDATE_RATE >inline
    setSustainLevel(byte sustain)ADSR< CONTROL_UPDATE_RATE >inline
    setSustainTime(unsigned int msec)ADSR< CONTROL_UPDATE_RATE >inline
    setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)ADSR< CONTROL_UPDATE_RATE >inline
    update()ADSR< CONTROL_UPDATE_RATE >inline
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -116,6 +119,8 @@

    A simple ADSR envelope generator. More...

    + +

    #include <ADSR.h>

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    @@ -134,18 +139,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -321,7 +326,7 @@

    Member Function Documentation

    Parameters

    Public Member Functions

    void noteOff ()
     Start the release phase of the ADSR. More...
     
    void setAttackLevel (byte value)
     Set the attack level of the ADSR. More...
     
    void setDecayLevel (byte value)
     Set the decay level of the ADSR. More...
     
    void setSustainLevel (byte value)
     Set the sustain level of the ADSR. More...
     
    void setReleaseLevel (byte value)
     Set the release level of the ADSR. More...
     
    void setAttackLevel (byte attack)
     Set the attack level of the ADSR. More...
     
    void setDecayLevel (byte decay)
     Set the decay level of the ADSR. More...
     
    void setSustainLevel (byte sustain)
     Set the sustain level of the ADSR. More...
     
    void setReleaseLevel (byte release)
     Set the release level of the ADSR. More...
     
    void setADLevels (byte attack, byte decay)
     Set the attack and decay levels of the ADSR. More...
     
    - +
    attackthe new attack level.
    valuethe new sustain level.
    decaythe new sustain level.
    @@ -330,7 +335,7 @@

    Member Function Documentation

    - +
    @@ -343,7 +348,7 @@

    Member Function Documentation

    void ADSR< CONTROL_UPDATE_RATE >::setAttackLevel ( byte  - value) + attack) @@ -355,7 +360,7 @@

    Member Function Documentation

    Parameters
    - +
    valuethe attack level.
    attackthe attack level.
    @@ -390,7 +395,7 @@

    Member Function Documentation

    The actual time taken will be resolved within the resolution of CONTROL_RATE.

    Parameters
    - +
    valuethe unsigned int attack time in milliseconds.
    msecthe unsigned int attack time in milliseconds.
    @@ -399,7 +404,7 @@

    Member Function Documentation

    - +
    @@ -412,7 +417,7 @@

    Member Function Documentation

    void ADSR< CONTROL_UPDATE_RATE >::setDecayLevel ( byte  - value) + decay) @@ -424,7 +429,7 @@

    Member Function Documentation

    Parameters
    - +
    valuethe decay level.
    decaythe decay level.
    @@ -459,7 +464,7 @@

    Member Function Documentation

    The actual time taken will be resolved within the resolution of CONTROL_RATE.

    Parameters
    - +
    valuethe unsigned int decay time in milliseconds.
    msecthe unsigned int decay time in milliseconds.
    @@ -468,7 +473,7 @@

    Member Function Documentation

    - +
    @@ -481,7 +486,7 @@

    Member Function Documentation

    void ADSR< CONTROL_UPDATE_RATE >::setReleaseLevel ( byte  - value) + release) @@ -494,7 +499,7 @@

    Member Function Documentation

    Normally you'd make this 0, but you have the option of some other value.

    Parameters
    - +
    valuethe release level (normally 0).
    releasethe release level (normally 0).
    @@ -529,7 +534,7 @@

    Member Function Documentation

    The actual time taken will be resolved within the resolution of CONTROL_RATE.

    Parameters
    - +
    valuethe unsigned int release time in milliseconds.
    msecthe unsigned int release time in milliseconds.
    @@ -538,7 +543,7 @@

    Member Function Documentation

    - +
    @@ -551,7 +556,7 @@

    Member Function Documentation

    void ADSR< CONTROL_UPDATE_RATE >::setSustainLevel ( byte  - value) + sustain) @@ -563,7 +568,7 @@

    Member Function Documentation

    Parameters
    - +
    valuethe sustain level. Usually the same as the decay level, for a steady sustained note.
    sustainthe sustain level. Usually the same as the decay level, for a steady sustained note.
    @@ -598,7 +603,7 @@

    Member Function Documentation

    The actual time taken will be resolved within the resolution of CONTROL_RATE. The sustain phase will finish if the ADSR recieves a noteOff().

    Parameters
    - +
    valuethe unsigned int sustain time in milliseconds.
    msecthe unsigned int sustain time in milliseconds.
    @@ -657,7 +662,7 @@

    Member Function Documentation

    - +
    attack_msthe new attack time in milliseconds.
    decay_msthe new decay time in milliseconds.
    decay_msthe new sustain time in milliseconds.
    sustain_msthe new sustain time in milliseconds.
    release_msthe new release time in milliseconds.
    @@ -695,16 +700,13 @@

    Member Function Documentation

    -
    The documentation for this class was generated from the following file:
    -
    The documentation for this class was generated from the following file:
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    FrequencyTimer2 Member List
    +
    +
    + +

    This is the complete list of members for FrequencyTimer2, including all inherited members.

    + + + + + + + +
    disable()FrequencyTimer2static
    enable()FrequencyTimer2static
    getPeriod()FrequencyTimer2static
    onOverflowFrequencyTimer2static
    setOnOverflow(void(*)())FrequencyTimer2static
    setPeriod(unsigned long)FrequencyTimer2static
    +
    + + + + diff --git a/doc/html/class_frequency_timer2.html b/doc/html/class_frequency_timer2.html new file mode 100644 index 000000000..db0cd0b54 --- /dev/null +++ b/doc/html/class_frequency_timer2.html @@ -0,0 +1,308 @@ + + + + + + +My Project: FrequencyTimer2 Class Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    FrequencyTimer2 Class Reference
    +
    +
    + +

    #include <FrequencyTimer2.h>

    + + + + + + + + + + + + +

    +Static Public Member Functions

    static void setPeriod (unsigned long)
     
    static unsigned long getPeriod ()
     
    static void setOnOverflow (void(*)())
     
    static void enable ()
     
    static void disable ()
     
    + + + +

    +Static Public Attributes

    static void(* onOverflow )()
     
    +

    Detailed Description

    +
    +

    Definition at line 51 of file FrequencyTimer2.h.

    +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    void FrequencyTimer2::disable ()
    +
    +static
    +
    + +

    Definition at line 215 of file FrequencyTimer2.cpp.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void FrequencyTimer2::enable ()
    +
    +static
    +
    + +

    Definition at line 201 of file FrequencyTimer2.cpp.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    unsigned long FrequencyTimer2::getPeriod ()
    +
    +static
    +
    + +

    Definition at line 160 of file FrequencyTimer2.cpp.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + +
    void FrequencyTimer2::setOnOverflow (void(*)() func)
    +
    +static
    +
    + +

    Definition at line 61 of file FrequencyTimer2.cpp.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + +
    void FrequencyTimer2::setPeriod (unsigned long period)
    +
    +static
    +
    + +

    Definition at line 79 of file FrequencyTimer2.cpp.

    + +
    +
    +

    Member Data Documentation

    + +
    +
    + + + + + +
    + + + + +
    void(* FrequencyTimer2::onOverflow)()=0
    +
    +static
    +
    + +

    Definition at line 56 of file FrequencyTimer2.h.

    + +
    +
    +
    The documentation for this class was generated from the following files: +
    +
    + + + + diff --git a/doc/html/class_line-members.html b/doc/html/class_line-members.html index 4d811c0d8..c713ed125 100644 --- a/doc/html/class_line-members.html +++ b/doc/html/class_line-members.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -122,7 +125,7 @@
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -115,6 +118,8 @@

    For linear changes with a minimum of calculation at each step. More...

    + +

    #include <Line.h>

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    @@ -147,7 +152,7 @@

    Public Member Functions

    -
    Note
    Watch out for underflows in the internal calcualtion of Line() if you're not using floats (but on the other hand try to avoid lots of floats, they're too slow!). If it seems like the Line() is not working, there's a good chance you need to scale up the numbers you're using, so internal calculations don't get truncated away. Use Mozzi's fixed-point number types in mozzi_fixmath.h, which enable you to represent fractional numbers. Google "fixed point arithmetic" if this is new to you.
    +
    Note
    Watch out for underflows in the internal calcualtion of Line() if you're not using floats (but on the other hand try to avoid lots of floats, they're too slow!). If it seems like the Line() is not working, there's a good chance you need to scale up the numbers you're using, so internal calculations don't get truncated away. Use Mozzi's fixed-point number types in mozzi_fixmath.h, which enable you to represent fractional numbers. Google "fixed point arithmetic" if this is new to you.

    Definition at line 49 of file Line.h.

    Constructor & Destructor Documentation

    @@ -340,16 +345,13 @@

    Member Function Documentation

    -
    The documentation for this class was generated from the following file: -
    The documentation for this class was generated from the following file: -
    The documentation for this class was generated from the following file: +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    TimerOne Member List
    +
    +
    + +

    This is the complete list of members for TimerOne, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + +
    _modeTimerOneprotected
    attachInterrupt(void(*isr)()) __attribute__((always_inline))TimerOneinline
    attachInterrupt(void(*isr)(), unsigned long microseconds) __attribute__((always_inline))TimerOneinline
    clockSelectBitsTimerOneprotectedstatic
    detachInterrupt() __attribute__((always_inline))TimerOneinline
    disablePwm(char pin) __attribute__((always_inline))TimerOneinline
    getPeriod()TimerOneinline
    initialize(unsigned long microseconds=1000000, unsigned char mode=PHASE_FREQ_CORRECT) __attribute__((always_inline))TimerOneinline
    isrCallbackTimerOne
    pwm(char pin, unsigned int duty) __attribute__((always_inline))TimerOneinline
    pwm(char pin, unsigned int duty, unsigned long microseconds) __attribute__((always_inline))TimerOneinline
    pwmPeriodTimerOneprotectedstatic
    restart() __attribute__((always_inline))TimerOneinline
    resume() __attribute__((always_inline))TimerOneinline
    setPeriod(unsigned long microseconds) __attribute__((always_inline))TimerOneinline
    setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline))TimerOneinline
    start() __attribute__((always_inline))TimerOneinline
    stop() __attribute__((always_inline))TimerOneinline
    TCCR1A_PWM_MODE_BITSTimerOneprotected
    TCCR1B_PWM_MODE_BITSTimerOneprotected
    +
    + + + + diff --git a/doc/html/class_timer_one.html b/doc/html/class_timer_one.html new file mode 100644 index 000000000..781ad298f --- /dev/null +++ b/doc/html/class_timer_one.html @@ -0,0 +1,733 @@ + + + + + + +My Project: TimerOne Class Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    My Project +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + + +
    + +

    #include <TimerOne.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    void initialize (unsigned long microseconds=1000000, unsigned char mode=PHASE_FREQ_CORRECT) __attribute__((always_inline))
     
    void setPeriod (unsigned long microseconds) __attribute__((always_inline))
     
    void start () __attribute__((always_inline))
     
    void stop () __attribute__((always_inline))
     
    void restart () __attribute__((always_inline))
     
    void resume () __attribute__((always_inline))
     
    void setPwmDuty (char pin, unsigned int duty) __attribute__((always_inline))
     
    void pwm (char pin, unsigned int duty) __attribute__((always_inline))
     
    void pwm (char pin, unsigned int duty, unsigned long microseconds) __attribute__((always_inline))
     
    void disablePwm (char pin) __attribute__((always_inline))
     
    void attachInterrupt (void(*isr)()) __attribute__((always_inline))
     
    void attachInterrupt (void(*isr)(), unsigned long microseconds) __attribute__((always_inline))
     
    void detachInterrupt () __attribute__((always_inline))
     
    unsigned int getPeriod ()
     
    + + + +

    +Public Attributes

    void(* isrCallback )()
     
    + + + + + + + +

    +Protected Attributes

    unsigned char _mode
     
    unsigned char TCCR1B_PWM_MODE_BITS
     
    unsigned char TCCR1A_PWM_MODE_BITS
     
    + + + + + +

    +Static Protected Attributes

    static unsigned int pwmPeriod = 0
     
    static unsigned char clockSelectBits = 0
     
    +

    Detailed Description

    +
    +

    Definition at line 48 of file TimerOne.h.

    +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + + +
    void TimerOne::attachInterrupt (void(*)() isr)
    +
    +inline
    +
    + +

    Definition at line 218 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void TimerOne::attachInterrupt (void(*)() isr,
    unsigned long microseconds 
    )
    +
    +inline
    +
    + +

    Definition at line 223 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void TimerOne::detachInterrupt ()
    +
    +inline
    +
    + +

    Definition at line 229 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + +
    void TimerOne::disablePwm (char pin)
    +
    +inline
    +
    + +

    Definition at line 195 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    unsigned int TimerOne::getPeriod ()
    +
    +inline
    +
    + +

    Definition at line 235 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void TimerOne::initialize (unsigned long microseconds = 1000000,
    unsigned char mode = PHASE_FREQ_CORRECT 
    )
    +
    +inline
    +
    + +

    Definition at line 54 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void TimerOne::pwm (char pin,
    unsigned int duty 
    )
    +
    +inline
    +
    + +

    Definition at line 165 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void TimerOne::pwm (char pin,
    unsigned int duty,
    unsigned long microseconds 
    )
    +
    +inline
    +
    + +

    Definition at line 189 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void TimerOne::restart ()
    +
    +inline
    +
    + +

    Definition at line 132 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void TimerOne::resume ()
    +
    +inline
    +
    + +

    Definition at line 138 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + +
    void TimerOne::setPeriod (unsigned long microseconds)
    +
    +inline
    +
    + +

    Definition at line 70 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void TimerOne::setPwmDuty (char pin,
    unsigned int duty 
    )
    +
    +inline
    +
    + +

    Definition at line 146 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void TimerOne::start ()
    +
    +inline
    +
    + +

    Definition at line 122 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + + + + +
    void TimerOne::stop ()
    +
    +inline
    +
    + +

    Definition at line 128 of file TimerOne.h.

    + +
    +
    +

    Member Data Documentation

    + +
    +
    + + + + + +
    + + + + +
    unsigned char TimerOne::_mode
    +
    +protected
    +
    + +

    Definition at line 244 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + +
    unsigned char TimerOne::clockSelectBits = 0
    +
    +staticprotected
    +
    + +

    Definition at line 242 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + +
    void(* TimerOne::isrCallback)()
    +
    + +

    Definition at line 233 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + +
    unsigned int TimerOne::pwmPeriod = 0
    +
    +staticprotected
    +
    + +

    Definition at line 241 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + +
    unsigned char TimerOne::TCCR1A_PWM_MODE_BITS
    +
    +protected
    +
    + +

    Definition at line 246 of file TimerOne.h.

    + +
    +
    + +
    +
    + + + + + +
    + + + + +
    unsigned char TimerOne::TCCR1B_PWM_MODE_BITS
    +
    +protected
    +
    + +

    Definition at line 245 of file TimerOne.h.

    + +
    +
    +
    The documentation for this class was generated from the following files: +
    +
    + + + + diff --git a/doc/html/class_timer_one.js b/doc/html/class_timer_one.js new file mode 100644 index 000000000..f5731dfc6 --- /dev/null +++ b/doc/html/class_timer_one.js @@ -0,0 +1,21 @@ +var class_timer_one = +[ + [ "attachInterrupt", "class_timer_one.html#a20e47a29c41b2ea71527c979310bf52a", null ], + [ "attachInterrupt", "class_timer_one.html#a101e8edec40b23b2cea0b6f330dce178", null ], + [ "detachInterrupt", "class_timer_one.html#a24fdc429c4f61f02a7795895261ad4de", null ], + [ "disablePwm", "class_timer_one.html#a0fd864df169004ffe8f3e6b73216a11c", null ], + [ "getPeriod", "class_timer_one.html#acdb0a1793b5e1500a8d2d21c91bcd2ca", null ], + [ "initialize", "class_timer_one.html#a400983a86207fedc4870bab166c0d3f2", null ], + [ "pwm", "class_timer_one.html#ab82bc8ba44465074638adfab09e809f1", null ], + [ "pwm", "class_timer_one.html#ab19a6b0937ff3b2ab6177ebafe8d5257", null ], + [ "restart", "class_timer_one.html#a300cd652fd2c3f15496f884ef1f14c2f", null ], + [ "resume", "class_timer_one.html#ab3bb0b0fe326e83ca7114cec3754252d", null ], + [ "setPeriod", "class_timer_one.html#a0530428b51e32701ef4e55e7c3052155", null ], + [ "setPwmDuty", "class_timer_one.html#a53c9e4a29355e2557b82565a4ae2193b", null ], + [ "start", "class_timer_one.html#aeec1ebf3d215224316ccf07c429933a6", null ], + [ "stop", "class_timer_one.html#a22a765de7d6b02df2cdc34f69917b9d5", null ], + [ "_mode", "class_timer_one.html#a1aae0761553f7fc16479e97654354e34", null ], + [ "isrCallback", "class_timer_one.html#aeed829a3f938c613579c10a015a3d1cb", null ], + [ "TCCR1A_PWM_MODE_BITS", "class_timer_one.html#abbb9607b0432b9340934d15b230b661d", null ], + [ "TCCR1B_PWM_MODE_BITS", "class_timer_one.html#aa05d111db4f5f544db239ca11d4c0600", null ] +]; \ No newline at end of file diff --git a/doc/html/class_wave_packet-members.html b/doc/html/class_wave_packet-members.html index 2c81e1fa3..a00bb4247 100644 --- a/doc/html/class_wave_packet-members.html +++ b/doc/html/class_wave_packet-members.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -123,7 +126,7 @@
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -116,6 +119,8 @@

    Wavepacket synthesis, with two overlapping streams of wave packets. More...

    + +

    #include <WavePacket.h>

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    @@ -360,16 +365,13 @@

    Member Function Documentation

    -
    The documentation for this class was generated from the following file:

    Public Member Functions

    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -112,6 +115,8 @@

    WaveShaper maps values from its input to values in a table, which are returned as output. More...

    + +

    #include <WaveShaper.h>

    Detailed Description

    template<class T>
    class WaveShaper< T >

    @@ -124,16 +129,13 @@

    Definition at line 33 of file WaveShaper.h.

    -

    The documentation for this class was generated from the following file: -
    +
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -112,25 +115,26 @@
    A | C | D | E | L | O | P | R | S | W
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - - - - - - - - - + + + + + + + + + +
      A  
    -
      D  
    -
    LowPassFilter   
      R  
    -
    Smooth   
      O  
    -
    StateVariable   
    ADSR   DCfilter   RCpoll   
      W  
    -
    AudioDelay   
      E  
    -
    Oscil   RecentAverage   
    AutoRange   
      P  
    -
    ReverbTank   WavePacket   
      C  
    -
    Ead   
      S  
    +
      E  
    +
      P  
    +
      S  
    WaveShaper   
    EventDelay   Phasor   
    ControlDelay   
      L  
    -
    Portamento   Sample   
    Line   
    ADSR   Ead   Phasor   Sample   
    AudioDelay   EventDelay   Portamento   sintest   
    AutoRange   
      L  
    +
      R  
    +
    Smooth   
      C  
    +
    StateVariable   
    Line   RCpoll   
      W  
    +
    ControlDelay   LowPassFilter   RecentAverage   
      D  
    +
      O  
    +
    ReverbTank   WavePacket   
    DCfilter   Oscil   
    A | C | D | E | L | O | P | R | S | W
    @@ -139,7 +143,7 @@ +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cos2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COS2048_NUM_CELLS   2048
     
    #define COS2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COS2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COS2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file cos2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COS2048_SAMPLERATE   2048
    +
    + +

    Definition at line 12 of file cos2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cos2048__int8_8h.js b/doc/html/cos2048__int8_8h.js new file mode 100644 index 000000000..a8ada49fd --- /dev/null +++ b/doc/html/cos2048__int8_8h.js @@ -0,0 +1,6 @@ +var cos2048__int8_8h = +[ + [ "COS2048_NUM_CELLS", "cos2048__int8_8h.html#a2cc83856d7df6d20280f1e457424614c", null ], + [ "COS2048_SAMPLERATE", "cos2048__int8_8h.html#aae86144860ed8943c89ab53da609f380", null ], + [ "__attribute__", "cos2048__int8_8h.html#a4d8a7df4e9fda788df88db84df7a3ae1", null ] +]; \ No newline at end of file diff --git a/doc/html/cos2048__int8_8h_source.html b/doc/html/cos2048__int8_8h_source.html index 0e8ebf9c8..5002f101c 100644 --- a/doc/html/cos2048__int8_8h_source.html +++ b/doc/html/cos2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cos2048_int8.h Source File +Mozzi: cos2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    cos2048_int8.h
    -
    1 #ifndef COS2048_H_
    -
    2 #define COS2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COS2048_H_
    +
    2 #define COS2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define COS2048_NUM_CELLS 2048
    -
    12 #define COS2048_SAMPLERATE 2048
    -
    13 
    -
    14 const char __attribute__((progmem)) COS2048_DATA [] =
    +
    11 #define COS2048_NUM_CELLS 2048
    +
    12 #define COS2048_SAMPLERATE 2048
    +
    13 
    +
    14 const char __attribute__((progmem)) COS2048_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    @@ -246,14 +254,14 @@
    142  -128, -128, -128, -128, -128, -128,
    143  };
    144 
    -
    145 #endif /* COS2048_H_ */
    +
    145 #endif /* COS2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cos256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COS256_NUM_CELLS   256
     
    #define COS256_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COS256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COS256_NUM_CELLS   256
    +
    + +

    Definition at line 11 of file cos256_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COS256_SAMPLERATE   256
    +
    + +

    Definition at line 12 of file cos256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cos256__int8_8h.js b/doc/html/cos256__int8_8h.js new file mode 100644 index 000000000..ac98ffc4f --- /dev/null +++ b/doc/html/cos256__int8_8h.js @@ -0,0 +1,6 @@ +var cos256__int8_8h = +[ + [ "COS256_NUM_CELLS", "cos256__int8_8h.html#a3e10813563febab2c7ef3722913c5657", null ], + [ "COS256_SAMPLERATE", "cos256__int8_8h.html#a71b33149e817fd0731bfdf0004c489e6", null ], + [ "__attribute__", "cos256__int8_8h.html#afdb9b79e1507056edab2120617ca69b8", null ] +]; \ No newline at end of file diff --git a/doc/html/cos256__int8_8h_source.html b/doc/html/cos256__int8_8h_source.html index 85e9ce6e7..1af7ca85c 100644 --- a/doc/html/cos256__int8_8h_source.html +++ b/doc/html/cos256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cos256_int8.h Source File +Mozzi: cos256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    cos256_int8.h
    -
    1 #ifndef COS256_H_
    -
    2 #define COS256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COS256_H_
    +
    2 #define COS256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define COS256_NUM_CELLS 256
    -
    12 #define COS256_SAMPLERATE 256
    -
    13 
    -
    14 const char __attribute__((progmem)) COS256_DATA [] =
    +
    11 #define COS256_NUM_CELLS 256
    +
    12 #define COS256_SAMPLERATE 256
    +
    13 
    +
    14 const char __attribute__((progmem)) COS256_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -127,
    17  -127, -126, -125, -125, -124, -123, -122, -121, -120, -119, -118, -116, -115,
    @@ -136,14 +144,14 @@
    32  -128, -128, -128,
    33  };
    34 
    -
    35 #endif /* COS256_H_ */
    +
    35 #endif /* COS256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cos4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COS4096_NUM_CELLS   4096
     
    #define COS4096_SAMPLERATE   4096
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COS4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COS4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file cos4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COS4096_SAMPLERATE   4096
    +
    + +

    Definition at line 12 of file cos4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cos4096__int8_8h.js b/doc/html/cos4096__int8_8h.js new file mode 100644 index 000000000..231bcacba --- /dev/null +++ b/doc/html/cos4096__int8_8h.js @@ -0,0 +1,6 @@ +var cos4096__int8_8h = +[ + [ "COS4096_NUM_CELLS", "cos4096__int8_8h.html#ad6319789b7a33868609497d84f73d8f2", null ], + [ "COS4096_SAMPLERATE", "cos4096__int8_8h.html#a01821301fb825bbd6f8a2695ecc6e815", null ], + [ "__attribute__", "cos4096__int8_8h.html#adbfb5b3306d102cef601e2bf3d321cba", null ] +]; \ No newline at end of file diff --git a/doc/html/cos4096__int8_8h_source.html b/doc/html/cos4096__int8_8h_source.html index c6fbe4acf..f95d693d2 100644 --- a/doc/html/cos4096__int8_8h_source.html +++ b/doc/html/cos4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cos4096_int8.h Source File +Mozzi: cos4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    cos4096_int8.h
    -
    1 #ifndef COS4096_H_
    -
    2 #define COS4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COS4096_H_
    +
    2 #define COS4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define COS4096_NUM_CELLS 4096
    -
    12 #define COS4096_SAMPLERATE 4096
    -
    13 
    -
    14 const char __attribute__((progmem)) COS4096_DATA [] =
    +
    11 #define COS4096_NUM_CELLS 4096
    +
    12 #define COS4096_SAMPLERATE 4096
    +
    13 
    +
    14 const char __attribute__((progmem)) COS4096_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    @@ -372,14 +380,14 @@
    268  -128, -128, -128, -128, -128, -128,
    269  };
    270 
    -
    271 #endif /* COS4096_H_ */
    +
    271 #endif /* COS4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cos512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COS512_NUM_CELLS   512
     
    #define COS512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COS512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COS512_NUM_CELLS   512
    +
    + +

    Definition at line 11 of file cos512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COS512_SAMPLERATE   512
    +
    + +

    Definition at line 12 of file cos512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cos512__int8_8h.js b/doc/html/cos512__int8_8h.js new file mode 100644 index 000000000..9425df7b1 --- /dev/null +++ b/doc/html/cos512__int8_8h.js @@ -0,0 +1,6 @@ +var cos512__int8_8h = +[ + [ "COS512_NUM_CELLS", "cos512__int8_8h.html#a53ce62ef213e91318cdc41ec7636e0fa", null ], + [ "COS512_SAMPLERATE", "cos512__int8_8h.html#af1d42a6a226e184095f1127934f2346a", null ], + [ "__attribute__", "cos512__int8_8h.html#a260f05ca4db93fbec407303caad3dcc7", null ] +]; \ No newline at end of file diff --git a/doc/html/cos512__int8_8h_source.html b/doc/html/cos512__int8_8h_source.html index 5aa9f7c84..e3a9ea5fd 100644 --- a/doc/html/cos512__int8_8h_source.html +++ b/doc/html/cos512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cos512_int8.h Source File +Mozzi: cos512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    cos512_int8.h
    -
    1 #ifndef COS512_H_
    -
    2 #define COS512_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COS512_H_
    +
    2 #define COS512_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define COS512_NUM_CELLS 512
    -
    12 #define COS512_SAMPLERATE 512
    -
    13 
    -
    14 const char __attribute__((progmem)) COS512_DATA [] =
    +
    11 #define COS512_NUM_CELLS 512
    +
    12 #define COS512_SAMPLERATE 512
    +
    13 
    +
    14 const char __attribute__((progmem)) COS512_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -128, -128, -128, -127, -127, -127, -127, -126, -126, -126, -125, -125,
    @@ -151,14 +159,14 @@
    47  -127, -127, -127, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    48  };
    49 
    -
    50 #endif /* COS512_H_ */
    +
    50 #endif /* COS512_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cos8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COS8192_NUM_CELLS   8192
     
    #define COS8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COS8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COS8192_NUM_CELLS   8192
    +
    + +

    Definition at line 11 of file cos8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COS8192_SAMPLERATE   8192
    +
    + +

    Definition at line 12 of file cos8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cos8192__int8_8h.js b/doc/html/cos8192__int8_8h.js new file mode 100644 index 000000000..a31949750 --- /dev/null +++ b/doc/html/cos8192__int8_8h.js @@ -0,0 +1,6 @@ +var cos8192__int8_8h = +[ + [ "COS8192_NUM_CELLS", "cos8192__int8_8h.html#a63e06518e96491b0ec14232ecdcf353d", null ], + [ "COS8192_SAMPLERATE", "cos8192__int8_8h.html#aeedf933186667bf1929ceb2779eaeebd", null ], + [ "__attribute__", "cos8192__int8_8h.html#ac305d12d49f95f4ae1d8519fc8e59d25", null ] +]; \ No newline at end of file diff --git a/doc/html/cos8192__int8_8h_source.html b/doc/html/cos8192__int8_8h_source.html index 193eefdde..4458bd017 100644 --- a/doc/html/cos8192__int8_8h_source.html +++ b/doc/html/cos8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cos8192_int8.h Source File +Mozzi: cos8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    cos8192_int8.h
    -
    1 #ifndef COS8192_INT8_H_
    -
    2 #define COS8192_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COS8192_INT8_H_
    +
    2 #define COS8192_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define COS8192_NUM_CELLS 8192
    -
    12 #define COS8192_SAMPLERATE 8192
    -
    13 
    -
    14 const char __attribute__((progmem)) COS8192_DATA [] =
    +
    11 #define COS8192_NUM_CELLS 8192
    +
    12 #define COS8192_SAMPLERATE 8192
    +
    13 
    +
    14 const char __attribute__((progmem)) COS8192_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    @@ -624,14 +632,14 @@
    520  -128,
    521  };
    522 
    -
    523 #endif /* COS8192_INT8_H_ */
    +
    523 #endif /* COS8192_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cosphase2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + +

    +Macros

    #define COSPHASE2048_NUM_CELLS   2048
     Cosine wave, out-of-phase so it starts at 127, cycles to -128 and ends at 127. More...
     
    #define COSPHASE2048_SAMPLERATE   2048
     A samplerate attribute which is useful for sample tables. More...
     
    + + + + +

    +Functions

    const char __attribute__ ((progmem)) COSPHASE2048_DATA[]
     The table data, stored in progmem. More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COSPHASE2048_NUM_CELLS   2048
    +
    +

    The number of entries in the table.

    + +

    Definition at line 16 of file cosphase2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COSPHASE2048_SAMPLERATE   2048
    +
    + +

    Definition at line 20 of file cosphase2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cosphase2048__int8_8h.js b/doc/html/cosphase2048__int8_8h.js new file mode 100644 index 000000000..b8ab35184 --- /dev/null +++ b/doc/html/cosphase2048__int8_8h.js @@ -0,0 +1,6 @@ +var cosphase2048__int8_8h = +[ + [ "COSPHASE2048_NUM_CELLS", "cosphase2048__int8_8h.html#ac9a441998cad32403d781cfe9d80cf56", null ], + [ "COSPHASE2048_SAMPLERATE", "cosphase2048__int8_8h.html#ae6bbf04862cd9ec1b10a5441133e5186", null ], + [ "__attribute__", "cosphase2048__int8_8h.html#a6ebdc1e4dd0c424208625a17f349a112", null ] +]; \ No newline at end of file diff --git a/doc/html/cosphase2048__int8_8h_source.html b/doc/html/cosphase2048__int8_8h_source.html index 17f229974..f4bf528c4 100644 --- a/doc/html/cosphase2048__int8_8h_source.html +++ b/doc/html/cosphase2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cosphase2048_int8.h Source File +Mozzi: cosphase2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,21 +110,30 @@
    cosphase2048_int8.h
    -
    1 #ifndef COSPHASE2048_H_
    -
    2 #define COSPHASE2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COSPHASE2048_H_
    +
    2 #define COSPHASE2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    16 #define COSPHASE2048_NUM_CELLS 2048
    -
    17 
    -
    20 #define COSPHASE2048_SAMPLERATE 2048
    -
    21 
    -
    24 const char __attribute__((progmem)) COSPHASE2048_DATA [] =
    +
    11 /** Cosine wave, out-of-phase so it starts at 127, cycles to -128 and ends at 127
    +
    12 */
    +
    13 
    +
    14 /** The number of entries in the table.
    +
    15 */
    +
    16 #define COSPHASE2048_NUM_CELLS 2048
    +
    17 
    +
    18 /** A samplerate attribute which is useful for sample tables.
    +
    19 */
    +
    20 #define COSPHASE2048_SAMPLERATE 2048
    +
    21 
    +
    22 /** The table data, stored in progmem.
    +
    23 */
    +
    24 const char __attribute__((progmem)) COSPHASE2048_DATA [] =
    25  {
    26  127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    27  127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    @@ -247,14 +264,14 @@
    152  127, 127, 127, 127, 127, 127,
    153  };
    154 
    -
    155 #endif /* COSPHASE2048_H_ */
    +
    155 #endif /* COSPHASE2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cosphase256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COSPHASE256_NUM_CELLS   256
     
    #define COSPHASE256_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COSPHASE256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COSPHASE256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file cosphase256_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COSPHASE256_SAMPLERATE   256
    +
    + +

    Definition at line 15 of file cosphase256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cosphase256__int8_8h.js b/doc/html/cosphase256__int8_8h.js new file mode 100644 index 000000000..ee16546c3 --- /dev/null +++ b/doc/html/cosphase256__int8_8h.js @@ -0,0 +1,6 @@ +var cosphase256__int8_8h = +[ + [ "COSPHASE256_NUM_CELLS", "cosphase256__int8_8h.html#a4f816caf3c8149f37193c3945a5614c1", null ], + [ "COSPHASE256_SAMPLERATE", "cosphase256__int8_8h.html#a0a7840b04607aba3f8ff98e55c6c4ba6", null ], + [ "__attribute__", "cosphase256__int8_8h.html#a442a1e2675ace50725dc2abb674452a3", null ] +]; \ No newline at end of file diff --git a/doc/html/cosphase256__int8_8h_source.html b/doc/html/cosphase256__int8_8h_source.html index e98c76098..75c73c5d3 100644 --- a/doc/html/cosphase256__int8_8h_source.html +++ b/doc/html/cosphase256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cosphase256_int8.h Source File +Mozzi: cosphase256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    cosphase256_int8.h
    -
    1 #ifndef COSPHASE256_H_
    -
    2 #define COSPHASE256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COSPHASE256_H_
    +
    2 #define COSPHASE256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* cos out-of-phase
    12 */
    13 
    -
    14 #define COSPHASE256_NUM_CELLS 256
    -
    15 #define COSPHASE256_SAMPLERATE 256
    -
    16 
    -
    17 const char __attribute__((progmem)) COSPHASE256_DATA [] =
    +
    14 #define COSPHASE256_NUM_CELLS 256
    +
    15 #define COSPHASE256_SAMPLERATE 256
    +
    16 
    +
    17 const char __attribute__((progmem)) COSPHASE256_DATA [] =
    18  {
    19  127, 127, 127, 127, 127, 127, 127,
    20  126, 126, 125, 124, 124, 123, 122, 121, 120, 119, 118, 117, 115, 114, 112, 111,
    @@ -139,14 +147,14 @@
    35  126, 126, 127, 127, 127, 127,
    36  };
    37 
    -
    38 #endif /* COSPHASE256_H_ */
    +
    38 #endif /* COSPHASE256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    cosphase8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define COSPHASE8192_NUM_CELLS   8192
     
    #define COSPHASE8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) COSPHASE8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define COSPHASE8192_NUM_CELLS   8192
    +
    + +

    Definition at line 14 of file cosphase8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define COSPHASE8192_SAMPLERATE   8192
    +
    + +

    Definition at line 15 of file cosphase8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/cosphase8192__int8_8h.js b/doc/html/cosphase8192__int8_8h.js new file mode 100644 index 000000000..a27b46651 --- /dev/null +++ b/doc/html/cosphase8192__int8_8h.js @@ -0,0 +1,6 @@ +var cosphase8192__int8_8h = +[ + [ "COSPHASE8192_NUM_CELLS", "cosphase8192__int8_8h.html#a51c95618b49b568821a05a56aea73f8d", null ], + [ "COSPHASE8192_SAMPLERATE", "cosphase8192__int8_8h.html#aa8d65ba2a3bb6f6035937fe5f6869fc6", null ], + [ "__attribute__", "cosphase8192__int8_8h.html#a5452ea26a8dd9788cca9e6185979270b", null ] +]; \ No newline at end of file diff --git a/doc/html/cosphase8192__int8_8h_source.html b/doc/html/cosphase8192__int8_8h_source.html index 205a3b69d..98866675f 100644 --- a/doc/html/cosphase8192__int8_8h_source.html +++ b/doc/html/cosphase8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/cosphase8192_int8.h Source File +Mozzi: cosphase8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,25 +110,25 @@
    cosphase8192_int8.h
    -
    1 #ifndef COSPHASE8192_H_
    -
    2 #define COSPHASE8192_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef COSPHASE8192_H_
    +
    2 #define COSPHASE8192_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* cos out-of-phase
    12 */
    13 
    -
    14 #define COSPHASE8192_NUM_CELLS 8192
    -
    15 #define COSPHASE8192_SAMPLERATE 8192
    -
    16 
    -
    17 const char __attribute__((progmem)) COSPHASE8192_DATA [] =
    +
    14 #define COSPHASE8192_NUM_CELLS 8192
    +
    15 #define COSPHASE8192_SAMPLERATE 8192
    +
    16 
    +
    17 const char __attribute__((progmem)) COSPHASE8192_DATA [] =
    18  {
    -
    19  127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    +
    19  127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    20 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    21 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    22 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    @@ -626,14 +634,14 @@
    522 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    523  };
    524 
    -
    525 #endif /* COSPHASE8192_H_ */
    +
    525 #endif /* COSPHASE8192_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - @@ -47,8 +44,10 @@
    @@ -146,7 +145,7 @@
    -
    Mozzi -  alpha 0.01.2c +
    My Project
    -
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    tables Directory Reference
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Files

    file  brownnoise8192_int8.h [code]
     
    file  chum78_int8.h [code]
     
    file  chum9_int8.h [code]
     
    file  cos1024_int8.h [code]
     
    file  cos2048_int8.h [code]
     
    file  cos256_int8.h [code]
     
    file  cos4096_int8.h [code]
     
    file  cos512_int8.h [code]
     
    file  cos8192_int8.h [code]
     
    file  cosphase2048_int8.h [code]
     
    file  cosphase256_int8.h [code]
     
    file  cosphase8192_int8.h [code]
     
    file  envelop2048_uint8.h [code]
     
    file  halfsin256_uint8.h [code]
     
    file  halfsinwindow512_uint8.h [code]
     
    file  noise_static_1_16384_int8.h [code]
     
    file  phasor256_int8.h [code]
     
    file  pinknoise8192_int8.h [code]
     
    file  saw1024_int8.h [code]
     
    file  saw2048_int8.h [code]
     
    file  saw256_int8.h [code]
     
    file  saw4096_int8.h [code]
     
    file  saw512_int8.h [code]
     
    file  saw8192_int8.h [code]
     
    file  saw_analogue512_int8.h [code]
     
    file  sin1024_int8.h [code]
     
    file  sin1024_uint8.h [code]
     
    file  sin2048_int8.h [code]
     
    file  sin256_int8.h [code]
     
    file  sin4096_int8.h [code]
     
    file  sin512_int8.h [code]
     
    file  sin8192_int8.h [code]
     
    file  sin8192_uint8.h [code]
     
    file  sintest_int8.h [code]
     
    file  smoothsquare8192_int8.h [code]
     
    file  square_analogue512_int8.h [code]
     
    file  square_no_alias512_int8.h [code]
     
    file  triangle1024_int8.h [code]
     
    file  triangle2048_int8.h [code]
     
    file  triangle512_int8.h [code]
     
    file  triangle_analogue512_int8.h [code]
     
    file  triangle_dist_cubed_2048_int8.h [code]
     
    file  triangle_dist_squared_2048_int8.h [code]
     
    file  triangle_hermes_2048_int8.h [code]
     
    file  triangle_valve_2048_int8.h [code]
     
    file  triangle_valve_2_2048_int8.h [code]
     
    file  triangle_warm8192_int8.h [code]
     
    file  uphasor256_uint8.h [code]
     
    file  waveshape1_softclip_int8.h [code]
     
    file  waveshape2_softerclip_int8.h [code]
     
    file  waveshape_chebyshev_3rd_256_int8.h [code]
     
    file  waveshape_chebyshev_4th_256_int8.h [code]
     
    file  waveshape_chebyshev_5th_256_int8.h [code]
     
    file  waveshape_chebyshev_6th_256_int8.h [code]
     
    file  waveshape_compress_512_to_488_int16.h [code]
     
    file  waveshape_sigmoid_int8.h [code]
     
    file  waveshape_tanh_int8.h [code]
     
    file  whitenoise8192_int8.h [code]
     
    +
    +
    + + + + diff --git a/doc/html/dir_1a61e042530bd40c081eda0462bbfbd8.js b/doc/html/dir_1a61e042530bd40c081eda0462bbfbd8.js new file mode 100644 index 000000000..ed8d4e3b7 --- /dev/null +++ b/doc/html/dir_1a61e042530bd40c081eda0462bbfbd8.js @@ -0,0 +1,60 @@ +var dir_1a61e042530bd40c081eda0462bbfbd8 = +[ + [ "brownnoise8192_int8.h", "brownnoise8192__int8_8h.html", "brownnoise8192__int8_8h" ], + [ "chum78_int8.h", "chum78__int8_8h.html", "chum78__int8_8h" ], + [ "chum9_int8.h", "chum9__int8_8h.html", "chum9__int8_8h" ], + [ "cos1024_int8.h", "cos1024__int8_8h.html", "cos1024__int8_8h" ], + [ "cos2048_int8.h", "cos2048__int8_8h.html", "cos2048__int8_8h" ], + [ "cos256_int8.h", "cos256__int8_8h.html", "cos256__int8_8h" ], + [ "cos4096_int8.h", "cos4096__int8_8h.html", "cos4096__int8_8h" ], + [ "cos512_int8.h", "cos512__int8_8h.html", "cos512__int8_8h" ], + [ "cos8192_int8.h", "cos8192__int8_8h.html", "cos8192__int8_8h" ], + [ "cosphase2048_int8.h", "cosphase2048__int8_8h.html", "cosphase2048__int8_8h" ], + [ "cosphase256_int8.h", "cosphase256__int8_8h.html", "cosphase256__int8_8h" ], + [ "cosphase8192_int8.h", "cosphase8192__int8_8h.html", "cosphase8192__int8_8h" ], + [ "envelop2048_uint8.h", "envelop2048__uint8_8h.html", "envelop2048__uint8_8h" ], + [ "halfsin256_uint8.h", "halfsin256__uint8_8h.html", "halfsin256__uint8_8h" ], + [ "halfsinwindow512_uint8.h", "halfsinwindow512__uint8_8h.html", "halfsinwindow512__uint8_8h" ], + [ "noise_static_1_16384_int8.h", "noise__static__1__16384__int8_8h.html", "noise__static__1__16384__int8_8h" ], + [ "phasor256_int8.h", "phasor256__int8_8h.html", "phasor256__int8_8h" ], + [ "pinknoise8192_int8.h", "pinknoise8192__int8_8h.html", "pinknoise8192__int8_8h" ], + [ "saw1024_int8.h", "saw1024__int8_8h.html", "saw1024__int8_8h" ], + [ "saw2048_int8.h", "saw2048__int8_8h.html", "saw2048__int8_8h" ], + [ "saw256_int8.h", "saw256__int8_8h.html", "saw256__int8_8h" ], + [ "saw4096_int8.h", "saw4096__int8_8h.html", "saw4096__int8_8h" ], + [ "saw512_int8.h", "saw512__int8_8h.html", "saw512__int8_8h" ], + [ "saw8192_int8.h", "saw8192__int8_8h.html", "saw8192__int8_8h" ], + [ "saw_analogue512_int8.h", "saw__analogue512__int8_8h.html", "saw__analogue512__int8_8h" ], + [ "sin1024_int8.h", "sin1024__int8_8h.html", "sin1024__int8_8h" ], + [ "sin1024_uint8.h", "sin1024__uint8_8h.html", "sin1024__uint8_8h" ], + [ "sin2048_int8.h", "sin2048__int8_8h.html", "sin2048__int8_8h" ], + [ "sin256_int8.h", "sin256__int8_8h.html", "sin256__int8_8h" ], + [ "sin4096_int8.h", "sin4096__int8_8h.html", "sin4096__int8_8h" ], + [ "sin512_int8.h", "sin512__int8_8h.html", "sin512__int8_8h" ], + [ "sin8192_int8.h", "sin8192__int8_8h.html", "sin8192__int8_8h" ], + [ "sin8192_uint8.h", "sin8192__uint8_8h.html", "sin8192__uint8_8h" ], + [ "smoothsquare8192_int8.h", "smoothsquare8192__int8_8h.html", "smoothsquare8192__int8_8h" ], + [ "square_analogue512_int8.h", "square__analogue512__int8_8h.html", "square__analogue512__int8_8h" ], + [ "square_no_alias512_int8.h", "square__no__alias512__int8_8h.html", "square__no__alias512__int8_8h" ], + [ "triangle1024_int8.h", "triangle1024__int8_8h.html", "triangle1024__int8_8h" ], + [ "triangle2048_int8.h", "triangle2048__int8_8h.html", "triangle2048__int8_8h" ], + [ "triangle512_int8.h", "triangle512__int8_8h.html", "triangle512__int8_8h" ], + [ "triangle_analogue512_int8.h", "triangle__analogue512__int8_8h.html", "triangle__analogue512__int8_8h" ], + [ "triangle_dist_cubed_2048_int8.h", "triangle__dist__cubed__2048__int8_8h.html", "triangle__dist__cubed__2048__int8_8h" ], + [ "triangle_dist_squared_2048_int8.h", "triangle__dist__squared__2048__int8_8h.html", "triangle__dist__squared__2048__int8_8h" ], + [ "triangle_hermes_2048_int8.h", "triangle__hermes__2048__int8_8h.html", "triangle__hermes__2048__int8_8h" ], + [ "triangle_valve_2048_int8.h", "triangle__valve__2048__int8_8h.html", "triangle__valve__2048__int8_8h" ], + [ "triangle_valve_2_2048_int8.h", "triangle__valve__2__2048__int8_8h.html", "triangle__valve__2__2048__int8_8h" ], + [ "triangle_warm8192_int8.h", "triangle__warm8192__int8_8h.html", "triangle__warm8192__int8_8h" ], + [ "uphasor256_uint8.h", "uphasor256__uint8_8h.html", "uphasor256__uint8_8h" ], + [ "waveshape1_softclip_int8.h", "waveshape1__softclip__int8_8h.html", "waveshape1__softclip__int8_8h" ], + [ "waveshape2_softerclip_int8.h", "waveshape2__softerclip__int8_8h.html", "waveshape2__softerclip__int8_8h" ], + [ "waveshape_chebyshev_3rd_256_int8.h", "waveshape__chebyshev__3rd__256__int8_8h.html", "waveshape__chebyshev__3rd__256__int8_8h" ], + [ "waveshape_chebyshev_4th_256_int8.h", "waveshape__chebyshev__4th__256__int8_8h.html", "waveshape__chebyshev__4th__256__int8_8h" ], + [ "waveshape_chebyshev_5th_256_int8.h", "waveshape__chebyshev__5th__256__int8_8h.html", "waveshape__chebyshev__5th__256__int8_8h" ], + [ "waveshape_chebyshev_6th_256_int8.h", "waveshape__chebyshev__6th__256__int8_8h.html", "waveshape__chebyshev__6th__256__int8_8h" ], + [ "waveshape_compress_512_to_488_int16.h", "waveshape__compress__512__to__488__int16_8h.html", "waveshape__compress__512__to__488__int16_8h" ], + [ "waveshape_sigmoid_int8.h", "waveshape__sigmoid__int8_8h.html", "waveshape__sigmoid__int8_8h" ], + [ "waveshape_tanh_int8.h", "waveshape__tanh__int8_8h.html", "waveshape__tanh__int8_8h" ], + [ "whitenoise8192_int8.h", "whitenoise8192__int8_8h.html", "whitenoise8192__int8_8h" ] +]; \ No newline at end of file diff --git a/doc/html/dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.html b/doc/html/dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.html new file mode 100644 index 000000000..96171d41b --- /dev/null +++ b/doc/html/dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.html @@ -0,0 +1,125 @@ + + + + + + +Mozzi: Arduino Directory Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    Arduino Directory Reference
    +
    +
    + + + + +

    +Directories

    directory  libraries
     
    +
    +
    + + + + diff --git a/doc/html/dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.js b/doc/html/dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.js new file mode 100644 index 000000000..229225084 --- /dev/null +++ b/doc/html/dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.js @@ -0,0 +1,4 @@ +var dir_1ff56a8542c5da85d9f5c9ecf90c3ea3 = +[ + [ "libraries", "dir_9e0d9c2503aad25b459a272009aa8c8a.html", "dir_9e0d9c2503aad25b459a272009aa8c8a" ] +]; \ No newline at end of file diff --git a/doc/html/dir_4f6c6995d68d8db40fd401d0cfce5fde.html b/doc/html/dir_4f6c6995d68d8db40fd401d0cfce5fde.html new file mode 100644 index 000000000..d7f9cdf87 --- /dev/null +++ b/doc/html/dir_4f6c6995d68d8db40fd401d0cfce5fde.html @@ -0,0 +1,157 @@ + + + + + + +Mozzi: bamboo Directory Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    bamboo Directory Reference
    +
    + +
    + + + + diff --git a/doc/html/dir_4f6c6995d68d8db40fd401d0cfce5fde.js b/doc/html/dir_4f6c6995d68d8db40fd401d0cfce5fde.js new file mode 100644 index 000000000..f1e2fe72a --- /dev/null +++ b/doc/html/dir_4f6c6995d68d8db40fd401d0cfce5fde.js @@ -0,0 +1,20 @@ +var dir_4f6c6995d68d8db40fd401d0cfce5fde = +[ + [ "bamboo_00_2048_int8.h", "bamboo__00__2048__int8_8h.html", "bamboo__00__2048__int8_8h" ], + [ "bamboo_00_4096_int8.h", "bamboo__00__4096__int8_8h.html", "bamboo__00__4096__int8_8h" ], + [ "bamboo_01_2048_int8.h", "bamboo__01__2048__int8_8h.html", "bamboo__01__2048__int8_8h" ], + [ "bamboo_01_4096_int8.h", "bamboo__01__4096__int8_8h.html", "bamboo__01__4096__int8_8h" ], + [ "bamboo_02_2048_int8.h", "bamboo__02__2048__int8_8h.html", "bamboo__02__2048__int8_8h" ], + [ "bamboo_02_4096_int8.h", "bamboo__02__4096__int8_8h.html", "bamboo__02__4096__int8_8h" ], + [ "bamboo_03_2048_int8.h", "bamboo__03__2048__int8_8h.html", "bamboo__03__2048__int8_8h" ], + [ "bamboo_03_4096_int8.h", "bamboo__03__4096__int8_8h.html", "bamboo__03__4096__int8_8h" ], + [ "bamboo_04_2048_int8.h", "bamboo__04__2048__int8_8h.html", "bamboo__04__2048__int8_8h" ], + [ "bamboo_04_4096_int8.h", "bamboo__04__4096__int8_8h.html", "bamboo__04__4096__int8_8h" ], + [ "bamboo_05_2048_int8.h", "bamboo__05__2048__int8_8h.html", "bamboo__05__2048__int8_8h" ], + [ "bamboo_05_4096_int8.h", "bamboo__05__4096__int8_8h.html", "bamboo__05__4096__int8_8h" ], + [ "bamboo_06_2048_int8.h", "bamboo__06__2048__int8_8h.html", "bamboo__06__2048__int8_8h" ], + [ "bamboo_07_2048_int8.h", "bamboo__07__2048__int8_8h.html", "bamboo__07__2048__int8_8h" ], + [ "bamboo_08_2048_int8.h", "bamboo__08__2048__int8_8h.html", "bamboo__08__2048__int8_8h" ], + [ "bamboo_09_2048_int8.h", "bamboo__09__2048__int8_8h.html", "bamboo__09__2048__int8_8h" ], + [ "bamboo_10_2048_int8.h", "bamboo__10__2048__int8_8h.html", "bamboo__10__2048__int8_8h" ] +]; \ No newline at end of file diff --git a/doc/html/dir_55a17ad2da1043e18141e174893dc5b7.html b/doc/html/dir_55a17ad2da1043e18141e174893dc5b7.html new file mode 100644 index 000000000..5d024f2e4 --- /dev/null +++ b/doc/html/dir_55a17ad2da1043e18141e174893dc5b7.html @@ -0,0 +1,126 @@ + + + + + + +Mozzi: python Directory Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    python Directory Reference
    +
    +
    + + + + + +

    +Files

    file  char2mozzi.py [code]
     A script for converting raw 8 bit sound data files to wavetables for Mozzi.
     
    +
    +
    + + + + diff --git a/doc/html/dir_55a17ad2da1043e18141e174893dc5b7.js b/doc/html/dir_55a17ad2da1043e18141e174893dc5b7.js new file mode 100644 index 000000000..ca1306154 --- /dev/null +++ b/doc/html/dir_55a17ad2da1043e18141e174893dc5b7.js @@ -0,0 +1,11 @@ +var dir_55a17ad2da1043e18141e174893dc5b7 = +[ + [ "char2mozzi.py", "char2mozzi_8py.html", "char2mozzi_8py" ], + [ "chebyshev_int8.py", "chebyshev__int8_8py.html", "chebyshev__int8_8py" ], + [ "float2mozzi.py", "float2mozzi_8py.html", "float2mozzi_8py" ], + [ "float2mozzi_uint8.py", "float2mozzi__uint8_8py.html", "float2mozzi__uint8_8py" ], + [ "sin1024_int8.py", "sin1024__int8_8py.html", "sin1024__int8_8py" ], + [ "sin8192_uint8.py", "sin8192__uint8_8py.html", "sin8192__uint8_8py" ], + [ "sin_multi_levels_int8.py", "sin__multi__levels__int8_8py.html", "sin__multi__levels__int8_8py" ], + [ "table_generator_template.py", "table__generator__template_8py.html", "table__generator__template_8py" ] +]; \ No newline at end of file diff --git a/doc/html/dir_6f9635d4fbfa321d4c00f29df5cd540c.html b/doc/html/dir_6f9635d4fbfa321d4c00f29df5cd540c.html index 20271a7ba..3a9c42a5c 100644 --- a/doc/html/dir_6f9635d4fbfa321d4c00f29df5cd540c.html +++ b/doc/html/dir_6f9635d4fbfa321d4c00f29df5cd540c.html @@ -4,7 +4,7 @@ -Mozzi: samples Directory Reference +My Project: samples Directory Reference @@ -28,12 +28,9 @@ - @@ -47,8 +44,10 @@
    @@ -121,7 +120,7 @@
    -
    Mozzi -  alpha 0.01.2c +
    My Project
    -
    sound synthesis library for Arduino
    - @@ -47,8 +44,10 @@
    @@ -128,7 +127,7 @@
    -
    Mozzi -  alpha 0.01.2c +
    My Project
    -
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    config Directory Reference
    +
    +
    + + + + +

    +Files

    file  known_16bit_timers.h [code]
     
    +
    +
    + + + + diff --git a/doc/html/dir_7a228ef8bcf46ae62a0f60aa09218ee6.js b/doc/html/dir_7a228ef8bcf46ae62a0f60aa09218ee6.js new file mode 100644 index 000000000..657591ece --- /dev/null +++ b/doc/html/dir_7a228ef8bcf46ae62a0f60aa09218ee6.js @@ -0,0 +1,4 @@ +var dir_7a228ef8bcf46ae62a0f60aa09218ee6 = +[ + [ "known_16bit_timers.h", "known__16bit__timers_8h.html", null ] +]; \ No newline at end of file diff --git a/doc/html/dir_894eb6377fca7653903e7e316f8780ba.html b/doc/html/dir_894eb6377fca7653903e7e316f8780ba.html new file mode 100644 index 000000000..69b3f2e5b --- /dev/null +++ b/doc/html/dir_894eb6377fca7653903e7e316f8780ba.html @@ -0,0 +1,218 @@ + + + + + + +Mozzi: Mozzi Directory Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    Mozzi Directory Reference
    +
    +
    + + + + + + + + + + +

    +Directories

    directory  config
     
    directory  python
     
    directory  samples
     
    directory  tables
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Files

    file  ADSR.h [code]
     
    file  AudioConfigHiSpeed14bitPwm.h [code]
     
    file  AudioConfigStandard9bitPwm.h [code]
     
    file  AudioDelay.h [code]
     
    file  AudioDelayFeedback.h [code]
     
    file  AutoRange.h [code]
     
    file  ControlDelay.h [code]
     
    file  DCfilter.h [code]
     
    file  Ead.h [code]
     
    file  EventDelay.h [code]
     
    file  Line.h [code]
     
    file  LowPassFilter.h [code]
     
    file  meta.h [code]
     
    file  mozzi_analog.cpp [code]
     
    file  mozzi_analog.h [code]
     
    file  mozzi_config.h [code]
     
    file  mozzi_fixmath.cpp [code]
     
    file  mozzi_fixmath.h [code]
     
    file  mozzi_midi.cpp [code]
     
    file  mozzi_midi.h [code]
     
    file  mozzi_rand.cpp [code]
     
    file  mozzi_rand.h [code]
     
    file  mozzi_utils.h [code]
     
    file  MozziGuts.cpp [code]
     
    file  MozziGuts.h [code]
     
    file  mult16x16.h [code]
     
    file  mult16x8.h [code]
     
    file  mult32x16.h [code]
     
    file  Oscil.h [code]
     
    file  Phasor.h [code]
     
    file  Portamento.h [code]
     
    file  primes.h [code]
     
    file  RCpoll.h [code]
     
    file  RecentAverage.h [code]
     
    file  ReverbTank.h [code]
     
    file  Sample.h [code]
     
    file  Smooth.h [code]
     
    file  StateVariable.h [code]
     
    file  twi_nonblock.cpp [code]
     
    file  twi_nonblock.h [code]
     
    file  WavePacket.h [code]
     
    file  WaveShaper.h [code]
     
    +
    +
    + + + + diff --git a/doc/html/dir_894eb6377fca7653903e7e316f8780ba.js b/doc/html/dir_894eb6377fca7653903e7e316f8780ba.js new file mode 100644 index 000000000..e0de9600d --- /dev/null +++ b/doc/html/dir_894eb6377fca7653903e7e316f8780ba.js @@ -0,0 +1,83 @@ +var dir_894eb6377fca7653903e7e316f8780ba = +[ + [ "config", "dir_7a228ef8bcf46ae62a0f60aa09218ee6.html", "dir_7a228ef8bcf46ae62a0f60aa09218ee6" ], + [ "python", "dir_55a17ad2da1043e18141e174893dc5b7.html", "dir_55a17ad2da1043e18141e174893dc5b7" ], + [ "samples", "dir_a774e559c9a66996f5c4b203ebd90fb9.html", "dir_a774e559c9a66996f5c4b203ebd90fb9" ], + [ "tables", "dir_1a61e042530bd40c081eda0462bbfbd8.html", "dir_1a61e042530bd40c081eda0462bbfbd8" ], + [ "ADSR.h", "_a_d_s_r_8h.html", [ + [ "ADSR", "class_a_d_s_r.html", "class_a_d_s_r" ] + ] ], + [ "AudioConfigHiSpeed14bitPwm.h", "_audio_config_hi_speed14bit_pwm_8h.html", "_audio_config_hi_speed14bit_pwm_8h" ], + [ "AudioConfigStandard9bitPwm.h", "_audio_config_standard9bit_pwm_8h.html", "_audio_config_standard9bit_pwm_8h" ], + [ "AudioDelay.h", "_audio_delay_8h.html", [ + [ "AudioDelay", "class_audio_delay.html", "class_audio_delay" ] + ] ], + [ "AudioDelayFeedback.h", "_audio_delay_feedback_8h.html", null ], + [ "AutoRange.h", "_auto_range_8h.html", "_auto_range_8h" ], + [ "ControlDelay.h", "_control_delay_8h.html", [ + [ "ControlDelay", "class_control_delay.html", null ] + ] ], + [ "DCfilter.h", "_d_cfilter_8h.html", [ + [ "DCfilter", "class_d_cfilter.html", "class_d_cfilter" ] + ] ], + [ "Ead.h", "_ead_8h.html", [ + [ "Ead", "class_ead.html", "class_ead" ] + ] ], + [ "EventDelay.h", "_event_delay_8h.html", [ + [ "EventDelay", "class_event_delay.html", "class_event_delay" ] + ] ], + [ "FrequencyTimer2.cpp", "_frequency_timer2_8cpp.html", null ], + [ "FrequencyTimer2.h", "_frequency_timer2_8h.html", [ + [ "FrequencyTimer2", "class_frequency_timer2.html", null ] + ] ], + [ "Line.h", "_line_8h.html", [ + [ "Line", "class_line.html", "class_line" ] + ] ], + [ "LowPassFilter.h", "_low_pass_filter_8h.html", "_low_pass_filter_8h" ], + [ "meta.h", "meta_8h.html", null ], + [ "mozzi_analog.cpp", "mozzi__analog_8cpp.html", "mozzi__analog_8cpp" ], + [ "mozzi_analog.h", "mozzi__analog_8h.html", "mozzi__analog_8h" ], + [ "mozzi_config.h", "mozzi__config_8h.html", "mozzi__config_8h" ], + [ "mozzi_fixmath.cpp", "mozzi__fixmath_8cpp.html", "mozzi__fixmath_8cpp" ], + [ "mozzi_fixmath.h", "mozzi__fixmath_8h.html", "mozzi__fixmath_8h" ], + [ "mozzi_midi.cpp", "mozzi__midi_8cpp.html", "mozzi__midi_8cpp" ], + [ "mozzi_midi.h", "mozzi__midi_8h.html", "mozzi__midi_8h" ], + [ "mozzi_rand.cpp", "mozzi__rand_8cpp.html", "mozzi__rand_8cpp" ], + [ "mozzi_rand.h", "mozzi__rand_8h.html", "mozzi__rand_8h" ], + [ "mozzi_utils.h", "mozzi__utils_8h.html", "mozzi__utils_8h" ], + [ "MozziGuts.cpp", "_mozzi_guts_8cpp.html", "_mozzi_guts_8cpp" ], + [ "MozziGuts.h", "_mozzi_guts_8h.html", "_mozzi_guts_8h" ], + [ "mult16x16.h", "mult16x16_8h.html", "mult16x16_8h" ], + [ "mult16x8.h", "mult16x8_8h.html", "mult16x8_8h" ], + [ "mult32x16.h", "mult32x16_8h.html", "mult32x16_8h" ], + [ "Oscil.h", "_oscil_8h.html", "_oscil_8h" ], + [ "Phasor.h", "_phasor_8h.html", "_phasor_8h" ], + [ "Portamento.h", "_portamento_8h.html", [ + [ "Portamento", "class_portamento.html", "class_portamento" ] + ] ], + [ "primes.h", "primes_8h.html", "primes_8h" ], + [ "RCpoll.h", "_r_cpoll_8h.html", [ + [ "RCpoll", "class_r_cpoll.html", "class_r_cpoll" ] + ] ], + [ "RecentAverage.h", "_recent_average_8h.html", [ + [ "RecentAverage", "class_recent_average.html", "class_recent_average" ] + ] ], + [ "ReverbTank.h", "_reverb_tank_8h.html", [ + [ "ReverbTank", "class_reverb_tank.html", "class_reverb_tank" ] + ] ], + [ "Sample.h", "_sample_8h.html", "_sample_8h" ], + [ "Smooth.h", "_smooth_8h.html", [ + [ "Smooth", "class_smooth.html", "class_smooth" ] + ] ], + [ "StateVariable.h", "_state_variable_8h.html", "_state_variable_8h" ], + [ "TimerOne.cpp", "_timer_one_8cpp.html", "_timer_one_8cpp" ], + [ "TimerOne.h", "_timer_one_8h.html", "_timer_one_8h" ], + [ "TimerZero.cpp", "_timer_zero_8cpp.html", "_timer_zero_8cpp" ], + [ "TimerZero.h", "_timer_zero_8h.html", "_timer_zero_8h" ], + [ "twi_nonblock.cpp", "twi__nonblock_8cpp.html", "twi__nonblock_8cpp" ], + [ "twi_nonblock.h", "twi__nonblock_8h.html", "twi__nonblock_8h" ], + [ "WavePacket.h", "_wave_packet_8h.html", "_wave_packet_8h" ], + [ "WaveShaper.h", "_wave_shaper_8h.html", [ + [ "WaveShaper", "class_wave_shaper.html", null ] + ] ] +]; \ No newline at end of file diff --git a/doc/html/dir_9e0d9c2503aad25b459a272009aa8c8a.html b/doc/html/dir_9e0d9c2503aad25b459a272009aa8c8a.html new file mode 100644 index 000000000..16e21fb60 --- /dev/null +++ b/doc/html/dir_9e0d9c2503aad25b459a272009aa8c8a.html @@ -0,0 +1,125 @@ + + + + + + +Mozzi: libraries Directory Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    libraries Directory Reference
    +
    +
    + + + + +

    +Directories

    directory  Mozzi
     
    +
    +
    + + + + diff --git a/doc/html/dir_9e0d9c2503aad25b459a272009aa8c8a.js b/doc/html/dir_9e0d9c2503aad25b459a272009aa8c8a.js new file mode 100644 index 000000000..3a142326c --- /dev/null +++ b/doc/html/dir_9e0d9c2503aad25b459a272009aa8c8a.js @@ -0,0 +1,4 @@ +var dir_9e0d9c2503aad25b459a272009aa8c8a = +[ + [ "Mozzi", "dir_894eb6377fca7653903e7e316f8780ba.html", "dir_894eb6377fca7653903e7e316f8780ba" ] +]; \ No newline at end of file diff --git a/doc/html/dir_9f351d46ce3cc29445a41dc3a31e6919.html b/doc/html/dir_9f351d46ce3cc29445a41dc3a31e6919.html index 776f56634..09c25509c 100644 --- a/doc/html/dir_9f351d46ce3cc29445a41dc3a31e6919.html +++ b/doc/html/dir_9f351d46ce3cc29445a41dc3a31e6919.html @@ -4,7 +4,7 @@ -Mozzi: config Directory Reference +My Project: config Directory Reference @@ -28,12 +28,9 @@ - @@ -47,8 +44,10 @@
    @@ -114,7 +113,7 @@
    -
    Mozzi -  alpha 0.01.2c +
    My Project
    -
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    samples Directory Reference
    +
    +
    + + + + +

    +Directories

    directory  bamboo
     
    + + + + + +

    +Files

    file  abomb16384_int8.h [code]
     
    file  burroughs1_18649_int8.h [code]
     
    +
    +
    + + + + diff --git a/doc/html/dir_a774e559c9a66996f5c4b203ebd90fb9.js b/doc/html/dir_a774e559c9a66996f5c4b203ebd90fb9.js new file mode 100644 index 000000000..090975a3b --- /dev/null +++ b/doc/html/dir_a774e559c9a66996f5c4b203ebd90fb9.js @@ -0,0 +1,6 @@ +var dir_a774e559c9a66996f5c4b203ebd90fb9 = +[ + [ "bamboo", "dir_4f6c6995d68d8db40fd401d0cfce5fde.html", "dir_4f6c6995d68d8db40fd401d0cfce5fde" ], + [ "abomb16384_int8.h", "abomb16384__int8_8h.html", "abomb16384__int8_8h" ], + [ "burroughs1_18649_int8.h", "burroughs1__18649__int8_8h.html", "burroughs1__18649__int8_8h" ] +]; \ No newline at end of file diff --git a/doc/html/dir_c14d9bf81a1758ecfa63ad49c7d2ec2e.html b/doc/html/dir_c14d9bf81a1758ecfa63ad49c7d2ec2e.html index f2be15e87..d7b64c0d3 100644 --- a/doc/html/dir_c14d9bf81a1758ecfa63ad49c7d2ec2e.html +++ b/doc/html/dir_c14d9bf81a1758ecfa63ad49c7d2ec2e.html @@ -4,7 +4,7 @@ -Mozzi: tables Directory Reference +My Project: tables Directory Reference @@ -28,12 +28,9 @@ - @@ -47,8 +44,10 @@
    @@ -135,8 +134,6 @@
    - - @@ -228,7 +225,7 @@
    -
    Mozzi -  alpha 0.01.2c +
    My Project
    -
    sound synthesis library for Arduino
     
    file  halfsinwindow512_uint8.h [code]
     
    file  horse_lips_8192_int8.h [code]
     
    file  noise_static_1_16384_int8.h [code]
     
    file  phasor256_int8.h [code]
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    Documents Directory Reference
    +
    +
    + + + + +

    +Directories

    directory  Arduino
     
    +
    +
    + + + + diff --git a/doc/html/dir_f396504afdc959660871b003fa10164d.js b/doc/html/dir_f396504afdc959660871b003fa10164d.js new file mode 100644 index 000000000..f98221c7b --- /dev/null +++ b/doc/html/dir_f396504afdc959660871b003fa10164d.js @@ -0,0 +1,4 @@ +var dir_f396504afdc959660871b003fa10164d = +[ + [ "Arduino", "dir_1ff56a8542c5da85d9f5c9ecf90c3ea3.html", "dir_1ff56a8542c5da85d9f5c9ecf90c3ea3" ] +]; \ No newline at end of file diff --git a/doc/html/envelop2048__uint8_8h.html b/doc/html/envelop2048__uint8_8h.html new file mode 100644 index 000000000..ce4e51ac0 --- /dev/null +++ b/doc/html/envelop2048__uint8_8h.html @@ -0,0 +1,191 @@ + + + + + + +Mozzi: envelop2048_uint8.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    envelop2048_uint8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define ENVELOP2048_NUM_CELLS   2048
     
    #define ENVELOP2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) ENVELOP2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define ENVELOP2048_NUM_CELLS   2048
    +
    + +

    Definition at line 14 of file envelop2048_uint8.h.

    + +
    +
    + +
    +
    + + + + +
    #define ENVELOP2048_SAMPLERATE   2048
    +
    + +

    Definition at line 15 of file envelop2048_uint8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/envelop2048__uint8_8h.js b/doc/html/envelop2048__uint8_8h.js new file mode 100644 index 000000000..23a638ea6 --- /dev/null +++ b/doc/html/envelop2048__uint8_8h.js @@ -0,0 +1,6 @@ +var envelop2048__uint8_8h = +[ + [ "ENVELOP2048_NUM_CELLS", "envelop2048__uint8_8h.html#a38882787ae774b06b2cf8e356adad94f", null ], + [ "ENVELOP2048_SAMPLERATE", "envelop2048__uint8_8h.html#a61bb557a42235168283ed67698afa3e2", null ], + [ "__attribute__", "envelop2048__uint8_8h.html#a2172bd9507dc0d37e6c805f5a2117049", null ] +]; \ No newline at end of file diff --git a/doc/html/envelop2048__uint8_8h_source.html b/doc/html/envelop2048__uint8_8h_source.html index 10b1205f1..1121f4380 100644 --- a/doc/html/envelop2048__uint8_8h_source.html +++ b/doc/html/envelop2048__uint8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/envelop2048_uint8.h Source File +Mozzi: envelop2048_uint8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    envelop2048_uint8.h
    -
    1 #ifndef ENVELOP2048_INT8_H_
    -
    2 #define ENVELOP2048_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef ENVELOP2048_INT8_H_
    +
    2 #define ENVELOP2048_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* a hand-drawn envelope with fast attack and slow decay
    12 */
    13 
    -
    14 #define ENVELOP2048_NUM_CELLS 2048
    -
    15 #define ENVELOP2048_SAMPLERATE 2048
    -
    16 
    -
    17 const char __attribute__((progmem)) ENVELOP2048_DATA [] =
    +
    14 #define ENVELOP2048_NUM_CELLS 2048
    +
    15 #define ENVELOP2048_SAMPLERATE 2048
    +
    16 
    +
    17 const char __attribute__((progmem)) ENVELOP2048_DATA [] =
    18  {
    19  0, 1, 5, 8, 13, 22, 36, 53, 69, 82, 91,
    20  97, 103, 107, 113, 119, 128, 139, 151, 162, 171, 177, 181, 184, 186, 189, 192,
    @@ -223,14 +231,14 @@
    119  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    120  };
    121 
    -
    122 #endif /* ENVELOP2048_INT8_H_ */
    +
    122 #endif /* ENVELOP2048_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -88,7 +90,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -113,7 +115,7 @@
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - - - - + - - -
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - - + + @@ -52,6 +51,7 @@
  • Modules
  • Classes
  • Files
  • +
  • Examples
  • @@ -73,15 +73,30 @@ +
    +
    + +
    +
    + +
    @@ -95,146 +110,140 @@
    File List
    -
    Here is a list of all documented files with brief descriptions:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    Here is a list of all files with brief descriptions:
    +
    ADSR.h [code]
    AudioConfigHiSpeed14bitPwm.h [code]
    AudioConfigStandard9bitPwm.h [code]
    AudioDelay.h [code]
    AudioDelayFeedback.h [code]
    AutoRange.h [code]
    ControlDelay.h [code]
    DCfilter.h [code]
    Ead.h [code]
    EventDelay.h [code]
    Line.h [code]
    LowPassFilter.h [code]
    meta.h [code]
    mozzi_analog.cpp [code]
    mozzi_analog.h [code]
    mozzi_config.h [code]
    mozzi_fixmath.cpp [code]
    mozzi_fixmath.h [code]
    mozzi_midi.cpp [code]
    mozzi_midi.h [code]
    mozzi_rand.cpp [code]
    mozzi_rand.h [code]
    mozzi_utils.h [code]
    MozziGuts.cpp [code]
    MozziGuts.h [code]
    mult16x16.h [code]
    mult16x8.h [code]
    mult32x16.h [code]
    Oscil.h [code]
    Phasor.h [code]
    Portamento.h [code]
    primes.h [code]
    RCpoll.h [code]
    RecentAverage.h [code]
    ReverbTank.h [code]
    Sample.h [code]
    Smooth.h [code]
    StateVariable.h [code]
    twi_nonblock.cpp [code]
    twi_nonblock.h [code]
    WavePacket.h [code]
    WaveShaper.h [code]
    config/known_16bit_timers.h [code]
    python/char2mozzi-old.py [code]
    python/char2mozzi.py [code]
    python/chebyshev_int8.py [code]
    python/float2mozzi.py [code]
    python/float2mozzi_uint8.py [code]
    python/sin1024_int8.py [code]
    python/sin8192_uint8.py [code]
    python/sin_levels_int8.py [code]
    python/sin_multi_levels_int8.py [code]
    python/table_generator_template.py [code]
    samples/abomb16384_int8.h [code]
    samples/burroughs1_18649_int8.h [code]
    samples/bamboo/bamboo_00_2048_int8.h [code]
    samples/bamboo/bamboo_00_4096_int8.h [code]
    samples/bamboo/bamboo_01_2048_int8.h [code]
    samples/bamboo/bamboo_01_4096_int8.h [code]
    samples/bamboo/bamboo_02_2048_int8.h [code]
    samples/bamboo/bamboo_02_4096_int8.h [code]
    samples/bamboo/bamboo_03_2048_int8.h [code]
    samples/bamboo/bamboo_03_4096_int8.h [code]
    samples/bamboo/bamboo_04_2048_int8.h [code]
    samples/bamboo/bamboo_04_4096_int8.h [code]
    samples/bamboo/bamboo_05_2048_int8.h [code]
    samples/bamboo/bamboo_05_4096_int8.h [code]
    samples/bamboo/bamboo_06_2048_int8.h [code]
    samples/bamboo/bamboo_07_2048_int8.h [code]
    samples/bamboo/bamboo_08_2048_int8.h [code]
    samples/bamboo/bamboo_09_2048_int8.h [code]
    samples/bamboo/bamboo_10_2048_int8.h [code]
    tables/brownnoise8192_int8.h [code]
    tables/chum78_int8.h [code]
    tables/chum9_int8.h [code]
    tables/cos1024_int8.h [code]
    tables/cos2048_int8.h [code]
    tables/cos256_int8.h [code]
    tables/cos4096_int8.h [code]
    tables/cos512_int8.h [code]
    tables/cos8192_int8.h [code]
    tables/cosphase2048_int8.h [code]
    tables/cosphase256_int8.h [code]
    tables/cosphase8192_int8.h [code]
    tables/envelop2048_uint8.h [code]
    tables/halfsin256_uint8.h [code]
    tables/halfsinwindow512_uint8.h [code]
    tables/horse_lips_8192_int8.h [code]
    tables/noise_static_1_16384_int8.h [code]
    tables/phasor256_int8.h [code]
    tables/pinknoise8192_int8.h [code]
    tables/saw1024_int8.h [code]
    tables/saw2048_int8.h [code]
    tables/saw256_int8.h [code]
    tables/saw4096_int8.h [code]
    tables/saw512_int8.h [code]
    tables/saw8192_int8.h [code]
    tables/saw_analogue512_int8.h [code]
    tables/sin1024_int8.h [code]
    tables/sin1024_uint8.h [code]
    tables/sin2048_int8.h [code]
    tables/sin256_int8.h [code]
    tables/sin4096_int8.h [code]
    tables/sin512_int8.h [code]
    tables/sin8192_int8.h [code]
    tables/sin8192_uint8.h [code]
    tables/smoothsquare8192_int8.h [code]
    tables/square_analogue512_int8.h [code]
    tables/square_no_alias512_int8.h [code]
    tables/triangle1024_int8.h [code]
    tables/triangle2048_int8.h [code]
    tables/triangle512_int8.h [code]
    tables/triangle_analogue512_int8.h [code]
    tables/triangle_dist_cubed_2048_int8.h [code]
    tables/triangle_dist_squared_2048_int8.h [code]
    tables/triangle_hermes_2048_int8.h [code]
    tables/triangle_valve_2048_int8.h [code]
    tables/triangle_valve_2_2048_int8.h [code]
    tables/triangle_warm8192_int8.h [code]
    tables/uphasor256_uint8.h [code]
    tables/waveshape1_softclip_int8.h [code]
    tables/waveshape2_softerclip_int8.h [code]
    tables/waveshape_chebyshev_3rd_256_int8.h [code]
    tables/waveshape_chebyshev_4th_256_int8.h [code]
    tables/waveshape_chebyshev_5th_256_int8.h [code]
    tables/waveshape_chebyshev_6th_256_int8.h [code]
    tables/waveshape_compress_512_to_488_int16.h [code]
    tables/waveshape_sigmoid_int8.h [code]
    tables/waveshape_tanh_int8.h [code]
    tables/whitenoise8192_int8.h [code]
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    o*abomb16384_int8.h
    o*ADSR.h
    o*AudioConfigHiSpeed14bitPwm.h
    o*AudioConfigStandard9bitPwm.h
    o*AudioDelay.h
    o*AudioDelayFeedback.h
    o*AutoRange.h
    o*bamboo_00_2048_int8.h
    o*bamboo_00_4096_int8.h
    o*bamboo_01_2048_int8.h
    o*bamboo_01_4096_int8.h
    o*bamboo_02_2048_int8.h
    o*bamboo_02_4096_int8.h
    o*bamboo_03_2048_int8.h
    o*bamboo_03_4096_int8.h
    o*bamboo_04_2048_int8.h
    o*bamboo_04_4096_int8.h
    o*bamboo_05_2048_int8.h
    o*bamboo_05_4096_int8.h
    o*bamboo_06_2048_int8.h
    o*bamboo_07_2048_int8.h
    o*bamboo_08_2048_int8.h
    o*bamboo_09_2048_int8.h
    o*bamboo_10_2048_int8.h
    o*brownnoise8192_int8.h
    o*burroughs1_18649_int8.h
    o*char2mozzi.pyA script for converting raw 8 bit sound data files to wavetables for Mozzi
    o*chum78_int8.h
    o*chum9_int8.h
    o*ControlDelay.h
    o*cos1024_int8.h
    o*cos2048_int8.h
    o*cos256_int8.h
    o*cos4096_int8.h
    o*cos512_int8.h
    o*cos8192_int8.h
    o*cosphase2048_int8.h
    o*cosphase256_int8.h
    o*cosphase8192_int8.h
    o*DCfilter.h
    o*Ead.h
    o*envelop2048_uint8.h
    o*EventDelay.h
    o*halfsin256_uint8.h
    o*halfsinwindow512_uint8.h
    o*known_16bit_timers.h
    o*Line.h
    o*LowPassFilter.h
    o*meta.h
    o*mozzi_analog.cpp
    o*mozzi_analog.h
    o*mozzi_config.h
    o*mozzi_fixmath.cpp
    o*mozzi_fixmath.h
    o*mozzi_midi.cpp
    o*mozzi_midi.h
    o*mozzi_rand.cpp
    o*mozzi_rand.h
    o*mozzi_utils.h
    o*MozziGuts.cpp
    o*MozziGuts.h
    o*mult16x16.h
    o*mult16x8.h
    o*mult32x16.h
    o*noise_static_1_16384_int8.h
    o*Oscil.h
    o*Phasor.h
    o*phasor256_int8.h
    o*pinknoise8192_int8.h
    o*Portamento.h
    o*primes.h
    o*RCpoll.h
    o*RecentAverage.h
    o*ReverbTank.h
    o*Sample.h
    o*saw1024_int8.h
    o*saw2048_int8.h
    o*saw256_int8.h
    o*saw4096_int8.h
    o*saw512_int8.h
    o*saw8192_int8.h
    o*saw_analogue512_int8.h
    o*sin1024_int8.h
    o*sin1024_uint8.h
    o*sin2048_int8.h
    o*sin256_int8.h
    o*sin4096_int8.h
    o*sin512_int8.h
    o*sin8192_int8.h
    o*sin8192_uint8.h
    o*sintest_int8.h
    o*Smooth.h
    o*smoothsquare8192_int8.h
    o*square_analogue512_int8.h
    o*square_no_alias512_int8.h
    o*StateVariable.h
    o*triangle1024_int8.h
    o*triangle2048_int8.h
    o*triangle512_int8.h
    o*triangle_analogue512_int8.h
    o*triangle_dist_cubed_2048_int8.h
    o*triangle_dist_squared_2048_int8.h
    o*triangle_hermes_2048_int8.h
    o*triangle_valve_2048_int8.h
    o*triangle_valve_2_2048_int8.h
    o*triangle_warm8192_int8.h
    o*twi_nonblock.cpp
    o*twi_nonblock.h
    o*uphasor256_uint8.h
    o*WavePacket.h
    o*waveshape1_softclip_int8.h
    o*waveshape2_softerclip_int8.h
    o*waveshape_chebyshev_3rd_256_int8.h
    o*waveshape_chebyshev_4th_256_int8.h
    o*waveshape_chebyshev_5th_256_int8.h
    o*waveshape_chebyshev_6th_256_int8.h
    o*waveshape_compress_512_to_488_int16.h
    o*waveshape_sigmoid_int8.h
    o*waveshape_tanh_int8.h
    o*WaveShaper.h
    \*whitenoise8192_int8.h
    +
    - - - - + + + diff --git a/doc/html/files.js b/doc/html/files.js new file mode 100644 index 000000000..1d790412e --- /dev/null +++ b/doc/html/files.js @@ -0,0 +1,150 @@ +var files = +[ + [ "abomb16384_int8.h", "abomb16384__int8_8h.html", "abomb16384__int8_8h" ], + [ "ADSR.h", "_a_d_s_r_8h.html", [ + [ "ADSR", "class_a_d_s_r.html", "class_a_d_s_r" ] + ] ], + [ "AudioConfigHiSpeed14bitPwm.h", "_audio_config_hi_speed14bit_pwm_8h.html", "_audio_config_hi_speed14bit_pwm_8h" ], + [ "AudioConfigStandard9bitPwm.h", "_audio_config_standard9bit_pwm_8h.html", "_audio_config_standard9bit_pwm_8h" ], + [ "AudioDelay.h", "_audio_delay_8h.html", [ + [ "AudioDelay", "class_audio_delay.html", "class_audio_delay" ] + ] ], + [ "AudioDelayFeedback.h", "_audio_delay_feedback_8h.html", null ], + [ "AutoRange.h", "_auto_range_8h.html", "_auto_range_8h" ], + [ "bamboo_00_2048_int8.h", "bamboo__00__2048__int8_8h.html", "bamboo__00__2048__int8_8h" ], + [ "bamboo_00_4096_int8.h", "bamboo__00__4096__int8_8h.html", "bamboo__00__4096__int8_8h" ], + [ "bamboo_01_2048_int8.h", "bamboo__01__2048__int8_8h.html", "bamboo__01__2048__int8_8h" ], + [ "bamboo_01_4096_int8.h", "bamboo__01__4096__int8_8h.html", "bamboo__01__4096__int8_8h" ], + [ "bamboo_02_2048_int8.h", "bamboo__02__2048__int8_8h.html", "bamboo__02__2048__int8_8h" ], + [ "bamboo_02_4096_int8.h", "bamboo__02__4096__int8_8h.html", "bamboo__02__4096__int8_8h" ], + [ "bamboo_03_2048_int8.h", "bamboo__03__2048__int8_8h.html", "bamboo__03__2048__int8_8h" ], + [ "bamboo_03_4096_int8.h", "bamboo__03__4096__int8_8h.html", "bamboo__03__4096__int8_8h" ], + [ "bamboo_04_2048_int8.h", "bamboo__04__2048__int8_8h.html", "bamboo__04__2048__int8_8h" ], + [ "bamboo_04_4096_int8.h", "bamboo__04__4096__int8_8h.html", "bamboo__04__4096__int8_8h" ], + [ "bamboo_05_2048_int8.h", "bamboo__05__2048__int8_8h.html", "bamboo__05__2048__int8_8h" ], + [ "bamboo_05_4096_int8.h", "bamboo__05__4096__int8_8h.html", "bamboo__05__4096__int8_8h" ], + [ "bamboo_06_2048_int8.h", "bamboo__06__2048__int8_8h.html", "bamboo__06__2048__int8_8h" ], + [ "bamboo_07_2048_int8.h", "bamboo__07__2048__int8_8h.html", "bamboo__07__2048__int8_8h" ], + [ "bamboo_08_2048_int8.h", "bamboo__08__2048__int8_8h.html", "bamboo__08__2048__int8_8h" ], + [ "bamboo_09_2048_int8.h", "bamboo__09__2048__int8_8h.html", "bamboo__09__2048__int8_8h" ], + [ "bamboo_10_2048_int8.h", "bamboo__10__2048__int8_8h.html", "bamboo__10__2048__int8_8h" ], + [ "brownnoise8192_int8.h", "brownnoise8192__int8_8h.html", "brownnoise8192__int8_8h" ], + [ "burroughs1_18649_int8.h", "burroughs1__18649__int8_8h.html", "burroughs1__18649__int8_8h" ], + [ "char2mozzi.py", "char2mozzi_8py.html", "char2mozzi_8py" ], + [ "chum78_int8.h", "chum78__int8_8h.html", "chum78__int8_8h" ], + [ "chum9_int8.h", "chum9__int8_8h.html", "chum9__int8_8h" ], + [ "ControlDelay.h", "_control_delay_8h.html", [ + [ "ControlDelay", "class_control_delay.html", "class_control_delay" ] + ] ], + [ "cos1024_int8.h", "cos1024__int8_8h.html", "cos1024__int8_8h" ], + [ "cos2048_int8.h", "cos2048__int8_8h.html", "cos2048__int8_8h" ], + [ "cos256_int8.h", "cos256__int8_8h.html", "cos256__int8_8h" ], + [ "cos4096_int8.h", "cos4096__int8_8h.html", "cos4096__int8_8h" ], + [ "cos512_int8.h", "cos512__int8_8h.html", "cos512__int8_8h" ], + [ "cos8192_int8.h", "cos8192__int8_8h.html", "cos8192__int8_8h" ], + [ "cosphase2048_int8.h", "cosphase2048__int8_8h.html", "cosphase2048__int8_8h" ], + [ "cosphase256_int8.h", "cosphase256__int8_8h.html", "cosphase256__int8_8h" ], + [ "cosphase8192_int8.h", "cosphase8192__int8_8h.html", "cosphase8192__int8_8h" ], + [ "DCfilter.h", "_d_cfilter_8h.html", [ + [ "DCfilter", "class_d_cfilter.html", "class_d_cfilter" ] + ] ], + [ "Ead.h", "_ead_8h.html", [ + [ "Ead", "class_ead.html", "class_ead" ] + ] ], + [ "envelop2048_uint8.h", "envelop2048__uint8_8h.html", "envelop2048__uint8_8h" ], + [ "EventDelay.h", "_event_delay_8h.html", [ + [ "EventDelay", "class_event_delay.html", "class_event_delay" ] + ] ], + [ "halfsin256_uint8.h", "halfsin256__uint8_8h.html", "halfsin256__uint8_8h" ], + [ "halfsinwindow512_uint8.h", "halfsinwindow512__uint8_8h.html", "halfsinwindow512__uint8_8h" ], + [ "known_16bit_timers.h", "known__16bit__timers_8h.html", null ], + [ "Line.h", "_line_8h.html", [ + [ "Line", "class_line.html", "class_line" ] + ] ], + [ "LowPassFilter.h", "_low_pass_filter_8h.html", "_low_pass_filter_8h" ], + [ "meta.h", "meta_8h.html", null ], + [ "mozzi_analog.cpp", "mozzi__analog_8cpp.html", "mozzi__analog_8cpp" ], + [ "mozzi_analog.h", "mozzi__analog_8h.html", "mozzi__analog_8h" ], + [ "mozzi_config.h", "mozzi__config_8h.html", "mozzi__config_8h" ], + [ "mozzi_fixmath.cpp", "mozzi__fixmath_8cpp.html", "mozzi__fixmath_8cpp" ], + [ "mozzi_fixmath.h", "mozzi__fixmath_8h.html", "mozzi__fixmath_8h" ], + [ "mozzi_midi.cpp", "mozzi__midi_8cpp.html", "mozzi__midi_8cpp" ], + [ "mozzi_midi.h", "mozzi__midi_8h.html", "mozzi__midi_8h" ], + [ "mozzi_rand.cpp", "mozzi__rand_8cpp.html", "mozzi__rand_8cpp" ], + [ "mozzi_rand.h", "mozzi__rand_8h.html", "mozzi__rand_8h" ], + [ "mozzi_utils.h", "mozzi__utils_8h.html", "mozzi__utils_8h" ], + [ "MozziGuts.cpp", "_mozzi_guts_8cpp.html", "_mozzi_guts_8cpp" ], + [ "MozziGuts.h", "_mozzi_guts_8h.html", "_mozzi_guts_8h" ], + [ "mult16x16.h", "mult16x16_8h.html", "mult16x16_8h" ], + [ "mult16x8.h", "mult16x8_8h.html", "mult16x8_8h" ], + [ "mult32x16.h", "mult32x16_8h.html", "mult32x16_8h" ], + [ "noise_static_1_16384_int8.h", "noise__static__1__16384__int8_8h.html", "noise__static__1__16384__int8_8h" ], + [ "Oscil.h", "_oscil_8h.html", "_oscil_8h" ], + [ "Phasor.h", "_phasor_8h.html", "_phasor_8h" ], + [ "phasor256_int8.h", "phasor256__int8_8h.html", "phasor256__int8_8h" ], + [ "pinknoise8192_int8.h", "pinknoise8192__int8_8h.html", "pinknoise8192__int8_8h" ], + [ "Portamento.h", "_portamento_8h.html", [ + [ "Portamento", "class_portamento.html", "class_portamento" ] + ] ], + [ "primes.h", "primes_8h.html", "primes_8h" ], + [ "RCpoll.h", "_r_cpoll_8h.html", [ + [ "RCpoll", "class_r_cpoll.html", "class_r_cpoll" ] + ] ], + [ "RecentAverage.h", "_recent_average_8h.html", [ + [ "RecentAverage", "class_recent_average.html", "class_recent_average" ] + ] ], + [ "ReverbTank.h", "_reverb_tank_8h.html", [ + [ "ReverbTank", "class_reverb_tank.html", "class_reverb_tank" ] + ] ], + [ "Sample.h", "_sample_8h.html", "_sample_8h" ], + [ "saw1024_int8.h", "saw1024__int8_8h.html", "saw1024__int8_8h" ], + [ "saw2048_int8.h", "saw2048__int8_8h.html", "saw2048__int8_8h" ], + [ "saw256_int8.h", "saw256__int8_8h.html", "saw256__int8_8h" ], + [ "saw4096_int8.h", "saw4096__int8_8h.html", "saw4096__int8_8h" ], + [ "saw512_int8.h", "saw512__int8_8h.html", "saw512__int8_8h" ], + [ "saw8192_int8.h", "saw8192__int8_8h.html", "saw8192__int8_8h" ], + [ "saw_analogue512_int8.h", "saw__analogue512__int8_8h.html", "saw__analogue512__int8_8h" ], + [ "sin1024_int8.h", "sin1024__int8_8h.html", "sin1024__int8_8h" ], + [ "sin1024_uint8.h", "sin1024__uint8_8h.html", "sin1024__uint8_8h" ], + [ "sin2048_int8.h", "sin2048__int8_8h.html", "sin2048__int8_8h" ], + [ "sin256_int8.h", "sin256__int8_8h.html", "sin256__int8_8h" ], + [ "sin4096_int8.h", "sin4096__int8_8h.html", "sin4096__int8_8h" ], + [ "sin512_int8.h", "sin512__int8_8h.html", "sin512__int8_8h" ], + [ "sin8192_int8.h", "sin8192__int8_8h.html", "sin8192__int8_8h" ], + [ "sin8192_uint8.h", "sin8192__uint8_8h.html", "sin8192__uint8_8h" ], + [ "sintest_int8.h", "sintest__int8_8h.html", "sintest__int8_8h" ], + [ "Smooth.h", "_smooth_8h.html", [ + [ "Smooth", "class_smooth.html", "class_smooth" ] + ] ], + [ "smoothsquare8192_int8.h", "smoothsquare8192__int8_8h.html", "smoothsquare8192__int8_8h" ], + [ "square_analogue512_int8.h", "square__analogue512__int8_8h.html", "square__analogue512__int8_8h" ], + [ "square_no_alias512_int8.h", "square__no__alias512__int8_8h.html", "square__no__alias512__int8_8h" ], + [ "StateVariable.h", "_state_variable_8h.html", "_state_variable_8h" ], + [ "triangle1024_int8.h", "triangle1024__int8_8h.html", "triangle1024__int8_8h" ], + [ "triangle2048_int8.h", "triangle2048__int8_8h.html", "triangle2048__int8_8h" ], + [ "triangle512_int8.h", "triangle512__int8_8h.html", "triangle512__int8_8h" ], + [ "triangle_analogue512_int8.h", "triangle__analogue512__int8_8h.html", "triangle__analogue512__int8_8h" ], + [ "triangle_dist_cubed_2048_int8.h", "triangle__dist__cubed__2048__int8_8h.html", "triangle__dist__cubed__2048__int8_8h" ], + [ "triangle_dist_squared_2048_int8.h", "triangle__dist__squared__2048__int8_8h.html", "triangle__dist__squared__2048__int8_8h" ], + [ "triangle_hermes_2048_int8.h", "triangle__hermes__2048__int8_8h.html", "triangle__hermes__2048__int8_8h" ], + [ "triangle_valve_2048_int8.h", "triangle__valve__2048__int8_8h.html", "triangle__valve__2048__int8_8h" ], + [ "triangle_valve_2_2048_int8.h", "triangle__valve__2__2048__int8_8h.html", "triangle__valve__2__2048__int8_8h" ], + [ "triangle_warm8192_int8.h", "triangle__warm8192__int8_8h.html", "triangle__warm8192__int8_8h" ], + [ "twi_nonblock.cpp", "twi__nonblock_8cpp.html", "twi__nonblock_8cpp" ], + [ "twi_nonblock.h", "twi__nonblock_8h.html", "twi__nonblock_8h" ], + [ "uphasor256_uint8.h", "uphasor256__uint8_8h.html", "uphasor256__uint8_8h" ], + [ "WavePacket.h", "_wave_packet_8h.html", "_wave_packet_8h" ], + [ "waveshape1_softclip_int8.h", "waveshape1__softclip__int8_8h.html", "waveshape1__softclip__int8_8h" ], + [ "waveshape2_softerclip_int8.h", "waveshape2__softerclip__int8_8h.html", "waveshape2__softerclip__int8_8h" ], + [ "waveshape_chebyshev_3rd_256_int8.h", "waveshape__chebyshev__3rd__256__int8_8h.html", "waveshape__chebyshev__3rd__256__int8_8h" ], + [ "waveshape_chebyshev_4th_256_int8.h", "waveshape__chebyshev__4th__256__int8_8h.html", "waveshape__chebyshev__4th__256__int8_8h" ], + [ "waveshape_chebyshev_5th_256_int8.h", "waveshape__chebyshev__5th__256__int8_8h.html", "waveshape__chebyshev__5th__256__int8_8h" ], + [ "waveshape_chebyshev_6th_256_int8.h", "waveshape__chebyshev__6th__256__int8_8h.html", "waveshape__chebyshev__6th__256__int8_8h" ], + [ "waveshape_compress_512_to_488_int16.h", "waveshape__compress__512__to__488__int16_8h.html", "waveshape__compress__512__to__488__int16_8h" ], + [ "waveshape_sigmoid_int8.h", "waveshape__sigmoid__int8_8h.html", "waveshape__sigmoid__int8_8h" ], + [ "waveshape_tanh_int8.h", "waveshape__tanh__int8_8h.html", "waveshape__tanh__int8_8h" ], + [ "WaveShaper.h", "_wave_shaper_8h.html", [ + [ "WaveShaper", "class_wave_shaper.html", null ] + ] ], + [ "whitenoise8192_int8.h", "whitenoise8192__int8_8h.html", "whitenoise8192__int8_8h" ] +]; \ No newline at end of file diff --git a/doc/html/float2mozzi_8py.html b/doc/html/float2mozzi_8py.html new file mode 100644 index 000000000..bde6a1392 --- /dev/null +++ b/doc/html/float2mozzi_8py.html @@ -0,0 +1,157 @@ + + + + + + +Mozzi: float2mozzi.py File Reference + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    float2mozzi.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     float2mozzi
     
    + + + +

    +Constant Groups

     float2mozzi
     
    + + + +

    +Functions

    def float2mozzi.float2mozzi
     
    + + + + + + + +

    +Variables

    tuple float2mozzi.fout = open(os.path.expanduser(outfile), "w")
     print values[0] print values[len(values)-1] print len(values) More...
     
    string float2mozzi.outstring = 'const char __attribute__((progmem)) '
     
           outstring += str(num) + ", "
    +

    values.fromfile(fin, bytesetad) More...

     
    +
    +
    + + + + diff --git a/doc/html/float2mozzi_8py.js b/doc/html/float2mozzi_8py.js new file mode 100644 index 000000000..579eed267 --- /dev/null +++ b/doc/html/float2mozzi_8py.js @@ -0,0 +1,6 @@ +var float2mozzi_8py = +[ + [ "float2mozzi", "float2mozzi_8py.html#ab3585ce6ced72bfd3d2497e93d9614c4", null ], + [ "fout", "float2mozzi_8py.html#a7a708578a599e6c5c0a7487edea9f775", null ], + [ "outstring", "float2mozzi_8py.html#ae5bc68ccd470e395c70895816fbc47d8", null ] +]; \ No newline at end of file diff --git a/doc/html/float2mozzi_8py_source.html b/doc/html/float2mozzi_8py_source.html index 3b8c6636a..5f615c228 100644 --- a/doc/html/float2mozzi_8py_source.html +++ b/doc/html/float2mozzi_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/float2mozzi.py Source File +Mozzi: float2mozzi.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +109,7 @@
    float2mozzi.py
    -
    1 ## for converting 32 bit float raw files from Audacity, with values -128 to 127 int8 Mozzi table
    +Go to the documentation of this file.
    1 ## for converting 32 bit float raw files from Audacity, with values -128 to 127 int8 Mozzi table
    2 
    3 import sys, array, os, textwrap, math
    4 
    @@ -159,8 +166,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    float2mozzi_uint8.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     float2mozzi_uint8
     
    + + + +

    +Constant Groups

     float2mozzi_uint8
     
    + + + +

    +Functions

    def float2mozzi_uint8.float2mozzi_uint8
     
    + + + + + + + +

    +Variables

    tuple float2mozzi_uint8.fout = open(os.path.expanduser(outfile), "w")
     print values[0] print values[len(values)-1] print len(values) More...
     
    string float2mozzi_uint8.outstring = 'const char __attribute__((progmem)) '
     
           outstring += str(num) + ", "
    +

    values.fromfile(fin, bytesetad) More...

     
    +
    +
    + + + + diff --git a/doc/html/float2mozzi__uint8_8py.js b/doc/html/float2mozzi__uint8_8py.js new file mode 100644 index 000000000..501322f20 --- /dev/null +++ b/doc/html/float2mozzi__uint8_8py.js @@ -0,0 +1,6 @@ +var float2mozzi__uint8_8py = +[ + [ "float2mozzi_uint8", "float2mozzi__uint8_8py.html#a6ec919908e7b23451963c2c355cde68e", null ], + [ "fout", "float2mozzi__uint8_8py.html#afbf031e2d208adca1f9794f5985789c1", null ], + [ "outstring", "float2mozzi__uint8_8py.html#a983f5c79d8af12f0100fc052c8bbab98", null ] +]; \ No newline at end of file diff --git a/doc/html/float2mozzi__uint8_8py_source.html b/doc/html/float2mozzi__uint8_8py_source.html index 5d586c86d..857aa4964 100644 --- a/doc/html/float2mozzi__uint8_8py_source.html +++ b/doc/html/float2mozzi__uint8_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/float2mozzi_uint8.py Source File +Mozzi: float2mozzi_uint8.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +109,7 @@
    float2mozzi_uint8.py
    -
    1 ## for converting 32 bit float raw files from Audacity, with values > 0, to 0-255 uint8 Mozzi table
    +Go to the documentation of this file.
    1 ## for converting 32 bit float raw files from Audacity, with values > 0, to 0-255 uint8 Mozzi table
    2 
    3 import sys, array, os, textwrap, math
    4 
    @@ -153,8 +160,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -289,7 +292,7 @@

    - s -

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -286,7 +289,7 @@

    - s -

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -71,6 +73,7 @@ + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -122,7 +125,7 @@
  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - _ -

    +
    +
    + + + + diff --git a/doc/html/globals_0x61.html b/doc/html/globals_0x61.html new file mode 100644 index 000000000..df8374bd4 --- /dev/null +++ b/doc/html/globals_0x61.html @@ -0,0 +1,234 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - a -

    +
    +
    + + + + diff --git a/doc/html/globals_0x62.html b/doc/html/globals_0x62.html new file mode 100644 index 000000000..1b374ccc9 --- /dev/null +++ b/doc/html/globals_0x62.html @@ -0,0 +1,296 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - b -

    +
    +
    + + + + diff --git a/doc/html/globals_0x63.html b/doc/html/globals_0x63.html new file mode 100644 index 000000000..3ae03fe18 --- /dev/null +++ b/doc/html/globals_0x63.html @@ -0,0 +1,246 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - c -

    +
    +
    + + + + diff --git a/doc/html/globals_0x64.html b/doc/html/globals_0x64.html new file mode 100644 index 000000000..a22a9f54e --- /dev/null +++ b/doc/html/globals_0x64.html @@ -0,0 +1,168 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - d -

    +
    +
    + + + + diff --git a/doc/html/globals_0x65.html b/doc/html/globals_0x65.html new file mode 100644 index 000000000..3417cdbe2 --- /dev/null +++ b/doc/html/globals_0x65.html @@ -0,0 +1,167 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - e -

    +
    +
    + + + + diff --git a/doc/html/globals_0x66.html b/doc/html/globals_0x66.html new file mode 100644 index 000000000..584d6953e --- /dev/null +++ b/doc/html/globals_0x66.html @@ -0,0 +1,203 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - f -

    +
    +
    + + + + diff --git a/doc/html/globals_0x67.html b/doc/html/globals_0x67.html new file mode 100644 index 000000000..3174f238d --- /dev/null +++ b/doc/html/globals_0x67.html @@ -0,0 +1,164 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - g -

    +
    +
    + + + + diff --git a/doc/html/globals_0x68.html b/doc/html/globals_0x68.html new file mode 100644 index 000000000..81d75dca3 --- /dev/null +++ b/doc/html/globals_0x68.html @@ -0,0 +1,179 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - h -

    +
    +
    + + + + diff --git a/doc/html/globals_0x69.html b/doc/html/globals_0x69.html new file mode 100644 index 000000000..55f556aa6 --- /dev/null +++ b/doc/html/globals_0x69.html @@ -0,0 +1,174 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - i -

    +
    +
    + + + + diff --git a/doc/html/globals_0x6c.html b/doc/html/globals_0x6c.html new file mode 100644 index 000000000..47b6492a1 --- /dev/null +++ b/doc/html/globals_0x6c.html @@ -0,0 +1,167 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - l -

    +
    +
    + + + + diff --git a/doc/html/globals_0x6d.html b/doc/html/globals_0x6d.html new file mode 100644 index 000000000..087e74709 --- /dev/null +++ b/doc/html/globals_0x6d.html @@ -0,0 +1,213 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - m -

    +
    +
    + + + + diff --git a/doc/html/globals_0x6e.html b/doc/html/globals_0x6e.html new file mode 100644 index 000000000..509b02baa --- /dev/null +++ b/doc/html/globals_0x6e.html @@ -0,0 +1,173 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - n -

    +
    +
    + + + + diff --git a/doc/html/globals_0x6f.html b/doc/html/globals_0x6f.html new file mode 100644 index 000000000..c52153652 --- /dev/null +++ b/doc/html/globals_0x6f.html @@ -0,0 +1,170 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - o -

    +
    +
    + + + + diff --git a/doc/html/globals_0x70.html b/doc/html/globals_0x70.html new file mode 100644 index 000000000..b46e6ec4a --- /dev/null +++ b/doc/html/globals_0x70.html @@ -0,0 +1,180 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - p -

    +
    +
    + + + + diff --git a/doc/html/globals_0x71.html b/doc/html/globals_0x71.html new file mode 100644 index 000000000..f0d7292d9 --- /dev/null +++ b/doc/html/globals_0x71.html @@ -0,0 +1,436 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - q -

    +
    +
    + + + + diff --git a/doc/html/globals_0x72.html b/doc/html/globals_0x72.html new file mode 100644 index 000000000..de5104cb7 --- /dev/null +++ b/doc/html/globals_0x72.html @@ -0,0 +1,200 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - r -

    +
    +
    + + + + diff --git a/doc/html/globals_0x73.html b/doc/html/globals_0x73.html new file mode 100644 index 000000000..9742a2653 --- /dev/null +++ b/doc/html/globals_0x73.html @@ -0,0 +1,314 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - s -

    +
    +
    + + + + diff --git a/doc/html/globals_0x74.html b/doc/html/globals_0x74.html new file mode 100644 index 000000000..69918dbb1 --- /dev/null +++ b/doc/html/globals_0x74.html @@ -0,0 +1,321 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - t -

    +
    +
    + + + + diff --git a/doc/html/globals_0x75.html b/doc/html/globals_0x75.html new file mode 100644 index 000000000..767f93fbc --- /dev/null +++ b/doc/html/globals_0x75.html @@ -0,0 +1,189 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - u -

    +
    +
    + + + + diff --git a/doc/html/globals_0x77.html b/doc/html/globals_0x77.html new file mode 100644 index 000000000..be85e140b --- /dev/null +++ b/doc/html/globals_0x77.html @@ -0,0 +1,188 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - w -

    +
    +
    + + + + diff --git a/doc/html/globals_0x78.html b/doc/html/globals_0x78.html new file mode 100644 index 000000000..54109f56a --- /dev/null +++ b/doc/html/globals_0x78.html @@ -0,0 +1,169 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    Here is a list of all file members with links to the files they belong to:
    + +

    - x -

    +
    +
    + + + + diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html new file mode 100644 index 000000000..62bb14c03 --- /dev/null +++ b/doc/html/globals_defs.html @@ -0,0 +1,192 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - a -

    +
    +
    + + + + diff --git a/doc/html/globals_defs.js b/doc/html/globals_defs.js new file mode 100644 index 000000000..9920cbd2f --- /dev/null +++ b/doc/html/globals_defs.js @@ -0,0 +1,19 @@ +var globals_defs = +[ + [ "a", "globals_defs.html", null ], + [ "b", "globals_defs_0x62.html", null ], + [ "c", "globals_defs_0x63.html", null ], + [ "e", "globals_defs_0x65.html", null ], + [ "f", "globals_defs_0x66.html", null ], + [ "h", "globals_defs_0x68.html", null ], + [ "l", "globals_defs_0x6c.html", null ], + [ "m", "globals_defs_0x6d.html", null ], + [ "n", "globals_defs_0x6e.html", null ], + [ "o", "globals_defs_0x6f.html", null ], + [ "p", "globals_defs_0x70.html", null ], + [ "q", "globals_defs_0x71.html", null ], + [ "s", "globals_defs_0x73.html", null ], + [ "t", "globals_defs_0x74.html", null ], + [ "u", "globals_defs_0x75.html", null ], + [ "w", "globals_defs_0x77.html", null ] +]; \ No newline at end of file diff --git a/doc/html/globals_defs_0x62.html b/doc/html/globals_defs_0x62.html new file mode 100644 index 000000000..af8b5f7da --- /dev/null +++ b/doc/html/globals_defs_0x62.html @@ -0,0 +1,275 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - b -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x63.html b/doc/html/globals_defs_0x63.html new file mode 100644 index 000000000..ad276edbf --- /dev/null +++ b/doc/html/globals_defs_0x63.html @@ -0,0 +1,240 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - c -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x65.html b/doc/html/globals_defs_0x65.html new file mode 100644 index 000000000..305cc7a32 --- /dev/null +++ b/doc/html/globals_defs_0x65.html @@ -0,0 +1,161 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_defs_0x66.html b/doc/html/globals_defs_0x66.html new file mode 100644 index 000000000..6d1658640 --- /dev/null +++ b/doc/html/globals_defs_0x66.html @@ -0,0 +1,158 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_defs_0x68.html b/doc/html/globals_defs_0x68.html new file mode 100644 index 000000000..c1e6fdcb8 --- /dev/null +++ b/doc/html/globals_defs_0x68.html @@ -0,0 +1,170 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - h -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x6c.html b/doc/html/globals_defs_0x6c.html new file mode 100644 index 000000000..6d4ebe404 --- /dev/null +++ b/doc/html/globals_defs_0x6c.html @@ -0,0 +1,158 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_defs_0x6d.html b/doc/html/globals_defs_0x6d.html new file mode 100644 index 000000000..2b3498414 --- /dev/null +++ b/doc/html/globals_defs_0x6d.html @@ -0,0 +1,197 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - m -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x6e.html b/doc/html/globals_defs_0x6e.html new file mode 100644 index 000000000..662498419 --- /dev/null +++ b/doc/html/globals_defs_0x6e.html @@ -0,0 +1,164 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - n -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x6f.html b/doc/html/globals_defs_0x6f.html new file mode 100644 index 000000000..7a056f0fa --- /dev/null +++ b/doc/html/globals_defs_0x6f.html @@ -0,0 +1,164 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - o -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x70.html b/doc/html/globals_defs_0x70.html new file mode 100644 index 000000000..24223ae2f --- /dev/null +++ b/doc/html/globals_defs_0x70.html @@ -0,0 +1,170 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - p -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x71.html b/doc/html/globals_defs_0x71.html new file mode 100644 index 000000000..7b94391a7 --- /dev/null +++ b/doc/html/globals_defs_0x71.html @@ -0,0 +1,203 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - q -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x73.html b/doc/html/globals_defs_0x73.html new file mode 100644 index 000000000..e649ee05b --- /dev/null +++ b/doc/html/globals_defs_0x73.html @@ -0,0 +1,288 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - s -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x74.html b/doc/html/globals_defs_0x74.html new file mode 100644 index 000000000..547dbb92b --- /dev/null +++ b/doc/html/globals_defs_0x74.html @@ -0,0 +1,242 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - t -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x75.html b/doc/html/globals_defs_0x75.html new file mode 100644 index 000000000..95c0285e2 --- /dev/null +++ b/doc/html/globals_defs_0x75.html @@ -0,0 +1,164 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - u -

    +
    +
    + + + + diff --git a/doc/html/globals_defs_0x77.html b/doc/html/globals_defs_0x77.html new file mode 100644 index 000000000..e3b6c5315 --- /dev/null +++ b/doc/html/globals_defs_0x77.html @@ -0,0 +1,182 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - w -

    +
    +
    + + + + diff --git a/doc/html/globals_dup.js b/doc/html/globals_dup.js new file mode 100644 index 000000000..93a0ee242 --- /dev/null +++ b/doc/html/globals_dup.js @@ -0,0 +1,25 @@ +var globals_dup = +[ + [ "_", "globals.html", null ], + [ "a", "globals_0x61.html", null ], + [ "b", "globals_0x62.html", null ], + [ "c", "globals_0x63.html", null ], + [ "d", "globals_0x64.html", null ], + [ "e", "globals_0x65.html", null ], + [ "f", "globals_0x66.html", null ], + [ "g", "globals_0x67.html", null ], + [ "h", "globals_0x68.html", null ], + [ "i", "globals_0x69.html", null ], + [ "l", "globals_0x6c.html", null ], + [ "m", "globals_0x6d.html", null ], + [ "n", "globals_0x6e.html", null ], + [ "o", "globals_0x6f.html", null ], + [ "p", "globals_0x70.html", null ], + [ "q", "globals_0x71.html", null ], + [ "r", "globals_0x72.html", null ], + [ "s", "globals_0x73.html", null ], + [ "t", "globals_0x74.html", null ], + [ "u", "globals_0x75.html", null ], + [ "w", "globals_0x77.html", null ], + [ "x", "globals_0x78.html", null ] +]; \ No newline at end of file diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html new file mode 100644 index 000000000..5eb8c57e8 --- /dev/null +++ b/doc/html/globals_enum.html @@ -0,0 +1,139 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html new file mode 100644 index 000000000..d43ecf8d7 --- /dev/null +++ b/doc/html/globals_eval.html @@ -0,0 +1,151 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html new file mode 100644 index 000000000..325c47b35 --- /dev/null +++ b/doc/html/globals_func.html @@ -0,0 +1,232 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - _ -

    +
    +
    + + + + diff --git a/doc/html/globals_func.js b/doc/html/globals_func.js new file mode 100644 index 000000000..59e34ea06 --- /dev/null +++ b/doc/html/globals_func.js @@ -0,0 +1,18 @@ +var globals_func = +[ + [ "_", "globals_func.html", null ], + [ "a", "globals_func_0x61.html", null ], + [ "b", "globals_func_0x62.html", null ], + [ "d", "globals_func_0x64.html", null ], + [ "f", "globals_func_0x66.html", null ], + [ "g", "globals_func_0x67.html", null ], + [ "i", "globals_func_0x69.html", null ], + [ "m", "globals_func_0x6d.html", null ], + [ "p", "globals_func_0x70.html", null ], + [ "q", "globals_func_0x71.html", null ], + [ "r", "globals_func_0x72.html", null ], + [ "s", "globals_func_0x73.html", null ], + [ "t", "globals_func_0x74.html", null ], + [ "u", "globals_func_0x75.html", null ], + [ "x", "globals_func_0x78.html", null ] +]; \ No newline at end of file diff --git a/doc/html/globals_func_0x61.html b/doc/html/globals_func_0x61.html new file mode 100644 index 000000000..71a974f17 --- /dev/null +++ b/doc/html/globals_func_0x61.html @@ -0,0 +1,187 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - a -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x62.html b/doc/html/globals_func_0x62.html new file mode 100644 index 000000000..87b7f3609 --- /dev/null +++ b/doc/html/globals_func_0x62.html @@ -0,0 +1,166 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func_0x64.html b/doc/html/globals_func_0x64.html new file mode 100644 index 000000000..4566648d5 --- /dev/null +++ b/doc/html/globals_func_0x64.html @@ -0,0 +1,158 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func_0x66.html b/doc/html/globals_func_0x66.html new file mode 100644 index 000000000..b6b6c960a --- /dev/null +++ b/doc/html/globals_func_0x66.html @@ -0,0 +1,190 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - f -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x67.html b/doc/html/globals_func_0x67.html new file mode 100644 index 000000000..1411c00ff --- /dev/null +++ b/doc/html/globals_func_0x67.html @@ -0,0 +1,157 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func_0x69.html b/doc/html/globals_func_0x69.html new file mode 100644 index 000000000..79bfc9d5c --- /dev/null +++ b/doc/html/globals_func_0x69.html @@ -0,0 +1,167 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func_0x6d.html b/doc/html/globals_func_0x6d.html new file mode 100644 index 000000000..b7d250bd0 --- /dev/null +++ b/doc/html/globals_func_0x6d.html @@ -0,0 +1,163 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func_0x70.html b/doc/html/globals_func_0x70.html new file mode 100644 index 000000000..4db5bde38 --- /dev/null +++ b/doc/html/globals_func_0x70.html @@ -0,0 +1,158 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_func_0x71.html b/doc/html/globals_func_0x71.html new file mode 100644 index 000000000..8b09529ad --- /dev/null +++ b/doc/html/globals_func_0x71.html @@ -0,0 +1,318 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - q -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x72.html b/doc/html/globals_func_0x72.html new file mode 100644 index 000000000..d812fa29c --- /dev/null +++ b/doc/html/globals_func_0x72.html @@ -0,0 +1,184 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - r -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x73.html b/doc/html/globals_func_0x73.html new file mode 100644 index 000000000..383b03dfa --- /dev/null +++ b/doc/html/globals_func_0x73.html @@ -0,0 +1,171 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - s -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x74.html b/doc/html/globals_func_0x74.html new file mode 100644 index 000000000..189df7137 --- /dev/null +++ b/doc/html/globals_func_0x74.html @@ -0,0 +1,212 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - t -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x75.html b/doc/html/globals_func_0x75.html new file mode 100644 index 000000000..5d8dcd7e7 --- /dev/null +++ b/doc/html/globals_func_0x75.html @@ -0,0 +1,164 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +  + +

    - u -

    +
    +
    + + + + diff --git a/doc/html/globals_func_0x78.html b/doc/html/globals_func_0x78.html new file mode 100644 index 000000000..d53b03da9 --- /dev/null +++ b/doc/html/globals_func_0x78.html @@ -0,0 +1,162 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html new file mode 100644 index 000000000..a33bfc669 --- /dev/null +++ b/doc/html/globals_type.html @@ -0,0 +1,205 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    + + + + diff --git a/doc/html/globals_vars.html b/doc/html/globals_vars.html new file mode 100644 index 000000000..86310121d --- /dev/null +++ b/doc/html/globals_vars.html @@ -0,0 +1,157 @@ + + + + + + +Mozzi: File Members + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    + + + + diff --git a/doc/html/graph_legend.dot b/doc/html/graph_legend.dot new file mode 100644 index 000000000..789df5672 --- /dev/null +++ b/doc/html/graph_legend.dot @@ -0,0 +1,22 @@ +digraph "Graph Legend" +{ + edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; + node [fontname="Helvetica",fontsize="10",shape=record]; + Node9 [shape="box",label="Inherited",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",fillcolor="grey75",style="filled" fontcolor="black"]; + Node10 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; + Node10 [shape="box",label="PublicBase",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPublicBase.html"]; + Node11 -> Node10 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; + Node11 [shape="box",label="Truncated",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="red",URL="$classTruncated.html"]; + Node13 -> Node9 [dir="back",color="darkgreen",fontsize="10",style="solid",fontname="Helvetica"]; + Node13 [shape="box",label="ProtectedBase",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classProtectedBase.html"]; + Node14 -> Node9 [dir="back",color="firebrick4",fontsize="10",style="solid",fontname="Helvetica"]; + Node14 [shape="box",label="PrivateBase",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPrivateBase.html"]; + Node15 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; + Node15 [shape="box",label="Undocumented",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="grey75"]; + Node16 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; + Node16 [shape="box",label="Templ< int >",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"]; + Node17 -> Node16 [dir="back",color="orange",fontsize="10",style="dashed",label="< int >",fontname="Helvetica"]; + Node17 [shape="box",label="Templ< T >",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"]; + Node18 -> Node9 [dir="back",color="darkorchid3",fontsize="10",style="dashed",label="m_usedClass",fontname="Helvetica"]; + Node18 [shape="box",label="Used",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classUsed.html"]; +} diff --git a/doc/html/graph_legend.html b/doc/html/graph_legend.html new file mode 100644 index 000000000..8c6edb4c6 --- /dev/null +++ b/doc/html/graph_legend.html @@ -0,0 +1,179 @@ + + + + + + +Mozzi: Graph Legend + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Mozzi +  alpha 0.01.2c +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    Graph Legend
    +
    +
    +

    This page explains how to interpret the graphs that are generated by doxygen.

    +

    Consider the following example:

    +
    /*! Invisible class because of truncation */
    +
    class Invisible { };
    +
    +
    /*! Truncated class, inheritance relation is hidden */
    +
    class Truncated : public Invisible { };
    +
    +
    /* Class not documented with doxygen comments */
    +
    class Undocumented { };
    +
    +
    /*! Class that is inherited using public inheritance */
    +
    class PublicBase : public Truncated { };
    +
    +
    /*! A template class */
    +
    template<class T> class Templ { };
    +
    +
    /*! Class that is inherited using protected inheritance */
    +
    class ProtectedBase { };
    +
    +
    /*! Class that is inherited using private inheritance */
    +
    class PrivateBase { };
    +
    +
    /*! Class that is used by the Inherited class */
    +
    class Used { };
    +
    +
    /*! Super class that inherits a number of other classes */
    +
    class Inherited : public PublicBase,
    +
    protected ProtectedBase,
    +
    private PrivateBase,
    +
    public Undocumented,
    +
    public Templ<int>
    +
    {
    +
    private:
    +
    Used *m_usedClass;
    +
    };
    +

    This will result in the following graph:

    +
    + +
    +

    The boxes in the above graph have the following meaning:

    +
      +
    • +A filled gray box represents the struct or class for which the graph is generated.
    • +
    • +A box with a black border denotes a documented struct or class.
    • +
    • +A box with a grey border denotes an undocumented struct or class.
    • +
    • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
    • +
    +

    The arrows have the following meaning:

    +
      +
    • +A dark blue arrow is used to visualize a public inheritance relation between two classes.
    • +
    • +A dark green arrow is used for protected inheritance.
    • +
    • +A dark red arrow is used for private inheritance.
    • +
    • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
    • +
    • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
    • +
    +
    +
    + + + + diff --git a/doc/html/graph_legend.md5 b/doc/html/graph_legend.md5 new file mode 100644 index 000000000..a06ed050c --- /dev/null +++ b/doc/html/graph_legend.md5 @@ -0,0 +1 @@ +387ff8eb65306fa251338d3c9bd7bfff \ No newline at end of file diff --git a/doc/html/group__analog.html b/doc/html/group__analog.html index b58a6a930..9313f2272 100644 --- a/doc/html/group__analog.html +++ b/doc/html/group__analog.html @@ -4,7 +4,7 @@ -Mozzi: Mozzi fast analog input functions for sensors and audio +Mozzi: Analog @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -88,7 +90,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -101,11 +103,11 @@
    -
    Mozzi fast analog input functions for sensors and audio
    +
    Analog
    -

    Glitch-free audio by speeding up analog input functions which normally block processing. +

    Fast analog input functions for sensors and audio Glitch-free audio by speeding up analog input functions which normally block processing. More...

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - +

    @@ -147,7 +149,7 @@

     Call adcReadAllChannels() in updateControl() and the results for each channel will be available by calling adcGetResult(channel_num) next time updateControl() runs. More...
     
    int getAudioInput ()
     This returns audio input from the input buffer, if #define USE_AUDIO_INPUT true is in the Mozzi/mozzi_config.h file. More...
     This returns audio input from the input buffer, if #define USE_AUDIO_INPUT true is in the Mozzi/mozzi_config.h file. More...
     

    Detailed Description

    @@ -234,7 +236,7 @@

    Function Documentation

    -
    Note
    The adcEnableInterrupt(), adcReadAllChannels(), adcGetResult() approach is currently set to work with all channels on each kind of board. You can change the number of channels to use in mozzi_analog.cpp by editing NUM_ANALOG_INPUTS if desired.
    +
    Note
    The adcEnableInterrupt(), adcReadAllChannels(), adcGetResult() approach is currently set to work with all channels on each kind of board. You can change the number of channels to use in mozzi_analog.cpp by editing NUM_ANALOG_INPUTS if desired.
    In some cases this method can cause glitches which may have to do with the ADC interrupt interfering with the audio or control interrupts.
    @@ -294,7 +296,7 @@

    Function Documentation

    Parameters
    - +
    channelor pin number. If pin number is provided, adcSetChannel() will convert it to the channel number.
    pinchannel or pin number. If pin number is provided, adcSetChannel() will convert it to the channel number.
    @@ -441,7 +443,7 @@

    Function Documentation

    @@ -275,7 +278,7 @@

    Macro Definition Documentation

    ....13 .......Sanguino

    -

    Definition at line 121 of file MozziGuts.h.

    +

    Definition at line 80 of file MozziGuts.h.

    @@ -303,7 +306,7 @@

    Macro Definition Documentation

    -

    Put #define USE_AUDIO_INPUT true in Mozzi/mozzi_config.h to enable audio input on analog pin 0, otherwise make it false, to save resources. When audio input is used, don't read other analog channels as they'll interfere with the audio sampling.

    +

    Put #define USE_AUDIO_INPUT true in Mozzi/mozzi_config.h to enable audio input on analog pin 0, otherwise make it false, to save resources. When audio input is used, don't read other analog channels as they'll interfere with the audio sampling.

    Definition at line 66 of file mozzi_config.h.

    @@ -322,7 +325,7 @@

    Function Documentation

    -

    If there is room in Mozzi's output buffer, audioHook() calls updateAudio() once and puts the result into the output buffer. Also, if #define USE_AUDIO_INPUT true is in Mozzi/mozzi_config.h, audioHook() takes care of moving audio input from the input buffer so it can be accessed with getAudioInput() in your updateAudio() routine. If other functions are called in loop() along with audioHook(), see if they can be called less often by moving them into updateControl(), to save processing power. Otherwise it may be most efficient to calculate a block of samples at a time by putting audioHook() in a loop of its own, rather than calculating only 1 sample for each time your other functions are called.

    +

    If there is room in Mozzi's output buffer, audioHook() calls updateAudio() once and puts the result into the output buffer. Also, if #define USE_AUDIO_INPUT true is in Mozzi/mozzi_config.h, audioHook() takes care of moving audio input from the input buffer so it can be accessed with getAudioInput() in your updateAudio() routine. If other functions are called in loop() along with audioHook(), see if they can be called less often by moving them into updateControl(), to save processing power. Otherwise it may be most efficient to calculate a block of samples at a time by putting audioHook() in a loop of its own, rather than calculating only 1 sample for each time your other functions are called.

    Definition at line 149 of file MozziGuts.cpp.

    @@ -340,7 +343,7 @@

    Function Documentation

    -

    mozziMicros has a resolution of 61 microseconds. May be a useful hack for replacing micros() in time-related sensor libraries.

    +

    mozziMicros is updated each time an audio sample is output, so the resolution is 1/AUDIO_RATE (61 microseconds when AUDIO_RATE is 16384 Hz).

    Returns
    the approximate number of microseconds since the program began.

    Definition at line 421 of file MozziGuts.cpp.

    @@ -361,7 +364,7 @@

    Function Documentation

    This will enable the standard Arduino time functions millis(), micros(), delay(), and delayMicroseconds(). This could be useful when using sensor libraries which depend on the same timers as Mozzi.

    A potentially better option for resolving timer conflicts involves using non-blocking methods, such as demonstrated by the twowire_nonblock code in the forked version of Mozzi on github, so sound production can continue while reading sensors.

    -

    As it is, pauseMozzi restores all the Timers used by Mozzi to their previous settings. Another scenario which could be easily hacked in MozziGuts.cpp could involve individually saving and restoring particular Timer registers depending on which one(s) are required for other tasks, so for example the control interrupt (Timer 0) could be suspended while audio continues.

    +

    As it is, pauseMozzi restores all the Timers used by Mozzi to their previous settings. Another scenario which could be easily hacked in MozziGuts.cpp could involve individually saving and restoring particular Timer registers depending on which one(s) are required for other tasks, so for example the control interrupt (Timer 0) could be suspended while audio continues.

    Definition at line 351 of file MozziGuts.cpp.

    @@ -454,7 +457,7 @@

    Function Documentation

    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    conversion Namespace Reference
    +
    +
    + +

    A script for converting raw 8 bit sound data files to wavetables for Mozzi. +More...

    +

    Detailed Description

    +
    Usage: 
    +>>>char2mozzi.py <infile outfile tablename samplerate>
    +
    +Using Audacity to prepare raw sound files for converting:
    +
    +Set your Audacity project sample rate:
    +
    +For generated waveforms like sine or sawtooth, set the project
    +rate to the size of the wavetable you wish to create, which must
    +be a power of two (eg. 8192), and set the selection format
    +(beneath the editing window) to samples. Then you can generate
    +and save 1 second of a waveform and it will fit your table
    +length.
    +
    +For a recorded audio sample, set the project rate to the
    +Mozzi AUDIO_RATE (16384 in the current version). 
    +Samples can be any length, as long as they fit in your Arduino.
    +
    +Save by exporting with the format set to "Other uncompressed formats",
    +options set to "RAW(headerless)" and "Encoding 8 bit signed PCM".
    +
    +Now use the file you just exported, as the "infile" to convert.
    +
    Parameters
    + + + + + +
    infileThe file to convert.
    outfileThe file to save as output.
    tablenameThe name to give the table of converted data in the new file.
    samplerateThe samplerate the sound was recorded at. Choose what make sense for you, if it's not a normal recorded sample.
    +
    +
    +
    Author
    Tim Barrass 2010-12
    +
    +
    + + + + diff --git a/doc/html/namespaceconverters.html b/doc/html/namespaceconverters.html new file mode 100644 index 000000000..1c53df429 --- /dev/null +++ b/doc/html/namespaceconverters.html @@ -0,0 +1,161 @@ + + + + + + +Mozzi: converters Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    converters Namespace Reference
    +
    +
    + +

    A script for converting raw 8 bit sound data files to wavetables for Mozzi. +More...

    +

    Detailed Description

    +
    Usage: 
    +>>>char2mozzi.py <infile outfile tablename samplerate>
    +
    +Using Audacity to prepare raw sound files for converting:
    +
    +Set your Audacity project sample rate:
    +
    +For generated waveforms like sine or sawtooth, set the project
    +rate to the size of the wavetable you wish to create, which must
    +be a power of two (eg. 8192), and set the selection format
    +(beneath the editing window) to samples. Then you can generate
    +and save 1 second of a waveform and it will fit your table
    +length.
    +
    +For a recorded audio sample, set the project rate to the
    +Mozzi AUDIO_RATE (16384 in the current version). 
    +Samples can be any length, as long as they fit in your Arduino.
    +
    +Save by exporting with the format set to "Other uncompressed formats",
    +options set to "RAW(headerless)" and "Encoding 8 bit signed PCM".
    +
    +Now use the file you just exported, as the "infile" to convert.
    +
    Parameters
    + + + + + +
    infileThe file to convert.
    outfileThe file to save as output.
    tablenameThe name to give the table of converted data in the new file.
    samplerateThe samplerate the sound was recorded at. Choose what make sense for you, if it's not a normal recorded sample.
    +
    +
    +
    Author
    Tim Barrass 2010-12
    +
    +
    + + + + diff --git a/doc/html/namespacefloat2mozzi.html b/doc/html/namespacefloat2mozzi.html index b7015247c..405c0bc8c 100644 --- a/doc/html/namespacefloat2mozzi.html +++ b/doc/html/namespacefloat2mozzi.html @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -93,7 +94,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -121,7 +122,7 @@
  • - + @@ -187,7 +188,7 @@

    Variable Documentation

    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    tuple fout = open(os.path.expanduser(outfile), "w")
     print values[0] print values[len(values)-1] print len(values) More...
     
    string outstring = 'const char __attribute__((progmem)) '
    string outstring = 'const char __attribute__((progmem)) '
     
           outstring += str(num) + ", "
     

    values.fromfile(fin, bytesetad) More...

     
    - +
    tuple float2mozzi.outstring = 'const char __attribute__((progmem)) 'tuple float2mozzi.outstring = 'const char __attribute__((progmem)) '
    @@ -202,7 +203,7 @@

    Variable Documentation

    @@ -202,7 +203,7 @@

    Variable Documentation

    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    Packages
    +
    +
    +
    Here are the packages with brief descriptions (if available):
    + + +
    \Nchar2mozzi
    +
    +
    +
    + + + + diff --git a/doc/html/namespaces.js b/doc/html/namespaces.js new file mode 100644 index 000000000..e2aedb400 --- /dev/null +++ b/doc/html/namespaces.js @@ -0,0 +1,4 @@ +var namespaces = +[ + [ "char2mozzi", "namespacechar2mozzi.html", null ] +]; \ No newline at end of file diff --git a/doc/html/namespacesin1024__int8.html b/doc/html/namespacesin1024__int8.html index 9ebafe999..d7da30d9e 100644 --- a/doc/html/namespacesin1024__int8.html +++ b/doc/html/namespacesin1024__int8.html @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -93,7 +94,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -162,7 +163,7 @@

    Function Documentation

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -93,7 +94,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -162,7 +163,7 @@

    Function Documentation

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -93,7 +94,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -162,7 +163,7 @@

    Function Documentation

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -93,7 +94,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables Typedefs Groups Pages
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -162,7 +163,7 @@

    Function Documentation

  • Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    noise_static_1_16384_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define NOISE_STATIC_1_16384_NUM_CELLS   16384
     
    #define NOISE_STATIC_1_16384_SAMPLERATE   16384
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) NOISE_STATIC_1_16384_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define NOISE_STATIC_1_16384_NUM_CELLS   16384
    +
    + +

    Definition at line 14 of file noise_static_1_16384_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define NOISE_STATIC_1_16384_SAMPLERATE   16384
    +
    + +

    Definition at line 15 of file noise_static_1_16384_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/noise__static__1__16384__int8_8h.js b/doc/html/noise__static__1__16384__int8_8h.js new file mode 100644 index 000000000..e998b770c --- /dev/null +++ b/doc/html/noise__static__1__16384__int8_8h.js @@ -0,0 +1,6 @@ +var noise__static__1__16384__int8_8h = +[ + [ "NOISE_STATIC_1_16384_NUM_CELLS", "noise__static__1__16384__int8_8h.html#af47820c24b03694f82cf2439b17cd296", null ], + [ "NOISE_STATIC_1_16384_SAMPLERATE", "noise__static__1__16384__int8_8h.html#add156eaf787603e4f47900693bf5e6ec", null ], + [ "__attribute__", "noise__static__1__16384__int8_8h.html#a68b8f56ffb0873a59756474fe5fb8ec1", null ] +]; \ No newline at end of file diff --git a/doc/html/noise__static__1__16384__int8_8h_source.html b/doc/html/noise__static__1__16384__int8_8h_source.html index 680b034bc..aee8d23e8 100644 --- a/doc/html/noise__static__1__16384__int8_8h_source.html +++ b/doc/html/noise__static__1__16384__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/noise_static_1_16384_int8.h Source File +Mozzi: noise_static_1_16384_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    noise_static_1_16384_int8.h
    -
    1 #ifndef NOISE_STATIC_1_16384_H_
    -
    2 #define NOISE_STATIC_1_16384_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef NOISE_STATIC_1_16384_H_
    +
    2 #define NOISE_STATIC_1_16384_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* static noise from needle on old record
    12 */
    13 
    -
    14 #define NOISE_STATIC_1_16384_NUM_CELLS 16384
    -
    15 #define NOISE_STATIC_1_16384_SAMPLERATE 16384
    -
    16 
    -
    17 const char __attribute__((progmem)) NOISE_STATIC_1_16384_DATA [] =
    +
    14 #define NOISE_STATIC_1_16384_NUM_CELLS 16384
    +
    15 #define NOISE_STATIC_1_16384_SAMPLERATE 16384
    +
    16 
    +
    17 const char __attribute__((progmem)) NOISE_STATIC_1_16384_DATA [] =
    18  {
    19  -5, -8, -8, 1, 4, -1, 5, 3, 3,
    20  0, -4, 7, 1, -1, 0, -9, -3, -2, 2, 2, -2, 1, -8, -7, -5, -4, -1, -3, -6, -14, 0,
    @@ -933,14 +941,14 @@
    829  -13, -8, -12, -7, -4, -11, -16, 3
    830  };
    831 
    -
    832 #endif /* NOISE_STATIC_1_16384_H_ */
    +
    832 #endif /* NOISE_STATIC_1_16384_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - - - - + - - -
    Mozzi -  alpha 0.01.1z +  0.01.2c alpha
    sound synthesis library for Arduino
    - - + + @@ -53,6 +51,7 @@
  • Modules
  • Classes
  • Files
  • +
  • Examples
  • @@ -71,13 +70,27 @@
  • + +
    + +
    +
    + +
    + All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -91,18 +104,20 @@
    Related Pages
    -
    Here is a list of all related documentation pages:
    +
    Here is a list of all related documentation pages:
    + + +
    \Todo List
    +
    - - - - + + + diff --git a/doc/html/phasor256__int8_8h.html b/doc/html/phasor256__int8_8h.html new file mode 100644 index 000000000..1ccf28d90 --- /dev/null +++ b/doc/html/phasor256__int8_8h.html @@ -0,0 +1,191 @@ + + + + + + +Mozzi: phasor256_int8.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    phasor256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define PHASOR256_NUM_CELLS   256
     
    #define PHASOR256_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) PHASOR256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define PHASOR256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file phasor256_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define PHASOR256_SAMPLERATE   256
    +
    + +

    Definition at line 15 of file phasor256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/phasor256__int8_8h.js b/doc/html/phasor256__int8_8h.js new file mode 100644 index 000000000..ebcbf1386 --- /dev/null +++ b/doc/html/phasor256__int8_8h.js @@ -0,0 +1,6 @@ +var phasor256__int8_8h = +[ + [ "PHASOR256_NUM_CELLS", "phasor256__int8_8h.html#a35dc2f87b7ec89af56be170f4c7b8fae", null ], + [ "PHASOR256_SAMPLERATE", "phasor256__int8_8h.html#aa1039ae58d22772c6cfc850384b26f34", null ], + [ "__attribute__", "phasor256__int8_8h.html#a3ab8e4ebb95fa74c1837b91fadbf2403", null ] +]; \ No newline at end of file diff --git a/doc/html/phasor256__int8_8h_source.html b/doc/html/phasor256__int8_8h_source.html index 6b9b02c55..36b2fb5be 100644 --- a/doc/html/phasor256__int8_8h_source.html +++ b/doc/html/phasor256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/phasor256_int8.h Source File +Mozzi: phasor256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    phasor256_int8.h
    -
    1 #ifndef PHASOR256_H_
    -
    2 #define PHASOR256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef PHASOR256_H_
    +
    2 #define PHASOR256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* ramp
    12 */
    13 
    -
    14 #define PHASOR256_NUM_CELLS 256
    -
    15 #define PHASOR256_SAMPLERATE 256
    -
    16 
    -
    17 const char __attribute__((progmem)) PHASOR256_DATA [] =
    +
    14 #define PHASOR256_NUM_CELLS 256
    +
    15 #define PHASOR256_SAMPLERATE 256
    +
    16 
    +
    17 const char __attribute__((progmem)) PHASOR256_DATA [] =
    18  {
    19  -128, -127, -127, -126, -124, -124, -122,
    20  -122, -120, -120, -118, -118, -116, -115, -115, -113, -113, -111, -110, -110,
    @@ -138,14 +146,14 @@
    34  121, 121, 123, 123, 125, 126, 126,
    35  };
    36 
    -
    37 #endif /* PHASOR256_H_ */
    +
    37 #endif /* PHASOR256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    pinknoise8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define PINKNOISE8192_NUM_CELLS   8192
     
    #define PINKNOISE8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) PINKNOISE8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define PINKNOISE8192_NUM_CELLS   8192
    +
    + +

    Definition at line 14 of file pinknoise8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define PINKNOISE8192_SAMPLERATE   8192
    +
    + +

    Definition at line 15 of file pinknoise8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/pinknoise8192__int8_8h.js b/doc/html/pinknoise8192__int8_8h.js new file mode 100644 index 000000000..769acdf33 --- /dev/null +++ b/doc/html/pinknoise8192__int8_8h.js @@ -0,0 +1,6 @@ +var pinknoise8192__int8_8h = +[ + [ "PINKNOISE8192_NUM_CELLS", "pinknoise8192__int8_8h.html#a451e680ec72ed0262a43716a48739caf", null ], + [ "PINKNOISE8192_SAMPLERATE", "pinknoise8192__int8_8h.html#abac3f85a0e3602887b57a952e4d7d9d9", null ], + [ "__attribute__", "pinknoise8192__int8_8h.html#a3a0a280cd2a283b187dabe27a2ab9c2f", null ] +]; \ No newline at end of file diff --git a/doc/html/pinknoise8192__int8_8h_source.html b/doc/html/pinknoise8192__int8_8h_source.html index 62f43557f..db81595e3 100644 --- a/doc/html/pinknoise8192__int8_8h_source.html +++ b/doc/html/pinknoise8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/pinknoise8192_int8.h Source File +Mozzi: pinknoise8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    pinknoise8192_int8.h
    -
    1 #ifndef PINKNOISE8192_H_
    -
    2 #define PINKNOISE8192_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef PINKNOISE8192_H_
    +
    2 #define PINKNOISE8192_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* generated pink noise
    12 */
    13 
    -
    14 #define PINKNOISE8192_NUM_CELLS 8192
    -
    15 #define PINKNOISE8192_SAMPLERATE 8192
    -
    16 
    -
    17 const char __attribute__((progmem)) PINKNOISE8192_DATA [] =
    +
    14 #define PINKNOISE8192_NUM_CELLS 8192
    +
    15 #define PINKNOISE8192_SAMPLERATE 8192
    +
    16 
    +
    17 const char __attribute__((progmem)) PINKNOISE8192_DATA [] =
    18  {
    19  -27, -51, -55, -63, -69, -29, -48,
    20  -46, -37, 4, -40, -6, 12, 17, -34, -22, -30, 0, -33, -18, 19, -14, -4, 29, -26,
    @@ -567,14 +575,14 @@
    463  -91, -67, -96, -97, -99, -72, -85,
    464  };
    465 
    -
    466 #endif /* PINKNOISE8192_H_ */
    +
    466 #endif /* PINKNOISE8192_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    primes.h File Reference
    +
    +
    +
    #include "mozzi_rand.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + +

    +Functions

    unsigned int randPrime (unsigned int n)
     Generates a random prime number between 0 and the n-1th prime number. More...
     
    unsigned int randPrimeUpTo (unsigned int n)
     Generates a random prime number between 0 and the given input number inclusive. More...
     
    +
    +
    + + + + diff --git a/doc/html/primes_8h.js b/doc/html/primes_8h.js new file mode 100644 index 000000000..7e6304fee --- /dev/null +++ b/doc/html/primes_8h.js @@ -0,0 +1,5 @@ +var primes_8h = +[ + [ "randPrime", "primes_8h.html#gab6c2b444d462461b82997e04105d0398", null ], + [ "randPrimeUpTo", "primes_8h.html#gaead8db89e2403d5ef7842f894552c629", null ] +]; \ No newline at end of file diff --git a/doc/html/primes_8h_source.html b/doc/html/primes_8h_source.html index 2af2ea722..01ece12bd 100644 --- a/doc/html/primes_8h_source.html +++ b/doc/html/primes_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    primes.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * Primes.h
    3  *
    4  * Copyright 2012 Tim Barrass.
    @@ -123,7 +131,7 @@
    19  * along with Mozzi. If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  */
    -
    22 
    +
    22 
    23  /*
    24 Inspired by PrimeSieve by Paul Badger 2009
    25 http://playground.arduino.cc/Main/PrimeSieve
    @@ -132,12 +140,12 @@
    28 Takes up about 2.5k of progmem
    29 */
    30 
    -
    31 #ifndef PRIMES_H
    -
    32 #define PRIMES_H
    -
    33 
    -
    34 #include "mozzi_rand.h" // for rand()
    +
    31 #ifndef PRIMES_H
    +
    32 #define PRIMES_H
    +
    33 
    +
    34 #include "mozzi_rand.h" // for rand()
    35 
    -
    36 static const unsigned int __attribute__((progmem)) primes[]={
    +
    36 static const unsigned int __attribute__((progmem)) primes[]={
    37  2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973,};
    38 
    39 static const unsigned int TOP_PRIME_INDEX = (sizeof(primes)/2);// - 1; //1228
    @@ -148,27 +156,47 @@
    44 }
    45 */
    46 
    +
    47 /** @ingroup random
    +
    48 Generates a random prime number between 0 and the n-1th prime number.
    +
    49 This uses a stored array of primes, which takes about 2.5k of progmem.
    +
    50 @param n the maximum index in the series of primes up to which numbers will be returned.
    +
    51 The maximum is 1128.
    +
    52 @return random prime number between 0 and n-1th index in the series of primes.
    +
    53 @note This isn't included automatically with mozzi_rand.h,
    +
    54 because it takes up memory which might be needed for other things.
    +
    55 You need to "#include <primes.h>" separately to mozzi_rand.h.
    +
    56 */
    57 inline
    58 unsigned int randPrime(unsigned int n){
    -
    59  return pgm_read_word(primes+rand(n));
    +
    59  return pgm_read_word(primes+rand(n));
    60 }
    61 
    +
    62 /** @ingroup random
    +
    63 Generates a random prime number between 0 and the given input number inclusive.
    +
    64 This uses a stored array of primes up to 10000, which takes about 2.5k of progmem.
    +
    65 @param n the upper limit of the random prime number to be generated.
    +
    66 The maximum is 10000.
    +
    67 @return random prime number between 0 and n.
    +
    68 @note This isn't included automatically with mozzi_utils.h,
    +
    69 because it takes up memory which might be needed for other things.
    +
    70 You need to "#include <primes.h>" separately to mozzi_utils.h.
    +
    71 */
    72 inline
    73 unsigned int randPrimeUpTo(unsigned int n){
    -
    74  unsigned int p;
    -
    75  do {
    -
    76  p = pgm_read_word(primes+rand(TOP_PRIME_INDEX));
    -
    77  } while (p > n);
    +
    74  unsigned int p;
    +
    75  do {
    +
    76  p = pgm_read_word(primes+rand(TOP_PRIME_INDEX));
    +
    77  } while (p > n);
    78 }
    79 
    -
    80 #endif // #ifndef PRIMES_H
    +
    80 #endif // #ifndef PRIMES_H
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw1024_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW1024_NUM_CELLS   1024
     
    #define SAW1024_SAMPLERATE   1024
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW1024_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW1024_NUM_CELLS   1024
    +
    + +

    Definition at line 11 of file saw1024_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW1024_SAMPLERATE   1024
    +
    + +

    Definition at line 12 of file saw1024_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw1024__int8_8h.js b/doc/html/saw1024__int8_8h.js new file mode 100644 index 000000000..e37970f33 --- /dev/null +++ b/doc/html/saw1024__int8_8h.js @@ -0,0 +1,6 @@ +var saw1024__int8_8h = +[ + [ "SAW1024_NUM_CELLS", "saw1024__int8_8h.html#a8f20bcd37b911edaf99053075fca9daa", null ], + [ "SAW1024_SAMPLERATE", "saw1024__int8_8h.html#ac6dd58b3e37999eac0e3f81e1675a321", null ], + [ "__attribute__", "saw1024__int8_8h.html#a4a04dbb323f12b58b174c9ec47caf216", null ] +]; \ No newline at end of file diff --git a/doc/html/saw1024__int8_8h_source.html b/doc/html/saw1024__int8_8h_source.html index f4e8b80e6..af38a1d10 100644 --- a/doc/html/saw1024__int8_8h_source.html +++ b/doc/html/saw1024__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw1024_int8.h Source File +Mozzi: saw1024_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    saw1024_int8.h
    -
    1 #ifndef SAW1024_H_
    -
    2 #define SAW1024_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW1024_H_
    +
    2 #define SAW1024_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SAW1024_NUM_CELLS 1024
    -
    12 #define SAW1024_SAMPLERATE 1024
    -
    13 
    -
    14 const char __attribute__((progmem)) SAW1024_DATA [] =
    +
    11 #define SAW1024_NUM_CELLS 1024
    +
    12 #define SAW1024_SAMPLERATE 1024
    +
    13 
    +
    14 const char __attribute__((progmem)) SAW1024_DATA [] =
    15  {
    16  -128, -128, -128, -128, -127, -127, -127,
    17  -127, -126, -126, -126, -126, -125, -125, -125, -125, -125, -124, -124, -124,
    @@ -180,14 +188,14 @@
    76  127, 127, 127,
    77  };
    78 
    -
    79 #endif /* SAW1024_H_ */
    +
    79 #endif /* SAW1024_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW2048_NUM_CELLS   2048
     
    #define SAW2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file saw2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW2048_SAMPLERATE   2048
    +
    + +

    Definition at line 12 of file saw2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw2048__int8_8h.js b/doc/html/saw2048__int8_8h.js new file mode 100644 index 000000000..becd03911 --- /dev/null +++ b/doc/html/saw2048__int8_8h.js @@ -0,0 +1,6 @@ +var saw2048__int8_8h = +[ + [ "SAW2048_NUM_CELLS", "saw2048__int8_8h.html#aff46751cb267881bf250e3dce5badd55", null ], + [ "SAW2048_SAMPLERATE", "saw2048__int8_8h.html#a45524f17aedba3c4054a2543ef4ad0e6", null ], + [ "__attribute__", "saw2048__int8_8h.html#a8e66d8e60e93d20c75f741d2832e44a4", null ] +]; \ No newline at end of file diff --git a/doc/html/saw2048__int8_8h_source.html b/doc/html/saw2048__int8_8h_source.html index 1a2a4ec10..204706343 100644 --- a/doc/html/saw2048__int8_8h_source.html +++ b/doc/html/saw2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw2048_int8.h Source File +Mozzi: saw2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    saw2048_int8.h
    -
    1 #ifndef SAW2048_H_
    -
    2 #define SAW2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW2048_H_
    +
    2 #define SAW2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SAW2048_NUM_CELLS 2048
    -
    12 #define SAW2048_SAMPLERATE 2048
    -
    13 
    -
    14 const char __attribute__((progmem)) SAW2048_DATA [] =
    +
    11 #define SAW2048_NUM_CELLS 2048
    +
    12 #define SAW2048_SAMPLERATE 2048
    +
    13 
    +
    14 const char __attribute__((progmem)) SAW2048_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -127, -127, -127, -127, -127, -127, -127, -127, -126, -126, -126, -126,
    @@ -239,14 +247,14 @@
    135  126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127,
    136  };
    137 
    -
    138 #endif /* SAW2048_H_ */
    +
    138 #endif /* SAW2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW256_NUM_CELLS   256
     
    #define SAW256_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW256_NUM_CELLS   256
    +
    + +

    Definition at line 11 of file saw256_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW256_SAMPLERATE   256
    +
    + +

    Definition at line 12 of file saw256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw256__int8_8h.js b/doc/html/saw256__int8_8h.js new file mode 100644 index 000000000..6cf0b7541 --- /dev/null +++ b/doc/html/saw256__int8_8h.js @@ -0,0 +1,6 @@ +var saw256__int8_8h = +[ + [ "SAW256_NUM_CELLS", "saw256__int8_8h.html#aa44ef0c2d1fb58f4f9e0970001d33f80", null ], + [ "SAW256_SAMPLERATE", "saw256__int8_8h.html#a3cb59c10ded5858af80a983665899b11", null ], + [ "__attribute__", "saw256__int8_8h.html#a1c726507437de79991b35d0227c18e62", null ] +]; \ No newline at end of file diff --git a/doc/html/saw256__int8_8h_source.html b/doc/html/saw256__int8_8h_source.html index 627bc73ca..fd80abed4 100644 --- a/doc/html/saw256__int8_8h_source.html +++ b/doc/html/saw256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw256_int8.h Source File +Mozzi: saw256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    saw256_int8.h
    -
    1 #ifndef SAW256_H_
    -
    2 #define SAW256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW256_H_
    +
    2 #define SAW256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SAW256_NUM_CELLS 256
    -
    12 #define SAW256_SAMPLERATE 256
    -
    13 
    -
    14 const char __attribute__((progmem)) SAW256_DATA [] =
    +
    11 #define SAW256_NUM_CELLS 256
    +
    12 #define SAW256_SAMPLERATE 256
    +
    13 
    +
    14 const char __attribute__((progmem)) SAW256_DATA [] =
    15  {
    16  -128, -127, -126, -125, -124, -123, -122,
    17  -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109,
    @@ -135,14 +143,14 @@
    31  121, 122, 123, 124, 125, 126, 127,
    32  };
    33 
    -
    34 #endif /* SAW256_H_ */
    +
    34 #endif /* SAW256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW4096_NUM_CELLS   4096
     
    #define SAW4096_SAMPLERATE   4096
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file saw4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW4096_SAMPLERATE   4096
    +
    + +

    Definition at line 12 of file saw4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw4096__int8_8h.js b/doc/html/saw4096__int8_8h.js new file mode 100644 index 000000000..e72be42f6 --- /dev/null +++ b/doc/html/saw4096__int8_8h.js @@ -0,0 +1,6 @@ +var saw4096__int8_8h = +[ + [ "SAW4096_NUM_CELLS", "saw4096__int8_8h.html#aff07b06be49efe63f93673dfee64114a", null ], + [ "SAW4096_SAMPLERATE", "saw4096__int8_8h.html#ac96ab017271670a91c647ffddfca4069", null ], + [ "__attribute__", "saw4096__int8_8h.html#a9f6bc5a0ced8f8de1f54238d80f7dfa0", null ] +]; \ No newline at end of file diff --git a/doc/html/saw4096__int8_8h_source.html b/doc/html/saw4096__int8_8h_source.html index f8ce2d674..51a7d549c 100644 --- a/doc/html/saw4096__int8_8h_source.html +++ b/doc/html/saw4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw4096_int8.h Source File +Mozzi: saw4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    saw4096_int8.h
    -
    1 #ifndef SAW4096_H_
    -
    2 #define SAW4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW4096_H_
    +
    2 #define SAW4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SAW4096_NUM_CELLS 4096
    -
    12 #define SAW4096_SAMPLERATE 4096
    -
    13 
    -
    14 const char __attribute__((progmem)) SAW4096_DATA [] =
    +
    11 #define SAW4096_NUM_CELLS 4096
    +
    12 #define SAW4096_SAMPLERATE 4096
    +
    13 
    +
    14 const char __attribute__((progmem)) SAW4096_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -128, -128, -128, -128, -128, -128, -128, -128, -127, -127, -127, -127,
    @@ -359,14 +367,14 @@
    255  127, 127, 127, 127, 127, 127,
    256  };
    257 
    -
    258 #endif /* SAW4096_H_ */
    +
    258 #endif /* SAW4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW512_NUM_CELLS   512
     
    #define SAW512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW512_NUM_CELLS   512
    +
    + +

    Definition at line 11 of file saw512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW512_SAMPLERATE   512
    +
    + +

    Definition at line 12 of file saw512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw512__int8_8h.js b/doc/html/saw512__int8_8h.js new file mode 100644 index 000000000..d29f0b753 --- /dev/null +++ b/doc/html/saw512__int8_8h.js @@ -0,0 +1,6 @@ +var saw512__int8_8h = +[ + [ "SAW512_NUM_CELLS", "saw512__int8_8h.html#af12ff62825de3f53ac9b9426f58511d7", null ], + [ "SAW512_SAMPLERATE", "saw512__int8_8h.html#a418575ae87a9cc017363b8352ef712f6", null ], + [ "__attribute__", "saw512__int8_8h.html#a7f4b2f53887f2ff050fcfbc679089c05", null ] +]; \ No newline at end of file diff --git a/doc/html/saw512__int8_8h_source.html b/doc/html/saw512__int8_8h_source.html index d9853cf6e..9b02c1685 100644 --- a/doc/html/saw512__int8_8h_source.html +++ b/doc/html/saw512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw512_int8.h Source File +Mozzi: saw512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    saw512_int8.h
    -
    1 #ifndef SAW512_H_
    -
    2 #define SAW512_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW512_H_
    +
    2 #define SAW512_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SAW512_NUM_CELLS 512
    -
    12 #define SAW512_SAMPLERATE 512
    -
    13 
    -
    14 const char __attribute__((progmem)) SAW512_DATA [] =
    +
    11 #define SAW512_NUM_CELLS 512
    +
    12 #define SAW512_SAMPLERATE 512
    +
    13 
    +
    14 const char __attribute__((progmem)) SAW512_DATA [] =
    15  {
    16  -128, -128, -127, -127, -126, -126, -126,
    17  -125, -125, -124, -124, -123, -123, -122, -121, -121, -120, -120, -119, -119,
    @@ -150,14 +158,14 @@
    46  124, 125, 125, 126, 126, 127,
    47  };
    48 
    -
    49 #endif /* SAW512_H_ */
    +
    49 #endif /* SAW512_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW8192_NUM_CELLS   8192
     
    #define SAW8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW8192_NUM_CELLS   8192
    +
    + +

    Definition at line 11 of file saw8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW8192_SAMPLERATE   8192
    +
    + +

    Definition at line 12 of file saw8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw8192__int8_8h.js b/doc/html/saw8192__int8_8h.js new file mode 100644 index 000000000..6fe468d16 --- /dev/null +++ b/doc/html/saw8192__int8_8h.js @@ -0,0 +1,6 @@ +var saw8192__int8_8h = +[ + [ "SAW8192_NUM_CELLS", "saw8192__int8_8h.html#a15cefc927358b5706e934dc2d7501aaa", null ], + [ "SAW8192_SAMPLERATE", "saw8192__int8_8h.html#aa344e2f053182ccb388b3e98b52edd8a", null ], + [ "__attribute__", "saw8192__int8_8h.html#ad1bd8bb752cbd0063e95d4345dba0ad6", null ] +]; \ No newline at end of file diff --git a/doc/html/saw8192__int8_8h_source.html b/doc/html/saw8192__int8_8h_source.html index 5525f0b9f..71608caf9 100644 --- a/doc/html/saw8192__int8_8h_source.html +++ b/doc/html/saw8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw8192_int8.h Source File +Mozzi: saw8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    saw8192_int8.h
    -
    1 #ifndef SAW8192_H_
    -
    2 #define SAW8192_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW8192_H_
    +
    2 #define SAW8192_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SAW8192_NUM_CELLS 8192
    -
    12 #define SAW8192_SAMPLERATE 8192
    -
    13 
    -
    14 const char __attribute__((progmem)) SAW8192_DATA [] =
    +
    11 #define SAW8192_NUM_CELLS 8192
    +
    12 #define SAW8192_SAMPLERATE 8192
    +
    13 
    +
    14 const char __attribute__((progmem)) SAW8192_DATA [] =
    15  {
    16  -128, -128, -128, -128, -128, -128, -128,
    17  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    @@ -598,14 +606,14 @@
    494  127, 127,
    495  };
    496 
    -
    497 #endif /* SAW8192_H_ */
    +
    497 #endif /* SAW8192_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    saw_analogue512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SAW_ANALOGUE512_NUM_CELLS   512
     
    #define SAW_ANALOGUE512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SAW_ANALOGUE512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SAW_ANALOGUE512_NUM_CELLS   512
    +
    + +

    Definition at line 14 of file saw_analogue512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAW_ANALOGUE512_SAMPLERATE   512
    +
    + +

    Definition at line 15 of file saw_analogue512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/saw__analogue512__int8_8h.js b/doc/html/saw__analogue512__int8_8h.js new file mode 100644 index 000000000..12eef5ffa --- /dev/null +++ b/doc/html/saw__analogue512__int8_8h.js @@ -0,0 +1,6 @@ +var saw__analogue512__int8_8h = +[ + [ "SAW_ANALOGUE512_NUM_CELLS", "saw__analogue512__int8_8h.html#ade2a0d567fd834dde1fd2800373d9164", null ], + [ "SAW_ANALOGUE512_SAMPLERATE", "saw__analogue512__int8_8h.html#a7af03c329978581d2383303c4b0c82af", null ], + [ "__attribute__", "saw__analogue512__int8_8h.html#ac05eb657dfbd948bcf55e1e18683994c", null ] +]; \ No newline at end of file diff --git a/doc/html/saw__analogue512__int8_8h_source.html b/doc/html/saw__analogue512__int8_8h_source.html index 841316851..b4565a67d 100644 --- a/doc/html/saw__analogue512__int8_8h_source.html +++ b/doc/html/saw__analogue512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/saw_analogue512_int8.h Source File +Mozzi: saw_analogue512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    saw_analogue512_int8.h
    -
    1 #ifndef SAW_ANALOGUE512_INT8_H_
    -
    2 #define SAW_ANALOGUE512_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SAW_ANALOGUE512_INT8_H_
    +
    2 #define SAW_ANALOGUE512_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* generated "analogue" saw wave from Audacity
    12 */
    13 
    -
    14 #define SAW_ANALOGUE512_NUM_CELLS 512
    -
    15 #define SAW_ANALOGUE512_SAMPLERATE 512
    -
    16 
    -
    17 const char __attribute__((progmem)) SAW_ANALOGUE512_DATA [] =
    +
    14 #define SAW_ANALOGUE512_NUM_CELLS 512
    +
    15 #define SAW_ANALOGUE512_SAMPLERATE 512
    +
    16 
    +
    17 const char __attribute__((progmem)) SAW_ANALOGUE512_DATA [] =
    18  {
    19  23, 68, 102, 119, 120, 111, 100,
    20  92, 91, 95, 101, 106, 106, 102, 97, 93, 92, 94, 97, 100, 100, 97, 94, 91, 90,
    @@ -151,14 +159,14 @@
    47  -80, -84, -86, -86, -83, -79, -76, -77, -82, -89, -95, -95, -83, -59, -22,
    48  };
    49 
    -
    50 #endif /* SAW_ANALOGUE512_INT8_H_ */
    +
    50 #endif /* SAW_ANALOGUE512_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin1024_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SIN1024_NUM_CELLS   1024
     
    #define SIN1024_SAMPLERATE   1024
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SIN1024_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SIN1024_NUM_CELLS   1024
    +
    + +

    Definition at line 11 of file sin1024_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SIN1024_SAMPLERATE   1024
    +
    + +

    Definition at line 12 of file sin1024_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin1024__int8_8h.js b/doc/html/sin1024__int8_8h.js new file mode 100644 index 000000000..9afb66b1f --- /dev/null +++ b/doc/html/sin1024__int8_8h.js @@ -0,0 +1,6 @@ +var sin1024__int8_8h = +[ + [ "SIN1024_NUM_CELLS", "sin1024__int8_8h.html#a0b0951563c3b5f792b3a0f1f917aa25b", null ], + [ "SIN1024_SAMPLERATE", "sin1024__int8_8h.html#a0849da9a001336d212e4e1184044ad97", null ], + [ "__attribute__", "sin1024__int8_8h.html#ab5a0cd8932e66415eacab54611758f4b", null ] +]; \ No newline at end of file diff --git a/doc/html/sin1024__int8_8h_source.html b/doc/html/sin1024__int8_8h_source.html index 7750b42de..1992d2041 100644 --- a/doc/html/sin1024__int8_8h_source.html +++ b/doc/html/sin1024__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin1024_int8.h Source File +Mozzi: sin1024_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin1024_int8.h
    -
    1 #ifndef SIN1024_H_
    -
    2 #define SIN1024_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5 #include "Arduino.h"
    -
    6 #else
    -
    7 #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    -
    10 
    -
    11 #define SIN1024_NUM_CELLS 1024
    -
    12 #define SIN1024_SAMPLERATE 1024
    -
    13 
    -
    14 const char __attribute__((progmem)) SIN1024_DATA [] = {-128, -128, -128, -128,
    +Go to the documentation of this file.
    1 #ifndef SIN1024_H_
    +
    2 #define SIN1024_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5 #include "Arduino.h"
    +
    6 #else
    +
    7 #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    +
    10 
    +
    11 #define SIN1024_NUM_CELLS 1024
    +
    12 #define SIN1024_SAMPLERATE 1024
    +
    13 
    +
    14 const char __attribute__((progmem)) SIN1024_DATA [] = {-128, -128, -128, -128,
    15 -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    16 -128, -128, -128, -128, -127, -127, -127, -127, -127, -127, -127, -127, -126,
    17 -126, -126, -126, -126, -126, -126, -125, -125, -125, -125, -125, -124, -124,
    @@ -179,16 +187,16 @@
    75 -125, -126, -126, -126, -126, -126, -126, -126, -127, -127, -127, -127, -127,
    76 -127, -127, -127, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    77 -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    -
    78  };
    -
    79 
    -
    80  #endif /* SIN1024_H_ */
    +
    78  };
    +
    79 }
    +
    80  #endif /* SIN1024_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin1024_int8.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     sin1024_int8
     
    + + + +

    +Constant Groups

     sin1024_int8
     
    + + + +

    +Functions

    def sin1024_int8.generate
     
    +
    +
    + + + + diff --git a/doc/html/sin1024__int8_8py.js b/doc/html/sin1024__int8_8py.js new file mode 100644 index 000000000..f3afe2f80 --- /dev/null +++ b/doc/html/sin1024__int8_8py.js @@ -0,0 +1,4 @@ +var sin1024__int8_8py = +[ + [ "generate", "sin1024__int8_8py.html#a707ae7fcd93169b46d51ba6235858502", null ] +]; \ No newline at end of file diff --git a/doc/html/sin1024__int8_8py_source.html b/doc/html/sin1024__int8_8py_source.html index a29a70c58..7feac0c21 100644 --- a/doc/html/sin1024__int8_8py_source.html +++ b/doc/html/sin1024__int8_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/sin1024_int8.py Source File +Mozzi: sin1024_int8.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +109,7 @@
    sin1024_int8.py
    -
    1 ## generates a sin-shaped table with values -128 to 127
    +Go to the documentation of this file.
    1 ## generates a sin-shaped table with values -128 to 127
    2 
    3 
    4 import array
    @@ -125,7 +132,7 @@
    21  outstring = 'const char __attribute__((progmem)) ' + tablename + '_DATA [] = {'
    22 
    23  try:
    -
    24  for num in range(tablelength):
    +
    24  for num in range(tablelength):
    25  ## range between 0 and 1 first
    26  x = float(num)/tablelength
    27 
    @@ -147,8 +154,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin1024_uint8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define sin1024_uint_NUM_CELLS   1024
     
    #define sin1024_uint_SAMPLERATE   1024
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) sin1024_uint_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define sin1024_uint_NUM_CELLS   1024
    +
    + +

    Definition at line 11 of file sin1024_uint8.h.

    + +
    +
    + +
    +
    + + + + +
    #define sin1024_uint_SAMPLERATE   1024
    +
    + +

    Definition at line 12 of file sin1024_uint8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin1024__uint8_8h.js b/doc/html/sin1024__uint8_8h.js new file mode 100644 index 000000000..9d64220b7 --- /dev/null +++ b/doc/html/sin1024__uint8_8h.js @@ -0,0 +1,6 @@ +var sin1024__uint8_8h = +[ + [ "sin1024_uint_NUM_CELLS", "sin1024__uint8_8h.html#a5687e7c5aa02f3e6bf8930da87a3ac4e", null ], + [ "sin1024_uint_SAMPLERATE", "sin1024__uint8_8h.html#a38d742770307665cd35ef6c2c2917cdb", null ], + [ "__attribute__", "sin1024__uint8_8h.html#a0cb1a11fdd28173c3d9f2ccb5bc422f9", null ] +]; \ No newline at end of file diff --git a/doc/html/sin1024__uint8_8h_source.html b/doc/html/sin1024__uint8_8h_source.html index 83307bc23..e676dc85f 100644 --- a/doc/html/sin1024__uint8_8h_source.html +++ b/doc/html/sin1024__uint8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin1024_uint8.h Source File +Mozzi: sin1024_uint8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin1024_uint8.h
    -
    1 #ifndef sin1024_uint_H_
    -
    2 #define sin1024_uint_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5 #include "Arduino.h"
    -
    6 #else
    -
    7 #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    -
    10 
    -
    11 #define sin1024_uint_NUM_CELLS 1024
    -
    12 #define sin1024_uint_SAMPLERATE 1024
    -
    13 
    -
    14 const char __attribute__((progmem)) sin1024_uint_DATA [] = {0, 0, 0, 0, 0, 0, 0,
    +Go to the documentation of this file.
    1 #ifndef sin1024_uint_H_
    +
    2 #define sin1024_uint_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5 #include "Arduino.h"
    +
    6 #else
    +
    7 #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    +
    10 
    +
    11 #define sin1024_uint_NUM_CELLS 1024
    +
    12 #define sin1024_uint_SAMPLERATE 1024
    +
    13 
    +
    14 const char __attribute__((progmem)) sin1024_uint_DATA [] = {0, 0, 0, 0, 0, 0, 0,
    15 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9,
    16 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 23, 24, 25,
    17 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46,
    @@ -164,16 +172,16 @@
    60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    61 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    62 0, 0, 0, 0, 0, 0,
    -
    63  };
    -
    64 
    -
    65  #endif /* sin1024_uint_H_ */
    +
    63  };
    +
    64 
    +
    65  #endif /* sin1024_uint_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SIN2048_NUM_CELLS   2048
     
    #define SIN2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SIN2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SIN2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file sin2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SIN2048_SAMPLERATE   2048
    +
    + +

    Definition at line 12 of file sin2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin2048__int8_8h.js b/doc/html/sin2048__int8_8h.js new file mode 100644 index 000000000..92cafe199 --- /dev/null +++ b/doc/html/sin2048__int8_8h.js @@ -0,0 +1,6 @@ +var sin2048__int8_8h = +[ + [ "SIN2048_NUM_CELLS", "sin2048__int8_8h.html#a1151e8e06d9bdff0bf0656ff814554f3", null ], + [ "SIN2048_SAMPLERATE", "sin2048__int8_8h.html#a5b95e98a5d027c322ae6c5d07ec6dc9d", null ], + [ "__attribute__", "sin2048__int8_8h.html#a6b42b022ad69d4a79ff9b75f377aa5cf", null ] +]; \ No newline at end of file diff --git a/doc/html/sin2048__int8_8h_source.html b/doc/html/sin2048__int8_8h_source.html index c37fc1624..d565854ba 100644 --- a/doc/html/sin2048__int8_8h_source.html +++ b/doc/html/sin2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin2048_int8.h Source File +Mozzi: sin2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin2048_int8.h
    -
    1 #ifndef SIN2048_H_
    -
    2 #define SIN2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SIN2048_H_
    +
    2 #define SIN2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SIN2048_NUM_CELLS 2048
    -
    12 #define SIN2048_SAMPLERATE 2048
    -
    13 
    -
    14 const char __attribute__((progmem)) SIN2048_DATA [] =
    +
    11 #define SIN2048_NUM_CELLS 2048
    +
    12 #define SIN2048_SAMPLERATE 2048
    +
    13 
    +
    14 const char __attribute__((progmem)) SIN2048_DATA [] =
    15  {
    16  0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5,
    17  5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14,
    @@ -246,14 +254,14 @@
    142  -4, -3, -3, -2, -2, -2, -1, -1,
    143  };
    144 
    -
    145 #endif /* SIN2048_H_ */
    +
    145 #endif /* SIN2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SIN256_NUM_CELLS   256
     
    #define SIN256_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SIN256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SIN256_NUM_CELLS   256
    +
    + +

    Definition at line 11 of file sin256_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SIN256_SAMPLERATE   256
    +
    + +

    Definition at line 12 of file sin256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin256__int8_8h.js b/doc/html/sin256__int8_8h.js new file mode 100644 index 000000000..c7dab91e8 --- /dev/null +++ b/doc/html/sin256__int8_8h.js @@ -0,0 +1,6 @@ +var sin256__int8_8h = +[ + [ "SIN256_NUM_CELLS", "sin256__int8_8h.html#aab95551b46f453309e70d86aa54258e1", null ], + [ "SIN256_SAMPLERATE", "sin256__int8_8h.html#af3f86e48ff843534dfa5d0ade0d640e9", null ], + [ "__attribute__", "sin256__int8_8h.html#a16882c312910fc3a1889c3e85bbda42a", null ] +]; \ No newline at end of file diff --git a/doc/html/sin256__int8_8h_source.html b/doc/html/sin256__int8_8h_source.html index 06a901ea9..b6c6c475b 100644 --- a/doc/html/sin256__int8_8h_source.html +++ b/doc/html/sin256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin256_int8.h Source File +Mozzi: sin256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin256_int8.h
    -
    1 #ifndef SIN256_INT8_H_
    -
    2 #define SIN256_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SIN256_INT8_H_
    +
    2 #define SIN256_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SIN256_NUM_CELLS 256
    -
    12 #define SIN256_SAMPLERATE 256
    -
    13 
    -
    14 const char __attribute__((progmem)) SIN256_DATA [] =
    +
    11 #define SIN256_NUM_CELLS 256
    +
    12 #define SIN256_SAMPLERATE 256
    +
    13 
    +
    14 const char __attribute__((progmem)) SIN256_DATA [] =
    15  {
    16  -1, 3, 6, 9, 12, 15, 18, 21, 24, 28,
    17  31, 34, 37, 40, 43, 46, 48, 51, 54, 57, 60, 63, 65, 68, 71, 73, 76, 78, 81, 83,
    @@ -136,14 +144,14 @@
    32  -16, -13, -10, -7, -4,
    33  };
    34 
    -
    35 #endif /* SIN256_INT8_H_ */
    +
    35 #endif /* SIN256_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin4096_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SIN4096_NUM_CELLS   4096
     
    #define SIN4096_SAMPLERATE   4096
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SIN4096_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SIN4096_NUM_CELLS   4096
    +
    + +

    Definition at line 11 of file sin4096_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SIN4096_SAMPLERATE   4096
    +
    + +

    Definition at line 12 of file sin4096_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin4096__int8_8h.js b/doc/html/sin4096__int8_8h.js new file mode 100644 index 000000000..cc698f6e6 --- /dev/null +++ b/doc/html/sin4096__int8_8h.js @@ -0,0 +1,6 @@ +var sin4096__int8_8h = +[ + [ "SIN4096_NUM_CELLS", "sin4096__int8_8h.html#aa9fcaca57a1ddc406e3f7ca0b521efcc", null ], + [ "SIN4096_SAMPLERATE", "sin4096__int8_8h.html#ae3ad9e9920e9796831f56c36f7ba4e56", null ], + [ "__attribute__", "sin4096__int8_8h.html#a0e5d5a33cda05ce3ad49bfe1611e97a6", null ] +]; \ No newline at end of file diff --git a/doc/html/sin4096__int8_8h_source.html b/doc/html/sin4096__int8_8h_source.html index eada3b320..e76b17d52 100644 --- a/doc/html/sin4096__int8_8h_source.html +++ b/doc/html/sin4096__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin4096_int8.h Source File +Mozzi: sin4096_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin4096_int8.h
    -
    1 #ifndef SIN4096_H_
    -
    2 #define SIN4096_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SIN4096_H_
    +
    2 #define SIN4096_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SIN4096_NUM_CELLS 4096
    -
    12 #define SIN4096_SAMPLERATE 4096
    -
    13 
    -
    14 const char __attribute__((progmem)) SIN4096_DATA [] =
    +
    11 #define SIN4096_NUM_CELLS 4096
    +
    12 #define SIN4096_SAMPLERATE 4096
    +
    13 
    +
    14 const char __attribute__((progmem)) SIN4096_DATA [] =
    15  {
    16  0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2,
    17  2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7,
    @@ -372,14 +380,14 @@
    268  -2, -2, -2, -2, -1, -1, -1, -1, -1,
    269  };
    270 
    -
    271 #endif /* SIN4096_H_ */
    +
    271 #endif /* SIN4096_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SIN512_NUM_CELLS   512
     
    #define SIN512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SIN512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SIN512_NUM_CELLS   512
    +
    + +

    Definition at line 11 of file sin512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SIN512_SAMPLERATE   512
    +
    + +

    Definition at line 12 of file sin512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin512__int8_8h.js b/doc/html/sin512__int8_8h.js new file mode 100644 index 000000000..2057c15b6 --- /dev/null +++ b/doc/html/sin512__int8_8h.js @@ -0,0 +1,6 @@ +var sin512__int8_8h = +[ + [ "SIN512_NUM_CELLS", "sin512__int8_8h.html#a55cf274124fe0675993773001d27f715", null ], + [ "SIN512_SAMPLERATE", "sin512__int8_8h.html#a58891dba49a3a942044783714115f53a", null ], + [ "__attribute__", "sin512__int8_8h.html#a2d06c25185948f3c3e05abb3ea298077", null ] +]; \ No newline at end of file diff --git a/doc/html/sin512__int8_8h_source.html b/doc/html/sin512__int8_8h_source.html index faaf6d9d9..c614e6224 100644 --- a/doc/html/sin512__int8_8h_source.html +++ b/doc/html/sin512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin512_int8.h Source File +Mozzi: sin512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin512_int8.h
    -
    1 #ifndef SIN512_INT8_H_
    -
    2 #define SIN512_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SIN512_INT8_H_
    +
    2 #define SIN512_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SIN512_NUM_CELLS 512
    -
    12 #define SIN512_SAMPLERATE 512
    -
    13 
    -
    14 const char __attribute__((progmem)) SIN512_DATA [] =
    +
    11 #define SIN512_NUM_CELLS 512
    +
    12 #define SIN512_SAMPLERATE 512
    +
    13 
    +
    14 const char __attribute__((progmem)) SIN512_DATA [] =
    15  {
    16  0, 1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16,
    17  18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44,
    @@ -151,14 +159,14 @@
    47  -8, -6, -5, -3, -2,
    48  };
    49 
    -
    50 #endif /* SIN512_INT8_H_ */
    +
    50 #endif /* SIN512_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SIN8192_NUM_CELLS   8192
     
    #define SIN8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SIN8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SIN8192_NUM_CELLS   8192
    +
    + +

    Definition at line 11 of file sin8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SIN8192_SAMPLERATE   8192
    +
    + +

    Definition at line 12 of file sin8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin8192__int8_8h.js b/doc/html/sin8192__int8_8h.js new file mode 100644 index 000000000..dc1cd8a5d --- /dev/null +++ b/doc/html/sin8192__int8_8h.js @@ -0,0 +1,6 @@ +var sin8192__int8_8h = +[ + [ "SIN8192_NUM_CELLS", "sin8192__int8_8h.html#ab17cb46526724afc7ed987fe9f0646e2", null ], + [ "SIN8192_SAMPLERATE", "sin8192__int8_8h.html#a2d33df835069a0675718fb914df9b5e1", null ], + [ "__attribute__", "sin8192__int8_8h.html#a2183545ac43f94dce6d447a4f4ba1752", null ] +]; \ No newline at end of file diff --git a/doc/html/sin8192__int8_8h_source.html b/doc/html/sin8192__int8_8h_source.html index 07919e30d..48b03e42a 100644 --- a/doc/html/sin8192__int8_8h_source.html +++ b/doc/html/sin8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin8192_int8.h Source File +Mozzi: sin8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    sin8192_int8.h
    -
    1 #ifndef SIN8192_INT8_H_
    -
    2 #define SIN8192_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SIN8192_INT8_H_
    +
    2 #define SIN8192_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define SIN8192_NUM_CELLS 8192
    -
    12 #define SIN8192_SAMPLERATE 8192
    -
    13 
    -
    14 const char __attribute__((progmem)) SIN8192_DATA [] =
    +
    11 #define SIN8192_NUM_CELLS 8192
    +
    12 #define SIN8192_SAMPLERATE 8192
    +
    13 
    +
    14 const char __attribute__((progmem)) SIN8192_DATA [] =
    15  {
    16  0, 0, 0, 0, 0, 1, 1, 1,
    17  1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
    @@ -621,17 +629,17 @@
    517  -7, -7, -7, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5,
    518  -5, -5, -5, -5, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3,
    519  -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1,
    -
    520  -1, -1, -1, -1, -1, 0, 0, 0, 0, 0,
    +
    520  -1, -1, -1, -1, -1, 0, 0, 0, 0, 0,
    521  };
    522 
    -
    523 #endif /* SIN8192_INT8_H_ */
    +
    523 #endif /* SIN8192_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin8192_uint8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define sin8192_uint_NUM_CELLS   8192
     
    #define sin8192_uint_SAMPLERATE   8192
     
    + + + + +

    +Functions

    const char __attribute__ ((progmem)) sin8192_uint_DATA[]
     Useful as a gain envelope. More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define sin8192_uint_NUM_CELLS   8192
    +
    + +

    Definition at line 12 of file sin8192_uint8.h.

    + +
    +
    + +
    +
    + + + + +
    #define sin8192_uint_SAMPLERATE   8192
    +
    + +

    Definition at line 13 of file sin8192_uint8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sin8192__uint8_8h.js b/doc/html/sin8192__uint8_8h.js new file mode 100644 index 000000000..ac34f8c8c --- /dev/null +++ b/doc/html/sin8192__uint8_8h.js @@ -0,0 +1,6 @@ +var sin8192__uint8_8h = +[ + [ "sin8192_uint_NUM_CELLS", "sin8192__uint8_8h.html#adfe4cbda4a50ea36cff60ea665cd9b68", null ], + [ "sin8192_uint_SAMPLERATE", "sin8192__uint8_8h.html#a6d2ecb4a4d371fc51a8276cbfa9bff45", null ], + [ "__attribute__", "sin8192__uint8_8h.html#ad7a90c0d828fff78b863df25a4783b56", null ] +]; \ No newline at end of file diff --git a/doc/html/sin8192__uint8_8h_source.html b/doc/html/sin8192__uint8_8h_source.html index 0715c5acf..e5d7b2c21 100644 --- a/doc/html/sin8192__uint8_8h_source.html +++ b/doc/html/sin8192__uint8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/sin8192_uint8.h Source File +Mozzi: sin8192_uint8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,21 +110,24 @@
    sin8192_uint8.h
    -
    1 #ifndef sin8192_uint_H_
    -
    2 #define sin8192_uint_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    -
    10 
    +Go to the documentation of this file.
    1 #ifndef sin8192_uint_H_
    +
    2 #define sin8192_uint_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    +
    10 
    11 
    -
    12 #define sin8192_uint_NUM_CELLS 8192
    -
    13 #define sin8192_uint_SAMPLERATE 8192
    -
    14 
    -
    18 const char __attribute__((progmem)) sin8192_uint_DATA [] = {0, 0, 0, 0, 0, 0, 0,
    +
    12 #define sin8192_uint_NUM_CELLS 8192
    +
    13 #define sin8192_uint_SAMPLERATE 8192
    +
    14 
    +
    15 /** Useful as a gain envelope
    +
    16 */
    +
    17 
    +
    18 const char __attribute__((progmem)) sin8192_uint_DATA [] = {0, 0, 0, 0, 0, 0, 0,
    19 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    20 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    21 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    @@ -572,16 +583,16 @@
    471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    473 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -
    474  };
    -
    475 
    -
    476  #endif /* sin8192_uint_H_ */
    +
    474  };
    +
    475 
    +
    476  #endif /* sin8192_uint_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin8192_uint8.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     sin8192_uint8
     
    + + + +

    +Constant Groups

     sin8192_uint8
     
    + + + +

    +Functions

    def sin8192_uint8.generate
     
    +
    +
    + + + + diff --git a/doc/html/sin8192__uint8_8py.js b/doc/html/sin8192__uint8_8py.js new file mode 100644 index 000000000..2fd9b73b0 --- /dev/null +++ b/doc/html/sin8192__uint8_8py.js @@ -0,0 +1,4 @@ +var sin8192__uint8_8py = +[ + [ "generate", "sin8192__uint8_8py.html#a20373aeb85c8bd1b928c0097514f3a5b", null ] +]; \ No newline at end of file diff --git a/doc/html/sin8192__uint8_8py_source.html b/doc/html/sin8192__uint8_8py_source.html index b35765411..a156e8b84 100644 --- a/doc/html/sin8192__uint8_8py_source.html +++ b/doc/html/sin8192__uint8_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/sin8192_uint8.py Source File +Mozzi: sin8192_uint8.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +109,7 @@
    sin8192_uint8.py
    -
    1 ## generates a sin-shaped table with values 0-255 (to be used as an envelope)
    +Go to the documentation of this file.
    1 ## generates a sin-shaped table with values 0-255 (to be used as an envelope)
    2 
    3 
    4 import array
    @@ -125,7 +132,7 @@
    21  outstring = 'const char __attribute__((progmem)) ' + tablename + '_DATA [] = {'
    22  halftable = tablelength/2
    23  try:
    -
    24  for num in range(tablelength):
    +
    24  for num in range(tablelength):
    25  ## range between 0 and 1 first
    26  ## x = float(num)/halftable
    27  x = float(num)/tablelength
    @@ -151,8 +158,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sin_multi_levels_int8.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     sin_multi_levels_int8
     
    + + + +

    +Constant Groups

     sin_multi_levels_int8
     
    + + + +

    +Functions

    def sin_multi_levels_int8.generate
     
    +
    +
    + + + + diff --git a/doc/html/sin__multi__levels__int8_8py.js b/doc/html/sin__multi__levels__int8_8py.js new file mode 100644 index 000000000..07f3c0a75 --- /dev/null +++ b/doc/html/sin__multi__levels__int8_8py.js @@ -0,0 +1,4 @@ +var sin__multi__levels__int8_8py = +[ + [ "generate", "sin__multi__levels__int8_8py.html#a9ac50e02ffabacb7308698b74a505d0f", null ] +]; \ No newline at end of file diff --git a/doc/html/sin__multi__levels__int8_8py_source.html b/doc/html/sin__multi__levels__int8_8py_source.html index 9f496c23f..bec30dfbd 100644 --- a/doc/html/sin__multi__levels__int8_8py_source.html +++ b/doc/html/sin__multi__levels__int8_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/sin_multi_levels_int8.py Source File +Mozzi: sin_multi_levels_int8.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +109,7 @@
    sin_multi_levels_int8.py
    -
    1 ## generates a set of sin waves at different amplitudes
    +Go to the documentation of this file.
    1 ## generates a set of sin waves at different amplitudes
    2 ## tables go from 1 to numtables+1, as table 0 is all 0's
    3 
    4 import array,os,textwrap,math
    @@ -126,10 +133,10 @@
    22  fout.write('const char __attribute__((progmem)) ' + tablename + '_DATA [] = { \n')
    23 
    24  try:
    -
    25  for tablenum in range(numtables):
    +
    25  for tablenum in range(numtables):
    26  try:
    27  outstring = '\n'
    -
    28  for num in range(tablelength):
    +
    28  for num in range(tablelength):
    29  ## range between 0 and 1 first
    30  x = float(num)/tablelength
    31 
    @@ -155,8 +162,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    + + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    sintest_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Classes

    class  sintest
     
    + + + + + +

    +Macros

    #define NUM_CELLS   1024
     
    #define SAMPLERATE   1024
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define NUM_CELLS   1024
    +
    + +

    Definition at line 13 of file sintest_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SAMPLERATE   1024
    +
    + +

    Definition at line 14 of file sintest_int8.h.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/sintest__int8_8h.js b/doc/html/sintest__int8_8h.js new file mode 100644 index 000000000..0402787b7 --- /dev/null +++ b/doc/html/sintest__int8_8h.js @@ -0,0 +1,6 @@ +var sintest__int8_8h = +[ + [ "sintest", "classsintest.html", null ], + [ "NUM_CELLS", "sintest__int8_8h.html#a4e0a9a72c12d3d6f6648b55b5f714583", null ], + [ "SAMPLERATE", "sintest__int8_8h.html#a538e0cad3acb787a49e16b1e53787610", null ] +]; \ No newline at end of file diff --git a/doc/html/sintest__int8_8h_source.html b/doc/html/sintest__int8_8h_source.html new file mode 100644 index 000000000..bae0696e7 --- /dev/null +++ b/doc/html/sintest__int8_8h_source.html @@ -0,0 +1,207 @@ + + + + + + +Mozzi: sintest_int8.h Source File + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    sintest_int8.h
    +
    +
    +Go to the documentation of this file.
    1 #ifndef SINTEST_H_
    +
    2 #define SINTEST_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5 #include "Arduino.h"
    +
    6 #else
    +
    7 #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    +
    10 
    +
    11 class sintest
    +
    12 {
    +
    13 #define NUM_CELLS 1024
    +
    14 #define SAMPLERATE 1024
    +
    15 
    +
    16 const char __attribute__((progmem)) SIN1024_DATA [] = {-128, -128, -128, -128,
    +
    17 -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    +
    18 -128, -128, -128, -128, -127, -127, -127, -127, -127, -127, -127, -127, -126,
    +
    19 -126, -126, -126, -126, -126, -126, -125, -125, -125, -125, -125, -124, -124,
    +
    20 -124, -124, -124, -123, -123, -123, -123, -123, -122, -122, -122, -122, -121,
    +
    21 -121, -121, -120, -120, -120, -120, -119, -119, -119, -118, -118, -118, -118,
    +
    22 -117, -117, -117, -116, -116, -116, -115, -115, -114, -114, -114, -113, -113,
    +
    23 -113, -112, -112, -111, -111, -111, -110, -110, -109, -109, -109, -108, -108,
    +
    24 -107, -107, -106, -106, -106, -105, -105, -104, -104, -103, -103, -102, -102,
    +
    25 -101, -101, -100, -100, -99, -99, -98, -98, -97, -97, -96, -96, -95, -95, -94,
    +
    26 -94, -93, -93, -92, -92, -91, -90, -90, -89, -89, -88, -88, -87, -86, -86, -85,
    +
    27 -85, -84, -84, -83, -82, -82, -81, -80, -80, -79, -79, -78, -77, -77, -76, -75,
    +
    28 -75, -74, -74, -73, -72, -72, -71, -70, -70, -69, -68, -68, -67, -66, -66, -65,
    +
    29 -64, -64, -63, -62, -62, -61, -60, -59, -59, -58, -57, -57, -56, -55, -55, -54,
    +
    30 -53, -52, -52, -51, -50, -49, -49, -48, -47, -47, -46, -45, -44, -44, -43, -42,
    +
    31 -41, -41, -40, -39, -38, -38, -37, -36, -35, -35, -34, -33, -32, -32, -31, -30,
    +
    32 -29, -29, -28, -27, -26, -25, -25, -24, -23, -22, -22, -21, -20, -19, -19, -18,
    +
    33 -17, -16, -15, -15, -14, -13, -12, -11, -11, -10, -9, -8, -8, -7, -6, -5, -4,
    +
    34 -4, -3, -2, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, 14,
    +
    35 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 27, 28, 28, 29,
    +
    36 30, 31, 31, 32, 33, 34, 34, 35, 36, 37, 37, 38, 39, 40, 40, 41, 42, 43, 43, 44,
    +
    37 45, 46, 46, 47, 48, 48, 49, 50, 51, 51, 52, 53, 54, 54, 55, 56, 56, 57, 58, 58,
    +
    38 59, 60, 61, 61, 62, 63, 63, 64, 65, 65, 66, 67, 67, 68, 69, 69, 70, 71, 71, 72,
    +
    39 73, 73, 74, 74, 75, 76, 76, 77, 78, 78, 79, 79, 80, 81, 81, 82, 83, 83, 84, 84,
    +
    40 85, 85, 86, 87, 87, 88, 88, 89, 89, 90, 91, 91, 92, 92, 93, 93, 94, 94, 95, 95,
    +
    41 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 103, 104,
    +
    42 104, 105, 105, 105, 106, 106, 107, 107, 108, 108, 108, 109, 109, 110, 110, 110,
    +
    43 111, 111, 112, 112, 112, 113, 113, 113, 114, 114, 115, 115, 115, 116, 116, 116,
    +
    44 117, 117, 117, 117, 118, 118, 118, 119, 119, 119, 119, 120, 120, 120, 121, 121,
    +
    45 121, 121, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 124, 124, 124, 124,
    +
    46 124, 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, 126, 126,
    +
    47 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    +
    48 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
    +
    49 127, 127, 127, 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126,
    +
    50 126, 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 123, 123, 123,
    +
    51 123, 123, 122, 122, 122, 122, 122, 121, 121, 121, 121, 120, 120, 120, 119, 119,
    +
    52 119, 119, 118, 118, 118, 117, 117, 117, 117, 116, 116, 116, 115, 115, 115, 114,
    +
    53 114, 113, 113, 113, 112, 112, 112, 111, 111, 110, 110, 110, 109, 109, 108, 108,
    +
    54 108, 107, 107, 106, 106, 105, 105, 105, 104, 104, 103, 103, 102, 102, 101, 101,
    +
    55 100, 100, 99, 99, 98, 98, 97, 97, 96, 96, 95, 95, 94, 94, 93, 93, 92, 92, 91,
    +
    56 91, 90, 89, 89, 88, 88, 87, 87, 86, 85, 85, 84, 84, 83, 83, 82, 81, 81, 80, 79,
    +
    57 79, 78, 78, 77, 76, 76, 75, 74, 74, 73, 73, 72, 71, 71, 70, 69, 69, 68, 67, 67,
    +
    58 66, 65, 65, 64, 63, 63, 62, 61, 61, 60, 59, 58, 58, 57, 56, 56, 55, 54, 54, 53,
    +
    59 52, 51, 51, 50, 49, 48, 48, 47, 46, 46, 45, 44, 43, 43, 42, 41, 40, 40, 39, 38,
    +
    60 37, 37, 36, 35, 34, 34, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 24, 24, 23,
    +
    61 22, 21, 21, 20, 19, 18, 18, 17, 16, 15, 14, 14, 13, 12, 11, 10, 10, 9, 8, 7, 7,
    +
    62 6, 5, 4, 3, 3, 2, 1, 0, -1, -1, -2, -3, -4, -4, -5, -6, -7, -8, -8, -9, -10,
    +
    63 -11, -11, -12, -13, -14, -15, -15, -16, -17, -18, -19, -19, -20, -21, -22, -22,
    +
    64 -23, -24, -25, -25, -26, -27, -28, -29, -29, -30, -31, -32, -32, -33, -34, -35,
    +
    65 -35, -36, -37, -38, -38, -39, -40, -41, -41, -42, -43, -44, -44, -45, -46, -47,
    +
    66 -47, -48, -49, -49, -50, -51, -52, -52, -53, -54, -55, -55, -56, -57, -57, -58,
    +
    67 -59, -59, -60, -61, -62, -62, -63, -64, -64, -65, -66, -66, -67, -68, -68, -69,
    +
    68 -70, -70, -71, -72, -72, -73, -74, -74, -75, -75, -76, -77, -77, -78, -79, -79,
    +
    69 -80, -80, -81, -82, -82, -83, -84, -84, -85, -85, -86, -86, -87, -88, -88, -89,
    +
    70 -89, -90, -90, -91, -92, -92, -93, -93, -94, -94, -95, -95, -96, -96, -97, -97,
    +
    71 -98, -98, -99, -99, -100, -100, -101, -101, -102, -102, -103, -103, -104, -104,
    +
    72 -105, -105, -106, -106, -106, -107, -107, -108, -108, -109, -109, -109, -110,
    +
    73 -110, -111, -111, -111, -112, -112, -113, -113, -113, -114, -114, -114, -115,
    +
    74 -115, -116, -116, -116, -117, -117, -117, -118, -118, -118, -118, -119, -119,
    +
    75 -119, -120, -120, -120, -120, -121, -121, -121, -122, -122, -122, -122, -123,
    +
    76 -123, -123, -123, -123, -124, -124, -124, -124, -124, -125, -125, -125, -125,
    +
    77 -125, -126, -126, -126, -126, -126, -126, -126, -127, -127, -127, -127, -127,
    +
    78 -127, -127, -127, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    +
    79 -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    +
    80  };
    +
    81 }
    +
    82  #endif /* SINTEST_H_ */
    +
    +
    + + + + diff --git a/doc/html/smoothsquare8192__int8_8h.html b/doc/html/smoothsquare8192__int8_8h.html new file mode 100644 index 000000000..b81a20dc0 --- /dev/null +++ b/doc/html/smoothsquare8192__int8_8h.html @@ -0,0 +1,191 @@ + + + + + + +Mozzi: smoothsquare8192_int8.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    smoothsquare8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SMOOTHSQUARE8192_NUM_CELLS   8192
     
    #define SMOOTHSQUARE8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SMOOTHSQUARE8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SMOOTHSQUARE8192_NUM_CELLS   8192
    +
    + +

    Definition at line 14 of file smoothsquare8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SMOOTHSQUARE8192_SAMPLERATE   8192
    +
    + +

    Definition at line 15 of file smoothsquare8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/smoothsquare8192__int8_8h.js b/doc/html/smoothsquare8192__int8_8h.js new file mode 100644 index 000000000..d93c294dd --- /dev/null +++ b/doc/html/smoothsquare8192__int8_8h.js @@ -0,0 +1,6 @@ +var smoothsquare8192__int8_8h = +[ + [ "SMOOTHSQUARE8192_NUM_CELLS", "smoothsquare8192__int8_8h.html#a9f5e606d0cf30558deb63f4c9ea6b1a2", null ], + [ "SMOOTHSQUARE8192_SAMPLERATE", "smoothsquare8192__int8_8h.html#a418d2a4c6118d4a2e625b94d853e165b", null ], + [ "__attribute__", "smoothsquare8192__int8_8h.html#aaabfc9b1fdb5a74b9d3a5ded297de16f", null ] +]; \ No newline at end of file diff --git a/doc/html/smoothsquare8192__int8_8h_source.html b/doc/html/smoothsquare8192__int8_8h_source.html index cd7f3ed34..afe8a68c8 100644 --- a/doc/html/smoothsquare8192__int8_8h_source.html +++ b/doc/html/smoothsquare8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/smoothsquare8192_int8.h Source File +Mozzi: smoothsquare8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    smoothsquare8192_int8.h
    -
    1 #ifndef SMOOTHSQUARE8192_H_
    -
    2 #define SMOOTHSQUARE8192_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SMOOTHSQUARE8192_H_
    +
    2 #define SMOOTHSQUARE8192_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* hand-drawn square wave with rounded corners from Audacity
    12 */
    13 
    -
    14 #define SMOOTHSQUARE8192_NUM_CELLS 8192
    -
    15 #define SMOOTHSQUARE8192_SAMPLERATE 8192
    -
    16 
    -
    17 const char __attribute__((progmem)) SMOOTHSQUARE8192_DATA [] =
    +
    14 #define SMOOTHSQUARE8192_NUM_CELLS 8192
    +
    15 #define SMOOTHSQUARE8192_SAMPLERATE 8192
    +
    16 
    +
    17 const char __attribute__((progmem)) SMOOTHSQUARE8192_DATA [] =
    18  {
    19  -1, 0, -1, 0, -1, 0, 0, 0, -1, 0,
    20  -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0,
    @@ -666,14 +674,14 @@
    562  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    563  };
    564 
    -
    565 #endif /* SMOOTHSQUARE8192_H_ */
    +
    565 #endif /* SMOOTHSQUARE8192_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    square_analogue512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SQUARE_ANALOGUE512_NUM_CELLS   512
     
    #define SQUARE_ANALOGUE512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SQUARE_ANALOGUE512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SQUARE_ANALOGUE512_NUM_CELLS   512
    +
    + +

    Definition at line 14 of file square_analogue512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SQUARE_ANALOGUE512_SAMPLERATE   512
    +
    + +

    Definition at line 15 of file square_analogue512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/square__analogue512__int8_8h.js b/doc/html/square__analogue512__int8_8h.js new file mode 100644 index 000000000..effe99c85 --- /dev/null +++ b/doc/html/square__analogue512__int8_8h.js @@ -0,0 +1,6 @@ +var square__analogue512__int8_8h = +[ + [ "SQUARE_ANALOGUE512_NUM_CELLS", "square__analogue512__int8_8h.html#a1c3dd551f0533f1a52f4679cf6e367b4", null ], + [ "SQUARE_ANALOGUE512_SAMPLERATE", "square__analogue512__int8_8h.html#aa4a6034821320965946fe5b642b68106", null ], + [ "__attribute__", "square__analogue512__int8_8h.html#a9236f8f8394c2f4cbf9a359d2f015809", null ] +]; \ No newline at end of file diff --git a/doc/html/square__analogue512__int8_8h_source.html b/doc/html/square__analogue512__int8_8h_source.html index 51ba69967..4caa886b3 100644 --- a/doc/html/square__analogue512__int8_8h_source.html +++ b/doc/html/square__analogue512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/square_analogue512_int8.h Source File +Mozzi: square_analogue512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    square_analogue512_int8.h
    -
    1 #ifndef SQUARE_ANALOGUE512_INT8_H_
    -
    2 #define SQUARE_ANALOGUE512_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SQUARE_ANALOGUE512_INT8_H_
    +
    2 #define SQUARE_ANALOGUE512_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* generated "analogue" square wave from Audacity
    12 */
    13 
    -
    14 #define SQUARE_ANALOGUE512_NUM_CELLS 512
    -
    15 #define SQUARE_ANALOGUE512_SAMPLERATE 512
    -
    16 
    -
    17 const char __attribute__((progmem)) SQUARE_ANALOGUE512_DATA [] =
    +
    14 #define SQUARE_ANALOGUE512_NUM_CELLS 512
    +
    15 #define SQUARE_ANALOGUE512_SAMPLERATE 512
    +
    16 
    +
    17 const char __attribute__((progmem)) SQUARE_ANALOGUE512_DATA [] =
    18  {
    19  23, 68, 102, 119, 120, 112, 101,
    20  94, 94, 99, 105, 109, 109, 106, 101, 98, 98, 101, 104, 107, 107, 105, 102, 100,
    @@ -155,14 +163,14 @@
    51  -83, -89, -95, -94, -83, -59, -22,
    52  };
    53 
    -
    54 #endif /* SQUARE_ANALOGUE512_INT8_H_ */
    +
    54 #endif /* SQUARE_ANALOGUE512_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    square_no_alias512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define SQUARE_NO_ALIAS512_NUM_CELLS   512
     
    #define SQUARE_NO_ALIAS512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) SQUARE_NO_ALIAS512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define SQUARE_NO_ALIAS512_NUM_CELLS   512
    +
    + +

    Definition at line 14 of file square_no_alias512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define SQUARE_NO_ALIAS512_SAMPLERATE   512
    +
    + +

    Definition at line 15 of file square_no_alias512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/square__no__alias512__int8_8h.js b/doc/html/square__no__alias512__int8_8h.js new file mode 100644 index 000000000..c81734e13 --- /dev/null +++ b/doc/html/square__no__alias512__int8_8h.js @@ -0,0 +1,6 @@ +var square__no__alias512__int8_8h = +[ + [ "SQUARE_NO_ALIAS512_NUM_CELLS", "square__no__alias512__int8_8h.html#a38c996ea0bff67d5dafdbcfec5d3bc56", null ], + [ "SQUARE_NO_ALIAS512_SAMPLERATE", "square__no__alias512__int8_8h.html#ae5cc3ded0f0e1a24d451fc01539e7e14", null ], + [ "__attribute__", "square__no__alias512__int8_8h.html#ab65591f7f3dab08ff004d522d2d8792a", null ] +]; \ No newline at end of file diff --git a/doc/html/square__no__alias512__int8_8h_source.html b/doc/html/square__no__alias512__int8_8h_source.html index f73d611bd..7c0b3d07a 100644 --- a/doc/html/square__no__alias512__int8_8h_source.html +++ b/doc/html/square__no__alias512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/square_no_alias512_int8.h Source File +Mozzi: square_no_alias512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    square_no_alias512_int8.h
    -
    1 #ifndef SQUARE_NO_ALIAS512_INT8_H_
    -
    2 #define SQUARE_NO_ALIAS512_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef SQUARE_NO_ALIAS512_INT8_H_
    +
    2 #define SQUARE_NO_ALIAS512_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* square wave with rounded corners from Audacity
    12 */
    13 
    -
    14 #define SQUARE_NO_ALIAS512_NUM_CELLS 512
    -
    15 #define SQUARE_NO_ALIAS512_SAMPLERATE 512
    -
    16 
    -
    17 const char __attribute__((progmem)) SQUARE_NO_ALIAS512_DATA [] =
    +
    14 #define SQUARE_NO_ALIAS512_NUM_CELLS 512
    +
    15 #define SQUARE_NO_ALIAS512_SAMPLERATE 512
    +
    16 
    +
    17 const char __attribute__((progmem)) SQUARE_NO_ALIAS512_DATA [] =
    18  {
    19  -1, 93, 117, 114, 115,
    20  114, 115, 115, 114, 115, 114, 115, 115, 114, 115, 115, 115, 115, 115, 115, 115,
    @@ -159,14 +167,14 @@
    55  -116, -115, -118, -94,
    56  };
    57 
    -
    58 #endif /* SQUARE_NO_ALIAS512_INT8_H_ */
    +
    58 #endif /* SQUARE_NO_ALIAS512_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    table_generator_template.py File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + +

    +Namespaces

     table_generator_template
     
    + + + +

    +Constant Groups

     table_generator_template
     
    + + + +

    +Functions

    def table_generator_template.generate
     
    +
    +
    + + + + diff --git a/doc/html/table__generator__template_8py.js b/doc/html/table__generator__template_8py.js new file mode 100644 index 000000000..e0f0635ca --- /dev/null +++ b/doc/html/table__generator__template_8py.js @@ -0,0 +1,4 @@ +var table__generator__template_8py = +[ + [ "generate", "table__generator__template_8py.html#aea200a1fe03b0de47eeafdf8796c8417", null ] +]; \ No newline at end of file diff --git a/doc/html/table__generator__template_8py_source.html b/doc/html/table__generator__template_8py_source.html index 2aadd246f..b36e2c545 100644 --- a/doc/html/table__generator__template_8py_source.html +++ b/doc/html/table__generator__template_8py_source.html @@ -4,7 +4,7 @@ -Mozzi: python/table_generator_template.py Source File +Mozzi: table_generator_template.py Source File @@ -28,10 +28,10 @@ - + @@ -49,6 +49,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +69,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +109,7 @@
    table_generator_template.py
    -
    1 import array
    +Go to the documentation of this file.
    1 import array
    2 import os
    3 import textwrap
    4 
    @@ -120,7 +127,7 @@
    16  fout.write('#define ' + tablename + '_SAMPLERATE '+ str(samplerate)+'\n \n')
    17  outstring = 'const char __attribute__((progmem)) ' + tablename + '_DATA [] = {'
    18  try:
    -
    19  for num in range(tablelength):
    +
    19  for num in range(tablelength):
    20  outstring += str(num/32) + ", " ## for saw line, or put your own generating code here
    21  finally:
    22  outstring += "};"
    @@ -136,8 +143,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    - - - - + - - -
    Mozzi -  alpha 0.01.1z +  0.01.2c alpha
    sound synthesis library for Arduino
    - - + + @@ -53,6 +51,7 @@
  • Modules
  • Classes
  • Files
  • +
  • Examples
  • @@ -71,12 +70,27 @@
  • + +
    + +
    +
    +
    + +
    + All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -85,7 +99,6 @@
    -
    Todo List
    @@ -98,14 +111,12 @@
    fix release for rate rather than steps (time), so it releases at the same rate whatever the current level.
    Member AUDIO_RATE
    Possible option for output to R/2R DAC circuit, like http://blog.makezine.com/2008/05/29/makeit-protodac-shield-fo/ . Mozzi-users list has a thread on this.
    -
    Member AUDIO_RATE_AS_LSHIFT
    -

    Possible option for output to R/2R DAC circuit, like http://blog.makezine.com/2008/05/29/makeit-protodac-shield-fo/ This would limit dynamic range to 8 bit, but would remove the 16384Hz pwm carrier frequency noise which can be a problem in some applications, requiring filtering to remove (see the Mozzi wiki for filter schematics).

    -

    Test 32768Hz audio rate option properly

    -
    -
    Member audioHook ()
    +
    Member audioHook ()
    Try pre-decrement positions and swap gap calc around
    Member EventDelay< UPDATE_RATE >::start ()
    have a parameter to set whether it's single or repeating, so start doesn't have to be called for repeats. Pro: simpler user programming. Con: would require an if..then every time ready() is called.
    +
    Member mozziMicros ()
    +
    incorporate mozziMicros() in a more accurate EventDelay()?
    Class Oscil< NUM_TABLE_CELLS, UPDATE_RATE >
    Use conditional compilation to optimise setFreq() variations for different table sizes.
    Member Oscil< NUM_TABLE_CELLS, UPDATE_RATE >::phMod (Q15n16 phmod_proportion)
    @@ -114,27 +125,28 @@
    Test commenting out ATOMIC_BLOCK in setPhase(), setFreq(), etc.
    Member Oscil< NUM_TABLE_CELLS, UPDATE_RATE >::setPhaseFractional (unsigned long phase)
    Test commenting out ATOMIC_BLOCK in setPhase(), setFreq(), etc.
    -
    Member Q16n16_pow2 (Q8n8 exponent)
    -
    Q16n16_pow2() accuracy needs more attention.
    +
    Member Q16n16_pow2 (Q8n8 exponent)
    +
    Q16n16_pow2() accuracy needs more attention.
    Member Sample< NUM_TABLE_CELLS, UPDATE_RATE >::next ()
    in next(), incrementPhase() happens in a different position than for Oscil - check if it can be standardised
    Class Smooth< T >
    -
    Check if 8 bit templates can work efficiently with a higher res smoothness - as is they don't have enough resolution to work well at audio rate. See if Line might be more useful in most cases.
    -
    Member startMozzi (int control_rate_hz=CONTROL_RATE)
    +
    Check if 8 bit templates can work efficiently with a higher res smoothness - as is they don't have enough resolution to work well at audio rate. See if Line might be more useful in most cases.
    +
    Member startMozzi (int control_rate_hz=CONTROL_RATE)
    See if there is any advantage to using 8 bit port, without pwm, with a resistor ladder (maybe use readymade resistor networks).
    Class StateVariable< FILTER_TYPE >
    Try adding code to constrain the internal variables to enable resonant saturating effects.
    Member xorshift96 ()
    -
    check timing of xorshift96(), rand() and other PRNG candidates.
    +
    check timing of xorshift96(), rand() and other PRNG candidates.
    - - - - + + + diff --git a/doc/html/triangle1024__int8_8h.html b/doc/html/triangle1024__int8_8h.html new file mode 100644 index 000000000..15d1be9df --- /dev/null +++ b/doc/html/triangle1024__int8_8h.html @@ -0,0 +1,191 @@ + + + + + + +Mozzi: triangle1024_int8.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle1024_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE1024_NUM_CELLS   1024
     
    #define TRIANGLE1024_SAMPLERATE   1024
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE1024_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE1024_NUM_CELLS   1024
    +
    + +

    Definition at line 11 of file triangle1024_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE1024_SAMPLERATE   1024
    +
    + +

    Definition at line 12 of file triangle1024_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle1024__int8_8h.js b/doc/html/triangle1024__int8_8h.js new file mode 100644 index 000000000..17cd5a191 --- /dev/null +++ b/doc/html/triangle1024__int8_8h.js @@ -0,0 +1,6 @@ +var triangle1024__int8_8h = +[ + [ "TRIANGLE1024_NUM_CELLS", "triangle1024__int8_8h.html#a7c28a39a3cfb19b9a263a275ae9e658d", null ], + [ "TRIANGLE1024_SAMPLERATE", "triangle1024__int8_8h.html#a424da3412d3ce79d6a43712c56561ac0", null ], + [ "__attribute__", "triangle1024__int8_8h.html#a7f88e8dd61a08d21daec83d2529d9a34", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle1024__int8_8h_source.html b/doc/html/triangle1024__int8_8h_source.html index 17415c36b..bd5e35fa2 100644 --- a/doc/html/triangle1024__int8_8h_source.html +++ b/doc/html/triangle1024__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle1024_int8.h Source File +Mozzi: triangle1024_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    triangle1024_int8.h
    -
    1 #ifndef TRIANGLE1024_H_
    -
    2 #define TRIANGLE1024_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE1024_H_
    +
    2 #define TRIANGLE1024_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define TRIANGLE1024_NUM_CELLS 1024
    -
    12 #define TRIANGLE1024_SAMPLERATE 1024
    -
    13 
    -
    14 const char __attribute__((progmem)) TRIANGLE1024_DATA [] =
    +
    11 #define TRIANGLE1024_NUM_CELLS 1024
    +
    12 #define TRIANGLE1024_SAMPLERATE 1024
    +
    13 
    +
    14 const char __attribute__((progmem)) TRIANGLE1024_DATA [] =
    15  {
    16  0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5,
    17  6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 16, 16, 16,
    @@ -180,14 +188,14 @@
    76  -4, -3, -3, -2, -2, -1,
    77  };
    78 
    -
    79 #endif /* TRIANGLE1024_H_ */
    +
    79 #endif /* TRIANGLE1024_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE2048_NUM_CELLS   2048
     
    #define TRIANGLE2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE2048_NUM_CELLS   2048
    +
    + +

    Definition at line 11 of file triangle2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE2048_SAMPLERATE   2048
    +
    + +

    Definition at line 12 of file triangle2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle2048__int8_8h.js b/doc/html/triangle2048__int8_8h.js new file mode 100644 index 000000000..e9af73f26 --- /dev/null +++ b/doc/html/triangle2048__int8_8h.js @@ -0,0 +1,6 @@ +var triangle2048__int8_8h = +[ + [ "TRIANGLE2048_NUM_CELLS", "triangle2048__int8_8h.html#a1ec731d7ecae8fb4ab72010933aea9ea", null ], + [ "TRIANGLE2048_SAMPLERATE", "triangle2048__int8_8h.html#a0cf58ed65e1198b69012facab02f4523", null ], + [ "__attribute__", "triangle2048__int8_8h.html#a57b34c0e50f22728e28087ddb1a347c9", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle2048__int8_8h_source.html b/doc/html/triangle2048__int8_8h_source.html index 5f355215c..b37be0657 100644 --- a/doc/html/triangle2048__int8_8h_source.html +++ b/doc/html/triangle2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle2048_int8.h Source File +Mozzi: triangle2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    triangle2048_int8.h
    -
    1 #ifndef TRIANGLE2048_H_
    -
    2 #define TRIANGLE2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE2048_H_
    +
    2 #define TRIANGLE2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define TRIANGLE2048_NUM_CELLS 2048
    -
    12 #define TRIANGLE2048_SAMPLERATE 2048
    -
    13 
    -
    14 const char __attribute__((progmem)) TRIANGLE2048_DATA [] =
    +
    11 #define TRIANGLE2048_NUM_CELLS 2048
    +
    12 #define TRIANGLE2048_SAMPLERATE 2048
    +
    13 
    +
    14 const char __attribute__((progmem)) TRIANGLE2048_DATA [] =
    15  {
    16  0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3,
    17  3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,
    @@ -239,14 +247,14 @@
    135  -5, -5, -5, -5, -5, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1,
    136  };
    137 
    -
    138 #endif /* TRIANGLE2048_H_ */
    +
    138 #endif /* TRIANGLE2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE512_NUM_CELLS   512
     
    #define TRIANGLE512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE512_NUM_CELLS   512
    +
    + +

    Definition at line 11 of file triangle512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE512_SAMPLERATE   512
    +
    + +

    Definition at line 12 of file triangle512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle512__int8_8h.js b/doc/html/triangle512__int8_8h.js new file mode 100644 index 000000000..0499bb243 --- /dev/null +++ b/doc/html/triangle512__int8_8h.js @@ -0,0 +1,6 @@ +var triangle512__int8_8h = +[ + [ "TRIANGLE512_NUM_CELLS", "triangle512__int8_8h.html#ac08e5bf93c03162e9bdd2fddcc338e13", null ], + [ "TRIANGLE512_SAMPLERATE", "triangle512__int8_8h.html#a1b2acb084c1e3db4faa2d714217d2aaf", null ], + [ "__attribute__", "triangle512__int8_8h.html#a2c1a360b10aecac585af3c2589d01541", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle512__int8_8h_source.html b/doc/html/triangle512__int8_8h_source.html index 191a58587..a56839adc 100644 --- a/doc/html/triangle512__int8_8h_source.html +++ b/doc/html/triangle512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle512_int8.h Source File +Mozzi: triangle512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,20 @@
    triangle512_int8.h
    -
    1 #ifndef TRIANGLE512_H_
    -
    2 #define TRIANGLE512_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE512_H_
    +
    2 #define TRIANGLE512_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define TRIANGLE512_NUM_CELLS 512
    -
    12 #define TRIANGLE512_SAMPLERATE 512
    -
    13 
    -
    14 const char __attribute__((progmem)) TRIANGLE512_DATA [] =
    +
    11 #define TRIANGLE512_NUM_CELLS 512
    +
    12 #define TRIANGLE512_SAMPLERATE 512
    +
    13 
    +
    14 const char __attribute__((progmem)) TRIANGLE512_DATA [] =
    15  {
    16  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
    17  12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
    @@ -150,14 +158,14 @@
    46  -10, -9, -8, -7, -6, -5, -4, -3, -2, -1
    47  };
    48 
    -
    49 #endif /* TRIANGLE512_H_ */
    +
    49 #endif /* TRIANGLE512_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_analogue512_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_ANALOGUE512_NUM_CELLS   512
     
    #define TRIANGLE_ANALOGUE512_SAMPLERATE   512
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_ANALOGUE512_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_ANALOGUE512_NUM_CELLS   512
    +
    + +

    Definition at line 14 of file triangle_analogue512_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_ANALOGUE512_SAMPLERATE   512
    +
    + +

    Definition at line 15 of file triangle_analogue512_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__analogue512__int8_8h.js b/doc/html/triangle__analogue512__int8_8h.js new file mode 100644 index 000000000..a627dcde1 --- /dev/null +++ b/doc/html/triangle__analogue512__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__analogue512__int8_8h = +[ + [ "TRIANGLE_ANALOGUE512_NUM_CELLS", "triangle__analogue512__int8_8h.html#a2d6d82e03b98557fc0e3277bf0f50266", null ], + [ "TRIANGLE_ANALOGUE512_SAMPLERATE", "triangle__analogue512__int8_8h.html#af8f14a478343b64ff4b21835396b2ba6", null ], + [ "__attribute__", "triangle__analogue512__int8_8h.html#a86a9f1982edfa06231f542b63c9d3cc5", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__analogue512__int8_8h_source.html b/doc/html/triangle__analogue512__int8_8h_source.html index b4d7869a6..ce2b793c9 100644 --- a/doc/html/triangle__analogue512__int8_8h_source.html +++ b/doc/html/triangle__analogue512__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_analogue512_int8.h Source File +Mozzi: triangle_analogue512_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_analogue512_int8.h
    -
    1 #ifndef TRIANGLE_ANALOGUE512_INT8_H_
    -
    2 #define TRIANGLE_ANALOGUE512_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_ANALOGUE512_INT8_H_
    +
    2 #define TRIANGLE_ANALOGUE512_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* generated "analogue" triangle wave from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_ANALOGUE512_NUM_CELLS 512
    -
    15 #define TRIANGLE_ANALOGUE512_SAMPLERATE 512
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_ANALOGUE512_DATA [] =
    +
    14 #define TRIANGLE_ANALOGUE512_NUM_CELLS 512
    +
    15 #define TRIANGLE_ANALOGUE512_SAMPLERATE 512
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_ANALOGUE512_DATA [] =
    18  {
    19  0, 1, 2, 2, 3, 4, 5, 6,
    20  7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
    @@ -152,14 +160,14 @@
    48  -9, -8, -7, -6, -5, -4, -3, -3, -2, -1,
    49  };
    50 
    -
    51 #endif /* TRIANGLE_ANALOGUE512_INT8_H_ */
    +
    51 #endif /* TRIANGLE_ANALOGUE512_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_dist_cubed_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_DIST_CUBED_2048_NUM_CELLS   2048
     
    #define TRIANGLE_DIST_CUBED_2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_DIST_CUBED_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_DIST_CUBED_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 14 of file triangle_dist_cubed_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_DIST_CUBED_2048_SAMPLERATE   2048
    +
    + +

    Definition at line 15 of file triangle_dist_cubed_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__dist__cubed__2048__int8_8h.js b/doc/html/triangle__dist__cubed__2048__int8_8h.js new file mode 100644 index 000000000..327b3c1b7 --- /dev/null +++ b/doc/html/triangle__dist__cubed__2048__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__dist__cubed__2048__int8_8h = +[ + [ "TRIANGLE_DIST_CUBED_2048_NUM_CELLS", "triangle__dist__cubed__2048__int8_8h.html#a94e8efe873dd5285b2c484e6ef6f9868", null ], + [ "TRIANGLE_DIST_CUBED_2048_SAMPLERATE", "triangle__dist__cubed__2048__int8_8h.html#aadeae7464f728af0795b3805411b1bd1", null ], + [ "__attribute__", "triangle__dist__cubed__2048__int8_8h.html#a5eb30ece3cf5a03f9943cf31f5cbb334", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__dist__cubed__2048__int8_8h_source.html b/doc/html/triangle__dist__cubed__2048__int8_8h_source.html index 9087dbdfb..21c1ad2d5 100644 --- a/doc/html/triangle__dist__cubed__2048__int8_8h_source.html +++ b/doc/html/triangle__dist__cubed__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_dist_cubed_2048_int8.h Source File +Mozzi: triangle_dist_cubed_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_dist_cubed_2048_int8.h
    -
    1 #ifndef TRIANGLE_DIST_CUBED_2048_H_
    -
    2 #define TRIANGLE_DIST_CUBED_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_DIST_CUBED_2048_H_
    +
    2 #define TRIANGLE_DIST_CUBED_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* triangle wave with distortion from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_DIST_CUBED_2048_NUM_CELLS 2048
    -
    15 #define TRIANGLE_DIST_CUBED_2048_SAMPLERATE 2048
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_DIST_CUBED_2048_DATA [] =
    +
    14 #define TRIANGLE_DIST_CUBED_2048_NUM_CELLS 2048
    +
    15 #define TRIANGLE_DIST_CUBED_2048_SAMPLERATE 2048
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_DIST_CUBED_2048_DATA [] =
    18  {
    19  38, 39, 39, 38, 38, 38,
    20  38, 38, 37, 38, 38, 37, 37, 37, 37, 37, 36, 37, 37, 36, 36, 36, 36, 36, 35, 36,
    @@ -234,14 +242,14 @@
    130  41, 40, 40, 41, 41, 40, 39, 40, 40, 39, 39, 38, 39, 39, 38, 39, 39, 38,
    131  };
    132 
    -
    133 #endif /* TRIANGLE_DIST_CUBED_2048_H_ */
    +
    133 #endif /* TRIANGLE_DIST_CUBED_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_dist_squared_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_DIST_SQUARED_2048_NUM_CELLS   2048
     
    #define TRIANGLE_DIST_SQUARED_2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_DIST_SQUARED_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_DIST_SQUARED_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 14 of file triangle_dist_squared_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_DIST_SQUARED_2048_SAMPLERATE   2048
    +
    + +

    Definition at line 15 of file triangle_dist_squared_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__dist__squared__2048__int8_8h.js b/doc/html/triangle__dist__squared__2048__int8_8h.js new file mode 100644 index 000000000..03568d06a --- /dev/null +++ b/doc/html/triangle__dist__squared__2048__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__dist__squared__2048__int8_8h = +[ + [ "TRIANGLE_DIST_SQUARED_2048_NUM_CELLS", "triangle__dist__squared__2048__int8_8h.html#a204ea5c31fe8d9a1164df115a2ee4a0e", null ], + [ "TRIANGLE_DIST_SQUARED_2048_SAMPLERATE", "triangle__dist__squared__2048__int8_8h.html#a510b8f66081f75af29bc514ae9d27fe1", null ], + [ "__attribute__", "triangle__dist__squared__2048__int8_8h.html#a1d689ec47e8ac49b05609ac2acd57ccc", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__dist__squared__2048__int8_8h_source.html b/doc/html/triangle__dist__squared__2048__int8_8h_source.html index c55946c73..7f7dfb9a9 100644 --- a/doc/html/triangle__dist__squared__2048__int8_8h_source.html +++ b/doc/html/triangle__dist__squared__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_dist_squared_2048_int8.h Source File +Mozzi: triangle_dist_squared_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_dist_squared_2048_int8.h
    -
    1 #ifndef TRIANGLE_DIST_SQUARED_2048_H_
    -
    2 #define TRIANGLE_DIST_SQUARED_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_DIST_SQUARED_2048_H_
    +
    2 #define TRIANGLE_DIST_SQUARED_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* triangle wave with distortion from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_DIST_SQUARED_2048_NUM_CELLS 2048
    -
    15 #define TRIANGLE_DIST_SQUARED_2048_SAMPLERATE 2048
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_DIST_SQUARED_2048_DATA [] =
    +
    14 #define TRIANGLE_DIST_SQUARED_2048_NUM_CELLS 2048
    +
    15 #define TRIANGLE_DIST_SQUARED_2048_SAMPLERATE 2048
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_DIST_SQUARED_2048_DATA [] =
    18  {
    19  16, 16, 16, 16, 15, 16,
    20  16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15,
    @@ -220,14 +228,14 @@
    116  16,
    117  };
    118 
    -
    119 #endif /* TRIANGLE_DIST_SQUARED_2048_H_ */
    +
    119 #endif /* TRIANGLE_DIST_SQUARED_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_hermes_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_HERMES_2048_NUM_CELLS   2048
     
    #define TRIANGLE_HERMES_2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_HERMES_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_HERMES_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 14 of file triangle_hermes_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_HERMES_2048_SAMPLERATE   2048
    +
    + +

    Definition at line 15 of file triangle_hermes_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__hermes__2048__int8_8h.js b/doc/html/triangle__hermes__2048__int8_8h.js new file mode 100644 index 000000000..f2cfe1e29 --- /dev/null +++ b/doc/html/triangle__hermes__2048__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__hermes__2048__int8_8h = +[ + [ "TRIANGLE_HERMES_2048_NUM_CELLS", "triangle__hermes__2048__int8_8h.html#a1b588fdd5e36aacb64417f7338a64e4f", null ], + [ "TRIANGLE_HERMES_2048_SAMPLERATE", "triangle__hermes__2048__int8_8h.html#aea4a15a35ce8345460190fc91cd60464", null ], + [ "__attribute__", "triangle__hermes__2048__int8_8h.html#ae83da6f15fd670c6e8be1b90d5324a33", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__hermes__2048__int8_8h_source.html b/doc/html/triangle__hermes__2048__int8_8h_source.html index 21232982e..37df27834 100644 --- a/doc/html/triangle__hermes__2048__int8_8h_source.html +++ b/doc/html/triangle__hermes__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_hermes_2048_int8.h Source File +Mozzi: triangle_hermes_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_hermes_2048_int8.h
    -
    1 #ifndef TRIANGLE_HERMES_2048_H_
    -
    2 #define TRIANGLE_HERMES_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_HERMES_2048_H_
    +
    2 #define TRIANGLE_HERMES_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* triangle wave with distortion from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_HERMES_2048_NUM_CELLS 2048
    -
    15 #define TRIANGLE_HERMES_2048_SAMPLERATE 2048
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_HERMES_2048_DATA [] =
    +
    14 #define TRIANGLE_HERMES_2048_NUM_CELLS 2048
    +
    15 #define TRIANGLE_HERMES_2048_SAMPLERATE 2048
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_HERMES_2048_DATA [] =
    18  {
    19  -1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
    20  0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3,
    @@ -239,14 +247,14 @@
    135  -1, -1, -1, -1, -1, -1, -1,
    136  };
    137 
    -
    138 #endif /* TRIANGLE_HERMES_2048_H_ */
    +
    138 #endif /* TRIANGLE_HERMES_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_valve_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_VALVE_2048_NUM_CELLS   2048
     
    #define TRIANGLE_VALVE_2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_VALVE_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_VALVE_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 14 of file triangle_valve_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_VALVE_2048_SAMPLERATE   2048
    +
    + +

    Definition at line 15 of file triangle_valve_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__valve__2048__int8_8h.js b/doc/html/triangle__valve__2048__int8_8h.js new file mode 100644 index 000000000..94e7115a0 --- /dev/null +++ b/doc/html/triangle__valve__2048__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__valve__2048__int8_8h = +[ + [ "TRIANGLE_VALVE_2048_NUM_CELLS", "triangle__valve__2048__int8_8h.html#acd7af0d01415a1dce2c89ef0fd22256f", null ], + [ "TRIANGLE_VALVE_2048_SAMPLERATE", "triangle__valve__2048__int8_8h.html#a0c49474824dd6b6f157fd52ff73f3d2f", null ], + [ "__attribute__", "triangle__valve__2048__int8_8h.html#a71813c3d23b1539f60124e031562bba7", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__valve__2048__int8_8h_source.html b/doc/html/triangle__valve__2048__int8_8h_source.html index d3613b5c5..94abbcf84 100644 --- a/doc/html/triangle__valve__2048__int8_8h_source.html +++ b/doc/html/triangle__valve__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_valve_2048_int8.h Source File +Mozzi: triangle_valve_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_valve_2048_int8.h
    -
    1 #ifndef TRIANGLE_VALVE_2048_H_
    -
    2 #define TRIANGLE_VALVE_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_VALVE_2048_H_
    +
    2 #define TRIANGLE_VALVE_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* triangle wave with distortion from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_VALVE_2048_NUM_CELLS 2048
    -
    15 #define TRIANGLE_VALVE_2048_SAMPLERATE 2048
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_VALVE_2048_DATA [] =
    +
    14 #define TRIANGLE_VALVE_2048_NUM_CELLS 2048
    +
    15 #define TRIANGLE_VALVE_2048_SAMPLERATE 2048
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_VALVE_2048_DATA [] =
    18  {
    19  22, 22, 22, 23, 23, 23, 23, 23,
    20  24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27,
    @@ -238,14 +246,14 @@
    134  21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23,
    135  };
    136 
    -
    137 #endif /* TRIANGLE_VALVE_2048_H_ */
    +
    137 #endif /* TRIANGLE_VALVE_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_valve_2_2048_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_VALVE_2_2048_NUM_CELLS   2048
     
    #define TRIANGLE_VALVE_2_2048_SAMPLERATE   2048
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_VALVE_2_2048_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_VALVE_2_2048_NUM_CELLS   2048
    +
    + +

    Definition at line 14 of file triangle_valve_2_2048_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_VALVE_2_2048_SAMPLERATE   2048
    +
    + +

    Definition at line 15 of file triangle_valve_2_2048_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__valve__2__2048__int8_8h.js b/doc/html/triangle__valve__2__2048__int8_8h.js new file mode 100644 index 000000000..27705d2af --- /dev/null +++ b/doc/html/triangle__valve__2__2048__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__valve__2__2048__int8_8h = +[ + [ "TRIANGLE_VALVE_2_2048_NUM_CELLS", "triangle__valve__2__2048__int8_8h.html#a720badae80100f0d998097e946c67259", null ], + [ "TRIANGLE_VALVE_2_2048_SAMPLERATE", "triangle__valve__2__2048__int8_8h.html#a93fad7cfb31ba7eb1fc45b496beb075f", null ], + [ "__attribute__", "triangle__valve__2__2048__int8_8h.html#a58da93bc74824244151e36781f8db0c8", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__valve__2__2048__int8_8h_source.html b/doc/html/triangle__valve__2__2048__int8_8h_source.html index 476ed7164..ff2553a45 100644 --- a/doc/html/triangle__valve__2__2048__int8_8h_source.html +++ b/doc/html/triangle__valve__2__2048__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_valve_2_2048_int8.h Source File +Mozzi: triangle_valve_2_2048_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_valve_2_2048_int8.h
    -
    1 #ifndef TRIANGLE_VALVE_2_2048_H_
    -
    2 #define TRIANGLE_VALVE_2_2048_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_VALVE_2_2048_H_
    +
    2 #define TRIANGLE_VALVE_2_2048_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* triangle wave with distortion from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_VALVE_2_2048_NUM_CELLS 2048
    -
    15 #define TRIANGLE_VALVE_2_2048_SAMPLERATE 2048
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_VALVE_2_2048_DATA [] =
    +
    14 #define TRIANGLE_VALVE_2_2048_NUM_CELLS 2048
    +
    15 #define TRIANGLE_VALVE_2_2048_SAMPLERATE 2048
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_VALVE_2_2048_DATA [] =
    18  {
    19  52, 52, 53, 53, 53, 54, 54,
    20  54, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 58, 58, 58, 59, 59, 59, 59, 60, 60,
    @@ -244,14 +252,14 @@
    140  49, 49, 50, 50, 50, 51, 51, 51,
    141  };
    142 
    -
    143 #endif /* TRIANGLE_VALVE_2_2048_H_ */
    +
    143 #endif /* TRIANGLE_VALVE_2_2048_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    triangle_warm8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define TRIANGLE_WARM8192_NUM_CELLS   8192
     
    #define TRIANGLE_WARM8192_SAMPLERATE   8192
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) TRIANGLE_WARM8192_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define TRIANGLE_WARM8192_NUM_CELLS   8192
    +
    + +

    Definition at line 14 of file triangle_warm8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define TRIANGLE_WARM8192_SAMPLERATE   8192
    +
    + +

    Definition at line 15 of file triangle_warm8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/triangle__warm8192__int8_8h.js b/doc/html/triangle__warm8192__int8_8h.js new file mode 100644 index 000000000..c14b7d1cd --- /dev/null +++ b/doc/html/triangle__warm8192__int8_8h.js @@ -0,0 +1,6 @@ +var triangle__warm8192__int8_8h = +[ + [ "TRIANGLE_WARM8192_NUM_CELLS", "triangle__warm8192__int8_8h.html#a94aa4d266f1139fe4f03848add71bcb6", null ], + [ "TRIANGLE_WARM8192_SAMPLERATE", "triangle__warm8192__int8_8h.html#a456d9733ea649c168b186a72a333d397", null ], + [ "__attribute__", "triangle__warm8192__int8_8h.html#a848feaa8b5705ed03b1c0dc3d1c70b22", null ] +]; \ No newline at end of file diff --git a/doc/html/triangle__warm8192__int8_8h_source.html b/doc/html/triangle__warm8192__int8_8h_source.html index d55004875..27a855d70 100644 --- a/doc/html/triangle__warm8192__int8_8h_source.html +++ b/doc/html/triangle__warm8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/triangle_warm8192_int8.h Source File +Mozzi: triangle_warm8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    triangle_warm8192_int8.h
    -
    1 #ifndef TRIANGLE_WARM8192_INT8_H_
    -
    2 #define TRIANGLE_WARM8192_INT8_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef TRIANGLE_WARM8192_INT8_H_
    +
    2 #define TRIANGLE_WARM8192_INT8_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* triangle wave with "warmth" from Audacity
    12 */
    13 
    -
    14 #define TRIANGLE_WARM8192_NUM_CELLS 8192
    -
    15 #define TRIANGLE_WARM8192_SAMPLERATE 8192
    -
    16 
    -
    17 const char __attribute__((progmem)) TRIANGLE_WARM8192_DATA [] =
    +
    14 #define TRIANGLE_WARM8192_NUM_CELLS 8192
    +
    15 #define TRIANGLE_WARM8192_SAMPLERATE 8192
    +
    16 
    +
    17 const char __attribute__((progmem)) TRIANGLE_WARM8192_DATA [] =
    18  {
    19  0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
    20  1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
    @@ -601,14 +609,14 @@
    497  0, 0, 0, 0,
    498  };
    499 
    -
    500 #endif /* TRIANGLE_WARM8192_INT8_H_ */
    +
    500 #endif /* TRIANGLE_WARM8192_INT8_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    twi_nonblock.cpp File Reference
    +
    +
    +
    #include "twi_nonblock.h"
    +#include <avr/interrupt.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void initialize_twi_nonblock ()
     
    uint8_t twowire_requestFromBlocking (uint8_t address, uint8_t quantity)
     
    void twowire_beginTransmission (uint8_t address)
     
    void twowire_send (uint8_t data)
     
    uint8_t twowire_endTransmission (void)
     
    uint8_t twi_readFromBlocking (uint8_t address, uint8_t *data, uint8_t length)
     TODO: make non-blocking. More...
     
    uint8_t twi_initiateReadFrom (uint8_t address, uint8_t length)
     -------— non-blocking version -------— More...
     
    void twi_continueReadFrom ()
     
    uint8_t twi_readMasterBuffer (uint8_t *data, uint8_t length)
     
    uint8_t twi_writeToBlocking (uint8_t address, uint8_t *data, uint8_t length, uint8_t wait)
     -—end—— non-blocking version ----—— More...
     
    uint8_t twi_initiateWriteTo (uint8_t address, uint8_t *data, uint8_t length)
     --------------— non-blocking ------— More...
     
    void twi_continueWriteTo ()
     
    void twi_reply (uint8_t ack)
     
    void twi_stop (void)
     
    void twi_releaseBus (void)
     
     ISR (TWI_vect)
     
    + + + + + + + + + + + +

    +Variables

    uint8_t twi_writeAddress
     
    uint8_t * twi_writeData
     
    uint8_t twi_writeLength
     
    uint8_t twi_readAddress
     
    uint8_t twi_readLength
     
    +

    Function Documentation

    + +
    +
    + + + + + + + +
    void initialize_twi_nonblock ()
    +
    + +

    Definition at line 38 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    ISR (TWI_vect )
    +
    + +

    Definition at line 461 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + +
    void twi_continueReadFrom ()
    +
    + +

    Definition at line 220 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + +
    void twi_continueWriteTo ()
    +
    + +

    Definition at line 359 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    uint8_t twi_initiateReadFrom (uint8_t address,
    uint8_t length 
    )
    +
    +

    non-blocking functions:

    + +

    Definition at line 192 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    uint8_t twi_initiateWriteTo (uint8_t address,
    uint8_t * data,
    uint8_t length 
    )
    +
    + +

    Definition at line 332 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    uint8_t twi_readFromBlocking (uint8_t address,
    uint8_t * data,
    uint8_t length 
    )
    +
    +

    blocking versions:

    + +

    Definition at line 137 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    uint8_t twi_readMasterBuffer (uint8_t * data,
    uint8_t length 
    )
    +
    + +

    Definition at line 245 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twi_releaseBus (void )
    +
    + +

    Definition at line 444 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twi_reply (uint8_t ack)
    +
    + +

    Definition at line 397 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twi_stop (void )
    +
    + +

    Definition at line 415 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    uint8_t twi_writeToBlocking (uint8_t address,
    uint8_t * data,
    uint8_t length,
    uint8_t wait 
    )
    +
    +

    TODO: make non-blocking

    + +

    Definition at line 278 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twowire_beginTransmission (uint8_t address)
    +
    + +

    Definition at line 90 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    uint8_t twowire_endTransmission (void )
    +
    + +

    Definition at line 115 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    uint8_t twowire_requestFromBlocking (uint8_t address,
    uint8_t quantity 
    )
    +
    + +

    Definition at line 75 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twowire_send (uint8_t data)
    +
    + +

    Definition at line 100 of file twi_nonblock.cpp.

    + +
    +
    +

    Variable Documentation

    + +
    +
    + + + + +
    uint8_t twi_readAddress
    +
    + +

    Definition at line 28 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + +
    uint8_t twi_readLength
    +
    + +

    Definition at line 30 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + +
    uint8_t twi_writeAddress
    +
    + +

    Definition at line 24 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + +
    uint8_t* twi_writeData
    +
    + +

    Definition at line 25 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + +
    uint8_t twi_writeLength
    +
    + +

    Definition at line 26 of file twi_nonblock.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/twi__nonblock_8cpp.js b/doc/html/twi__nonblock_8cpp.js new file mode 100644 index 000000000..466593ac4 --- /dev/null +++ b/doc/html/twi__nonblock_8cpp.js @@ -0,0 +1,24 @@ +var twi__nonblock_8cpp = +[ + [ "initialize_twi_nonblock", "twi__nonblock_8cpp.html#af181de038aef868afdc2add729c0bbb5", null ], + [ "ISR", "twi__nonblock_8cpp.html#a474f42eedbdc093683fdb4b88be3c48f", null ], + [ "twi_continueReadFrom", "twi__nonblock_8cpp.html#a024f9a641b67863de23a45cea1a49d35", null ], + [ "twi_continueWriteTo", "twi__nonblock_8cpp.html#a5443fa2d7cdb3dcca731ffbeb3b025e1", null ], + [ "twi_initiateReadFrom", "twi__nonblock_8cpp.html#a2d3c2b5761e61ce7b6da0bf582157e64", null ], + [ "twi_initiateWriteTo", "twi__nonblock_8cpp.html#ac8f66f76ece44f2726190477727ce01c", null ], + [ "twi_readFromBlocking", "twi__nonblock_8cpp.html#a1fa89bb0f151e2e194cab9b2ef795ec7", null ], + [ "twi_readMasterBuffer", "twi__nonblock_8cpp.html#a1d70026061f6fadd1e3724239b8e5bc2", null ], + [ "twi_releaseBus", "twi__nonblock_8cpp.html#a7f830793058786f5597ddd1d80b885ae", null ], + [ "twi_reply", "twi__nonblock_8cpp.html#a19f62ca29970133e675862b58d2f3ac3", null ], + [ "twi_stop", "twi__nonblock_8cpp.html#acf52d6c93df110dee6d402b389e5042e", null ], + [ "twi_writeToBlocking", "twi__nonblock_8cpp.html#a59f5035172d7bd0dfa20bd29e15075fb", null ], + [ "twowire_beginTransmission", "twi__nonblock_8cpp.html#af903bddac63f885f3182a322eb825439", null ], + [ "twowire_endTransmission", "twi__nonblock_8cpp.html#a3aa463df29bfc6f3ef887a53294c2e44", null ], + [ "twowire_requestFromBlocking", "twi__nonblock_8cpp.html#adec4b6aa4b5b78eb1be4e5b45edd4658", null ], + [ "twowire_send", "twi__nonblock_8cpp.html#a3502e282ddd534ba143095e0d1e6153f", null ], + [ "twi_readAddress", "twi__nonblock_8cpp.html#aed5375dc61085765e8750432f3c672f8", null ], + [ "twi_readLength", "twi__nonblock_8cpp.html#aba7d6a819d622ac6cc9a147818e9211a", null ], + [ "twi_writeAddress", "twi__nonblock_8cpp.html#a702a914d930f045d63d2fddc9ffaddfe", null ], + [ "twi_writeData", "twi__nonblock_8cpp.html#ab1f8b6deaee4fb6748f6ba6972d0ffb7", null ], + [ "twi_writeLength", "twi__nonblock_8cpp.html#ac55749f23240fc81b5d7e79155d5f9a6", null ] +]; \ No newline at end of file diff --git a/doc/html/twi__nonblock_8cpp_source.html b/doc/html/twi__nonblock_8cpp_source.html index 79d1676a1..c116557c5 100644 --- a/doc/html/twi__nonblock_8cpp_source.html +++ b/doc/html/twi__nonblock_8cpp_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    twi_nonblock.cpp
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * twi_nonblock.cpp
    3  *
    4  * Copyright 2012 Marije Baalman.
    @@ -120,18 +128,18 @@
    16  * You should have received a copy of the GNU General Public License
    17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    18  */
    -
    19 
    -
    20 #include "twi_nonblock.h"
    +
    19 
    +
    20 #include "twi_nonblock.h"
    21 
    -
    22 #include <avr/interrupt.h>
    +
    22 #include <avr/interrupt.h>
    23 
    -
    24 uint8_t twi_writeAddress;
    -
    25 uint8_t * twi_writeData;
    -
    26 uint8_t twi_writeLength;
    + + +
    27 
    -
    28 uint8_t twi_readAddress;
    +
    29 // uint8_t * twi_writeData;
    -
    30 uint8_t twi_readLength;
    +
    31 
    32 /*
    33  * Function twi_init
    @@ -139,32 +147,32 @@
    35  * Input none
    36  * Output none
    37  */
    -
    38 void initialize_twi_nonblock(){
    +
    39  rxBufferIndex = 0;
    40  rxBufferLength = 0;
    41 
    42  txBufferIndex = 0;
    -
    43  txBufferLength = 0;
    +
    43  txBufferLength = 0;
    44 
    45  // initialize state
    -
    46  twi_state = TWI_READY;
    +
    46  twi_state = TWI_READY;
    47 
    -
    48  #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__)
    -
    49  // activate internal pull-ups for twi
    +
    48  #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__)
    +
    49  // activate internal pull-ups for twi
    50  // as per note from atmega8 manual pg167
    51  sbi(PORTC, 4);
    52  sbi(PORTC, 5);
    -
    53  #else
    -
    54  // activate internal pull-ups for twi
    +
    53  #else
    +
    54  // activate internal pull-ups for twi
    55  // as per note from atmega128 manual pg204
    -
    56  sbi(PORTD, 0);
    -
    57  sbi(PORTD, 1);
    -
    58  #endif
    -
    59 
    +
    56  sbi(PORTD, 0);
    +
    57  sbi(PORTD, 1);
    +
    58  #endif
    +
    59 
    60  // initialize twi prescaler and bit rate
    -
    61  cbi(TWSR, TWPS0);
    -
    62  cbi(TWSR, TWPS1);
    -
    63  TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
    +
    61  cbi(TWSR, TWPS0);
    +
    62  cbi(TWSR, TWPS1);
    +
    63  TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
    64 
    65  /* twi bit rate formula from atmega128 manual pg 204
    66  SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR))
    @@ -176,11 +184,11 @@
    72 }
    73 
    74 
    -
    75 uint8_t twowire_requestFromBlocking(uint8_t address, uint8_t quantity)
    +
    76 {
    77  // clamp to buffer length
    -
    78  if(quantity > BUFFER_LENGTH){
    -
    79  quantity = BUFFER_LENGTH;
    +
    78  if(quantity > BUFFER_LENGTH){
    +
    79  quantity = BUFFER_LENGTH;
    80  }
    81  // perform blocking read into buffer
    82  uint8_t read = twi_readFromBlocking(address, rxBuffer, quantity);
    @@ -191,21 +199,21 @@
    87  return read;
    88 }
    89 
    -
    90 void twowire_beginTransmission( uint8_t address ){
    +
    90 void twowire_beginTransmission( uint8_t address ){
    91  // indicate that we are transmitting
    92  transmitting = 1;
    93  // set address of targeted slave
    94  txAddress = address;
    95  // reset tx buffer iterator vars
    96  txBufferIndex = 0;
    -
    97  txBufferLength = 0;
    +
    97  txBufferLength = 0;
    98 }
    99 
    -
    100 void twowire_send( uint8_t data ){
    +
    100 void twowire_send( uint8_t data ){
    101  if(transmitting){
    102  // in master transmitter mode
    103  // don't bother if buffer is full
    -
    104  if(txBufferLength >= BUFFER_LENGTH){
    +
    104  if(txBufferLength >= BUFFER_LENGTH){
    105  return;
    106  }
    107  // put byte in tx buffer
    @@ -213,10 +221,10 @@
    109  ++txBufferIndex;
    110  // update amount in buffer
    111  txBufferLength = txBufferIndex;
    -
    112  }
    +
    112  }
    113 }
    114 
    -
    115 uint8_t twowire_endTransmission(void)
    +
    116 {
    117  // transmit buffer (blocking)
    118  int8_t ret = twi_writeToBlocking(txAddress, txBuffer, txBufferLength, 1);
    @@ -237,21 +245,22 @@
    133  * length: number of bytes to read into array
    134  * Output number of bytes read
    135  */
    -
    137 uint8_t twi_readFromBlocking(uint8_t address, uint8_t* data, uint8_t length)
    +
    136 /// TODO: make non-blocking
    +
    138 {
    139  uint8_t i;
    140 
    141  // ensure data will fit into buffer
    -
    142  if(TWI_BUFFER_LENGTH < length){
    +
    142  if(TWI_BUFFER_LENGTH < length){
    143  return 0;
    144  }
    145 
    146  // wait until twi is ready, become master receiver
    -
    147  while(TWI_READY != twi_state){
    +
    147  while(TWI_READY != twi_state){
    148  continue;
    149  }
    -
    150 
    -
    151  twi_state = TWI_MRX;
    +
    150 
    +
    151  twi_state = TWI_MRX;
    152  // reset error state (0xFF.. no error occured)
    153  twi_error = 0xFF;
    154 
    @@ -272,7 +281,7 @@
    169  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);
    170 
    171  // wait for read operation to complete
    -
    172  while(TWI_MRX == twi_state){
    +
    172  while(TWI_MRX == twi_state){
    173  continue;
    174  }
    175 
    @@ -283,29 +292,30 @@
    180  for(i = 0; i < length; ++i){
    181  data[i] = twi_masterBuffer[i];
    182  }
    -
    183 
    +
    183 
    184  return length;
    185 }
    186 
    187 
    188 
    +
    189 /// ---------- non-blocking version ----------
    190 
    191 
    -
    192 uint8_t twi_initiateReadFrom(uint8_t address, uint8_t length)
    +
    193 {
    194 
    195  // ensure data will fit into buffer
    -
    196  if(TWI_BUFFER_LENGTH < length){
    +
    196  if(TWI_BUFFER_LENGTH < length){
    197  return 0;
    198  }
    -
    199 
    +
    199 
    200  twi_readLength = length;
    201  twi_readAddress = address;
    -
    202 
    -
    203  if ( TWI_READY == twi_state ){
    +
    202 
    +
    203  if ( TWI_READY == twi_state ){
    204  twi_continueReadFrom();
    205  } else {
    -
    206  twi_state = TWI_PRE_MRX;
    +
    206  twi_state = TWI_PRE_MRX;
    207  }
    208  if (twi_error == 0xFF)
    209  return 0; // success
    @@ -319,9 +329,9 @@
    217 
    218 
    219 
    -
    220 void twi_continueReadFrom(){
    -
    221 
    -
    222  twi_state = TWI_MRX;
    + +
    221 
    +
    222  twi_state = TWI_MRX;
    223  // reset error state (0xFF.. no error occured)
    224  twi_error = 0xFF;
    225 
    @@ -344,7 +354,7 @@
    242 
    243 
    244 
    -
    245 uint8_t twi_readMasterBuffer( uint8_t* data, uint8_t length ){
    +
    246  uint8_t i;
    247  if (twi_masterBufferIndex < length)
    248  length = twi_masterBufferIndex;
    @@ -353,12 +363,13 @@
    251  for(i = 0; i < length; ++i){
    252  data[i] = twi_masterBuffer[i];
    253  }
    -
    254 
    +
    254 
    255  return length;
    256 }
    257 
    258 
    259 
    +
    260 /// ----end------ non-blocking version ----------
    261 
    262 
    263 /*
    @@ -375,45 +386,46 @@
    274  * 3 .. data send, NACK received
    275  * 4 .. other twi error (lost bus arbitration, bus error, ..)
    276  */
    -
    278 uint8_t twi_writeToBlocking(uint8_t address, uint8_t* data, uint8_t length, uint8_t wait)
    +
    277 /// TODO: make non-blocking
    +
    279 {
    280  uint8_t i;
    281 
    282  // ensure data will fit into buffer
    -
    283  if(TWI_BUFFER_LENGTH < length){
    +
    283  if(TWI_BUFFER_LENGTH < length){
    284  return 1;
    285  }
    286 
    287  // wait until twi is ready, become master transmitter
    -
    288  while(TWI_READY != twi_state){
    +
    288  while(TWI_READY != twi_state){
    289  continue;
    290  }
    291 
    -
    292  twi_state = TWI_MTX;
    +
    292  twi_state = TWI_MTX;
    293  // reset error state (0xFF.. no error occured)
    294  twi_error = 0xFF;
    295 
    296  // initialize buffer iteration vars
    297  twi_masterBufferIndex = 0;
    298  twi_masterBufferLength = length;
    -
    299 
    +
    299 
    300  // copy data to twi buffer
    301  for(i = 0; i < length; ++i){
    302  twi_masterBuffer[i] = data[i];
    303  }
    -
    304 
    +
    304 
    305  // build sla+w, slave device address + w bit
    306  twi_slarw = TW_WRITE;
    307  twi_slarw |= address << 1;
    -
    308 
    +
    308 
    309  // send start condition
    310  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);
    311 
    312  // wait for write operation to complete
    -
    313  while(wait && (TWI_MTX == twi_state)){
    +
    313  while(wait && (TWI_MTX == twi_state)){
    314  continue;
    315  }
    -
    316 
    +
    316 
    317  if (twi_error == 0xFF)
    318  return 0; // success
    319  else if (twi_error == TW_MT_SLA_NACK)
    @@ -426,22 +438,23 @@
    326 
    327 
    328 
    +
    329 /// ----------------- non-blocking ---------
    330 
    331 
    -
    332 uint8_t twi_initiateWriteTo(uint8_t address, uint8_t* data, uint8_t length )
    +
    333 {
    334  // ensure data will fit into buffer
    -
    335  if(TWI_BUFFER_LENGTH < length){
    +
    335  if(TWI_BUFFER_LENGTH < length){
    336  return 1;
    337  }
    338  twi_writeAddress = address;
    339  twi_writeData = data;
    340  twi_writeLength = length;
    341 
    -
    342  if ( TWI_READY == twi_state ){
    +
    342  if ( TWI_READY == twi_state ){
    343  twi_continueWriteTo();
    344  } else {
    -
    345  twi_state = TWI_PRE_MTX;
    +
    345  twi_state = TWI_PRE_MTX;
    346  }
    347  if (twi_error == 0xFF)
    348  return 0; // success
    @@ -455,30 +468,30 @@
    356 
    357 
    358 
    -
    359 void twi_continueWriteTo(){
    +
    360  uint8_t i;
    361  // wait until twi is ready, become master transmitter
    362 // while(TWI_READY != twi_state){
    363 // continue;
    364 // }
    365 
    -
    366  twi_state = TWI_MTX;
    +
    366  twi_state = TWI_MTX;
    367  // reset error state (0xFF.. no error occured)
    368  twi_error = 0xFF;
    369 
    370  // initialize buffer iteration vars
    371  twi_masterBufferIndex = 0;
    372  twi_masterBufferLength = twi_writeLength;
    -
    373 
    +
    373 
    374  // copy data to twi buffer
    375  for(i = 0; i < twi_writeLength; ++i){
    376  twi_masterBuffer[i] = twi_writeData[i];
    377  }
    -
    378 
    +
    378 
    379  // build sla+w, slave device address + w bit
    380  twi_slarw = TW_WRITE;
    381  twi_slarw |= twi_writeAddress << 1;
    -
    382 
    +
    382 
    383  // send start condition
    384  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);
    385 }
    @@ -493,7 +506,7 @@
    394  * Input ack: byte indicating to ack or to nack
    395  * Output none
    396  */
    -
    397 void twi_reply(uint8_t ack)
    +
    397 void twi_reply(uint8_t ack)
    398 {
    399  // transmit master read ready signal, with or without ack
    400  if(ack){
    @@ -511,7 +524,7 @@
    412  * Input none
    413  * Output none
    414  */
    -
    415 void twi_stop(void)
    +
    415 void twi_stop(void)
    416 {
    417  // send stop condition
    418  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);
    @@ -524,10 +537,10 @@
    425 
    426  twi_oldstate = twi_state;
    427  // update twi state
    -
    428  twi_state = TWI_READY;
    -
    429  if ( twi_oldstate == TWI_PRE_MTX ){
    +
    428  twi_state = TWI_READY;
    +
    429  if ( twi_oldstate == TWI_PRE_MTX ){
    430  twi_continueWriteTo();
    -
    431  } else if ( twi_oldstate == TWI_PRE_MRX ){
    +
    431  } else if ( twi_oldstate == TWI_PRE_MRX ){
    432  twi_continueReadFrom();
    433  }
    434 }
    @@ -540,24 +553,24 @@
    441  * Input none
    442  * Output none
    443  */
    -
    444 void twi_releaseBus(void)
    +
    444 void twi_releaseBus(void)
    445 {
    446  // release bus
    447  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);
    448 
    449  twi_oldstate = twi_state;
    450  // update twi state
    -
    451  twi_state = TWI_READY;
    -
    452  if ( twi_oldstate == TWI_PRE_MTX ){
    +
    451  twi_state = TWI_READY;
    +
    452  if ( twi_oldstate == TWI_PRE_MTX ){
    453  twi_continueWriteTo();
    -
    454  } else if ( twi_oldstate == TWI_PRE_MRX ){
    +
    454  } else if ( twi_oldstate == TWI_PRE_MRX ){
    455  twi_continueReadFrom();
    456  }
    457 }
    458 
    459 // SIGNAL(TWI_vect)
    460 // ISR(TWI_vect, ISR_NOBLOCK )
    -
    461 ISR(TWI_vect)
    +
    461 ISR(TWI_vect)
    462 {
    463  switch(TW_STATUS){
    464  // All Master
    @@ -706,8 +719,8 @@
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    twi_nonblock.h File Reference
    +
    +
    +
    #include "Arduino.h"
    +#include <compat/twi.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Macros

    #define cbi(sfr, bit)   (_SFR_BYTE(sfr) &= ~_BV(bit))
     
    #define sbi(sfr, bit)   (_SFR_BYTE(sfr) |= _BV(bit))
     
    #define TWI_FREQ   100000L
     
    #define TWI_BUFFER_LENGTH   32
     
    #define TWI_READY   0
     
    #define TWI_PRE_MRX   1
     
    #define TWI_MRX   2
     
    #define TWI_PRE_MTX   3
     
    #define TWI_MTX   4
     
    #define TWI_SRX   5
     
    #define TWI_STX   6
     
    #define BUFFER_LENGTH   32
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void initialize_twi_nonblock ()
     
    uint8_t twowire_requestFrom (uint8_t address, uint8_t quantity)
     
    void twowire_beginTransmission (uint8_t address)
     
    void twowire_send (uint8_t data)
     
    uint8_t twowire_endTransmission (void)
     
    uint8_t twi_initiateReadFrom (uint8_t address, uint8_t length)
     non-blocking functions: More...
     
    void twi_continueReadFrom ()
     
    uint8_t twi_readMasterBuffer (uint8_t *data, uint8_t length)
     
    uint8_t twi_initiateWriteTo (uint8_t address, uint8_t *data, uint8_t length)
     --------------— non-blocking ------— More...
     
    void twi_continueWriteTo ()
     
    void twi_reply (uint8_t ack)
     
    void twi_stop (void)
     
    void twi_releaseBus (void)
     
    uint8_t twi_readFromBlocking (uint8_t address, uint8_t *data, uint8_t length)
     blocking versions: More...
     
    uint8_t twi_writeToBlocking (uint8_t address, uint8_t *data, uint8_t length, uint8_t wait)
     -—end—— non-blocking version ----—— More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define BUFFER_LENGTH   32
    +
    + +

    Definition at line 58 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    #define cbi( sfr,
     bit 
    )   (_SFR_BYTE(sfr) &= ~_BV(bit))
    +
    + +

    Definition at line 27 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    #define sbi( sfr,
     bit 
    )   (_SFR_BYTE(sfr) |= _BV(bit))
    +
    + +

    Definition at line 28 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_BUFFER_LENGTH   32
    +
    + +

    Definition at line 36 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_FREQ   100000L
    +
    + +

    Definition at line 32 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_MRX   2
    +
    + +

    Definition at line 41 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_MTX   4
    +
    + +

    Definition at line 43 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_PRE_MRX   1
    +
    + +

    Definition at line 40 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_PRE_MTX   3
    +
    + +

    Definition at line 42 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_READY   0
    +
    + +

    Definition at line 39 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_SRX   5
    +
    + +

    Definition at line 44 of file twi_nonblock.h.

    + +
    +
    + +
    +
    + + + + +
    #define TWI_STX   6
    +
    + +

    Definition at line 45 of file twi_nonblock.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + +
    void initialize_twi_nonblock ()
    +
    + +

    Definition at line 38 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + +
    void twi_continueReadFrom ()
    +
    + +

    Definition at line 220 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + +
    void twi_continueWriteTo ()
    +
    + +

    Definition at line 359 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    uint8_t twi_initiateReadFrom (uint8_t address,
    uint8_t length 
    )
    +
    + +

    Definition at line 192 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    uint8_t twi_initiateWriteTo (uint8_t address,
    uint8_t * data,
    uint8_t length 
    )
    +
    + +

    Definition at line 332 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    uint8_t twi_readFromBlocking (uint8_t address,
    uint8_t * data,
    uint8_t length 
    )
    +
    + +

    Definition at line 137 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    uint8_t twi_readMasterBuffer (uint8_t * data,
    uint8_t length 
    )
    +
    + +

    Definition at line 245 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twi_releaseBus (void )
    +
    + +

    Definition at line 444 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twi_reply (uint8_t ack)
    +
    + +

    Definition at line 397 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twi_stop (void )
    +
    + +

    Definition at line 415 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    uint8_t twi_writeToBlocking (uint8_t address,
    uint8_t * data,
    uint8_t length,
    uint8_t wait 
    )
    +
    +

    TODO: make non-blocking

    + +

    Definition at line 278 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    void twowire_beginTransmission (uint8_t address)
    +
    + +

    Definition at line 90 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + +
    uint8_t twowire_endTransmission (void )
    +
    + +

    Definition at line 115 of file twi_nonblock.cpp.

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    uint8_t twowire_requestFrom (uint8_t address,
    uint8_t quantity 
    )
    +
    + +
    +
    + +
    +
    + + + + + + + + +
    void twowire_send (uint8_t data)
    +
    + +

    Definition at line 100 of file twi_nonblock.cpp.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/twi__nonblock_8h.js b/doc/html/twi__nonblock_8h.js new file mode 100644 index 000000000..41bbce47a --- /dev/null +++ b/doc/html/twi__nonblock_8h.js @@ -0,0 +1,30 @@ +var twi__nonblock_8h = +[ + [ "BUFFER_LENGTH", "twi__nonblock_8h.html#af7b7dc9a200cb1404c280bd500fd1551", null ], + [ "cbi", "twi__nonblock_8h.html#ae70baf5399951da1e7ad45a0ed890832", null ], + [ "sbi", "twi__nonblock_8h.html#ac4a5536d9bf092116f88b94797ddc882", null ], + [ "TWI_BUFFER_LENGTH", "twi__nonblock_8h.html#a18f2336f01cb5b7f479e65ee78020c76", null ], + [ "TWI_FREQ", "twi__nonblock_8h.html#a3e79c6425e8cc6a0ce853eb49a45e5b9", null ], + [ "TWI_MRX", "twi__nonblock_8h.html#a4e51cef0c946abc25dca6e7edaa1653b", null ], + [ "TWI_MTX", "twi__nonblock_8h.html#a18bbad08828cae8d1e9fd9b8105e3ebc", null ], + [ "TWI_PRE_MRX", "twi__nonblock_8h.html#a170e028f798920121e883edf6cca963c", null ], + [ "TWI_PRE_MTX", "twi__nonblock_8h.html#af3bfd9af98c4e29dc9d813b3bf4fa68c", null ], + [ "TWI_READY", "twi__nonblock_8h.html#a78f8e40420d26b512b064b1902f5d559", null ], + [ "TWI_SRX", "twi__nonblock_8h.html#a0c36c496c84490bf65979fcc79e5e1b4", null ], + [ "TWI_STX", "twi__nonblock_8h.html#afa37d05db1b20f3567371ef9e7bbbc48", null ], + [ "initialize_twi_nonblock", "twi__nonblock_8h.html#af181de038aef868afdc2add729c0bbb5", null ], + [ "twi_continueReadFrom", "twi__nonblock_8h.html#a024f9a641b67863de23a45cea1a49d35", null ], + [ "twi_continueWriteTo", "twi__nonblock_8h.html#a5443fa2d7cdb3dcca731ffbeb3b025e1", null ], + [ "twi_initiateReadFrom", "twi__nonblock_8h.html#a2d3c2b5761e61ce7b6da0bf582157e64", null ], + [ "twi_initiateWriteTo", "twi__nonblock_8h.html#ac8f66f76ece44f2726190477727ce01c", null ], + [ "twi_readFromBlocking", "twi__nonblock_8h.html#a1fa89bb0f151e2e194cab9b2ef795ec7", null ], + [ "twi_readMasterBuffer", "twi__nonblock_8h.html#a1d70026061f6fadd1e3724239b8e5bc2", null ], + [ "twi_releaseBus", "twi__nonblock_8h.html#a7f830793058786f5597ddd1d80b885ae", null ], + [ "twi_reply", "twi__nonblock_8h.html#a19f62ca29970133e675862b58d2f3ac3", null ], + [ "twi_stop", "twi__nonblock_8h.html#acf52d6c93df110dee6d402b389e5042e", null ], + [ "twi_writeToBlocking", "twi__nonblock_8h.html#a59f5035172d7bd0dfa20bd29e15075fb", null ], + [ "twowire_beginTransmission", "twi__nonblock_8h.html#af903bddac63f885f3182a322eb825439", null ], + [ "twowire_endTransmission", "twi__nonblock_8h.html#a3aa463df29bfc6f3ef887a53294c2e44", null ], + [ "twowire_requestFrom", "twi__nonblock_8h.html#a69979f17267b69788d66e195eb20125e", null ], + [ "twowire_send", "twi__nonblock_8h.html#a3502e282ddd534ba143095e0d1e6153f", null ] +]; \ No newline at end of file diff --git a/doc/html/twi__nonblock_8h_source.html b/doc/html/twi__nonblock_8h_source.html index a276a1aee..25fbe10c7 100644 --- a/doc/html/twi__nonblock_8h_source.html +++ b/doc/html/twi__nonblock_8h_source.html @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,7 +110,7 @@
    twi_nonblock.h
    -
    1 /*
    +Go to the documentation of this file.
    1 /*
    2  * twi_nonblock.h
    3  *
    4  * Copyright 2012 Marije Baalman.
    @@ -120,90 +128,92 @@
    16  * You should have received a copy of the GNU General Public License
    17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    18  */
    -
    19 
    -
    20 #ifndef TWI_NONBLOCK_H_
    -
    21 #define TWI_NONBLOCK_H_
    -
    22 
    -
    23 #include "Arduino.h"
    +
    19 
    +
    20 #ifndef TWI_NONBLOCK_H_
    +
    21 #define TWI_NONBLOCK_H_
    +
    22 
    +
    23 #include "Arduino.h"
    24 
    -
    25 #include <compat/twi.h>
    +
    25 #include <compat/twi.h>
    26 
    -
    27 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
    -
    28 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
    -
    29 
    +
    27 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
    +
    28 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
    +
    29 
    30 // --- twi reading variables
    -
    31  #ifndef TWI_FREQ
    -
    32  #define TWI_FREQ 100000L
    -
    33  #endif
    -
    34 
    -
    35  #ifndef TWI_BUFFER_LENGTH
    -
    36  #define TWI_BUFFER_LENGTH 32
    -
    37  #endif
    -
    38 
    -
    39  #define TWI_READY 0
    -
    40  #define TWI_PRE_MRX 1
    -
    41  #define TWI_MRX 2
    -
    42  #define TWI_PRE_MTX 3
    -
    43  #define TWI_MTX 4
    -
    44  #define TWI_SRX 5
    -
    45  #define TWI_STX 6
    -
    46 
    +
    31  #ifndef TWI_FREQ
    +
    32  #define TWI_FREQ 100000L
    +
    33  #endif
    +
    34 
    +
    35  #ifndef TWI_BUFFER_LENGTH
    +
    36  #define TWI_BUFFER_LENGTH 32
    +
    37  #endif
    +
    38 
    +
    39  #define TWI_READY 0
    +
    40  #define TWI_PRE_MRX 1
    +
    41  #define TWI_MRX 2
    +
    42  #define TWI_PRE_MTX 3
    +
    43  #define TWI_MTX 4
    +
    44  #define TWI_SRX 5
    +
    45  #define TWI_STX 6
    +
    46 
    47 static volatile uint8_t twi_state;
    48 static volatile uint8_t twi_oldstate;
    49 // static uint8_t twiint_masrw;
    50 static uint8_t twi_slarw;
    51 
    -
    52 static uint8_t twi_masterBuffer[TWI_BUFFER_LENGTH];
    +
    52 static uint8_t twi_masterBuffer[TWI_BUFFER_LENGTH];
    53 static volatile uint8_t twi_masterBufferIndex;
    54 static uint8_t twi_masterBufferLength;
    55 
    56 static volatile uint8_t twi_error;
    57 
    -
    58 #define BUFFER_LENGTH 32
    -
    59 static uint8_t rxBuffer[BUFFER_LENGTH];
    +
    58 #define BUFFER_LENGTH 32
    +
    59 static uint8_t rxBuffer[BUFFER_LENGTH];
    60 static uint8_t rxBufferIndex = 0;
    61 static uint8_t rxBufferLength = 0;
    62 
    63 static uint8_t txAddress = 0;
    -
    64 static uint8_t txBuffer[BUFFER_LENGTH];
    +
    64 static uint8_t txBuffer[BUFFER_LENGTH];
    65 static uint8_t txBufferIndex = 0;
    66 static uint8_t txBufferLength = 0;
    67 
    68 static uint8_t transmitting;
    69 
    70 
    -
    71 void initialize_twi_nonblock();
    +
    72 
    -
    73 uint8_t twowire_requestFrom(uint8_t address, uint8_t quantity);
    -
    74 void twowire_beginTransmission( uint8_t address );
    -
    75 void twowire_send( uint8_t data );
    -
    76 uint8_t twowire_endTransmission(void);
    + +
    74 void twowire_beginTransmission( uint8_t address );
    +
    75 void twowire_send( uint8_t data );
    +
    77 
    -
    79 uint8_t twi_initiateReadFrom(uint8_t address, uint8_t length);
    -
    80 void twi_continueReadFrom();
    +
    78 /// non-blocking functions:
    + +
    81 
    -
    82 uint8_t twi_readMasterBuffer( uint8_t* data, uint8_t length );
    +
    83 
    -
    84 uint8_t twi_initiateWriteTo(uint8_t address, uint8_t* data, uint8_t length );
    -
    85 void twi_continueWriteTo();
    + +
    85 void twi_continueWriteTo();
    86 
    87 
    -
    88 void twi_reply(uint8_t ack);
    -
    89 void twi_stop(void);
    -
    90 void twi_releaseBus(void);
    +
    88 void twi_reply(uint8_t ack);
    +
    89 void twi_stop(void);
    +
    90 void twi_releaseBus(void);
    91 
    -
    93 uint8_t twi_readFromBlocking(uint8_t address, uint8_t* data, uint8_t length);
    -
    94 uint8_t twi_writeToBlocking(uint8_t address, uint8_t* data, uint8_t length, uint8_t wait);
    +
    92 /// blocking versions:
    + +
    95 
    96 
    -
    97 #endif
    +
    97 #endif
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    uphasor256_uint8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define UPHASOR256_NUM_CELLS   256
     
    #define UPHASOR256_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) UPHASOR256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define UPHASOR256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file uphasor256_uint8.h.

    + +
    +
    + +
    +
    + + + + +
    #define UPHASOR256_SAMPLERATE   256
    +
    + +

    Definition at line 15 of file uphasor256_uint8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/uphasor256__uint8_8h.js b/doc/html/uphasor256__uint8_8h.js new file mode 100644 index 000000000..0531bfd0b --- /dev/null +++ b/doc/html/uphasor256__uint8_8h.js @@ -0,0 +1,6 @@ +var uphasor256__uint8_8h = +[ + [ "UPHASOR256_NUM_CELLS", "uphasor256__uint8_8h.html#aa3cffe495ad6fce9a6638bddc56a48ba", null ], + [ "UPHASOR256_SAMPLERATE", "uphasor256__uint8_8h.html#af530f276ea905a4de9f26b36d8398c6a", null ], + [ "__attribute__", "uphasor256__uint8_8h.html#a1f1eaa68846b9d3cda627c426aadddd5", null ] +]; \ No newline at end of file diff --git a/doc/html/uphasor256__uint8_8h_source.html b/doc/html/uphasor256__uint8_8h_source.html index fe92cccb9..b778b5692 100644 --- a/doc/html/uphasor256__uint8_8h_source.html +++ b/doc/html/uphasor256__uint8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/uphasor256_uint8.h Source File +Mozzi: uphasor256_uint8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    uphasor256_uint8.h
    -
    1 #ifndef UPHASOR256_H_
    -
    2 #define UPHASOR256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef UPHASOR256_H_
    +
    2 #define UPHASOR256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* ramp
    12 */
    13 
    -
    14 #define UPHASOR256_NUM_CELLS 256
    -
    15 #define UPHASOR256_SAMPLERATE 256
    -
    16 
    -
    17 const char __attribute__((progmem)) UPHASOR256_DATA [] =
    +
    14 #define UPHASOR256_NUM_CELLS 256
    +
    15 #define UPHASOR256_SAMPLERATE 256
    +
    16 
    +
    17 const char __attribute__((progmem)) UPHASOR256_DATA [] =
    18  {
    19  0,1,2,3,4,5,6,7,8,9,
    20  10,11,12,13,14,15,16,17,18,19,
    @@ -148,14 +156,14 @@
    44  250,251,252,253,254,255,
    45  };
    46 
    -
    47 #endif /* UPHASOR256_H_ */
    +
    47 #endif /* UPHASOR256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    user_guide.md File Reference
    +
    + +
    + + + + diff --git a/doc/html/user__guide_8md_source.html b/doc/html/user__guide_8md_source.html new file mode 100644 index 000000000..e6b0c2378 --- /dev/null +++ b/doc/html/user__guide_8md_source.html @@ -0,0 +1,151 @@ + + + + + + +Mozzi: user_guide.md Source File + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    +
    +
    user_guide.md
    +
    +
    +Go to the documentation of this file.
    1 # Mozzi user's guide
    +
    2 
    +
    3 
    +
    4 ### Anatomy of a sketch
    +
    5 
    +
    6 #### Is a Mozzi sketch different to a normal Arduino sketch?
    +
    7 A Mozzi sketch is a normal Arduino sketch, but it has a couple of extra parts which always need to be included.
    +
    8 Those are updateControl() and updateAudio().
    +
    9 
    +
    10 ##### What are the unusual bits?
    +
    11 Mozzi uses "objects", such as "Oscil" or "Sample" which are declared similarly to "int" or "float", but which instantiate
    +
    12 oscillators or sample players (and other things) instead of different types of numbers.
    +
    13 
    +
    14 ### analogRead
    +
    15 Asynchronous would be cool, so you could just set the chip to read continuously, and ask now and again what the latest value is.
    +
    16 The problem is that you would only be reading one channel this way, since there is only one actual adc, which can be connected to any of several channels. OK in some cases, but not much room for interaction or complex inputs.
    +
    17 Often it is desirable to read several channels of analog information simultaneously, which in practice means switching from one input to the next to get info on each pin.
    +
    18 
    +
    19 
    +
    20 ### Fixed-point notation and arithmetic
    +
    21 Wikipedia provides a good introduction.
    +
    22 Mozzi uses a notation Q_n_ where Q indicates the number of bits used for the whole part of a number, and n is how many bits for the fractional part.
    +
    23 For example, a Q8n8 number has 8 bits for the whole number, so it can go from 0 to 255, and 8 bits for the fractional part, so the grain or resolution is 1/256th.
    +
    24 Mozzi has functions to convert between different formats, which can be handy when you need to keep arithmetic from over or underflowing,
    +
    25 and to help keep track of the precision of the numbers as they change through arithmetic operations.
    +
    26 
    +
    +
    + + + + diff --git a/doc/html/waveshape1__softclip__int8_8h.html b/doc/html/waveshape1__softclip__int8_8h.html new file mode 100644 index 000000000..5f1ba3e4a --- /dev/null +++ b/doc/html/waveshape1__softclip__int8_8h.html @@ -0,0 +1,191 @@ + + + + + + +Mozzi: waveshape1_softclip_int8.h File Reference + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + +
    +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape1_softclip_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define WAVESHAPE1_SOFTCLIP_NUM_CELLS   256
     
    #define WAVESHAPE1_SOFTCLIP_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) WAVESHAPE1_SOFTCLIP_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define WAVESHAPE1_SOFTCLIP_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file waveshape1_softclip_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define WAVESHAPE1_SOFTCLIP_SAMPLERATE   256
    +
    + +

    Definition at line 15 of file waveshape1_softclip_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape1__softclip__int8_8h.js b/doc/html/waveshape1__softclip__int8_8h.js new file mode 100644 index 000000000..383308359 --- /dev/null +++ b/doc/html/waveshape1__softclip__int8_8h.js @@ -0,0 +1,6 @@ +var waveshape1__softclip__int8_8h = +[ + [ "WAVESHAPE1_SOFTCLIP_NUM_CELLS", "waveshape1__softclip__int8_8h.html#a5a2589c27493abc06a686d16a1be94c2", null ], + [ "WAVESHAPE1_SOFTCLIP_SAMPLERATE", "waveshape1__softclip__int8_8h.html#af85cc81596306ecfa2195c48463d067e", null ], + [ "__attribute__", "waveshape1__softclip__int8_8h.html#a54d9dac6b425acc56a05e7bc1adda795", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape1__softclip__int8_8h_source.html b/doc/html/waveshape1__softclip__int8_8h_source.html index 83cf255e8..a261b22e5 100644 --- a/doc/html/waveshape1__softclip__int8_8h_source.html +++ b/doc/html/waveshape1__softclip__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape1_softclip_int8.h Source File +Mozzi: waveshape1_softclip_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    waveshape1_softclip_int8.h
    -
    1 #ifndef WAVESHAPE1_SOFTCLIP_H_
    -
    2 #define WAVESHAPE1_SOFTCLIP_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef WAVESHAPE1_SOFTCLIP_H_
    +
    2 #define WAVESHAPE1_SOFTCLIP_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper to impose soft clipping
    12 */
    13 
    -
    14 #define WAVESHAPE1_SOFTCLIP_NUM_CELLS 256
    -
    15 #define WAVESHAPE1_SOFTCLIP_SAMPLERATE 256
    -
    16 
    -
    17 const char __attribute__((progmem)) WAVESHAPE1_SOFTCLIP_DATA [] =
    +
    14 #define WAVESHAPE1_SOFTCLIP_NUM_CELLS 256
    +
    15 #define WAVESHAPE1_SOFTCLIP_SAMPLERATE 256
    +
    16 
    +
    17 const char __attribute__((progmem)) WAVESHAPE1_SOFTCLIP_DATA [] =
    18  {
    19  -128, -128, -128, -128, -128,
    20  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    @@ -141,14 +149,14 @@
    37  127, 127, 127, 127, 127,
    38  };
    39 
    -
    40 #endif /* WAVESHAPE1_SOFTCLIP_H_ */
    +
    40 #endif /* WAVESHAPE1_SOFTCLIP_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape2_softerclip_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define WAVESHAPE2_SOFTERCLIP_NUM_CELLS   256
     
    #define WAVESHAPE2_SOFTERCLIP_SAMPLERATE   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) WAVESHAPE2_SOFTERCLIP_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define WAVESHAPE2_SOFTERCLIP_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file waveshape2_softerclip_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define WAVESHAPE2_SOFTERCLIP_SAMPLERATE   256
    +
    + +

    Definition at line 15 of file waveshape2_softerclip_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape2__softerclip__int8_8h.js b/doc/html/waveshape2__softerclip__int8_8h.js new file mode 100644 index 000000000..c8035f18d --- /dev/null +++ b/doc/html/waveshape2__softerclip__int8_8h.js @@ -0,0 +1,6 @@ +var waveshape2__softerclip__int8_8h = +[ + [ "WAVESHAPE2_SOFTERCLIP_NUM_CELLS", "waveshape2__softerclip__int8_8h.html#ae75afd2644bb7260ed4ef8f7867d6629", null ], + [ "WAVESHAPE2_SOFTERCLIP_SAMPLERATE", "waveshape2__softerclip__int8_8h.html#a4f77a3761e6c77f1c2fccd58b25aef4d", null ], + [ "__attribute__", "waveshape2__softerclip__int8_8h.html#a0ea34b29e9386e9462ada4ebe4abe389", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape2__softerclip__int8_8h_source.html b/doc/html/waveshape2__softerclip__int8_8h_source.html index be7489402..4b4c85045 100644 --- a/doc/html/waveshape2__softerclip__int8_8h_source.html +++ b/doc/html/waveshape2__softerclip__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape2_softerclip_int8.h Source File +Mozzi: waveshape2_softerclip_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,23 +110,23 @@
    waveshape2_softerclip_int8.h
    -
    1 #ifndef WAVESHAPE2_SOFTERCLIP_H_
    -
    2 #define WAVESHAPE2_SOFTERCLIP_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef WAVESHAPE2_SOFTERCLIP_H_
    +
    2 #define WAVESHAPE2_SOFTERCLIP_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper to impose softer clipping
    12 */
    13 
    -
    14 #define WAVESHAPE2_SOFTERCLIP_NUM_CELLS 256
    -
    15 #define WAVESHAPE2_SOFTERCLIP_SAMPLERATE 256
    -
    16 
    -
    17 const char __attribute__((progmem)) WAVESHAPE2_SOFTERCLIP_DATA [] =
    +
    14 #define WAVESHAPE2_SOFTERCLIP_NUM_CELLS 256
    +
    15 #define WAVESHAPE2_SOFTERCLIP_SAMPLERATE 256
    +
    16 
    +
    17 const char __attribute__((progmem)) WAVESHAPE2_SOFTERCLIP_DATA [] =
    18  {
    19  -128, -128, -128, -128, -128,
    20  -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
    @@ -140,14 +148,14 @@
    36  127, 127, 127, 127, 127, 127, 127,
    37  };
    38 
    -
    39 #endif /* WAVESHAPE2_SOFTERCLIP_H_ */
    +
    39 #endif /* WAVESHAPE2_SOFTERCLIP_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_chebyshev_3rd_256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define CHEBYSHEV_3RD_256_NUM_CELLS   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) CHEBYSHEV_3RD_256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define CHEBYSHEV_3RD_256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file waveshape_chebyshev_3rd_256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__chebyshev__3rd__256__int8_8h.js b/doc/html/waveshape__chebyshev__3rd__256__int8_8h.js new file mode 100644 index 000000000..8332a7c6f --- /dev/null +++ b/doc/html/waveshape__chebyshev__3rd__256__int8_8h.js @@ -0,0 +1,5 @@ +var waveshape__chebyshev__3rd__256__int8_8h = +[ + [ "CHEBYSHEV_3RD_256_NUM_CELLS", "waveshape__chebyshev__3rd__256__int8_8h.html#aca075e4b5d1f1e8aaf70c5212135920a", null ], + [ "__attribute__", "waveshape__chebyshev__3rd__256__int8_8h.html#a2ff3c79044b4ed0aaddaedb2816f91ff", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__chebyshev__3rd__256__int8_8h_source.html b/doc/html/waveshape__chebyshev__3rd__256__int8_8h_source.html index dcef2e527..061bb0ff5 100644 --- a/doc/html/waveshape__chebyshev__3rd__256__int8_8h_source.html +++ b/doc/html/waveshape__chebyshev__3rd__256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_chebyshev_3rd_256_int8.h Source File +Mozzi: waveshape_chebyshev_3rd_256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,21 +110,21 @@
    waveshape_chebyshev_3rd_256_int8.h
    -
    1 #ifndef CHEBYSHEV_3RD_256_H_
    -
    2 #define CHEBYSHEV_3RD_256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef CHEBYSHEV_3RD_256_H_
    +
    2 #define CHEBYSHEV_3RD_256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper using chebyshev polynomials
    12 */
    13 
    -
    14 #define CHEBYSHEV_3RD_256_NUM_CELLS 256
    -
    15 const char __attribute__((progmem)) CHEBYSHEV_3RD_256_DATA [] =
    +
    14 #define CHEBYSHEV_3RD_256_NUM_CELLS 256
    +
    15 const char __attribute__((progmem)) CHEBYSHEV_3RD_256_DATA [] =
    16  {
    17  -128, -120, -111,
    18  -102, -94, -86, -78, -70, -62, -55, -48, -41, -34, -27, -20, -14, -7, -1, 5, 10,
    @@ -137,14 +145,14 @@
    33  54, 61, 69, 77, 85, 93, 101, 110, 119,
    34  };
    35 
    -
    36 #endif /* CHEBYSHEV_3RD_256_H_ */
    +
    36 #endif /* CHEBYSHEV_3RD_256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_chebyshev_4th_256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define CHEBYSHEV_4TH_256_NUM_CELLS   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) CHEBYSHEV_4TH_256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define CHEBYSHEV_4TH_256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file waveshape_chebyshev_4th_256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__chebyshev__4th__256__int8_8h.js b/doc/html/waveshape__chebyshev__4th__256__int8_8h.js new file mode 100644 index 000000000..ab4c50d31 --- /dev/null +++ b/doc/html/waveshape__chebyshev__4th__256__int8_8h.js @@ -0,0 +1,5 @@ +var waveshape__chebyshev__4th__256__int8_8h = +[ + [ "CHEBYSHEV_4TH_256_NUM_CELLS", "waveshape__chebyshev__4th__256__int8_8h.html#ac8e85d612eb209973dd5a0dad4862ef0", null ], + [ "__attribute__", "waveshape__chebyshev__4th__256__int8_8h.html#abfcffdcbb1bb40bccb95183c60428ed7", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__chebyshev__4th__256__int8_8h_source.html b/doc/html/waveshape__chebyshev__4th__256__int8_8h_source.html index ac01caa27..3d16b27d1 100644 --- a/doc/html/waveshape__chebyshev__4th__256__int8_8h_source.html +++ b/doc/html/waveshape__chebyshev__4th__256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_chebyshev_4th_256_int8.h Source File +Mozzi: waveshape_chebyshev_4th_256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,21 +110,21 @@
    waveshape_chebyshev_4th_256_int8.h
    -
    1 #ifndef CHEBYSHEV_4TH_256_H_
    -
    2 #define CHEBYSHEV_4TH_256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef CHEBYSHEV_4TH_256_H_
    +
    2 #define CHEBYSHEV_4TH_256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper using chebyshev polynomials
    12 */
    13 
    -
    14 #define CHEBYSHEV_4TH_256_NUM_CELLS 256
    -
    15 const char __attribute__((progmem)) CHEBYSHEV_4TH_256_DATA [] =
    +
    14 #define CHEBYSHEV_4TH_256_NUM_CELLS 256
    +
    15 const char __attribute__((progmem)) CHEBYSHEV_4TH_256_DATA [] =
    16  {
    17  127, 112, 97, 82,
    18  68, 55, 42, 30, 19, 7, -3, -13, -23, -32, -40, -49, -56, -63, -70, -77, -83,
    @@ -137,14 +145,14 @@
    33  -32, -23, -13, -3, 7, 19, 30, 42, 55, 68, 82, 97, 112,
    34  };
    35 
    -
    36 #endif /* CHEBYSHEV_4TH_256_H_ */
    +
    36 #endif /* CHEBYSHEV_4TH_256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_chebyshev_5th_256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define CHEBYSHEV_5TH_256_NUM_CELLS   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) CHEBYSHEV_5TH_256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define CHEBYSHEV_5TH_256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file waveshape_chebyshev_5th_256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__chebyshev__5th__256__int8_8h.js b/doc/html/waveshape__chebyshev__5th__256__int8_8h.js new file mode 100644 index 000000000..07db3a452 --- /dev/null +++ b/doc/html/waveshape__chebyshev__5th__256__int8_8h.js @@ -0,0 +1,5 @@ +var waveshape__chebyshev__5th__256__int8_8h = +[ + [ "CHEBYSHEV_5TH_256_NUM_CELLS", "waveshape__chebyshev__5th__256__int8_8h.html#aa1e8ff82cf0071b7092be72ae417ef50", null ], + [ "__attribute__", "waveshape__chebyshev__5th__256__int8_8h.html#a3cadf96fd935dc449f3be7608fb22303", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__chebyshev__5th__256__int8_8h_source.html b/doc/html/waveshape__chebyshev__5th__256__int8_8h_source.html index 23a863838..ed7b76e06 100644 --- a/doc/html/waveshape__chebyshev__5th__256__int8_8h_source.html +++ b/doc/html/waveshape__chebyshev__5th__256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_chebyshev_5th_256_int8.h Source File +Mozzi: waveshape_chebyshev_5th_256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,21 +110,21 @@
    waveshape_chebyshev_5th_256_int8.h
    -
    1 #ifndef CHEBYSHEV_5TH_256_H_
    -
    2 #define CHEBYSHEV_5TH_256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef CHEBYSHEV_5TH_256_H_
    +
    2 #define CHEBYSHEV_5TH_256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper using chebyshev polynomials
    12 */
    13 
    -
    14 #define CHEBYSHEV_5TH_256_NUM_CELLS 256
    -
    15 const char __attribute__((progmem)) CHEBYSHEV_5TH_256_DATA [] =
    +
    14 #define CHEBYSHEV_5TH_256_NUM_CELLS 256
    +
    15 const char __attribute__((progmem)) CHEBYSHEV_5TH_256_DATA [] =
    16  {
    17  -128, -104, -82,
    18  -60, -40, -22, -5, 11, 26, 39, 52, 63, 73, 82, 90, 98, 104, 110, 114, 118, 121,
    @@ -137,14 +145,14 @@
    33  -53, -40, -27, -12, 4, 21, 39, 59, 81, 103,
    34  };
    35 
    -
    36 #endif /* CHEBYSHEV_5TH_256_H_ */
    +
    36 #endif /* CHEBYSHEV_5TH_256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_chebyshev_6th_256_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define CHEBYSHEV_6TH_256_NUM_CELLS   256
     
    + + + +

    +Functions

    const char __attribute__ ((progmem)) CHEBYSHEV_6TH_256_DATA[]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define CHEBYSHEV_6TH_256_NUM_CELLS   256
    +
    + +

    Definition at line 14 of file waveshape_chebyshev_6th_256_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__chebyshev__6th__256__int8_8h.js b/doc/html/waveshape__chebyshev__6th__256__int8_8h.js new file mode 100644 index 000000000..5f2f8b71c --- /dev/null +++ b/doc/html/waveshape__chebyshev__6th__256__int8_8h.js @@ -0,0 +1,5 @@ +var waveshape__chebyshev__6th__256__int8_8h = +[ + [ "CHEBYSHEV_6TH_256_NUM_CELLS", "waveshape__chebyshev__6th__256__int8_8h.html#a9c07b08c40bc5d25f893c904679dba37", null ], + [ "__attribute__", "waveshape__chebyshev__6th__256__int8_8h.html#a7b32a7b3597049583f2747a7d69138df", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__chebyshev__6th__256__int8_8h_source.html b/doc/html/waveshape__chebyshev__6th__256__int8_8h_source.html index 0433d868c..82a9adc55 100644 --- a/doc/html/waveshape__chebyshev__6th__256__int8_8h_source.html +++ b/doc/html/waveshape__chebyshev__6th__256__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_chebyshev_6th_256_int8.h Source File +Mozzi: waveshape_chebyshev_6th_256_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,21 +110,21 @@
    waveshape_chebyshev_6th_256_int8.h
    -
    1 #ifndef CHEBYSHEV_6TH_256_H_
    -
    2 #define CHEBYSHEV_6TH_256_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef CHEBYSHEV_6TH_256_H_
    +
    2 #define CHEBYSHEV_6TH_256_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper using chebyshev polynomials
    12 */
    13 
    -
    14 #define CHEBYSHEV_6TH_256_NUM_CELLS 256
    -
    15 const char __attribute__((progmem)) CHEBYSHEV_6TH_256_DATA [] =
    +
    14 #define CHEBYSHEV_6TH_256_NUM_CELLS 256
    +
    15 const char __attribute__((progmem)) CHEBYSHEV_6TH_256_DATA [] =
    16  {
    17  127, 93, 62, 34, 8,
    18  -15, -35, -53, -69, -82, -94, -103, -111, -118, -122, -126, -128, -128, -128,
    @@ -137,14 +145,14 @@
    33  -103, -94, -82, -69, -53, -35, -15, 8, 34, 62, 93,
    34  };
    35 
    -
    36 #endif /* CHEBYSHEV_6TH_256_H_ */
    +
    36 #endif /* CHEBYSHEV_6TH_256_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_compress_512_to_488_int16.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define WAVESHAPE_COMPRESS_512_TO_488_NUM_CELLS   512
     
    + + + +

    +Functions

    const int __attribute__ ((progmem)) WAVESHAPE_COMPRESS_512_TO_488_DATA[512]
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define WAVESHAPE_COMPRESS_512_TO_488_NUM_CELLS   512
    +
    + +

    Definition at line 14 of file waveshape_compress_512_to_488_int16.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const int __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__compress__512__to__488__int16_8h.js b/doc/html/waveshape__compress__512__to__488__int16_8h.js new file mode 100644 index 000000000..35ffc052f --- /dev/null +++ b/doc/html/waveshape__compress__512__to__488__int16_8h.js @@ -0,0 +1,5 @@ +var waveshape__compress__512__to__488__int16_8h = +[ + [ "WAVESHAPE_COMPRESS_512_TO_488_NUM_CELLS", "waveshape__compress__512__to__488__int16_8h.html#a06e71713d3f4e642fa59cc695f616831", null ], + [ "__attribute__", "waveshape__compress__512__to__488__int16_8h.html#a218db9ef341de0a44d775effc95dcc91", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__compress__512__to__488__int16_8h_source.html b/doc/html/waveshape__compress__512__to__488__int16_8h_source.html index 87f6e7702..c8aca4737 100644 --- a/doc/html/waveshape__compress__512__to__488__int16_8h_source.html +++ b/doc/html/waveshape__compress__512__to__488__int16_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_compress_512_to_488_int16.h Source File +Mozzi: waveshape_compress_512_to_488_int16.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,22 +110,22 @@
    waveshape_compress_512_to_488_int16.h
    -
    1 #ifndef WAVESHAPE_COMPRESS_512_TO_488_H_
    -
    2 #define WAVESHAPE_COMPRESS_512_TO_488_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef WAVESHAPE_COMPRESS_512_TO_488_H_
    +
    2 #define WAVESHAPE_COMPRESS_512_TO_488_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    11 /* table for waveshaper to impart compression
    12 */
    13 
    -
    14 #define WAVESHAPE_COMPRESS_512_TO_488_NUM_CELLS 512
    -
    15 
    -
    16 const int __attribute__((progmem)) WAVESHAPE_COMPRESS_512_TO_488_DATA [512] =
    +
    14 #define WAVESHAPE_COMPRESS_512_TO_488_NUM_CELLS 512
    +
    15 
    +
    16 const int __attribute__((progmem)) WAVESHAPE_COMPRESS_512_TO_488_DATA [512] =
    17  {
    18  -244 , -243 , -242 , -242 , -241 , -240 , -239 , -239 , -238 , -237 , -236 ,
    19  -236 , -235 , -234 , -233 , -233 , -232 , -231 , -230 , -230 , -229 , -228 ,
    @@ -161,14 +169,14 @@
    57  236 , 237 , 238 , 238 , 239 , 240 , 241 , 241 , 242 , 243
    58  };
    59 
    -
    60 #endif /* WAVESHAPE_COMPRESS_512_TO_488_H_ */
    +
    60 #endif /* WAVESHAPE_COMPRESS_512_TO_488_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_sigmoid_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define WAVESHAPE_SIGMOID_NUM_CELLS   256
     
    + + + + +

    +Functions

    const char __attribute__ ((progmem)) WAVESHAPE_SIGMOID_DATA[256]
     A sigmoid squashing function (sort of like an s-shape or cursive f-shape). More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define WAVESHAPE_SIGMOID_NUM_CELLS   256
    +
    + +

    Definition at line 11 of file waveshape_sigmoid_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    +

    Useful for waveshaping audio compression/distortion sounds, or emphasising changes in controls around 0 and making them less sensitive in higher (or lower) ranges.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__sigmoid__int8_8h.js b/doc/html/waveshape__sigmoid__int8_8h.js new file mode 100644 index 000000000..f5c58701b --- /dev/null +++ b/doc/html/waveshape__sigmoid__int8_8h.js @@ -0,0 +1,5 @@ +var waveshape__sigmoid__int8_8h = +[ + [ "WAVESHAPE_SIGMOID_NUM_CELLS", "waveshape__sigmoid__int8_8h.html#a4781d8e558797b58eccc12d3d8dc52f1", null ], + [ "__attribute__", "waveshape__sigmoid__int8_8h.html#ab503f643246e96541de7a3acff0402c3", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__sigmoid__int8_8h_source.html b/doc/html/waveshape__sigmoid__int8_8h_source.html index 21f1d9257..6ec8a022b 100644 --- a/doc/html/waveshape__sigmoid__int8_8h_source.html +++ b/doc/html/waveshape__sigmoid__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_sigmoid_int8.h Source File +Mozzi: waveshape_sigmoid_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,19 +110,25 @@
    waveshape_sigmoid_int8.h
    -
    1 #ifndef WAVESHAPE_SIGMOID_H_
    -
    2 #define WAVESHAPE_SIGMOID_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef WAVESHAPE_SIGMOID_H_
    +
    2 #define WAVESHAPE_SIGMOID_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define WAVESHAPE_SIGMOID_NUM_CELLS 256
    -
    12 
    -
    19 const char __attribute__((progmem)) WAVESHAPE_SIGMOID_DATA [256] =
    +
    11 #define WAVESHAPE_SIGMOID_NUM_CELLS 256
    +
    12 
    +
    13 /** @ingroup tables
    +
    14 A sigmoid squashing function (sort of like an s-shape or cursive f-shape).
    +
    15 Useful for waveshaping audio compression/distortion sounds, or emphasising changes in
    +
    16 controls around 0 and making them less sensitive in higher (or lower) ranges.
    +
    17 */
    +
    18 
    +
    19 const char __attribute__((progmem)) WAVESHAPE_SIGMOID_DATA [256] =
    20  {
    21  -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
    22  -127, -127, -127, -127, -127, -127, -127, -127, -126, -126, -126,
    @@ -139,14 +153,14 @@
    41  127
    42  };
    43 
    -
    44 #endif /* WAVESHAPE_SIGMOID_H_ */
    +
    44 #endif /* WAVESHAPE_SIGMOID_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    waveshape_tanh_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Macros

    #define WAVESHAPE_TANH_NUM_CELLS   256
     
    + + + + +

    +Functions

    const char __attribute__ ((progmem)) WAVESHAPE_TANH_DATA[256]
     A tanh squashing function (sort of like an s-shape or cursive f-shape). More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define WAVESHAPE_TANH_NUM_CELLS   256
    +
    + +

    Definition at line 11 of file waveshape_tanh_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    +

    Useful for waveshaping audio compression/distortion sounds, or emphasising changes in controls around 0 and making them less sensitive in higher (or lower) ranges.

    + +
    +
    +
    +
    + + + + diff --git a/doc/html/waveshape__tanh__int8_8h.js b/doc/html/waveshape__tanh__int8_8h.js new file mode 100644 index 000000000..0ce6d0e8f --- /dev/null +++ b/doc/html/waveshape__tanh__int8_8h.js @@ -0,0 +1,5 @@ +var waveshape__tanh__int8_8h = +[ + [ "WAVESHAPE_TANH_NUM_CELLS", "waveshape__tanh__int8_8h.html#a3e601eae79fee501cb7df226581adc26", null ], + [ "__attribute__", "waveshape__tanh__int8_8h.html#a717fb987a901e490743474b71fef3cac", null ] +]; \ No newline at end of file diff --git a/doc/html/waveshape__tanh__int8_8h_source.html b/doc/html/waveshape__tanh__int8_8h_source.html index bd90474fe..889516380 100644 --- a/doc/html/waveshape__tanh__int8_8h_source.html +++ b/doc/html/waveshape__tanh__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/waveshape_tanh_int8.h Source File +Mozzi: waveshape_tanh_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,19 +110,25 @@
    waveshape_tanh_int8.h
    -
    1 #ifndef WAVESHAPE_TANH_H_
    -
    2 #define WAVESHAPE_TANH_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef WAVESHAPE_TANH_H_
    +
    2 #define WAVESHAPE_TANH_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define WAVESHAPE_TANH_NUM_CELLS 256
    -
    12 
    -
    19 const char __attribute__((progmem)) WAVESHAPE_TANH_DATA [256] =
    +
    11 #define WAVESHAPE_TANH_NUM_CELLS 256
    +
    12 
    +
    13 /** @ingroup tables
    +
    14 A tanh squashing function (sort of like an s-shape or cursive f-shape).
    +
    15 Useful for waveshaping audio compression/distortion sounds, or emphasising changes in
    +
    16 controls around 0 and making them less sensitive in higher (or lower) ranges.
    +
    17 */
    +
    18 
    +
    19 const char __attribute__((progmem)) WAVESHAPE_TANH_DATA [256] =
    20  {
    21  -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
    22  -127, -127, -127, -127, -127, -127, -126, -126, -126, -126, -126, -126, -126,
    @@ -135,14 +149,14 @@
    37  127, 127, 127, 127, 127, 127, 127, 127, 127
    38  };
    39 
    -
    40 #endif /* WAVESHAPE_TANH_H_ */
    +
    40 #endif /* WAVESHAPE_TANH_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino
    + + + + + + +
    +
    Mozzi +  0.01.2c alpha +
    +
    sound synthesis library for Arduino
    +
    +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    whitenoise8192_int8.h File Reference
    +
    +
    +
    #include "WProgram.h"
    +#include <avr/pgmspace.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define WHITENOISE8192_NUM_CELLS   8192
     
    #define WHITENOISE8192_SAMPLERATE   8192
     
    + + + + +

    +Functions

    const char __attribute__ ((progmem)) WHITENOISE8192_DATA[]
     White noise table. More...
     
    +

    Macro Definition Documentation

    + +
    +
    + + + + +
    #define WHITENOISE8192_NUM_CELLS   8192
    +
    + +

    Definition at line 11 of file whitenoise8192_int8.h.

    + +
    +
    + +
    +
    + + + + +
    #define WHITENOISE8192_SAMPLERATE   8192
    +
    + +

    Definition at line 12 of file whitenoise8192_int8.h.

    + +
    +
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    const char __attribute__ ((progmem) )
    +
    + +
    +
    +
    +
    + + + + diff --git a/doc/html/whitenoise8192__int8_8h.js b/doc/html/whitenoise8192__int8_8h.js new file mode 100644 index 000000000..19b053c47 --- /dev/null +++ b/doc/html/whitenoise8192__int8_8h.js @@ -0,0 +1,6 @@ +var whitenoise8192__int8_8h = +[ + [ "WHITENOISE8192_NUM_CELLS", "whitenoise8192__int8_8h.html#a6f6d1e2943cbf174e87cb61b3b28f25b", null ], + [ "WHITENOISE8192_SAMPLERATE", "whitenoise8192__int8_8h.html#a840781260fe545ec62bee8b8eb0b88e2", null ], + [ "__attribute__", "whitenoise8192__int8_8h.html#a11ac169f98178547d202b24beb3f0620", null ] +]; \ No newline at end of file diff --git a/doc/html/whitenoise8192__int8_8h_source.html b/doc/html/whitenoise8192__int8_8h_source.html index 9b9ae258b..2e7f03da7 100644 --- a/doc/html/whitenoise8192__int8_8h_source.html +++ b/doc/html/whitenoise8192__int8_8h_source.html @@ -4,7 +4,7 @@ -Mozzi: tables/whitenoise8192_int8.h Source File +Mozzi: whitenoise8192_int8.h Source File @@ -21,6 +21,7 @@ $(document).ready(function() { searchBox.OnSelectItem(0); }); +
    @@ -28,10 +29,10 @@ - + @@ -49,6 +50,7 @@
  • Main Page
  • Modules
  • Classes
  • +
  • Files
  • Examples
  • @@ -68,6 +70,12 @@
  • +
    + All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
    @@ -102,20 +110,24 @@
    whitenoise8192_int8.h
    -
    1 #ifndef WHITENOISE8192_H_
    -
    2 #define WHITENOISE8192_H_
    -
    3 
    -
    4 #if ARDUINO >= 100
    -
    5  #include "Arduino.h"
    -
    6 #else
    -
    7  #include "WProgram.h"
    -
    8 #endif
    -
    9 #include <avr/pgmspace.h>
    +Go to the documentation of this file.
    1 #ifndef WHITENOISE8192_H_
    +
    2 #define WHITENOISE8192_H_
    +
    3 
    +
    4 #if ARDUINO >= 100
    +
    5  #include "Arduino.h"
    +
    6 #else
    +
    7  #include "WProgram.h"
    +
    8 #endif
    +
    9 #include <avr/pgmspace.h>
    10 
    -
    11 #define WHITENOISE8192_NUM_CELLS 8192
    -
    12 #define WHITENOISE8192_SAMPLERATE 8192
    -
    13 
    -
    18 const char __attribute__((progmem)) WHITENOISE8192_DATA [] =
    +
    11 #define WHITENOISE8192_NUM_CELLS 8192
    +
    12 #define WHITENOISE8192_SAMPLERATE 8192
    +
    13 
    +
    14 /** @ingroup tables
    +
    15 White noise table.
    +
    16 */
    +
    17 
    +
    18 const char __attribute__((progmem)) WHITENOISE8192_DATA [] =
    19  {
    20  22, -14, 108, 2, -80, -99, 62, -62,
    21  -11, -127, -102, -80, -114, -66, -2, 68, -63, -101, 0, -13, 37, 55, 104, 61,
    @@ -600,14 +612,14 @@
    500  5, 91, 40, -38, 65, 7, -56, -99, -36, 119, 27, -99, -31, -69, 26, -85, -123,
    501  };
    502 
    -
    503 #endif /* WHITENOISE8192_H_ */
    +
    503 #endif /* WHITENOISE8192_H_ */
    Mozzi -  alpha 0.01.2c +  0.01.2c alpha
    sound synthesis library for Arduino