Would anyone have any code examples of modulating a voice input with sin wave. Alla Cylon.
Cheers,
kradsith
Cylon/Voice Modulation
Moderator: frank
This code will do a basic modulation of the input with a sin wave. It generates the sin wave rather than using the built in LFOs as we want a higher frequency than the LFOs will produce.
The result really should be filtered to give a true Cylon sound but that is left as an exercise for the student
The result really should be filtered to give a true Cylon sound but that is left as an exercise for the student
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
Frank Thomson
Experimental Noize
Experimental Noize
Cylon voice implementation with a microcontroller: http://www.elektor.com/magazines/2008/m ... 2560.lynkx
Marek
Marek
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
Many thanks