frequency table: --------------- equal tempering: x = 2 ^(1/12) octave is 8 below middle A (440Hz) c = (440 / (x^9)) / 8 counter value (complement of period) p = -1 -(8000 / c * x^(-0)) communication ------------- i was thinking about a bitbanged serial interface, where the synth runs at 9600 hz, and the timing engine is used to send/receive asynchronous serial data: * interrupt on change isr * wait loop until middle of start bit, guess where we are by looking at timer0 value (interrupt was probably pending) * check start bit * ok -> push 'receive synth' receive synth: recv 9 bits. when stopbit is valid, save data in buffer. now, i was thinking that a simpler, and way cooler, solution is to use a 2 wire protocol: master sends out a 8kHz clock signal, slave can sync its sample clock to this (alternative up/down edges). once this is in place, they can start sending meaningful data to each other, using their audio in/out lines. using 'magic numbers' it should be possible to: * avoid a master ever sends out a magic number without intent * enable the slave to switch into receive mode this is to make sure plain transmission/reception works. when you move this stuff through audio processors, weird things might happen. to get this working: * receive should be always on, so if a processor gets confused, it can always be reset by sending it a magic value and a reset command.