We’ve updated our Terms of Use to reflect our new entity name and address. You can review the changes here.
We’ve updated our Terms of Use. You can review the changes here.

December 5th

from 365​/​2015 by namke communications

/
  • Streaming + Download

    Includes high-quality download in MP3, FLAC and more. Paying supporters also get unlimited streaming via the free Bandcamp app.
    Purchasable with gift card

      name your price

     

about

COMBO!

This morning I have been playing with the ATTINY85 microprocessor, and getting it to make noises (not too hard). I made a thing (listing below) then recorded it. Shortly after that I saw a channel4 video interview with the leader of a far-right UK organisation. Seemed appropriate to couple the two random streams together…

(The code is overcomplicated for what it is, but it's on the way to somewhere else!)
(and most of the stuff on the electronics photo isn't actually connected!)

lyrics

unsigned int sample_rate = 16000;

void setup() {

PLLCSR |= _BV(PLLE); // Enable 64 MHz PLL
delayMicroseconds(100); // Stabilize
while (!(PLLCSR & _BV(PLOCK))); // Wait for it...
PLLCSR |= _BV(PCKE); // Timer1 source = PLL

// Set up Timer/Counter1 for PWM output
TIMSK = 0; // Timer interrupts OFF
TCCR1 = _BV(CS10); // 1:1 prescale
GTCCR = _BV(PWM1B) | _BV(COM1B1); // PWM B, clear on match
OCR1C = 255; // Full 8-bit PWM cycle
OCR1B = 127; // 50% duty at start

pinMode(4, OUTPUT); // Enable PWM output pin

// Set up Timer/Counter0 for sample-playing interrupt.
// TIMER0_OVF_vect is already in use by the Arduino runtime,
// so TIMER0_COMPA_vect is used. This code alters the timer
// interval, making delay(), micros(), etc. useless (the
// overflow interrupt is therefore disabled).

// Timer resolution is limited to either 0.125 or 1.0 uS,
// so it's rare that the playback rate will precisely match
// the data, but the difference is usually imperceptible.
TCCR0A = _BV(WGM01) | _BV(WGM00); // Mode 7 (fast PWM)
if (sample_rate >= 31250) {
TCCR0B = _BV(WGM02) | _BV(CS00); // 1:1 prescale
OCR0A = ((F_CPU + (sample_rate / 2)) / sample_rate) - 1;
} else { // Good down to about 3900 Hz
TCCR0B = _BV(WGM02) | _BV(CS01); // 1:8 prescale
OCR0A = (((F_CPU / 8L) + (sample_rate / 2)) / sample_rate) - 1;
}
TIMSK = _BV(OCIE0A); // Enable compare match, disable overflow

/* flash the light too ;-) */
pinMode(0, OUTPUT);
pinMode(2, INPUT);
// read from analogue on (chip pin 2)
pinMode(A3, INPUT);
}

int analogIn;
int boop=1 << 8;
unsigned int del=1000;
volatile unsigned int x;

void loop() {
int i = analogRead(A3);
analogIn = i * 4;
if (digitalRead(2))
{
boop = random(0,analogIn);
digitalWrite(0,1);
for (x=0;x<del;x++);
digitalWrite(0,0);
for (x=0;x<del;x++);
}
else
{
del= random(0,10000);
}
}

// 'saw' is actually a fixed-point (8+8) phase accumulator
unsigned int saw=0;

ISR(TIMER0_COMPA_vect)
{
// Write to the PWM controller
OCR1B = (saw >> 8) > 127 ? 255 : 0;
saw += boop;
}

credits

license

all rights reserved

tags

about

namke communications York, UK

Since 2000 John Tuffen has been performing/releasing electronic music under the name of namke communications. Originally formed with Damian Murphy in 2000 for the SightSonic festival in York, since 2002 it has been a solo venture.

December 2011 saw the live return with a synthesiser/drum-machine trip; January 2012 saw a guitar replacing the synth but still maintaining the electronic edge...
... more

contact / help

Contact namke communications

Streaming and
Download help

Report this track or account

If you like namke communications, you may also like: