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

how to add offset

For general discussion related FlowStone

Re: how to add offset

Postby KG_is_back » Fri Aug 08, 2014 1:29 pm

Here you go...
I have just added a few lines of code that will add length to counter if it's smaller than 0; Now the looping works in both directions.
To reverse, you just make the step negative.
Attachments
counteerInt.osm
(2.62 KiB) Downloaded 1043 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: how to add offset

Postby tester » Fri Aug 08, 2014 11:43 pm

Thanks. Now I need to wire a little bit of stuff and check if there are no errors.
But reverse speech sounds cool. :mrgreen:
.looc sdnuos hceeps esrever tuB :mrgreen:
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: how to add offset

Postby tester » Wed Aug 13, 2014 11:31 pm

Quick question. If the audio is played back at such slower speeds (several octaves) - is there a way smooth them a little bit, to remove these digital sounding artifacts? Would it be some sort of oversampling or some stuff like that useful here?
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: how to add offset

Postby KG_is_back » Wed Aug 13, 2014 11:53 pm

You need better interpolation. With linear interpolation the algorithm simply connects the points with straight lines - however real wave is smooth, so it is distorting it, creating aliasing which results in nasty artifacts you are mentioning. With pitch shifting down, they become rather obvious because you are basically "zooming in" on the wave or upsampling it.

You need better interpolation algorithm that interpolates the waves "smoother" (closer to original). Many such algorithms exist and many were implemented in FS/SM. Just search for "interpolation".

The difference between interpolation and oversampling is, that interpolation is an operation of calculating "inbetween" values in sampled signal, while oversampling is increasing number of samples per section of sampled signal. Basically you oversample using interpolation to make up the missing samples.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: how to add offset

Postby tester » Thu Aug 14, 2014 11:13 am

As I thought, thanks for confirming.

So oversampling modules for interpolation, yes? As far I remember, there were triangular and polyphase modules for that. Since I work on octaves here, it would fit 1:1 at the end.
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: how to add offset

Postby KG_is_back » Thu Aug 14, 2014 11:18 am

If you are working in octaves, then the oversampling will do the task quite good (basically the points you are looking for are identical with those that the oversampling provide).
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: how to add offset

Postby tester » Thu Aug 14, 2014 9:41 pm

I found two things, but I'm not sure how to use it in this design (waveplayer).

If I understand correctly, there is only upsample part needed if oversampling is used. In wav player (almost the same as the stock one), there is the counter (yours), something called interpolated "read" that takes mem (audio) and stream values according to counter.

My understanding tells me, that if I use oversampling modules, then it should be placed after that "interpolated read" module, to mess with the stream. But if so, then I'm not sure how to combine these two outputs into single one. Just mix them? Delay one output by one sample?

On the other hand, in "interpolated read" part there is a module responsible for some sort of simple interpolation, but it relies on counter. But again - there might be the problem with the counter itself (fractions).
Attachments
oversampling.fsm
(43.03 KiB) Downloaded 831 times
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: how to add offset

Postby tester » Thu Aug 14, 2014 9:53 pm

Hehe, I found even Trogs notes:

http://synthmaker.co.uk/forum/download/file.php?id=5232

:mrgreen:

and something like this. But no idea yet what worth is it. (plus - it oversamples only within 1 octave range).

And "developer toolkit" (registered area). Is the 0.1.8 the latest version?
Attachments
OversampledWaveplayerDemo.osm
(156.41 KiB) Downloaded 825 times
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: how to add offset

Postby tester » Thu Aug 14, 2014 10:40 pm

Okay, give me few moments to combine my findings. I will need to know whether I did not made mistakes there.

For more than 1 octave, should there be more oversampling than 2x?

//edit:
what worries me about these oversampled examples is, what happens with fract part of the index...
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: how to add offset

Postby KG_is_back » Thu Aug 14, 2014 11:01 pm

The "interpolated read" modules within should be of your main interest. Copy them into your schematic and test them.

For oversampling you may use two in tandem. One will be fed by normal counter and one will be fed with counter -(step/2). then the two must go into downsampling. For 4x oversampling you need 4 interpolated reads in tandem each delayed by step/4 more than the previous. And the downsample those 4.

You can actually hear the dramatic drop of aliasing within this schematic, if you use step 8 (basically 8*playback speed = 3 octaves up). I hear no difference on slowing things down though... I would definitely go with better interpolated read modules (provided in that schematic you posted) for improving that.
Attachments
oversampled wave player.fsm
(479.53 KiB) Downloaded 849 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 125 guests