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
More than one DLL GETFRAMESIZE Statement ?
7 posts
• Page 1 of 1
More than one DLL GETFRAMESIZE Statement ?
Hi,
I have 2 data streams going into my DLL and use an ASIO driver as the interface. I ASIO driver can be set to some sample range, but typically I have it set to 512 or 1024.
The two data streams are 2 different pairs of signals with different complexity and frequencies (my DLL finds when the data is similar between the then near zero crossings... more for data signal processing than for audio - but I use FlowStone for everything ...anyway)
Typically the frame size is gotten by this:
float* audio1 = GETFRAME(pIn[0]); //A frame is just a float array
float* audio2 = GETFRAME(pIn[1]); //A frame is just a float array
int frameSize = GETFRAMESIZE(pIn[0]);
I was wondering if this was valid as well:
float* audio1 = GETFRAME(pIn[0]); //A frame is just a float array
float* audio2 = GETFRAME(pIn[1]); //A frame is just a float array
float* audio3= GETFRAME(pIn[2]); //A frame is just a float array
float* audio4 = GETFRAME(pIn[3]); //A frame is just a float array
int frameSize12 = GETFRAMESIZE(pIn[0]);
int frameSize34 = GETFRAMESIZE(pIn[2]);
Or is the frame size ALWAYS equal for both (or each) data stream ?
Thanks,
Aron
I have 2 data streams going into my DLL and use an ASIO driver as the interface. I ASIO driver can be set to some sample range, but typically I have it set to 512 or 1024.
The two data streams are 2 different pairs of signals with different complexity and frequencies (my DLL finds when the data is similar between the then near zero crossings... more for data signal processing than for audio - but I use FlowStone for everything ...anyway)
Typically the frame size is gotten by this:
float* audio1 = GETFRAME(pIn[0]); //A frame is just a float array
float* audio2 = GETFRAME(pIn[1]); //A frame is just a float array
int frameSize = GETFRAMESIZE(pIn[0]);
I was wondering if this was valid as well:
float* audio1 = GETFRAME(pIn[0]); //A frame is just a float array
float* audio2 = GETFRAME(pIn[1]); //A frame is just a float array
float* audio3= GETFRAME(pIn[2]); //A frame is just a float array
float* audio4 = GETFRAME(pIn[3]); //A frame is just a float array
int frameSize12 = GETFRAMESIZE(pIn[0]);
int frameSize34 = GETFRAMESIZE(pIn[2]);
Or is the frame size ALWAYS equal for both (or each) data stream ?
Thanks,
Aron
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
Re: More than one DLL GETFRAMESIZE Statement ?
if the two pairs come from the same ASIO driver, then they should match in framesize. In fact, I don't think it is possible to have two drivers running with the same app/plugin, so it should always be the same size for all buffers. I may be wrong though...
I can only think of one example when the buffersizes do not match - when you use ruby to generate a frame of different size.
I can only think of one example when the buffersizes do not match - when you use ruby to generate a frame of different size.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: More than one DLL GETFRAMESIZE Statement ?
KG_is_back wrote: In fact, I don't think it is possible to have two drivers running with the same app/plugin
for sure not as vst inside a DAW, and also not as executable becasue you need to set the audiodriver then!
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: More than one DLL GETFRAMESIZE Statement ?
Indeed, the framesize is consistent for all channels a driver can handle (which depends on the soundcard).
I'm not even sure if the named Ruby example would cause issues, since the (real) framesize is driver dependant. I might be wrong though.
You have to check the size because the user could change it in the driver settings on the fly, but you don't need to check it for each audio channel.
I'm not even sure if the named Ruby example would cause issues, since the (real) framesize is driver dependant. I might be wrong though.
You have to check the size because the user could change it in the driver settings on the fly, but you don't need to check it for each audio channel.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: More than one DLL GETFRAMESIZE Statement ?
That is what I thought, so that is a good thing ! Well at least my thought process was correct on this...
I wanted to make sure because I was having a timing issue.
Maybe I need to delay by some number of samples...?
Back to coding.
Thanks for the comments / answers etc. !
Aron
I wanted to make sure because I was having a timing issue.
Maybe I need to delay by some number of samples...?
Back to coding.
Thanks for the comments / answers etc. !
Aron
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
Re: More than one DLL GETFRAMESIZE Statement ?
Thanks for the help !
So a one frame delay was my solution for one of the two xy data channels... Seems to work well now, hope this is a valid thing to do (just converting it to a frame then back again...?) still using the DLL to process, and added a one frame delay.
I use FlowStone more for image processing than anything else, and so putting image processing in the audio domain allows me to do some cool things, but you have to think about data in a new an interesting way. Lucky my hobby is building analog electronics and synths !
Aron
FlowStone Rocks !
So a one frame delay was my solution for one of the two xy data channels... Seems to work well now, hope this is a valid thing to do (just converting it to a frame then back again...?) still using the DLL to process, and added a one frame delay.
I use FlowStone more for image processing than anything else, and so putting image processing in the audio domain allows me to do some cool things, but you have to think about data in a new an interesting way. Lucky my hobby is building analog electronics and synths !
Aron
FlowStone Rocks !
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
Re: More than one DLL GETFRAMESIZE Statement ?
aronb wrote:Thanks for the help !
So a one frame delay was my solution for one of the two xy data channels... Seems to work well now, hope this is a valid thing to do (just converting it to a frame then back again...?) still using the DLL to process, and added a one frame delay.
I use FlowStone more for image processing than anything else, and so putting image processing in the audio domain allows me to do some cool things, but you have to think about data in a new an interesting way. Lucky my hobby is building analog electronics and synths !
Aron
FlowStone Rocks !
Hey Aron,
the one frame delay is normal and stated in the user guide. So you should be fine. Also interesting read about image processing in the audio domain. Hope you'll show us something when in good shape?
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 27 guests