Saturday, 26 March 2016

Friday, 25 March 2016

Tone() function - Arduino

Arduino - The Tone function
The Tone function is an easy way to make some noise with your Arduino.
 
A basic circuit. Example 1
The resistor is 100 Ohms.
Just need a Piezo speaker, breadboard & an Uno
 
The black leads connect to GND
 
 we need just 2 arguments
  1 pin
  2 frequency in Hz - determines pitch
 
tone(Pin, Hz)
tone(piezoPin, 100)
The frequency can be any number between 0 and 65,535.
Note that most noises that can be heard with the human ears range between 2k & 5k
 

Here is the code:
//-------------------------------------
// demo of tone function

// variables
int piezoPin = 8;

void setup(){
}

void loop(){
 
  /*
  we need just 2 arguments
  1 pin
  2 frequency in Hz - determines pitch
  */
  // create a tone ... tone();
  tone(piezoPin, 100); // play around with this last number
 
}
//---------------------------------------------------
 
 Example 2
Creating a beat.
Add a duration period - the last parameter (and a delay to your code).
 
The tone function is
tone(Pin, Hz,duration in milliseconds)
tone(piezoPin, 100, 500)
 
Here is an example of your new code
 
//----------------
// demo of tone function 2

// variables
int piezoPin = 8;

void setup(){
}

void loop(){
 
  /*
  we need just 3 arguments
  1 pin
  2 frequency in Hz - determines pitch
  3 duration
  */
  // create a tone ... tone();
  tone(piezoPin, 3000, 500);
 
  delay(1500);
 
}
//-----------------------------
 
Note, to add 1 second between each sound
you need to use a duration of 500ms, and a delay of 1500ms
 
 
Limitations
Don't use analogWrite on pins 3 & 11 if you are using the tone function

 
 Links
+ https://www.programmingelectronics.com/an-easy-way-to-make-noise-with-arduino-using-tone/
+ https://www.youtube.com/watch?v=1_LMAgO14z0
 
 ---------------------------------
------------------------------------- 

Buchla 360

Sadly this is only a panel, but its a glimpse into the world of the Buchla 300.

What is it? It's part of  the Buchla 300 Series Electric Music Box.

The 300 is described as a Digital/Analogue Hybrid Music system.
I have never seen one in the flesh and wonder what they were like.

The 360 is very rare. Formally, its called the "360 Programmable Octal Signal Source".
It's a 8 Voice Digital Synthesizer with 3 oscillators and a dedicated Buchla Lowpass/Gate per voice.

The 300 series were basically computer controlled 200 systems and it marked a return to analog modular synthesis when the rest of the world was going digital. ....mid 1970s's.
It used a patch programming language (Patch IV) to control the mostly 200 modules.
What made this special was that though many of the the modules were analog, the 300 offered digital control. This same concept of patch control is found in the modern Buchla 200e.

The 300 Series Controller/Processor was programmed using the 221 Kinesthetic Input Port touch keyboard.

The 221 had two modes :Programming or Performance.
The 221 had 50 real touch sensitive keys which could function in the +0 or in the +50 performance modes.
Special keys for programming in the Patch IV language included CMND, EXEC, DEL,  KEY,  SEQ, VOLT,  FUNC,  SEQ, SUBR, JUMP,  SKIP, INTP, SET, etc. etc.
Patch IV was written in 8080 assembly language, and used 28 K bytes of
RAM & 8 K of ROM. The 300 processor was the Intel 8080. This was a 8-bit micro processor originally released in 1974.

The 8080 was the basis of the MITS Altair 8800, for which Bill Gates and Paul Allen wrote BASIC.
The rest is history.

Please let me know if there are any errors or omissions.

Tom Roberts - National Gallery of Australia

Last weekend I made a flying visit to Canberra, the National Capital of Australia.
I visited a few friends and dropped by the National Gallery to see the Tom Roberts
exhibition. Most of these pictures have been with me since I was a child.
They are part of my consciousness, and helped me understand Australia, the country that I today
call home. I was born in Malaysia.

Tom Roberts was born in England & came to Australia at the age of 13. He lived half his life outside the country. Maybe he never quite knew where he belonged. ???
The picture above is called "Coming South".
It depicts the long journey to Australia from Europe. Though I arrived by plane, the sea is still the most
common route most immigrants use.

