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
Using HOP in flowstone
11 posts
• Page 1 of 2 • 1, 2
Using HOP in flowstone
There were several posts that mentioned HOP during the years, but still none of them really explained why, when and where you can get the advantage out of this HOP method. I would love to hear a little about it or get any link to a relevant information. I've tried google, but couldn't find a detailed explanation that refers to the audio section.
Thanks.
Thanks.
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Using HOP in flowstone
It’s about cpu load.
Dsp code is carried out once every sample (e.g. 44100 times each second). But not all operations need such frequent updating. For instance the coefficients of an EQ filter will not change at all most of the time. It would be wasteful to update those at sample rate. With hop(1024) you update only each 1024th pass, i.e. 50x per second, which is still sufficient but at much lower cpu.
Dsp code is carried out once every sample (e.g. 44100 times each second). But not all operations need such frequent updating. For instance the coefficients of an EQ filter will not change at all most of the time. It would be wasteful to update those at sample rate. With hop(1024) you update only each 1024th pass, i.e. 50x per second, which is still sufficient but at much lower cpu.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Using HOP in flowstone
Is it possible to create a dspcode layout that enables/disables hop? like in one instance I might have a static set of parameters, and then after hitting a switch those parameters would become dynamic. Would it increase efficiency / save cpu - to implement a switch in a block of code, going from some hop (x) setting to updating every sample when dynamic parameters are active?
If so, how?
If so, how?
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
Re: Using HOP in flowstone
Thank you very much for the explaination, Martin. That's a very understandable. How would you determine hop which in charge of sample\stream reading? is the best settings for that would be just 1 (since it's dynamic on every key note press)? or it's better to go up to 1024 with it?
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Using HOP in flowstone
Not sure what you mean by sample/stream reading. Key press events will hardly be accurate to 1 milisecond, so you could hop(32) the detection (and processing) of such events.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Using HOP in flowstone
@Martin I think you got what he asked. Maybe to reword it for detail.. What hop(x) is appropriate for what tasks?
What is you logic when determining how many samples you are hopping?
I just started implementing hop the other day, and I just run a sine wave through my schematic, and if I hear too much noise when there are moving parameters, I reduce hop.... I personally found filters need NO HOP if am going to be moving them...
Is there an assembly > dspcode translator? I went to remove hop(x) from a martin filter in assem, and could only hope I was snipping at the code correctly...
What is you logic when determining how many samples you are hopping?
I just started implementing hop the other day, and I just run a sine wave through my schematic, and if I hear too much noise when there are moving parameters, I reduce hop.... I personally found filters need NO HOP if am going to be moving them...
Is there an assembly > dspcode translator? I went to remove hop(x) from a martin filter in assem, and could only hope I was snipping at the code correctly...
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
Re: Using HOP in flowstone
No, but there is the opposite. If you connect a text box to the uppermost right pin of a code box you'll get the ASM code. This may be useful to understand what is going on under the hood. It is also a good starting point for optimization.guyman wrote:Is there an assembly > dspcode translator?
I went to remove hop(x) from a martin filter in assem, and could only hope I was snipping at the code correctly...
The following DSP code
- Code: Select all
hop(32){
<hopped code block>
}
- Code: Select all
mov eax,ecx;
and eax,31; // note this is not a typo!
cmp eax,0;
jnz continue;
<hopped code block>
continue:
- Code: Select all
//mov eax,ecx;
//and eax,31; // note this is not a typo!
//cmp eax,0;
//jnz continue;
<hopped code block>
//continue:
Last edited by martinvicanek on Sat Nov 02, 2019 7:45 pm, edited 1 time in total.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Using HOP in flowstone
Thanks Martin,
I understood. By the way, does hop somehow effects performance? like increasing latency or such?
I understood. By the way, does hop somehow effects performance? like increasing latency or such?
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Using HOP in flowstone
Latency, well yes, sort of. If you process external events at hop(1024), say, then in the worst case you may have a delay of 23 ms. On average it will be half that value, so you could call it latency.
Basically the decision whether or not to hop and how much includes the following considerations:
Is it worth it? Does the code block in question contain cpu-heavy operations to worry about?
How often does the result need to be updated?
Basically the decision whether or not to hop and how much includes the following considerations:
Is it worth it? Does the code block in question contain cpu-heavy operations to worry about?
How often does the result need to be updated?
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 130 guests