Wednesday, 17 January 2018

Modular Eurorack Compressor

 There are plenty of off the shelf compressors you can buy.
However by building one yourself, you'll learn the principles of how they work.

You can actually build a compressor with a envelope follower, a an inverter and a VCA. 
A modular compressor is essentially a voltage controlled envelope follower tied to a VCA.
 
The 4 basic components:
1. Mult
2. VCA (linear preferably but a exp VCA will work too)
3. Inverter / attenuverter
4. envelope follower
 
 
 First split the signal into two.
a. the original signal (A) to be compressed.
b. the side chain detector signal (B)
 
Signal A --> envelope follower ----> inverter ------> CV input of VCA
Signal B --------> audio input of VCA
 
The fun thing about building your own compressor is varying the components.
The VCA for example could be vactrol based LPGs 

You could use a Make Noise Maths. It could perform the envelope follower & voltage inverter tasks.
A serge DUSG could do this as well, as could the Doepfer VCS( A-171-2). 
 
This is a patch for compressing a bass drum
In this example channel 4 is acting like a slew limiter.
It's output is plugged into the input of channel 3. It's in inverter mode.... creating an inverted
version of channel 4. 
Chanel 2 of the maths is simply amplifying the straight audio of the bass drum.
It's then going into the second audio input of the VCA.
I'm using the HP filter to remove some of the lower frequencies. I could also use an EQ.
 
 I've swapped the LP filter for a delay in the above example.
The delay has lots of CV inputs which could be modulated with LFOs, the Maths, sequencers, or EGs. 
The Doepfer A-119 envelope follower has a voltage comparator with a gate output that can be used to trigger envelopes.
 
Of course the signal processed in the VCA doesn't have to be the same signal that is being analysed by the envelope follower. The open architecture of a modular synthesizer allows you to design any kind of side-chain compression scenario your heart desires.  