Its a beautiful composition with a dreamy like quality in the paint. You can see the ship move... its heaving to the right. The funnel, the chimney, the foreground all tilt.

Roberts, probably had to return often to the "mother country" to further his career. But I think you can see from his paintings that his heart belonged to Australia.

This is an old friend. I've looked at this countless times before and can't get over how relaxed it all this.
It's called "Bailed Up" and depicts a highway robbery. The man on the horse to the left is slouching forward with his gun pointing to the ground. The bushranger (Captain Thunderbolt) looking into the coach may as well be asking the occupants if they are having a nice day. Captain Thunderbolt was known as the "Gentleman Bushranger".

This is William Strutt  - 1887 - "Bushrangers on St Kilda Road". I understand that this is also Captain Thunderbolt.

I think Bailed up is more an examination of the Australian Bush. The heat, the glaring light, the vertical landscape are all beautifully portrayed. It's often described as Australia's greatest landscape painting.

This is a quite complex composition. It's called "the breakaway". The rider's almost futile attempts to control his sheep is emphasized by the tilt of the land, his outstretched arm & leg.

This is known as "the BIG Picture". At 5.65m across and 3.6m tall, the work took 2.5 years to paint.
Officially titled "The Opening of the First Parliament of the Commonwealth of Australia by HRH The Duke of Cornwall and York (later HM King George V), May 9, 1901"

Poor Tom ... he had to paint 269 separate portraits. It must have felt like hard labour. Roberts himself reportedly dubbed the painting his “Frankenstein of 17 feet”.

I much prefer this smaller study:

Below we have "The Golden Fleece"
This along with "Shearing the Rams" are two iconic paintings depecting shearing... the backbone of the nation's wealth and prosperity.

In titling the first painting, "The Golden fleece" was Roberts referencing classical antiquity - Jason & the Argonauts.  Tom was heavily criticized at the time for his depection of manual labour. Critics of the time said, "well it’s a bit vulgar to paint something so realistic, a great artist should connect to the ideology of the Greeks.” (Smith). But I think the figures are noble & heroic.

In a letter to The Argus on July 1880, he wrote: “Being in the bush and feeling the delight and fascination of the great pastoral life and work I have tried to express it … the quick running of the wool carriers, the screwing of the presses, the subdued hum of the hard, fast working and the rhythmic click of the shears, the whole lit warm with the reflection of Australian sunlight.”


Just love this painting. It's Lake Como, Italy. 1913.
Robert's emphasis of the triangles & geometry , the glassy water, misty light.


All, in all, a great exhibition.If you do get a chance to visit Canberra over the Easter weekend, dont miss it. 
http://nga.gov.au/

Thursday, 24 March 2016

Arduino - flashing a LED - basic program - delay function.

This is the basic code that everyone learns as their first arduino project
The blinking LED
It uses the delay function.
 
This function is good for many cases, however it has a disadvantage that it can slow up the program.
However, for this sketch, its perfect.
 
 
The setup:
The cathode (short leg) of the LED connects to GND
The resistor is 220 Ohm
The anode connects to  pin 7 in this case.
 
 Here is the basic Code
 
void setup() {
// put your setup code here, to run once:
pinMode(7, OUTPUT); // configure the pin as an output
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(7, HIGH); // turn LED on
delay(1000); // wait 1 second
digitalWrite(7, LOW); // turn LED off
delay(1000); // wait one second
}
 ---------------------------------
-------------------------------------
 
 

Midi - 3.5mm

There are 2 standards of the traditional MIDI connector to TRS (Tip-Ring-Sleeve) cable.
Both standards use pins 2, 5 & 4 of the DIN connector. 
(female DIN to male TRS)
These are called Type A & Type B.
One extra connector type uses a mono minijack.
This is referred to as Non-TRS, TS, or sometimes Type C


TRS Midi A

