SpinCAD Example and question on fading with pots

Algorithm development and general DSP issues

Moderator: frank

Post Reply
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

SpinCAD Example and question on fading with pots

Post by Digital Larry »

Here's an example of a simple algorithm I developed with SpinCAD designer.

Image

Uploaded with ImageShack.us

A few points:

The equalizer code and coefficient calculations come from Keith Barr's crossover example.

The popup panels allow you to adjust the settings of each block, although not in real time.

If you use all 6 bands at non-zero settings, you can only put one EQ block into an algorithm as it uses a lot of registers and instructions. However, if you set some of the bands to zero, code is not generated at all for those bands, so you save both instructions and registers this way. Of course, the algorithm has to be coded properly in Java for this to work. You'd have a tough time doing that in Spin ASM!

The pots go into the mixer blocks. The top connector on the left side of the mixer block is the control input for the left audio input. The bottom connector on the left hand side is for the right audio input.

Note that I called POT0 "Pot 1" and POT1 is "Pot 2". This will be fixed prior to beta.

So, in this model, POT0 controls the dry level and POT1 controls the effect level from the ping pong delay. However, I noticed that even with POT1 turned all the way down on the simulator, I'm still getting some output from the delay block. Is this normal?

Also, much as I like the name "SpinCAD" there is another commercial product for CNC design with this name. Name contest!

Below you will find the SpinASM code which this algorithm generated. Someone want to try it and report back?

Code: Select all

RDAX 21,0.25
WRAX 33,0.0
RDAX 33,0.006350746199570535
RDAX 36,-0.01529087076195759
RDAX 35,1.0
WRAX 34,0.9872985076008589
RDAX 33,0.006350746199570535
WRAX 35,0.0
RDAX 35,0.01529087076195759
RDAX 36,1.0
WRAX 36,0.0
RDAX 33,1.0
RDAX 34,-1.0
WRAX 33,0.01261987129522546
RDAX 38,-0.03048421914160988
RDAX 37,1.0
WRAX 34,0.9747602574095493
RDAX 33,0.01261987129522546
WRAX 37,0.0
RDAX 37,0.03048421914160988
RDAX 38,1.0
WRAX 38,0.0
RDAX 33,1.0
RDAX 34,-0.74
WRAX 33,0.024913752766059425
RDAX 40,-0.060580561732481046
RDAX 39,1.0
WRAX 34,0.9501724944678811
RDAX 33,0.024913752766059425
WRAX 39,0.0
RDAX 39,0.060580561732481046
RDAX 40,1.0
WRAX 40,0.0
RDAX 33,1.0
RDAX 34,0.86
WRAX 33,0.04852924085787434
RDAX 42,-0.11962861634631981
RDAX 41,1.0
WRAX 34,0.9029415182842514
RDAX 33,0.04852924085787434
WRAX 41,0.0
RDAX 41,0.11962861634631981
RDAX 42,1.0
WRAX 42,0.0
RDAX 33,1.0
RDAX 34,1.28
WRAX 33,0.0919341664953981
RDAX 44,-0.23329635679532068
RDAX 43,1.0
WRAX 34,0.8161316670092037
RDAX 33,0.0919341664953981
WRAX 43,0.0
RDAX 43,0.23329635679532068
RDAX 44,1.0
WRAX 44,0.0
RDAX 33,1.0
RDAX 34,0.27
WRAX 33,0.16416983789814885
RDAX 46,-0.4442831726736812
RDAX 45,1.0
WRAX 34,0.6716603242037023
RDAX 33,0.16416983789814885
WRAX 45,0.0
RDAX 45,0.23329635679532068
RDAX 46,1.0
WRAX 46,0.0
RDAX 33,1.0
RDAX 34,-0.09
WRAX 33,1.0
WRAX 32,0.0
RDAX 32,0.5
RDAX 32,0.75
RDAX 49,0.49
WRA 0,0.69
RDA 9175,0.8
WRAX 48,0.0
RDA 18351,0.79
WRAX 49,0.0
RDAX 49,0.5
RDAX 20,1.0
Mulx 16
WRAX 50,0.0
RDAX 48,1.0
Mulx 17
RDAX 50,1.0
WRAX 50,0.0
RDAX 20,1.0
Mulx 16
WRAX 53,0.0
RDAX 49,1.0
Mulx 17
RDAX 53,1.0
WRAX 53,0.0
RDAX 50,1.0
WRAX 22,0.0
RDAX 53,1.0
WRAX 23,0.0
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Turns out I had a bug in the mixer code!
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

I tried your code, it's a nice sounding delay, just need to add control of the delay time on the spare pot and it would make nice effect.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Thanks for the feedback! back-back-back :D

I'll make one with adjustable delay time before too long.

DL
Post Reply