Microphone to Headphones Object?
TonyA
Posts: 226
Hi,
Has anyone used this object? I'm just wondering if there are any sound samples around.
Does it add any effect to the vocel input? Does it automatically·loop?
Pin 8 = input, Pin 0 = output?
Thanks,
Tony
Post Edited (TonyA) : 9/17/2007 8:46:32 PM GMT
Has anyone used this object? I'm just wondering if there are any sound samples around.
Does it add any effect to the vocel input? Does it automatically·loop?
Pin 8 = input, Pin 0 = output?
Thanks,
Tony
Post Edited (TonyA) : 9/17/2007 8:46:32 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Please...remember where we can download your demo..I would like to "play" with it ..(if some day, I've some free time )
Could be interesting·to do a guitar effect box, reverberation, delay, echo, and fuzz, playing with that code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
Would it be possible to record it with one Propeller, send it serially to another Propeller and play it there?
(I do understand that using Propellers for an internal telephon system is not so relevant, but if there already are a cople of Propellers out that, exchanging data traffic, would it be possible to add some short voice-messages?)
Propeller digital recorder...
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
I hope I did the attachment correct.
Regards, Goran
For safety I copied it as well:
' This program uses the Propeller Demo Board, Rev C
' The microphone is digitized and the samples are played on the headphones.
CON
· _clkmode = xtal1 + pll16x
· _xinfreq = 5_000_000
' At 80MHz the ADC/DAC sample resolutions and rates are as follows:
'
' sample·· sample··············
' bits······ rate··············
'
·············
' 5······ 2.5 MHz··············
' 6····· 1.25 MHz··············
' 7······ 625 KHz··············
' 8······ 313 KHz··············
' 9······ 156 KHz··············
' 10······ 78 KHz··············
' 11······ 39 KHz··············
' 12···· 19.5 KHz··············
' 13···· 9.77 KHz··············
' 14···· 4.88 KHz··············
·······························
· bits = 11·············· 'try different values from table here
·
PUB go
· cognew(@asm_entry, 0)·· 'launch assembly program into a COG
·
DAT
'
'
' Assembly program
'
············· org
asm_entry···· mov······ dira,asm_dira·················· 'make pins 8 (ADC) and 0 (DAC) outputs
············· movs····· ctra,#8························ 'POS W/FEEDBACK mode for CTRA
············· movd····· ctra,#9
············· movi····· ctra,#%01001_000
············· mov······ frqa,#1
············· movs····· ctrb,#10······················· 'DUTY DIFFERENTIAL mode for CTRB
············· movd····· ctrb,#11
············· movi····· ctrb,#%00111_000
·············
············· mov······ asm_cnt,cnt···················· 'prepare for WAITCNT loop
············· add······ asm_cnt,asm_cycles
·············
:loop········ waitcnt·· asm_cnt,asm_cycles············· 'wait for next CNT value (timing is determinant after WAITCNT)
············· mov······ asm_sample,phsa················ 'capture PHSA and get difference
············· sub······ asm_sample,asm_old
············· add······ asm_old,asm_sample
························································
············· shl······ asm_sample,#32-bits············ 'justify sample and output to FRQB
············· mov······ frqb,asm_sample
···
············· jmp······ #:loop························· 'wait for next sample period
'
'
' Data
'
asm_cycles··· long····· |< bits - 1···················· 'sample time
asm_dira····· long····· $00000E00······················ 'output mask
asm_cnt······ res······ 1
asm_old······ res······ 1
asm_sample··· res······ 1
Here it is Enjoy!
Note: Play with this!! Adjust the Number of resolution Bits, Buffer Length, Attenuation, etc.
The attached audio gives you an idea on the output, but does not do this demo justice... (Improper line-in / mic-in audio levels when recording)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 9/18/2007 7:33:40 PM GMT
Do you have any recommendations (besides trial and error maybe) for learning how to manage the CTR registers?
I've been reading the datasheet and it sure seems slim.
Fred
Paul Baker has written an excellent application document regarding the counters.
http://www.parallax.com/dl/appnt/prop/AN001-PropellerCounters-v1.0.zip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
The much referred to AN001 doc!!!!
All this time I thought it was the propeller's guts pdf they were talking about.
* from Harry. He's a bullmastiff. I am happy too but..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
It seems worthwhile to drop it into this thread.
When you adjust the bit resolution, you can really get some funky robotic to large auditorium sound effects...
Enjoy!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/9/2007 7:14:39 AM GMT