Showing posts with label Dangerous Prototypes. Show all posts
Showing posts with label Dangerous Prototypes. Show all posts

Wednesday, 30 July 2014

quick experiment with chipKit DP32 timers

quick experiment with chipKit DP32 timers



#include <sys/attribs.h>
#define WAVE_SAMPLES 256
uint16_t a;
uint16_t b;
uint16_t d;
uint16_t inc;
boolean c;
boolean togg;
uint16_t sineData [WAVE_SAMPLES]; // void setup() {   Serial.begin(19200);   initTmr();   pinMode(A2, INPUT); //   pinMode(13, OUTPUT); //LED   sine ();   } void loop() {   uint16_t aIn =analogRead(A2);   inc=aIn>>2;   d=sineData[a];   // if(c !=togg){   // Serial.println(a);   // Serial.println(d);   // Serial.println("inc");   // Serial.println(inc);   //   // //Serial.println("togg");   // //Serial.println(togg,DEC);   // } //   c=togg; } // call interrupt handling vector extern "C" {   void __ISR(16, ipl6) int1Handler(void)   {     togg= !togg;     analogWrite(13, d); //a++;     //     //     a++;     a+=inc;     if(a>=WAVE_SAMPLES)       a-=WAVE_SAMPLES;     IFS0CLR = 0x80000;// Clear the T4 interrupt flag Bit 19     //   } } void initTmr(){   //   T4CON=0x0; //Stop timer and clear registers   T4CONSET = 0x0070; // set prescalar 1:256   TMR4 = 0x0; //Clear Timer 4 register   PR4 = 0x1D1; // set timer to 465   IFS0CLR = 0x80000;// Clear the T4 interrupt flag Bit 19   IPC4SET = 0x00000016;// Interrupt priority 5, 2   IEC0SET = 0x80000;// Enable T4 interrupt Bit 19   T4CONSET = 0x8000;// Enable Timer4 } void sine (){   uint16_t i;   for(i=0;i<WAVE_SAMPLES;i++){     b = 127*sin((2*PI/WAVE_SAMPLES)*i);     b+=127;     sineData [i]=b;   } }

Tuesday, 29 July 2014

Dub && Wise Synth


*some decoupling capacitors 100nFclose to the analog pins should be added.




My initial intention was to create something focused for the soundsystem culture. This turned out to be much more difficult than i thought .
Dub siren/Elec tom synth/And oscilattor+ MAD Lfos (some trying to recreate some of the sounds in a synare that Jah Shaka got us all used to)...All this synthesized on the fly with the help of some wavetables (all created during the start up)
.
Pots for :
-Oscillator wave selector ( Sine,cosine  Saw, Inverted Saw, Square wave, triangle and 1 extra slots for now )
-LFO rate
-LFO modulator type select ( Any of the above tables, plus a few more specific and tailored options)
-Attack
-Release
* Both attack and release can interact with the LFO
- Mode selector ( Dub Siren, Sound effects " a la Synare", Elec-Tom synth)

This video is just as an update on the proceedings.
Here i am using the Arduino Due.
Due to its complexity, i ended up re-writing the whole code from scratch and fresh to suit this specific idea.
Already started porting a similar idea to the chipKit DP32, and Pinguino and an Xmos version also soon to come, subject to availability of spare time.



Saturday, 2 November 2013

A DP32 chipKit from Dangerous prototypes... for free ?!? Yes Please !!



As some of you might have noticed, i love to dig into,  learn with, bash my head against, and ultimately discover new platforms. In my perspective it is essential to develop new and wide skills that ultimately will make one a better prepared and experienced programmer and engineer !
Recently i have been looking into the PIC32 as the most probable option to the Retro-inspired drum-synth i been developing for quite a while now, despite the fact i been using several chips along the way to develop ideas for the final version.

So, i took my chance and proposed an idea i been working in for a while, as part of a Dangerous Prototypes give-away with Microchip and Diligent in the form of a contest .
And guess what ?! I won !

QUOTE
Another winner is Ras B, and his idea for a CHipKit version of a Retro-Inspired Cynare Drum Synth scored him a chipKIT DP 32:
Id use the DP32 to make a CHipKit version of a Retro-Inspired Cynare Drum Synth( ADSR with variable exponential attack, LFO’s included) and some additional features ( Modulation related Like phaser, flanger and some basic reverb and delay- This through an additional memory chip to allow some leverage in the chips memory limitations) 
I am still working on implementing some of it, while a lot of it i have or am currently implementing it
* Funny thing was i was actually working on it when , during a break, i came across the news that i'd won !! :) .

I have already worked with the dip version of the PIC32 , even posted about it.
And i am not sure as yet, if all these features are all possible in a DIP version of it ( as it only runs at around 40 MHz, compared with th 80MHz of SMD versions).
But i vow to make a lighter version ( if need be) for the dip version, as i love it myself.
There are some limitations that might become an issue to take it as far as intend , due to the abstraction created by higher level languages as the "Arduino-based" used by the MPIDE. But, bit by bit (pass the pun) , i intend to present any limitations i might come across and reference them, so it helps anyone else !