Support

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 ?

For general discussion related FlowStone

More than one DLL GETFRAMESIZE Statement ?

Postby aronb » Tue Jul 28, 2015 7:35 pm

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 8-) ...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
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: More than one DLL GETFRAMESIZE Statement ?

Postby KG_is_back » Tue Jul 28, 2015 9:32 pm

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.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: More than one DLL GETFRAMESIZE Statement ?

Postby Nubeat7 » Tue Jul 28, 2015 10:58 pm

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!
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: More than one DLL GETFRAMESIZE Statement ?

Postby tulamide » Wed Jul 29, 2015 12:27 am

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.
"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 ?

Postby aronb » Wed Jul 29, 2015 3:09 am

That is what I thought, so that is a good thing ! Well at least my thought process was correct on this... :o

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
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: More than one DLL GETFRAMESIZE Statement ?

Postby aronb » Wed Jul 29, 2015 3:04 pm

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.

One_Frame_Delay.JPG
One_Frame_Delay.JPG (11.99 KiB) Viewed 14217 times


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 ! :geek:

Aron
FlowStone Rocks !
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: More than one DLL GETFRAMESIZE Statement ?

Postby tulamide » Wed Jul 29, 2015 3:57 pm

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.

One_Frame_Delay.JPG


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 ! :geek:

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


Return to General

Who is online

Users browsing this forum: No registered users and 67 guests