Cylon/Voice Modulation
Posted: Thu Dec 21, 2006 12:28 pm
Would anyone have any code examples of modulating a voice input with sin wave. Alla Cylon.
Cheers,
kradsith
Cheers,
kradsith
Code: Select all
equ s reg10
equ c reg11
equ freq reg12
;
skp run,start
clr ; Clear ACC
wrax s,0 ; Write 0 to sin reg
sof 0,0.5 ; 0.5 -> ACC
wrax c,0 ; Write 0.5 to cos reg
;
start:
;
clr
rdax pot0, 0.05 ; Read pot 0, scale to adjust max speed
wrax freq, 0 ; Save the freq coefficient
;
; Do the SIN calculation
rdax c, 1.0 ; COS -> ACC
mulx freq ; COS*fcoeff
rdax s, 1.0 ; +SIN
wrax s,0 ; Write it back
;
; Do the COS calculation, -SIN in ACC
rdax s, -1.0
mulx freq
rdax c, 1.0
wrax c, 0
;
; Modulate the inputs and write them to the DACs
ldax adcl
mulx s
wrax dacl,0
ldax adcr
mulx s
wrax dacr,0
Hi there - does anyone know if this will actually sound like a Cylon style voice i.e. a vocoder style simple (mono-pitched) sawtooth-wave sound, or is it just another ring modulator style voice?Markus wrote:Cylon voice implementation with a microcontroller: http://www.elektor.com/magazines/2008/m ... 2560.lynkx
Marek