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 

Granular Time Scrubbing

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



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

PostPosted: Fri May 06, 2016 4:11 pm    Post subject: Granular Time Scrubbing Reply with quote

I am working on some effects for a eurorack module (my company is MacroMachines.net), and I am currently experimenting with frozen delay lines and scrubbing. In the vein of the Greenwood file but way cleaner and deeper.

First I wanted to ask if there is a way to use the skip for non zero crossings to be able to grab wavelets of a full cycle waveform between two zero crosses. Or better yet have a full up down up cycle so the ends would be going in the same direction.

Second, I want to see how to create a ramp lfo driven window. I read a bit about how this might be done in the application note AP-0001 about the Lfos. I just didn't quite understand it. In the document they show 2 offset ramps which is easy, but then it shows a cross fade envelope that I can't seem to find in the actual example.

I just made an interesting time stretching effect by commenting out a few lines in the OEM echo file.. It really was a "Happy Hacky accident" discovery but it sounds pretty great:
https://instagram.com/p/BFFZ7EAByhp/
_________________
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
Digital Larry



Joined: 12 Nov 2012
Posts: 274

PostPosted: Fri May 06, 2016 6:22 pm    Post subject: Reply with quote

The crossfade ramps and all that are generated internally in the FV-1. All you have to do is use the pitch shift code as shown and it all magically happens. So I'm not sure what else you're trying to do with the Ramp.

Regarding skip instructions, you can combine ZRC and GEZ to trap a positive zero crossing.
Back to top
View user's profile Send private message Visit poster's website
MacroMachines



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

PostPosted: Sat Jun 11, 2016 5:52 am    Post subject: Reply with quote

Heya Digital Larry,
My main goal is something that I have not yet seen done with the FV-1 but I know it is possible because of a few programs I have seen by other people, and in general the instruction set seems pretty capable.

Simple Version:
audio is pass through, but also recording into delay mem
if pot 0 is above a threshold (basically anything above zero, but I know it might be realistically 0.0001) trap audio in circulating delay line memory by feeding the output back to the input instead of the adc, effectively "sampling" a bit of audio.
feed the output of that circulating "sample" into another delay line with a ramp going at a rate of [1/length*rate+offset]
cancel out the automatic delay line read index by using another ramp going at length*sampleRate/sampleRate
use pot1 to scrub through the buffer by driving offset
if pot 0 goes back below threshold, switch back to incoming audio

More Complex:
have the read index snapped to zero crossings
have the write state snapped to zero crossings, so that each wave cycle is captured and repeated until the next zero crossings
use both up and down cross to capture entire cycle rather then just half, or use a flip flop to capture every other cross (assuming it must cross down and then back up, which is usually the case)

Questions:
the main things I don't understand are how I map things, how do I deal with my index read positions? in samples? in 0-1?
If I want to go another route which instead of using zero crossing detection, would window the grain being played by a cosine envelope, with a second grain being played and windowed 180 degrees out of phase from the first, so the wrap around points are never heard. Also the values of start read offset would be sample-and-held and the wrap of each phase read so that there is smooth position scrubbing without pitch artifacts or clicks
I realize this is far more easily achieved with a microcontroller and I have code for this, but I enjoy a challenge and doing things that haven't been done before/bastardizing intended purposes in cool, useful, and interesting ways. Pushing the limits so to speak.
I am studying some of the pitch shifters as they are the closest to what I am after, as well as the forum patch


references:
http://www.spinsemi.com/forum/viewtopic.php?t=20
http://www.spinsemi.com/forum/viewtopic.php?t=290&start=0&postdays=0&postorder=asc&highlight=jonny[/list]
_________________
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
Digital Larry



Joined: 12 Nov 2012
Posts: 274

PostPosted: Sat Jun 11, 2016 5:35 pm    Post subject: Reply with quote

MacroMachines wrote:

Questions:
the main things I don't understand are how I map things, how do I deal with my index read positions? in samples? in 0-1?


As I recall, supposing you are mapping to some sample position x within the 32768 position RAM, then you multiply x * 256, put this into ADDR_PTR then use this for your RMPA.

MacroMachines wrote:

If I want to go another route which instead of using zero crossing detection, would window the grain being played by a cosine envelope, with a second grain being played and windowed 180 degrees out of phase from the first, so the wrap around points are never heard. Also the values of start read offset would be sample-and-held and the wrap of each phase read so that there is smooth position scrubbing without pitch artifacts or clicks

I don't know about a cosine envelope, maybe you could use SIN LFO and see if it would frequency lock to a specific buffer length. That's the challenge that comes to mind - how do you make sure the peaks match the glitch points in your buffer?

I also thought you could do something with a triangle wave centered on zero. Boost it until the tops clip off (-1.0 to 1.0), then SOF 0.5, 0.5 to make it go 0 to 1.0. That's one half of your crossfade waveform. Take that and SOF -0.999, 0.999 - roughly speaking - (since you can't do SOF -1, 1) - that is your other crossfade driver 180 degrees out.
Back to top
View user's profile Send private message Visit poster's website
MacroMachines



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

PostPosted: Sat Jun 18, 2016 5:13 pm    Post subject: Reply with quote

Nice, thank you Larry for the tips, Ill try them out asap and let you know how it goes Very Happy
Fried my pot0 adc somehow, so Im about to replace the smd chip on the dev board, steady fingers.. steady.

BTW, I love spinCAD, and was talking a bit with you on the forum over there. I could do this so easily in there with just a few more root access style nodes. Hmm.. I can easily pseudocode a couple simple modules that should be a piece of cake to implement.

actually I might be able to just do little sections using spinCAD and put everything together in ASM.. that actually might be a decent workflow especially for optimization (I notice since the workflow is modular there are many registers where they might not need to be, but would be really big task to try and make spinCAD optimize them out)
_________________
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