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
Square root in code
5 posts
• Page 1 of 1
Square root in code
Hi,
I'm a Flowstone novice trying to make an RMS voltmeter for the output of an audio processing stream. It would be fairly easy to do in code as the square root of the sum of the squares for an adjustable number of samples of the stream, but I don't see a square root function listed in the code expressions. Is there one? If not, how can I do it just in code?
Is there an alternative method using only the components? So far, I am trying to use mono to float from the output of an amplifier, then stack, square, square root. If that's right, all I need to do is trigger the mono to float block on every sample, but I don't see how to do that.
Thanks in advance for any advice and suggestions.
I'm a Flowstone novice trying to make an RMS voltmeter for the output of an audio processing stream. It would be fairly easy to do in code as the square root of the sum of the squares for an adjustable number of samples of the stream, but I don't see a square root function listed in the code expressions. Is there one? If not, how can I do it just in code?
Is there an alternative method using only the components? So far, I am trying to use mono to float from the output of an amplifier, then stack, square, square root. If that's right, all I need to do is trigger the mono to float block on every sample, but I don't see how to do that.
Thanks in advance for any advice and suggestions.
- flowstone
- Posts: 21
- Joined: Fri Aug 27, 2010 10:53 pm
Re: Square root in code
Hi Flowstone,
Your right there is no square root in the code component. But there is a square root command in the assembler component, you have to use that. I'm sure it will be implemented in code at some point.
Your method using components will not work because the triggers cannot be sent at sample rate. When working in 'green' the fastest anything can go is about 100hz using the ticker.
I've knocked up a quick example of how to do RMS in Flowstone. Sorry if I've just done it for you but it's easier for me to just do it than it is to try an explain it .
Cheers
Exo
Your right there is no square root in the code component. But there is a square root command in the assembler component, you have to use that. I'm sure it will be implemented in code at some point.
Your method using components will not work because the triggers cannot be sent at sample rate. When working in 'green' the fastest anything can go is about 100hz using the ticker.
I've knocked up a quick example of how to do RMS in Flowstone. Sorry if I've just done it for you but it's easier for me to just do it than it is to try an explain it .
Cheers
Exo
- Attachments
-
- RMS.fsm
- (14.99 KiB) Downloaded 1846 times
- Exo
- Posts: 426
- Joined: Wed Aug 04, 2010 8:58 pm
- Location: UK
Re: Square root in code
Hi Exo,
That great! Thanks very much for your help! Can you recommend a good reference for assembler commands?
Clayton
That great! Thanks very much for your help! Can you recommend a good reference for assembler commands?
Clayton
- flowstone
- Posts: 21
- Joined: Fri Aug 27, 2010 10:53 pm
Re: Square root in code
Here's a list of the know supported ASM opcodes
Since Flowstone is based on synthmaker it's a good idea to check out the Synthmaker site and forum lots of useful info over there.
Cheers
Exo
Since Flowstone is based on synthmaker it's a good idea to check out the Synthmaker site and forum lots of useful info over there.
Cheers
Exo
- Exo
- Posts: 426
- Joined: Wed Aug 04, 2010 8:58 pm
- Location: UK
Re: Square root in code
FYI: Square Root in now added to the list of funtions in the code compoent
-
admin - Site Admin
- Posts: 231
- Joined: Tue May 11, 2010 6:30 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 21 guests