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

Audio buffer lookahead?

DSP related issues, mathematics, processing and techniques

Audio buffer lookahead?

Postby dentistguba » Thu May 01, 2014 6:44 pm

Hi,

been a while since I posted here but I've still been working on my physical modelling drum synth and have started to look into the possibility of internal triggering as an alternative option to just attempting to filter plain incoming audio sources, allowing more reliable results across varying sources.

I have got a few tests made which are close to working reasonably well but I have a little worry about latency almost regardless of implementation. Presumably the 'single sample at a time' processing in Flowstone must receive a long buffer of samples from ASIO for example and then feed us one of these at a time at the sample rate. The trouble with this is the fact that a 512 buffer at 44100hz is 10ms which will be the delay in seeing the end sample. any buffers I then use in code to look back through for peaks will add to this.

basically what I want to do is have some of my code work more like a typical C++ plugin where you are free to manipulate each full buffer received from ASIO straight away. This could also be good for fft's as they could be calculated on the first sample of a new buffer.

Is there any way to do this in Flowstone or would I need to wait till I start porting stuff to C++?
dentistguba
 
Posts: 13
Joined: Thu Jan 10, 2013 8:39 pm

Re: Audio buffer lookahead?

Postby KG_is_back » Thu May 01, 2014 7:59 pm

It is not directly possible in FS, but ruby stream processing is frame based, so if nothing else, you can extract the buffersize form there and use latency compensation. If you are looking for real time performance, then FS is not the answer probably...
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Audio buffer lookahead?

Postby dentistguba » Fri May 02, 2014 12:00 am

It did seem that way but best to check.

I was interested when I saw the ruby DLL thing but as you said i'm going for realtime. The idea is to have individual drums as mini vst effects each on their own mixer channel in a host and trigger internally from a sensor (e.g piezo) connected to any ADC. This would avoid the latency of external MIDI (I guess within a host there isn't any) and avoid the routing mess of having to use a trigger vst effect connected to an instrument or using external trigger software.

Ah well, guess this limitation might at least force me to minimize the latency in my methods making a later C++ version even better :lol:
dentistguba
 
Posts: 13
Joined: Thu Jan 10, 2013 8:39 pm

Re: Audio buffer lookahead?

Postby martinvicanek » Fri May 02, 2014 7:11 am

You can configure the ASIO buffer size down to e.g. 64 samples. Just set it big enough to avoid clicks and dropouts for your application and setup.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm


Return to DSP

Who is online

Users browsing this forum: No registered users and 36 guests