Skip to content

Commit

Permalink
Definitive version of the library for a standalone ArduTouch card, pl…
Browse files Browse the repository at this point in the history
…us Hocus synth

This V1.16 release is the definitive version of the library for a standalone ArduTouch card.  V1.16 sets the stage for release V1.17, which will (hopefully) implement a MIDI interface via the host.

                     What's New in Version 1.16
                     -----------------------------------------

   Make sure that the PCB REV of your board (printed near the bottom of the
   ArduTouch card) corresponds to the revision declared in System.h

0)  New Hocus synth

1) ADSR internals have been rewritten to use fixed-point 16 bit math instead
   of floating point math, significantly reducing the code footprint.

2) A long-standing audio issue which effected all synths and which was
   characterized by a "glitch" at the start of the initial note played
   after power-up or reset or after a preset was loaded, has been solved.
   Initial notes are now glitch-free for all synths, all presets :)

   (This glitch was most noticeable when the played note had a slow attack.

3) A major new feature -- User Interface Frames -- has been incorporated
   into the low-level Control class. User Interface Frames provide a
   customizable mechanism for controlling up to 18 different parameters
   with just the 2 on-board pots. Since virtually every object in a synth,
   including the synth itself, inherits from the Control class, this opens
   up many possibilities for real-time control of all a synth's parameters.

4) There is a new example sketch which explains User Interface Frames:

      _57_UI_Frames.ino

5) The following synths have been updated to sync with the new UI Frames:

      Arpology
      Dronetic
      DuoPoly
      Hocus
      Quadrant
      Xoid
      ZapShot

7) The button interface for the DuoPoly Voice and ADSR objects has changed.
   Previously, the pots for the Voice and ADSR parameters were scrolled up
   and down using left-button-press and right-button-press gestures. Now,
   using the built-in UI Frame for Voice and ADSR classes -- each of which
   has a dimension of (0,1) -- the pot mappings are switched back and forth
   between FRAME00 and FRAME01 using the right-button-press gesture only.
   See _57_UI_Frames.ino for details on frame dimensions, symbolic frame
   numbers and frame buttons.
  • Loading branch information
maltman23 committed Nov 1, 2020
1 parent 9d6f08e commit 5378671
Show file tree
Hide file tree
Showing 70 changed files with 7,110 additions and 1,117 deletions.
Binary file modified Arduino/Arpology/Arpology -- How to Use.pdf
Binary file not shown.
25 changes: 19 additions & 6 deletions Arduino/Arpology/Arpology/Arpology.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
// uncommenting the "#define __STNDLONE__" statement in Model.h of the
// ArduTouch library.
//
// 2) In version 1.16 of the ArduTouch library an embedded U/I frame was
// added to the ArduTouch Control class (a base class for virtually all
// the objects that make up a synth -- including the synth itself.) The
// Arpology synth was written years before version 1.16 of the library
// was released, and its Envelope and Arpeggiator frames should not be
// confused with embedded U/I frames, which are disabled by default and
// not used in this synth.
//
//
// Target: ArduTouch board
//
// ---------------------------------------------------------------------------
Expand All @@ -74,7 +83,7 @@

#include "ArduTouch.h" // use the ArduTouch library

about_program( Arpology, 1.13 ) // specify sketch name & version
about_program( Arpology, 1.16 ) // specify sketch name & version

// Specify whether the voices of Arpology can be panned in stereo by
// uncommenting the following defines
Expand Down Expand Up @@ -692,6 +701,13 @@ PROGMEM const byte* const patterns[] =
#define ARP_BASE_CLASS QuadSynth // use QuadSynth as superclass
#endif

// Note: arpOsc[] are statically allocated here instead of dynamically allocated off the
// heap within ArpSynth::newOsc() to avoid an emergent issue in Arduino 1.8.10+
// where noise occurs in vox[0] if Hocus synth is uploaded 1st, then Arpology.
// This is a difficult problem to understand without a (real) debugger!

FastWaveOsc arpOsc[4]; // oscillators

