Porting Auduino Synthesizer code to Attiny85

Hi I'm new here! ...hope you can help.

I'm trying to port this code to the Attiny85

The code itself is a fork of the Auduino:

https://code.google.com/p/tinkerit/wiki/Auduino

As far as I understand it, I need to change the pin mappings.

// Map Analogue channels
#define SYNC_CONTROL         (0)
#define GRAIN_FREQ_CONTROL   (1)
#define GRAIN2_FREQ_CONTROL  (2)

to

// Map Analogue channels
#define SYNC_CONTROL         (2)
#define GRAIN_FREQ_CONTROL   (3)
#define GRAIN2_FREQ_CONTROL  (4)

and I need need to change the PWM setup:

void audioOn() {
  // Set up PWM to 31.25kHz, phase accurate
  TCCR2A = _BV(COM2A1) | _BV(WGM20);
  TCCR2B = _BV(CS20);
  TIMSK2 = _BV(TOIE2);
}

to

void audioOn() {
  // Set up PWM to 31.25kHz, phase accurate
  TCCR0A = _BV(COM0B1) | _BV(WGM00);
  TCCR0B = _BV(CS00);
  TIMSK = _BV(TOIE0);
}
}

What else do I need to change?

I have to admit I don't really understand parts of this program.
I don't really understand how the LED pin is used in this sketch for instance...
But I would love to get it running on a Attiny...

#define PWM_PIN 0 //need to use an PWM pin for output
#define PWM_VALUE OCR0A //pwm register corresponding to it
#define LED_PIN 1 //pin number
#define LED_PORT PORTB //it's PB1
#define LED_BIT 1 //PB1
#define PWM_INTERRUPT TIMER0_OVF_vect

I suspect LED_PIN is used to blink a led in response to something..

Sorry to reopen an old thread, but were these the only changes necessary to port Auduino to the Attiny85? I'm trying to do it with an Adafruit Trinket (the 5V Attiny85 version, not the Pro) and keep running into issues with the timer definition.

Here's the error I get:

Arduino: 1.6.4 (Windows 8.1), Board: "Adafruit Trinket 16MHz"

C:\Users\Paul\AppData\Local\Temp\build127568103313271913.tmp/core.a(wiring.c.o): In function __vector_5': Z:\arduino-1.6.4\hardware\arduino\avr\cores\arduino/wiring.c:49: multiple definition of __vector_5'
TinyGrains.cpp.o:Z:\arduino-1.6.4/TinyGrains.ino:119: first defined here
collect2.exe: error: ld returned 1 exit status
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

How best to get around this?

Thanks for your time and help.

Looks like they are referring to the Timer0 Overflow vector. Arduino uses Timer0 (in wiring.c) for the millis() timer. Looks like "TinyGrains.ino" is using it for PWM. Maybe a different core is assumed by the sketch.