Do you think it possible to hook up a DSP daughtercard to the Atmega168p via i2c? I gather that the TWI pins are 28 (PC5/ADC5/SCL) and 27 (PC4/ADC4/SDA). I’m looking at the cheap 56000-based development board, http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=SYMP_SOUNDBITE . Looks pretty sweet for $150. I know nothing about i2c, but it looks do-able to have the Shruti boards handle all the MIDI and display/control, and then send some subset of the midi data down to the DSP, DSP audio out direct, and back through the CEM. Let me know if you’re interested, and I’ll find a way to get you a soundbite.
Unrelated question - is there a repository of patches somewhere? I’ve overwritten a few by accident.
I haven’t experiemented with feeding back some of the CEM output back into the audio input (via mixer to control loop gain) yet. If it sounds good, it might be a trace worth putting in with some gain control for Shruthi.
Crystal - is there a way to effectively lower the frequency of the clock to the atmega, so as to get slow-down effects? I’ve seen gameboy mods using an LTC1799. Do you think that might work here, or maybe even a sw change to get 1/2 speed, etc.?
The Shruti-1 doesn’t make any use of the I2C pins of the ATMega328p, so there’s no reason why using them to control a slave circuit wouldn’t work. Indeed, I could get the Shruti-1 to read/write patches to an external I2C eeprom (but the I2C driver took a lot of space!). I’m not a big fan of I2C, though. If I were to design something to interface with this board, I would use the 6-lines bus (breaken away on pins 17-26 of CON1, look at the schematics…), 1 bit for clocking, 1 bit as a data/address, and a 4 address/data bits. It’s likely that faster parameter refresh rates could be achievable this way…
But the thing that troubles me with those DSP devboards is the following… To me, doing a cool hack or writing a cool piece of code is pointless if I’m the only one to ever use it. So let’s say I make a kick-ass synth with it. How could someone else build one too? By buying the DSP devboard? Or should I include the DSP on my design, which means finding a company to assemble (in low-volume) a PCB with all the SMT stuff already soldered on it? I know there’s a point in time I’ll have to graduate from through-hole and learn how to prototype SMT boards ; but the result will lose the DIY appeal, and it’s quite an investment.
As for the patches, you can hook up the Shruti-1 to a serial/USB dongle ; or an arduino. make dump_patches will create a text file with your patches in hardware/shruti1/data . You can mix and match with the patch files already in hardware/shruti1/data ; and then make upload_patches to copy back to the Shruti.
Feeding the output back to the output makes the resonance scream louder. This is indeed very similar to an extra resonance feedback loop, at the exception that this one goes through the VCA and the output/input amp stages.
Finally, regarding an external oscillator, you’ll have to set the fuses on the 328p so it gets clocked by an external oscillator instead of a crystal. Also, note that slowing down the chip will screw up MIDI reception, since the baud rate generator on the 328p doesn’t use an independent clock source ; and the display (since the software serial output to the LCD is clocked on a division of the audio sample rate).
Thanks. The DSP daughtercard thing – it’s just that you’ve built such a nice midi device (arpeggiator, receive CCs, etc.), that I’d love to use shruti-1 as a front-end to a DSP. Sort’ve like that Soundart Chameleon, which I failed to buy a few years ago! I’m more comfortable using low level languages on a DSP, than high level ones on the avr, so I thought I’d check out the possibility of i2c. I agree - eval kits don’t make sense as a way to distribute a synth! But for the DIY types, a $150 daughtercard with nice DACs and optical audio i/o might be reasonable, especially if it’s just a pair of wires (or 6 wire ribbon) to connect it.
I see the patches in hardware/shruti/data, thanks!
External oscillator – I’ve got an LTC1799 on hand, from the getlofi kit, so I spent the past hour playing with it. I expected to start missing midi events if underclocking the atmega, but am hoping to do stuff with the arpeggiator free running on the local clock. The 1799 part is variable from 1 kHz to 33MHz, according to the data sheet. I can’t seem to get it to run faster than 5MHz though, at least not with the pots I have on hand. On the gameboy, it seems to work as a direct replacement for the crystal, in an arrangement with a switch. When I can figure out the right resistances to get ~16 Mhz, I’ll solder it in place of the crystal, with the crystal still connectable via a switch, and let everyone know how it works.