playback of Audio Clips
Moderator: frank
playback of Audio Clips
Hello All,
I received my Dev board 2 days ago and it has surpassed my expectations already.
New to DSP programming and having some ASM programming experience. I am wondering if it
I received my Dev board 2 days ago and it has surpassed my expectations already.
New to DSP programming and having some ASM programming experience. I am wondering if it
Last edited by kradsith on Thu Dec 21, 2006 9:15 am, edited 1 time in total.
You could have the FV-1 record a short clip then play it back. Here is a small example program that records the left and right channels and will play them back. Record/play is controlled by the position of POT0.
Code: Select all
; Define delays
delL mem 16383
delR mem 16383
;
; If POT0 is 0 to 0.5 we are in record mode
; If 0.5 to 0.999 we are in playback mode
;
ldax pot0 ; Read in POT0
sof 1.0,-0.5 ; Add -0.5 to the POT0 value so it ranges -0.5 to +0.5
skp gez,play ; If ACC is >=0 we are in playback mode so jump to play
ldax adcl ; Read in ADC left
wra delL,1.0 ; Write to left delay line
wrax dacl,0 ; and to DAC left
ldax adcr ; Read in ADC right
wra delR,1.0 ; Write to right delay line
wrax dacr,0 ; and to DAC right
skp zro, end ; Jump to end
;
; Play back mode
play:
clr ; Clear ACC
rda delL#,1.0; Read tail of left delay
wrax dacl,0 ; Write it to DAC left
rda delR#,1.0; Read tail of right delay
wrax dacr,0 ; Write it to DAC right
;
end:
Frank Thomson
Experimental Noize
Experimental Noize
Not that I can think of, the start and end are always moving so you would need to track where you are in playback then do a cross fade as you get to the end. There really isn't a way I can think of to do this in the code.
Frank Thomson
Experimental Noize
Experimental Noize
Maybe he means removing a DC click. That's easy to do using a "zero crossing" state delay. I've done it with my sampler project and it seems to work.
Set the loop points at only zero crossing moments (also direction can improve it) and that gets rid of the click sound.
With low level signals it's not as noticeable because there isn't such a difference.
Of course for the granulizer section (not FV-1) I used an actual quick fade for the slower rates, then the above for the higher rates (>50 loops/second)
Set the loop points at only zero crossing moments (also direction can improve it) and that gets rid of the click sound.
With low level signals it's not as noticeable because there isn't such a difference.
Of course for the granulizer section (not FV-1) I used an actual quick fade for the slower rates, then the above for the higher rates (>50 loops/second)
Is there a latin word for "Stage Fright"?
Yes, that's what im talking about. Any advice for coding a zero crossing detection? Thank you.Sandrine wrote:Maybe he means removing a DC click. That's easy to do using a "zero crossing" state delay. I've done it with my sampler project and it seems to work.
Set the loop points at only zero crossing moments (also direction can improve it) and that gets rid of the click sound.
With low level signals it's not as noticeable because there isn't such a difference.
Of course for the granulizer section (not FV-1) I used an actual quick fade for the slower rates, then the above for the higher rates (>50 loops/second)
-
- Posts: 71
- Joined: Fri Dec 12, 2014 10:45 pm
- Location: Detroit,MI
- Contact:
Re:
Hi Frank,frank wrote: ↑Wed Dec 20, 2006 11:07 am You could have the FV-1 record a short clip then play it back. Here is a small example program that records the left and right channels and will play them back. Record/play is controlled by the position of POT0.Code: Select all
; Define delays delL mem 16383 delR mem 16383 ; ; If POT0 is 0 to 0.5 we are in record mode ; If 0.5 to 0.999 we are in playback mode ; ldax pot0 ; Read in POT0 sof 1.0,-0.5 ; Add -0.5 to the POT0 value so it ranges -0.5 to +0.5 skp gez,play ; If ACC is >=0 we are in playback mode so jump to play ldax adcl ; Read in ADC left wra delL,1.0 ; Write to left delay line wrax dacl,0 ; and to DAC left ldax adcr ; Read in ADC right wra delR,1.0 ; Write to right delay line wrax dacr,0 ; and to DAC right skp zro, end ; Jump to end ; ; Play back mode play: clr ; Clear ACC rda delL#,1.0; Read tail of left delay wrax dacl,0 ; Write it to DAC left rda delR#,1.0; Read tail of right delay wrax dacr,0 ; Write it to DAC right ; end:
there's a way to remove the "click"/"glitch"?
Thanks
Re: playback of Audio Clips
Not really, you could try but you need to track the head/tail write address and cross fade between the head and tail. I have not done this on the FV-1 and it is not simple since the user can record/play at any point in time and as a result any address could be the head/tail point.
Frank Thomson
Experimental Noize
Experimental Noize
Re: playback of Audio Clips
Hello frank,
forgive me little off-topic, but I got a question. How can I change lenght of recorded sample? Eg, I record full sample (all delay memory), goes into playback mode and now, if pot is 1, processor plays all sample lenght (0 -> 32767), when pot is 0.9 processor plays only 0 -> 29490, etc.
forgive me little off-topic, but I got a question. How can I change lenght of recorded sample? Eg, I record full sample (all delay memory), goes into playback mode and now, if pot is 1, processor plays all sample lenght (0 -> 32767), when pot is 0.9 processor plays only 0 -> 29490, etc.
Re: playback of Audio Clips
@frank colud you give me some idea, please?
Re: playback of Audio Clips
Not easy to do on FV-1, would not even try.
Frank Thomson
Experimental Noize
Experimental Noize
Re: playback of Audio Clips
Ok, so maybe at least can I change sample lenght while recording?