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

waveplayer features to vst porting

For general discussion related FlowStone

waveplayer features to vst porting

Postby tester » Sun Aug 03, 2014 2:01 am

Old SM wave player allows to manipulate pitch/tempo (a gramophone style, faster=higher) of audio content, to any degree.

How to make a vst plugin portion, that would allow to manipulate audio content that way in DAW in range let say +/-5 octaves?

As far I can say, wave player provides clip length in samples, and this allows such rescaling. And what about DAW?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: waveplayer features to vst porting

Postby KG_is_back » Sun Aug 03, 2014 9:43 am

The sample player works in a way, that there is internal counter (the double precision part). the counter is increased by a step each sample. then the counter indicates the index of sample of the wave, that should be read (also interpolation takes place here).
to calculate the step is easy, there are multiple ways to do it.
step=target tempo/ original tempo
step=original size / target size
step=target frequency / original frequency (both hertz and normalized 0-1 works)
to use pitch, you have to convert the pitch to frequency (FS has a primitive for that, both stream and green) or use this formula:
2^((target pitch - base pitch)/12)

Then you have to multiply the step by resampling factor, to compensate different sample rates:
true step=step*((sampling frequency of the sample) / sample rate)
sample rate is the one that FS or your daw uses and sampling frequency of the sample is the one that was recorded in - it is provided by the wave file primitive when you load a file.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: waveplayer features to vst porting

Postby tester » Sun Aug 03, 2014 1:07 pm

Yes, but I'd like to do such thing as a VST/effect plugin, that works on audio content in DAW.

One way would be (and I guess not in all DAWs, wave editor yes, montage workflow - no/maybe) if DAW provided lenght of audio clip to the plugin.

Other thing that comes to my mind - there would have to be some sort of dynamic buffering happen, that either would work, or would kill the DAW at some point.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: waveplayer features to vst porting

Postby trogluddite » Sun Aug 03, 2014 2:02 pm

Plugins don't have access to that kind of data - inputs/outputs are just continuous streams of small buffers. A silent section of an audio clip is indistinguishable from there being no clip at all.
You might be able to 'tag' regions by marking them with, say, MIDI events in another track running alongside. But you will still have problems when, for example, speeding up a section - you would need to read an ever increasing distance ahead of the playback cursor.
Most plugins (e.g. Melodyne) that allow this kind of manipulation work by having a separate analysis phase where you play through the track while the plugin creates its own 'image' of the audio to work with.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: waveplayer features to vst porting

Postby tester » Sun Aug 03, 2014 2:40 pm

There is a plugin from sony (pitch shift), which works as VST effect in all kind of DAWs and is capable of doing this work at +/- 60 semitones (+/- 5 octaves). And this is veeeery old plugin. It works well in old wavelab (editing mode), it may crash in reaper (multitrack vs buffer lenghts?).

So if they made it so long ago, it should be possible in FS in somewhat "easy" way?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: waveplayer features to vst porting

Postby KG_is_back » Sun Aug 03, 2014 6:46 pm

tester wrote:There is a plugin from sony (pitch shift), which works as VST effect in all kind of DAWs and is capable of doing this work at +/- 60 semitones (+/- 5 octaves). And this is veeeery old plugin. It works well in old wavelab (editing mode), it may crash in reaper (multitrack vs buffer lenghts?).So if they made it so long ago, it should be possible in FS in somewhat "easy" way?


As trog seat - VST plugins have direct access from the DAW only to the current asio buffer - The DAW sends the buffer to the plugin and the plugin may process that data in any way it wants. If you for example want to double the playback of a sample via VST plugin, your plugin has to receive the last part of the sample in in half the time. This may be achieved via massive lookahead (minimally of a size of half the sample you want to speed up).
I do not know about the rendering mode and how the buffering works in rendering - it might be that it receives the entire file as one buffer, but I doubt it.

Trong mentioned plugins like melodyne, which first have to record the audio into its internal memory and then use that for playback. That would be a way to go, for the task you want.

For example in FL studio audio clips behave like VSTi plugins (basically identical to Flowstone wave player). You load a wave file into a 'plugin' and when you place an audio clip into the multitrack view it is internally basically a midi note that forces the 'audio clip' to play a note for specified time. You may even overlap the files and they behave like polyphonic sample player.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia


Return to General

Who is online

Users browsing this forum: No registered users and 14 guests