Another interesting module is the Bastl Dynamo.
Its just 5HP and contains two Envelope Followers with inverted and non-inverted 
Envelope Follower Output. There is also a Compressor CV Output with indication LED 
(only negative voltage when envelope is greater than the threshold.
When the Compressor CV is plugged into CV input of a VCA with offset and attenuator knobs you get an Compressor!
 
 
Extra modules that would come in handy
5. mixer
6. Slew Limiter
7. EQ
8. filters
9. comparator
 





 Links
 


Friday, 12 January 2018

Timers and interrupts - basic using timerOne library

Timers

Many arduino functions use timers.
Mostly, they are hidden. 
The Uno, running the ATmega328 has 3 timers: Timer 0,1,2.
 
The Arduino Uno also has a central system clock that runs at 16MHz.
It's a square wave produced by this crystal on the left.
This clock can be directly or indirectly connected to the timers.
16Mhz is the max speed that the timers can increment their counters.
However we can control the speed of the timers using what is called a prescaler. 
The prescaler divides the clock

Each of these timers, count up till they reach a max counter value.
They then tick back to zero. This is called overflow.
 
Timer0: 
TCNT0 (Timer Counter 0)
Timer0 is a 8bit timer. 
Thus it can store a maximum counter value of 255.
It's used in functions like Delay(), Millis(), Micros() .
analogWrite() pins 5,6
Timer0 is already set up to generate a millisecond interrupt 
to update the millisecond counter reported by millis().
 
 Timer1:  
TCNT1 (Timer Counter 1)
Timer1 is a 16bit timer.
Thus it can store a maximum counter value of 65535. 
It's used by the servo library 
analogWrite() pins 9,10
 
Timer2:  
TCNT0 (Timer Counter 0)
Timer2 is a 8bit timer
This counts from zero to 255.
It's used by the tone() function.
analogWrite() pins 3,11
 

 Interrupts

An interrupt is a mechanism for performing an immediate action , irrespective of whatever else
the program is doing.
You can think of it as something extra that runs in the background while your Arduino is 
executing the main body of code. It will do this extra thing at certain pre-determined times.

There are 2 types of interrupts.
1. Hardware
2. Software

Hardware interrupts happen, based on something happening on a pin.
(Eg a certain pin goes high or low)
Software interrupts happen at certain times.
This can be pretty useful as the interrupt allows you to pause the events taking place in the loop() at precisely timed intervals.This allows the program to execute a separate set of commands. 
Once these commands are done the Arduino picks up again where it was in the loop().
It's important to not make your interrupts complicated, otherwise it may pause
the rest of your program for too long.
 
Interrupts are meant to be short and sweet.
 
Interrupts can generally be enabled / disabled with the function interrupts() / noInterrupts()
By default in the Arduino firmware interrupts are enabled. 
 
 
THis circuit uses just two 220 ohm resistors, two LEDs.
The anode of the LEDs connect to pins 9 & 10 (via the resistors). 
Cathode to gnd.
 
For this first bit of code , we are using the TimerOne library. 
This is a 3rd party library. It's the easy way to write your own timer interrupt service routines.
Timer1 gives finer PWM control and/or running an periodic interrupt function
Author: Jesse Tane, Jérôme Despatis, Michael Polli, Dan Clemens, Paul Stoffregen.
 
The code:

//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
/*
 This program mixes the delay function with timer interrupts
 Uses two digital pins & two LEDs
 */

#include <TimerOne.h>
String LEDStatus="OFF";

// using pins 10 & 9
// the red led is using delay
// Green LED uses interrupt
int GreenLED=10;

int RedLED=9;
int redDelay=1000;//millisecs
 
void setup()
{
 
  pinMode(GreenLED, OUTPUT);    
  pinMode(RedLED,OUTPUT);

 // Timer setup code is done inside the setup(){} function in an Arduino sketch.
// initialize the interrupt, specifying what time frame you want it to “interrupt” on,  
// and then what you want it to do when the interrupt alarm goes off.

  Timer1.initialize(200000); //0.2 secs ... millimicrosecs
  Timer1.attachInterrupt( FlashGreenLED );
 Serial.begin(9600);
}
 
void loop()
{
digitalWrite(RedLED, HIGH);
delay(redDelay);
digitalWrite(RedLED, LOW);
delay(redDelay);
}
 
void FlashGreenLED() // void = function
{
if (LEDStatus=="ON"){
  digitalWrite(GreenLED,LOW);
  LEDStatus="OFF";
  return;
  }
if (LEDStatus=="OFF"){
  digitalWrite(GreenLED,HIGH);
  LEDStatus="ON";
  return;
}
}
 
// &&&&&&&&&&&&&&&&&&&&&&&&&

-----------------------------------------------------------------------------

Links
+ https://www.instructables.com/Arduino-Timer-Interrupts/
+ https://toptechboy.com/arduino-lesson-28-tutorial-for-programming-software-interrupts/

This is a good link for the TimerOne library

Monday, 8 January 2018

Roland Jam - 100m, Aria TR8, MX 1

A quick and fun jam.
I love Roland gear, new and old.

I'm using Aria gear TR-8 drum & a MX 1 mixer and some old Roland 100m modules.

Apologies for the neck cramps.Couldn't work out how to rotate the video.


Wednesday, 3 January 2018

Hyve Touch Synthesizer - Tonnetz keyboard

I'm exploring the Hyve's upper keyboard. This is not your familiar black/white piano.
Apart from it not having any moving parts, it's arranged in a lattice structure.
This is a network representing tonal space "first described by the mathematician Leonhard Euler in 1739.Various visual representations of the Tonnetz can be used to show traditional harmonic relationships in European classical music".

It's all about chords and harmonies. Each note is harmonically related to its adjacent notes.
Straight up is a perfect 5th (a interval spanning 7 semitones), up to the right is a major 3rd (a interval of 4 semitones), and up to the left is a minor 3rd (interval of 3 semitones).


So the way it's arranged is if you play any note in a straight line from top to bottom, or bottom to top, it will play in perfect 5ths.
If you play notes going up to the right you will have a augmented pattern (it will go up or down in Major 3rds).
And playing notes to the left will have a diminished pattern (Minor thirds).

This layout of neighbouring fifths and thirds also makes it easy to form major and minor seventh, ninth, 11th and 13th chords.

It seems that all the most important scales — major, minor, chromatic, whole‑tone, diminished, blues, etc — have logical and distinctive patterns that basically climb rightwards and up. 
============================================================
How it forms chords is really interesting.

I'm starting by looking at how it groups the Major Triads.
These are the most common  chords and are built by adding the third and fifth notes in the scale above a starting note (root). For example, in C major, the triad built on C contains:
  • C (the root)
  • E (the third note above C; often called just "the third")
  • G (the fifth note above C; often called just "the fifth")
The 3 major white-white-white triads are: C Major, F Major, and G Major.
.
C major: C E G
  F Major : F A C
 G Major: G B D
---------------------------------------

Minor Triads
 In C minor, the triad on C is built the same way:
  • C (the root)
  • E♭ (the third note above C; often called just "the third")
  • G (the fifth note above C; often called just "the fifth")
This is called the C minor triad.

C Minor Triad : C Ef G
C-sharp Minor Triad : C# E G#
 D Minor Triad : D F A
-------------------------------------------------------------------------------------------------------------
As discussed earlier, this layout of neighbouring fifths and thirds also makes it easy to form major and minor seventh, ninth, 11th and 13th chords.

First the 7th & 9th chords.
The C Major 7th Chord is C E G B
The C Major 9th chord is C E G B D
--------------------------------------------------------
The C major 11th chord is C E G B D F
 ---------------------------------------
The C major 13th chord (drawn in light green) is C E G B D F A
===========================================================
The minor chords now.

Below are just random examples.

The G-minor 7th chord interval is: G A# D F (G Bf D F)


The E-minor 9th chord interval is: E F# G B D


The C minor 13 chord contains C, E♭ , G, B♭, D, F and A♭ (C D# G A# D F G#) as on the diagram below:
 


Hyve Synth

This arrived in the mail today: A Hyve synth.
I've been eagerly waiting for this since Feb 2017.
It's facinating. I think the Hyve gets its name from the upper honeycomb keyboard (and it also sounds like a swarm of buzzy oscillators.... there are 60 voices !!!).

There aren't a lot of these Hexagonal Lattice type keyboards around. (Tonnetz).
It's very Buchla Easel in its responsiveness to touch.

The Hyve is a result of a kickstarter program.
 https://www.kickstarter.com/projects/skotwiedmann/hyve-touch-synth-make-the-future-of-musical-expres
Thanks Skot for this incredible instrument. It's a beautiful fusion of engineering with art.
So how does such a small synth have this huge sound? (I'll post some videos later).
The synth looks deceptively simple. The two main ICs are a SN74HC393DR & CD40106BM96
There are six 74HC393s. It's a dual 4-bit binary counter. Each chip contains 8 flip-flops.

There are two CD40106s. These are CMOS Hex Schmitt-Trigger Inverters.
Each chip consists of six Schmitt-Trigger inputs and is capable of making 6 square/pulse wave oscillators.

The upper section has a TDA1308T/N2,115 .. it's a audio amplifier & a UA78L05CPK .... a 5V voltage regulator.
If I'm understanding this circuit correctly, each CD40106 produces 6 square waves.
As there are two CD40106 we have 12 original square waves to play with.
Each square wave is fed into a Flip-flop. The flip flop outputs 4 squares waves (each a octave below the previous).

So in actual fact each of the original square waves has added to it 4 new waves at different octaves from the original. (1 + 4 = 5)

There are two CD 40106 ICs so there are 12 original square waves.
12 X 5 = 60
This I think, is how we achieve 60 voices.

(let me know if there are any mistakes)
------------------------------
This Octave-down effect has been used in the past in guitar pedals. The MXR Blue Box used this method to create a two octave drop by using flip-flop circuits to divide the frequency by two. 
This created a buzzy synthesizer like tone.

The Roland SH101 used a CMOS 4013 dual flipflop to give three sub-oscillator waveforms; square at -1 octave, square at -2 octaves, and a pulse at -2 octaves.
Roland just fed the main oscillator output to the CMOS 4013 bistable flip-flop circuit to give the sub oscillator waveforms. Simple but ingenious.

Links:
HyveSynth.com
+ Hyve touch Synth Facebook
+ Kickstarter
+ Factmag
+ Muffs
+ Muffs - Hyve modifications
+ CMOS




Monday, 1 January 2018

Acclimatizing for Machu Picchu

Altitude sickness is probably the biggest obstacle for treking in Peru especially if you live at sea level.
In Peru most cities like Cusco are considered high altitude and the oxygen levels drop by around 5-6 percent. Symptoms range from SOB (shortness of breath) & tiredness to vomitting and dizziness.
In extreme cases, altitude sickness can cause death. Always seek medical advice if you are suffering from severe altitude sickness.

Altitude by City in Peru
  • Cusco – 3,200 meters (10,500 ft)
  • Sacred Valley* – 2,700 meters (8,850 ft)
  • Machu Picchu – 2,430 meters (7,970 ft)
  • Arequipa – 2,300 meters (7,500 ft)
  • Colca Canyon** – 3,633 meters (11,800 ft)
  • Puno / Lake Titicaca – 3,830 meters (12,560 ft)
Lima is not a good place to acclimatize for your Andean hikes as it is only 154m above sea level.
Before heading out to Cusco, I spent some time in Arequipa and visited a few of the surrounding volcanoes to help adjust.

The locals also advised me to chew Coca leaves. They make a decent tea.
Yes, coca leaves are the raw material for cocaine, but chewing the leaves or drinking coca tea when you're in Cusco (altitude 3,400 metres) clears your throbbing head and lets you breath again.





Altitude 4885m

 Our bus group at 5000m. Lack of O2 took its toll on everyone (except the bus driver).


Peruvian Pizza helps too.


 Inca Terraces




The bird is a Andean Condor.



Back in Arequipa. Peruvian hot dogs. I can think of no better way to round off a great few days in the mountains.
----------------------------------------------------------------------------------------------------
For more travel links click here:
http://djjondent.blogspot.com.au/2015/03/travel-postcards-index-my-travel.html