Saturation Point

Software questions and issues with the FV-1

Moderator: frank

Post Reply
MacroMachines
Posts: 71
Joined: Fri Dec 12, 2014 10:45 pm
Location: Detroit,MI
Contact:

Saturation Point

Post by MacroMachines »

what is the actual limit for the accumulator?

I can't seem to find this info in the documentation but there is tons of info on the resolution of the opcodes coefficients and registers.

right now I made a simulator in audulus 3 modular programming environment and am doing all the bit resolution downsampling for the opcodes and virtual accumulator, and I tried some things that work fine on the FV-1. I had thought the limits of the accumulator were -1 to 0.999999 or -2 to 1.99999 at 24 bit, but the results i get if I do that are not working.

The main thing I was trying first is the exp/log so I could figure out perfect pot mappings quickly. Specifically if I limit the log output going into the exp it doesn't seem to carry over a value. does this have to do with the *16 and /16? are those actually scaled or is the floating point of the main accumulator able to go up to a higher limit then -2 / +1.9999... ?
http://MacroMachines.net
Digital Control for your Analog Soul.
MacroMachines
Posts: 71
Joined: Fri Dec 12, 2014 10:45 pm
Location: Detroit,MI
Contact:

Post by MacroMachines »

I ended up finding the user manual PDF with more detail on the opcodes. What I am understanding now is the log uses s4.19 fixed point output. How does this translate into values the other opcodes can use in subsequent operations?
http://MacroMachines.net
Digital Control for your Analog Soul.
MacroMachines
Posts: 71
Joined: Fri Dec 12, 2014 10:45 pm
Location: Detroit,MI
Contact:

Post by MacroMachines »

From the user manual

"Since  ACC  (in  it’s  role  as  the  destination  for  the  EXP  instruction)  is  limited  to  linear  values  from  0  to +0.99999988,  the  EXP  instruction  is  limited  to  logarithmic  ACC  values  (in  it’s  role  as  the  source  operand for  the  EXP  instruction)    from  –16  to  0.  Like  the  LOG  instruction,  EXP  will  treat  the  ACC  content  as  a S4.19  number.  Positive  logarithmic  ACC  values  will  be  clipped  to  +0.99999988  which  is  the  most  positive linear  value  that  can  be  represented  within  the  accumulator. D is  intended  to  allow  the  linear  ACC  to  be  offset  by  a  constant  in  the  range  from  –1  to  +0.9990234375"

I am wondering if this "positive logarithmic acc values will be clipped to +0.99999988" is meant to say "positive exponential values"?

Also does this imply that values from put into the acc by log operations would be treated differently by other operations? Interpreted as a different value or clipped? I'm just trying to get my little simulator to be accurate so I can figure out some things a lot faster and I've been turning a few colleagues onto the fv-1 and Audulus so hopefully it can be helpful for all of us.

I'm anticipating using the fv-1 in 4 different products this upcoming year, I've been finding some incredible uses for it other than the common delay/reverb/pitch applications.
http://MacroMachines.net
Digital Control for your Analog Soul.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

What it means is you need to consider where the binary point is when dealing with log and exp operations. So if you wanted to add an offset you would need to consider that the format is S4.19 and adjust accordingly. Look at some of the example code in the knowledge base http://spinsemi.com/knowledge_base/pgm_ ... ml#LOG_EXP
Frank Thomson
Experimental Noize
MacroMachines
Posts: 71
Joined: Fri Dec 12, 2014 10:45 pm
Location: Detroit,MI
Contact:

Post by MacroMachines »

I retread that section again but it didn't clarify my main question which is :
What is the actual limit for values in the accumulator? Is it actually floating point so the value can be anything that fits into 24 bit float?
http://MacroMachines.net
Digital Control for your Analog Soul.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

ACC is actually fixed point not floating. There are a few bits of headroom (can't recall how many, maybe 3) in the ACC register to allow for accumulations to exceed 1.0 but it is expected that the final results will be in the range of -1.0 to +0.99... You should not try to use this headroom as it is not saved to register or memory and values will always be clipped to -1.0/+0.99...

For log and exp they are "interpreted" as S4.X but the binary point does not move so you need to be careful how you handle the ACC during exp and log operations.
Frank Thomson
Experimental Noize
MacroMachines
Posts: 71
Joined: Fri Dec 12, 2014 10:45 pm
Location: Detroit,MI
Contact:

Post by MacroMachines »

For log and exp they are "interpreted" as S4.X but the binary point does not move so you need to be careful how you handle the ACC during exp and log operations.
Would you be willing to elaborate a bit on that? this is one of the things I have been having a bit of trouble understanding, the implications of interpreting the ACC differently. Are there any examples of scenarios to be conscious of avoiding?
http://MacroMachines.net
Digital Control for your Analog Soul.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

I can't think of a specific algorithm that would manipulate the value but as an example let's say you have a S4.19 value in the ACC you were going to do an exp instruction on but you wanted to add an offset before doing the exp. Since exp treats the acc number as S4.19 you need to make sure that the offset you add is also treated as S4.19 so you will need to manipulate things a bit.

Assume ACC has a S4.19 number and you want to add 0.5 to it. We could use an SOF to do this but SOF expects the added value to be in S.10 format so what do we do? Well, shift the added value 4 bits right to align it so instead of doing 'SOF 1.0, 0.5' to add 0.5 you do 'SOF 1.0, 0.03125', 0.03125 is 0.5 shifted right 4 bits or simply 0.5/16. Now all the bits are aligned to add 0.5 to the S4.19 value in the ACC that can then be sent to the exp instruction.
Frank Thomson
Experimental Noize
MacroMachines
Posts: 71
Joined: Fri Dec 12, 2014 10:45 pm
Location: Detroit,MI
Contact:

Post by MacroMachines »

thank you, that is helpful.

I am also wondering for example 1*1 would be 1, but if I use exp would I be getting 1/16?

currently trying to make a 1 volt per octave tuning for one of the pots so that I can use this as a synth voice (sounds fantastic so far but the math for the tuning eludes me in my tests thus far). further complicating it is that I will need to scale the voltage in analog to accept 0-5v or more, but if I can figure it out in the FV-1 I should be able to get the voltage aspect fine. What is the max pot voltage? 3v? 3.3v?
http://MacroMachines.net
Digital Control for your Analog Soul.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

The pot inputs are from about 0.1V to about 3.2V so they would go the full binary range. You can go 0 to 3.3V, it will not harm the FV-1 but from 0 to about 0.1V they will read as 0 and from about 3.2V to 3.3V they will read full scale.

For the EXP you are doing 2^ACC with ACC treated as S4.19 so it matches the LOG instruction but it will clip the result to fit in the +0.99... to -1.0 range. If you are trying to load a number into ACC then use EXP on it you will need to /16 to make it in the correct format. In most cases people take a LOG, manipulate the result then do an EXP so they never have to deal with the /16.
Frank Thomson
Experimental Noize
Post Reply