Spin Semiconductor Forum Index Spin Semiconductor
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

playback of Audio Clips

 
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development
View previous topic :: View next topic  
Author Message
kradsith



Joined: 20 Dec 2006
Posts: 5

PostPosted: Wed Dec 20, 2006 6:15 am    Post subject: playback of Audio Clips Reply with quote

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


Last edited by kradsith on Thu Dec 21, 2006 8:15 am; edited 1 time in total
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 972

PostPosted: Wed Dec 20, 2006 10:07 am    Post subject: Reply with quote

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:

; 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
Back to top
View user's profile Send private message Visit poster's website
kradsith



Joined: 20 Dec 2006
Posts: 5

PostPosted: Thu Dec 21, 2006 7:08 am    Post subject: Reply with quote

Frank,

You replied way to quick and made it look way to easy.

Thanks!

Kradsith
Back to top
View user's profile Send private message
Mcfly



Joined: 08 Mar 2013
Posts: 46
Location: Argentina

PostPosted: Sun Sep 06, 2015 7:21 pm    Post subject: Reply with quote

Hi Frank, in playback mode, is there any way to soften the transition between the end and the start of the audio clip. Something like a fade in and fade out.
Back to top
View user's profile Send private message Send e-mail
frank



Joined: 19 Oct 2005
Posts: 972

PostPosted: Mon Sep 07, 2015 10:51 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Sandrine



Joined: 12 Mar 2015
Posts: 16
Location: BC Canada

PostPosted: Mon Sep 14, 2015 8:09 pm    Post subject: Reply with quote

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)
_________________
Is there a latin word for "Stage Fright"?
Back to top
View user's profile Send private message Visit poster's website
Mcfly



Joined: 08 Mar 2013
Posts: 46
Location: Argentina

PostPosted: Tue Sep 15, 2015 2:21 pm    Post subject: Reply with quote

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)


Yes, that's what im talking about. Any advice for coding a zero crossing detection? Thank you.
Back to top
View user's profile Send private message Send e-mail
MacroMachines



Joined: 12 Dec 2014
Posts: 70
Location: Detroit,MI

PostPosted: Sun Jun 19, 2016 2:07 pm    Post subject: Reply with quote

there is a skip instruction specifically for zero cross
SKP ZRC
_________________
http://MacroMachines.net
Digital Control for your Analog Soul.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group