8 seconds delay

Software questions and issues with the FV-1

Moderator: frank

ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

8 seconds delay

Post by ZibiSound »

Hi.
I found here a code of delay effect with 8 seconds delay. I think this processor is amazing that it can do something like that :D

But there is a little problem - sound quality is very bad. Frank, you helped me a few times, I think this time you also help. Here's code:

Code: Select all

equ   input   reg0 
equ   loop   reg1 
equ   temp   reg2 
equ   output   reg4 
mem   delay   32767 
; Get input, filter it to avoid aliasing (not shown) 
rdax   adcl, 1
rdax   adcr, 1 
; (filter here) 
wrax   input, 0 
; IF loop counter variable is 0, THEN read an input sample and put it in the temp variable. 
rdax   loop, -1 
skp   neg, NotZro 
ldax   input 
wrax   temp, 0 
NotZro: 
; Put the temp variable in the head-end of the delay. 
ldax   temp 
wra   delay, 0 
; Get a delayed sample out of the tail end of the delay, put it in the temp variable. 
rda   delay+32767, 1 
wrax   temp, 0 
; Add 0.1 to the loop counter. 
ldax   loop 
sof   1, 0.1 
wrax   loop, 1 
; IF loop counter is > 0.8, THEN write the temp variable to the output, and reset loop variable to 0 
sof   1, -0.8 
skp   neg, Done 
ldax   temp 
wrax   output, 0 
wrax   loop, 0 
Done: 
; Done, write output (you really need to filter it again here) 
ldax   output 
wrax   dacl, 1 
wrax   dacr, 0
I think that 1200ms delay per channel is enough for me and I would like to make this effect stereo with pot regulation of delay time (later I'm going to combine this effect with tap tempo control). Do you know how to do this ?

BTW - I use 40kHz crystal for full 20kHz bandwidth, is that a problem ?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

No, that code will sound bad if you try to make it do 8 seconds and a 20K bandwidth. There is no way to do that, if you make the delay long you must lower the bandwidth so if you want an 8 second delay and use a 32KHz crystal you must make sure that the audio is below 2KHz.
Frank Thomson
Experimental Noize
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

It was so beauty to be real...
I suppose there is no way to use an external memory too, right ?

Do you know some other dsp processor like fv-1 in similar price ?
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Post by ice-nine »

There is a way to get an 8 second delay at full bandwidth, but I don't think you are going to like how it can be done.

Simple answer is that each chl is able to get 1 second delay at the giving clock rate at full bandwidth which means you can get 2 seconds of mono from 1 chip. Use 4 FV-1 chips running into each other and hey presto 8 seconds of delay. :wink: Now I'm not sure how much noise and other artifacts may build up this way. and 4 chips starts to get expensive as a solution.
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

No, thanks :) It's not for me bacause I want to pack it all in one chip and, if it's possible, get stereo.

BTW - this 1s delay (Fs=32kHz) is for 2 channels (500ms/chan) or 1s/chan ?

And another question - about programs memory (external). In one 24LC64 EEPROM I can pack 8 effects. But what if I want more effects ? Can I use two EEPROM chips and some multiplexer to switch SCK/SDA lines ?
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

I think I'd have to disagree that there is 1 second per channel. There are 32768 memory locations for audio. The inputs and outputs are simply accessible registers and are not tied directly to the delay memory except through the algorithms which the device runs.

Regarding MUX'ing the EEPROM I'm pretty sure that would be possible. You just need to make sure you're not trying to access a program at the same time you're shifting from one EEPROM to the other. Another possibility, though much harder, would be to program a microcontroller to emulate an EEPROM and then you could have tons and tons of programs.
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

What do you think about that method (eeprom switching via uC) ?

- If effect is loaded, set S2S1S0 to 000 and T0 to 0 (bypass)
- Switch EEPROM connects by multiplexer
- Set T0 to 1 and S2S1S0 to desired value

@Digital Larry, What's with your SpinCAD Designer ? :)
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

You don't need the first step, the FV-1 only comunicates with the eeprom when you change the program, it then loads the chosen program into its internal memory, after that it doesn't care what happens to the eeprom.
So you can just switch the eeprom with your multiplexer, and select the program you want, if the new program is the same number as the one currently loaded you would need to toggle one of the "S" pins to force a load.
You don't even need a multiplexer, you can connect the SDA and SCLK lines
of the eeproms in parallel. The FV-1 talks to the eeprom at address 0, set by pins 2-4 on the eeprom, so your micro just needs to toggle one of those pins on each eeprom setting one to address 0 and the other one to any other address. Google I2C for more info on this.
Disclaimer, I haven't actually tried this.
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

You don't even need a multiplexer, you can connect the SDA and SCLK lines
of the eeproms in parallel. The FV-1 talks to the eeprom at address 0, set by pins 2-4 on the eeprom, so your micro just needs to toggle one of those pins on each eeprom setting one to address 0 and the other one to any other address.
Sounds interesting, but I don't know if I understood. Both of eeproms can be connected in parallel, but I must do something with eeprom address inputs ? For example, if I want to use EEPROM_1 I must connect his pads A0-A2 to ground and in EEPROM_2 connect, for example, A0 to VCC ? (3,3V)
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

Yes, exactly like that.
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

What do you say about this ?

Image

I think, in that way I can connect much more eeproms by adding next gates. Do you think it will work ?
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

sebxx4 wrote: @Digital Larry, What's with your SpinCAD Designer ? :)
Sorry but I don't quite understand your question. Could you clarify what you're trying to find out?
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Post by ice-nine »

Digital Larry wrote:I think I'd have to disagree that there is 1 second per channel. There are 32768 memory locations for audio. The inputs and outputs are simply accessible registers and are not tied directly to the delay memory except through the algorithms which the device runs.
.
Aha, I see what you mean there, and that make sense.
As for using multiple Eeproms, yeah that's not a problem at all. Of course the datasheet way to swich between Eeproms is to use A0-A2 but there are other non standard ways to switch but I would use the A0-A2 pins.
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

@Digital Larry - I'm talking about this:
http://www.spinsemi.com/forum/viewtopic.php?t=372
Can I download this program from somewhere ?


BTW - is my schematic correct ?
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

To download SpinCAD Designer you'll need to register at my forum.

http://holycityaudio.com/forum/

Look forward to seeing you soon.

DL
Post Reply