Envelope controlled tremolo with slight chorus - fixed

Algorithm development and general DSP issues

Moderator: frank

frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

There seem to be 2 problems, one in your code and one in SpinAsm:

You have "SKP 10,4" but 10 is a decimal, not hex it should be $10 for a bit mask of %10000

BUT SpinAsm seems to not be accepting hex or binary bit masks properly for the SKP instruction for the flags so change to coding in symbolic like "SKP RUN,4"
Frank Thomson
Experimental Noize
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Thanks Frank, it turns out there was a format control string in the code generation section that was set to output hex instead of decimal. So I output it as 16 base 10 for now.

It would be more clear to use the mnemonics as you suggest, although it's not really my intention to comment the SpinASM!
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

16 is the correct decimal value but SpinAsm won't assemble decimal properly in the skp instruction so anyone copying the code and assembling in SpinAsm will still get bad code.

To assemble the skp instruction properly in SpinAsm you must use the flag symbols and not any sort of binary/hex/decimal value.

SKP RUN,4 will assemble as: 80800011 <<< correct
SKP 16,4 will assemble as: 00800011 <<< incorrect
Using $10 or %10000 will also result in an incorrect assembly.
Frank Thomson
Experimental Noize
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

I hear and obey!

Thanks Frank.
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

Do you have a list of showing what registers and things the numeric values map to. This would help people understanding and debugging your code.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Well the way that SpinCAD works is that you just draw the picture and it spits out the ASM code. Registers and memory are allocated automatically. By the time I dig deep enough to trace what's what and where's where I've usually (as in this case) figured out the problem.

But if I have some issue again like this I'll give it a try because I know that looking at uncommented code is pretty ridiculous! I could have the program insert some comments that at least separate the functional blocks.
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

Ok, that makes sense for the general registers and memory.
Do the pots, adcs and dacs get assigned random numbers or are they always the same?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

slacker wrote:Do you have a list of showing what registers and things the numeric values map to. This would help people understanding and debugging your code.

See the last few pages of the SpinAsm pdf for that info http://www.spinsemi.com/Products/datash ... Manual.pdf
Frank Thomson
Experimental Noize
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

slacker wrote:Ok, that makes sense for the general registers and memory.
Do the pots, adcs and dacs get assigned random numbers or are they always the same?
Oh I see what you mean. I've been working in the engine room a little too long.

POT0 = 16
POT1 = 17
POT2 = 18

ADCL = 20
ADCR = 21
DACL = 22
DACR = 23
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

Thanks chaps, that's just what I was after, should have known it would be in the docs somewhere.

Code works a treat now, sounds very nice.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Update to my earlier comments, seems a hex value will work in the skp instruction but it must be the full 32-bits like:

skp $80000000,4 ; $80000000 is a RUN flag

Decimal will still not work, must be hex.
Frank Thomson
Experimental Noize
phaseman
Posts: 1
Joined: Thu Oct 25, 2012 5:06 am
Location: Pancevo, Serbia

Post by phaseman »

Hi everyone!
this is my first post, but I've been reading A LOT :) of threads, examples, Knowledge Base stuff.... Also, I've tried almost every algorithm on the forum :)

I am amazed with FV1, it has changed the way I use and treat guitar effects.

Anyway, I am new to dsp, and I've started learning SpinAsm assembler few mounths a go...

I have a question about the revers reverb algorithm:
How can one subtract the original signal from that program? How can I make it wet only?

I must say I did try some ideas but with no success...


Regards,
Marko
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Hi Marko, please do not introduce new topics in an existing thread, please start a new thread for your topic.

But, to answer your question, it may not be possible to remove the wet signal, a reverse reverb works very different and it depends on how you coded it. Please start a new thread and post your code there and I'll take a look at it.
Frank Thomson
Experimental Noize
Post Reply