Korg (Electribe 2 and SQ-1, SQ-64, NTs-1), Little Bits, Make Noise (O-coast), Moog Subharmonicon, Line 6 MIDI Mobilizer, AKAI (force, MPC Touch), Critter & Guitari Organelle M,  IK Multimedia (iRig), Roland T-8, J-6,E-4 , Twisted Electrons (Acid8 MKII, TherapSid MKII), Westlicht Performer,
Teenage Engineering (OP-Z with oplab, Pocket Modular 16), SQUARP (Rample), Dirtywave (M8),
Dreadbox ( Lil’ Erebus), Intellijel (the MIDI breakout for their palette cases)
use TRS MIDI A.

The DIN schematic above is of a female type... like the pic on the right

tip to pin #5
ring to pin #4
sleeve (earth/ground/shield) to pin #2

This particular configuration makes it easy for connection between a Make-Noise O-Coast & the Korg SQ-1 for example.
You only need a 3.5mm stereo jack to connect them to each other.




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

TRS MIDI B

Arturia (e.g. Beatstep Pro and Keystep, Microfreak) and early Novation (e.g. Circuit, Circuit MonoStation and Launchpad Pro) , Music1010 (MX4, blackbox, bitbox, synthbox), EOWAVE (Quadrantid Swarm), 
Flame (Quad CV Recorder, µQMCV), Pittsburgh Modular (Liveforms SV-1),
Analogue Solutions (Treadstone), Polyend's Tracker, Erica Synths Drum Sequencer & Future Retro (MIDI BUS), Malekko (SYNC), Faderfox SC4 & PC4, Five 12 Vector sequencer, Twisted Electrons (Crazy8) use the alternate ‘TRS MIDI B 

Note: Later Novation products like the Launchkey Mini (mk3) and  Launchpad Pro (mk3) use type A.
tip to pin #4
ring to pin #5
sleeve (earth/ground/shield) to pin #2

This particular configuration makes it easy for connection between a Arturia BeatStep Pro & the Music 1010 Synthbox for example.
You only need a 3.5mm stereo jack to connect them to each other.

==============================
To complicate things a bit more the Arturia beatstep pro uses another trs-din cable for the sync/clock adapter. It's got a black 3.5mm plug.
Don't mix this with the midi cable which is grey.


tip to pin #3
ring to pin #1
sleeve (earth/ground/sink) to pin #2
------------------------------------------------------------------------------------
Some modules such as
ALM/Busy Circuits, Shakmat Modular, Elektron (Samples) and Michigan Synth works (MSW)
support both A & B standards.
 
The 3.5mm jack can be switched between differing 3.5mm MIDI configurations 
by reversing the jack connector on the rear of the module.”
 
On the MSW  mBrane for example,
“Rev1.1 of the device … features PSImidi which allows ANY type of TRS MIDI cable to 
be used on the input.”

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

Type C

Also referred to as TS and Non-TRS
Expert sleepers (DJ1000, ES-5, ESX-8GT), Beatstep (original), MFB (Nanozwerg pro & SEQ-01 Pro)
 
This connects using just two points: Tip & Sleeve.
The tip connects to pin 4 of the midi DIN 
The Sleeve connects to pin 5 of the DIN. (sink or earth)
 

Links
+ Midi association

Monday, 21 March 2016

Deluge - factory reset

Factory reset

  

Almost all of the settings menu settings are stored in the Deluge’s internal memory,
as opposed to the SD card. To restore the Deluge’s default factory settings, switch it on

while holding down on the select knob. The numeric display will briefly blink “RESE”, indicating
that the reset has been performed. 

Saturday, 19 March 2016

If Statements , AND, OR, Equal & not Equal - Arduino

 This is all about "If Statements" in the Arduino world.
These are only executed , based on a condition
 
The if statement checks for a condition and executes the following statement or set of statements if the condition is 'true'.
 
 
 
Check out this old circuit about pots:
 
 I'll be modifying this with a if statement.
 
 

The code:
----------------
// if statement exercise
// if voltage is above 4V, the LED lights

// set up variables

int myPin=A2;
int readVal;
float V2;
int dT=250;

int redPin=9;

void setup()
{
  Serial.begin(9600);
  pinMode(myPin,INPUT);
  pinMode(redPin,OUTPUT);
 
}

