If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Sample accurate Array shifting.
24 posts
• Page 2 of 3 • 1, 2, 3
Re: Sample accurate Array shifting.
OK, so it looks like; interpolater module 'Step' input = streamin 'v' = the position in the Array that you want to interpolate. Presumably this value loops (or whatever) between zero and whatever maximum index you need.
So another few questions, I'm afraid.
Is the whole array always scanned through?
Does the array size need to change during run-time, or does the size stay fixed after loading?
Are you OK with the array size having to be a power of two?
None of those are a problem either way, but if you can manage with a fixed array that's always a power of two in size, some very neat and fast index-wrapping code is possible.
So another few questions, I'm afraid.
Is the whole array always scanned through?
Does the array size need to change during run-time, or does the size stay fixed after loading?
Are you OK with the array size having to be a power of two?
None of those are a problem either way, but if you can manage with a fixed array that's always a power of two in size, some very neat and fast index-wrapping code is possible.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Sample accurate Array shifting.
Not so sneaky, actually. Frame's instance method :data contains the actual memory address to the data, not the data itself. I once saw this in one of your examples, and later made use of it for a project that Martin was working on (something with direct access to memory from assembler or something like that)However, IIRC, there is a sneaky way to get the memory address of the raw sample data from a Frame, which might ease the translation from Ruby to Blue (though it has to be used somewhat, erm, carefully!)
Not that it matters much in this case, but since you mentioned it...
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Sample accurate Array shifting.
@ Trog
Yes the whole envelope array value is looped in sync to daw and used to control various other modules.
1. The whole array is always used.
2. The array size is always the same.
3. The whole array is indeed 1024 .
As for how its setup at the moment.( With the dodgy green setup)
For example the Offset knob is at 0 at center and goes full ccw to -1024 and shifts the envelope until its back to the same position , same with moving it cw +1024 and it moves until its fully at the same position. With snap these values are quantized so moving the knob moves the envelope one beat value , essentially snapping to the selected grid size.
LFO is operated in the same manner i, e snapping to Quantise/Grid value selected,but behaves little differently and therefore requires the shift Array prim to do what it indeed does and that is.. I can start the index at 1024 (same as zero) and keep increasing the shift past 1024 and up to 2048 . This is required to achieve a forward, Backward and bipolar moving LFO.
In essence , being able to shift using these values would be nice to maintain if possible.
I mention that as I am not sure if it needs to be shifted in samples or something when in DSP ?
Hope I am not complicating things with my "explanations"
Yes the whole envelope array value is looped in sync to daw and used to control various other modules.
1. The whole array is always used.
2. The array size is always the same.
3. The whole array is indeed 1024 .
As for how its setup at the moment.( With the dodgy green setup)
For example the Offset knob is at 0 at center and goes full ccw to -1024 and shifts the envelope until its back to the same position , same with moving it cw +1024 and it moves until its fully at the same position. With snap these values are quantized so moving the knob moves the envelope one beat value , essentially snapping to the selected grid size.
LFO is operated in the same manner i, e snapping to Quantise/Grid value selected,but behaves little differently and therefore requires the shift Array prim to do what it indeed does and that is.. I can start the index at 1024 (same as zero) and keep increasing the shift past 1024 and up to 2048 . This is required to achieve a forward, Backward and bipolar moving LFO.
In essence , being able to shift using these values would be nice to maintain if possible.
I mention that as I am not sure if it needs to be shifted in samples or something when in DSP ?
Hope I am not complicating things with my "explanations"
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Sample accurate Array shifting.
Offset , manual moving of the envelope , represented by they grey area.
Blue lines always stay at original drawing point and then grey area moves either with offset or LFO.
This function is mostly fine as its static , unless of course someone will automate.
LFO Moves envelope either with no snap , linear or snapped to grid via quantised LFO values.
It can either move backwards from origin point, forwards or in both directions.
Therefore the Shift Array prim being able to keep on shifting up to 2048 is needed.
Blue lines always stay at original drawing point and then grey area moves either with offset or LFO.
This function is mostly fine as its static , unless of course someone will automate.
LFO Moves envelope either with no snap , linear or snapped to grid via quantised LFO values.
It can either move backwards from origin point, forwards or in both directions.
Therefore the Shift Array prim being able to keep on shifting up to 2048 is needed.
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Sample accurate Array shifting.
tulamide wrote:...I once saw this in one of your examples
What? One of mine, you say? Errr... I wish I could sort out the memory addressing problems in my own brain by tinkering with the assembly in FS - the seg-faults get more frequent with every passing day!
@lalalandsynth
Great, that all makes a circular buffer an even better fit - wrapping out-of-range values and being able to sum offsets wherever you like come as standard in its simplest form. I'm sure I've coded this somewhere before, and I might have some idea where - I'll get back to you after a rummage (caveat: see above comment to tulamide! )
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Sample accurate Array shifting.
@ Trog
Thanks so much mate , would be great to solve this issue.
Thanks so much mate , would be great to solve this issue.
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Sample accurate Array shifting.
That turned out to be easier than expected - once I looked closer at the code in your earlier post, I realised it only needed a couple of little tweaks!
For the moment, it's strictly mono-only, and with a fixed array size of 1024 (extending it for mono4/poly should be relatively easy, which I might have a go at). There are comments in the code about what values to change if you need a bigger or smaller array, but note that the size must be an integer power of two. The test set-up in the schematic should make clear how offsets sum and wrap around etc.
For the moment, it's strictly mono-only, and with a fixed array size of 1024 (extending it for mono4/poly should be relatively easy, which I might have a go at). There are comments in the code about what values to change if you need a bigger or smaller array, but note that the size must be an integer power of two. The test set-up in the schematic should make clear how offsets sum and wrap around etc.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Sample accurate Array shifting.
SWEET ! , Cant wait to test this !
its getting late here in Iceland , will test this first thing .
Thanks man , super appreciated !
its getting late here in Iceland , will test this first thing .
Thanks man , super appreciated !
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
Re: Sample accurate Array shifting.
lalalandsynth wrote:Here is the current version of the plugin, mostly finished except for the Shifting issue .
GIF.
https://imgur.com/xYAgCnP
Looks great btw
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: Sample accurate Array shifting.
AAAND, It works perfectly ! Nulls out in Reaper , even at stupid settings and speed .
Need to torture test but so far , beautiful !
My plugin is officially viable now .
THANKS Trog!! Massive thanks !
Need to torture test but so far , beautiful !
My plugin is officially viable now .
THANKS Trog!! Massive thanks !
-
lalalandsynth - Posts: 600
- Joined: Sat Oct 01, 2016 12:48 pm
24 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 69 guests