class ArpSynth : public ARP_BASE_CLASS
{
typedef ARP_BASE_CLASS super; // superclass is ARP_BASE_CLASS
Expand Down Expand Up @@ -818,9 +834,6 @@ class ArpSynth : public ARP_BASE_CLASS

case '!': // reset

for ( byte i = 0; i < numVox; i++ )
vox[i]->setFreq( 0.0 );

super::charEv( code );

pendingPatNum = 1;
Expand Down Expand Up @@ -891,7 +904,7 @@ class ArpSynth : public ARP_BASE_CLASS
super::dynamics();

arpegCue.dynamics();
if ( arpegCue.pending() && ! deferVoc )
if ( arpegCue.pending() )
{
if ( pendingPatNum > 0 && arpegIdx == 1 )
{
Expand Down Expand Up @@ -1049,7 +1062,7 @@ class ArpSynth : public ARP_BASE_CLASS

Osc *newOsc( byte nth )
{
FastWaveOsc *o = new FastWaveOsc();
FastWaveOsc *o = &arpOsc[nth];
o->setTable( wavetable_named( Ether ) );
return o;
}
Expand Down
5 changes: 5 additions & 0 deletions Arduino/Arpology/versions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Versions:

1.16 nix explict squelching of voices at reset
syncs with 1.16
1.15 oscillators statically allocated to avoid noise in vox[0] with Ardunio 1.8.10+
1.14 dynamics() no longer dereferences deferVoc
syncs with 1.15
1.13 edit presets to use byte values <= 128 when setting LFO depths
rework PeriodicCue
syncs with 1.13
Expand Down
Binary file modified Arduino/Beatitude/Beatitude -- How to Use.pdf
Binary file not shown.
43 changes: 23 additions & 20 deletions Arduino/Beatitude/Beatitude/Beatitude.ino
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@

#include "ArduTouch.h" // use the ArduTouch library

about_program( Beatitude, 1.10h ) // specify sketch name & version
about_program( Beatitude, 1.11 ) // specify sketch name & version

#ifndef __STNDLONE__
#error This sketch requires the __STNDLONE__ runtime model (Model.h)
Expand Down Expand Up @@ -292,6 +292,8 @@ class DrumKit : public Voice
* Args: note - note to turn on
*
* Memb: osc - ptr to raw oscillator
* +panRight - if true pan to right (else, pan to left)
* +panCoeff - panning coefficient (for opposite channel)
*
* Note: If you want to use the __FULLHOST__ runtime model, comment out
* the "#error" statement after #ifndef __STNDLONE__ near the top of
Expand All @@ -302,60 +304,61 @@ class DrumKit : public Voice

void DrumKit::noteOn( key note )
{
SampleOsc *o = (SampleOsc *)osc;
byte pos = note.position();
byte pos = note.position(); // position of note within octave

panCoeff = 128;
// set panning defaults

#ifdef USE_SERIAL_PORT // use reduced kit when the console is enabled
panCoeff = 154;
panRight = true;

// set wavetable and panning coefficients based on note position

const desWavTab *drumTable; // ptr to wavetable descriptor

#ifdef USE_SERIAL_PORT // use reduced kit when the console is enabled

if ( pos <= 4 )
{
o->setSample( wavetable( lofi_Kick02 ) );
drumTable = wavetable( lofi_Kick02 );
panRight = false;
panCoeff = 154;
}
else
{
o->setSample( wavetable( Snare01 ) );
panRight = true;
panCoeff = 154;
drumTable = wavetable( Snare01 );
}

#else // use full kit

if ( pos <= 2 )
{
o->setSample( wavetable( lofi_Kick02 ) );
drumTable = wavetable( lofi_Kick02 );
panRight = false;
panCoeff = 154;
}
else if ( pos <= 4 )
{
o->setSample( wavetable( lofi_Tom02 ) );
drumTable = wavetable( lofi_Tom02 );
panRight = false;
panCoeff = 90;
}
else if ( pos <= 7 )
{
o->setSample( wavetable( Snare01 ) );
panRight = true;
panCoeff = 154;
drumTable = wavetable( Snare01 );
}
else if ( pos <= 9 )
{
o->setSample( wavetable( Rim01 ) );
panRight = true;
drumTable = wavetable( Rim01 );
panCoeff = 120;
}
else
{
o->setSample( wavetable( Hat03 ) );
panRight = true;
drumTable = wavetable( Hat03 );
panCoeff = 85;
}
#endif

SampleOsc *o = (SampleOsc *)osc; // typecast generic osc pointer
o->setSample( drumTable );

trigger();
}

Expand Down
2 changes: 2 additions & 0 deletions Arduino/Beatitude/versions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Versions:

1.11 optimize DrumKit::noteOn() for size
[31744] 1.6.6 revB
1.10 drums are panned in stereo
pot0 controls balance between bass and drums
add DrumKit::panCoeff ::panRight
Expand Down
Binary file modified Arduino/Dronetic/Dronetic -- How to Use.pdf
Binary file not shown.
Loading

0 comments on commit 5378671

Please sign in to comment.