void loop()
{
  readVal=analogRead(myPin);
  V2=(5./1023.)*readVal;
  // converts to a voltage -- remember to place the decimal
  // points after the 5 & 1023 ... these may be floating points
 
  Serial.print("Potentiometer Voltage is ");
  Serial.println(V2);
 
  if(V2>4.0){
    digitalWrite(redPin, HIGH);
  }
  if (V2<4.0) {
    digitalWrite(redPin, LOW);
  }
 
  delay(dT);
}
------------------------------------
Here is a variation of the if statement using equal (==)
and not equal(!=)
 

 if(V2==5.0){
    digitalWrite(redPin, HIGH);
    // "==" is equal
  }
 
  if (V2!=5.0) {
    digitalWrite(redPin, LOW);
    // != is not equal
 
----------------------------------------------------------------------
 Compound Conditionals
You can also use AND , OR

 if(V2>2.0 && V2<3.0){
    digitalWrite(redPin, HIGH);
    // "&&" is and
  }
 
  if (V2<2 || V2>3) {
    digitalWrite(redPin, LOW);
    // "||" is OR
  }
 
  delay(dT);

 ----------------------
if you are combining great than and equal, you don't use "=="
eg:
 if(V2>=2.0 && V2<=3.0){
    digitalWrite(redPin, HIGH);
    // "&&" is and
  }
 
  if (V2<=2 || V2>=3) {
    digitalWrite(redPin, LOW);
    // "||" is OR
--------------------------------------------
 
 
Thanks to Paul McWhorter for the great video.

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

Thursday, 17 March 2016

analogRead - Arduino

 The Arduino can read analog voltages.
It can be used to help analyse circuits.


This can only be done with the analog pins (A0 to A5)

In this example I'll use pin A3
 

Open your serial monitor.

We are getting the number 238
This is not a voltage
It's the scaled number between zero & 1023
I call this the readValue.
It's a 10bit number (1024 is 2 to the 10th)

0V = 0
5V = 1023

You can test this is we move out test probe to measure the reading @ the 5 volt rail.
We would expect a reading of 1023.
This is exactly what we get.
 
To calculate the voltage from the readValue use this formula.

Voltage  = (5/1023) x ReadValue

thus in this example,  V = (5/1023) x 238 = 1.163

The code:
------------------------------------------------
// declare your variables
int readPin=A3;
int V2=0;
int delayTime=500;

void setup()
{
  pinMode(readPin,INPUT);
  Serial.begin(9600);
}

void loop()
{
  V2=analogRead(readPin);
  Serial.println(V2);
    delay(delayTime);
}
----------------------------------------------------------

A useful variation of the program would be for the monitor to display the value in Volts.
To do this we need to do a few changes:
Add a new variable (readVal)
V2 must be a float
 
 readVal=analogRead(readPin);
  V2=(5./1023.)*readVal;
 

 The improved code:

------------------------------------------------
// declare your variables
int readPin=A3;
int readVal;
float V2=0;
int delayTime=500;

void setup()
{
  pinMode(readPin,INPUT);
  Serial.begin(9600);
}

void loop()
{
  readVal=analogRead(readPin);
  V2=(5./1023.)*readVal;
  Serial.println(V2);
    delay(delayTime);
}
-------------------------------------------------

Thanks to Paul McWhorter for his great inspirational videos
 
 
 ---------------------------------
-------------------------------------
 

Wednesday, 16 March 2016

ARP 2500 - My Resonator Addiction

Some videos using the beautiful 1047 filter/resonator.


The ARP has a combination of LP, BP, HP & notch.
All filter outs are available simultaneously. It very beautiful for obtaining timbres.
esp when Q is turned up. It's so resonate that a pulse applied to the input with make the filter ring.

The Korg Resonator works differently to the ARP as far as I understand.
The PS 3100 uses 3 bandpass filters.

The original video with the unaltered ARP sample is here:

...

 Most synths use a LP filter with a sharp cutoff (24dB) with moderate resonance (Q=10, or 20dB peak).
The ARP specs for this filter claim a resonance from zero to 54dB (or Q between 1/2 and 512).
The filter's bandpass response is a single pole, 6dB.
This is similar to natural acoustic resonators like drums, horns, pipes & strings.


Bundenna to Otford hike - NSW

 I did this hike around 2004.





 
















































For more travel postcards click here: