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 realize the counter algorithm for DSP module?

DSP related issues, mathematics, processing and techniques

How to realize the counter algorithm for DSP module?

Postby keyjslider1 » Sat May 26, 2018 7:26 pm

Dear colleagues, I would need to count incoming events/triggers (MIDI notes) within the DSP prim. At that what is the right code to increment the counter only when the desired event comes into input, and not when idle?? Please, do not suggest the Ruby prim, I need this to be realized only within DSP pane. Thank you in advance.
keyjslider1
 
Posts: 20
Joined: Tue Mar 13, 2018 2:19 pm

Re: How to realize the counter algorithm for DSP module?

Postby martinvicanek » Mon May 28, 2018 1:31 am

Like so?
Attachments
NoteCounter.fsm
(5.4 KiB) Downloaded 1348 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: How to realize the counter algorithm for DSP module?

Postby keyjslider1 » Tue May 29, 2018 1:01 am

martinvicanek wrote:Like so?

Thank you Martin. Probably a little in a different way. But thanks, cause I am new to DSP coding, there are things to for me learn from your module.
Actually, I need not to simply count notes, but count MIDI events coming out of MIDI Split prim as 5-params' set in order to derive unique MIDI-event index to write into array within DSP pane with the further goal to record and manupulate these MIDI-events...At that the MIDI to Poly conversion is not the way for me to go.
I made the module attached, one could even find it useful for some purposes... If you substitute code string "c1=c1+((P*res)>0)&P" for "c1=c1+((P*res)>0)&1", the code will count the amount of how many times the MIDI events, being aligned to the same time signature, come up during playback. Thus it will count chords - if only notes are on input...
Attachments
DSP Recorder4.fsm
Sorry for some junk modules there - needs a little clean-up))
(140.31 KiB) Downloaded 1335 times
keyjslider1
 
Posts: 20
Joined: Tue Mar 13, 2018 2:19 pm

Re: How to realize the counter algorithm for DSP module?

Postby martinvicanek » Wed May 30, 2018 8:34 am

Imho what you are after would be more appropriate for Ruby. DSP code is for high prrformance, low latency, and no jitter. Ruby is much moreversatile for complex stuff.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: How to realize the counter algorithm for DSP module?

Postby keyjslider1 » Wed May 30, 2018 9:24 am

martinvicanek wrote:Imho what you are after would be more appropriate for Ruby. DSP code is for high prrformance, low latency, and no jitter. Ruby is much moreversatile for complex stuff.


Agree. Unfortunately, some Ruby live MIDI processing implementations deliver often unexpected CPU load peaks up to 20-35% on my machine - and this all without synths and effects, whereas DSP implementation constantly loads CPU less then 3-5%... I would never mess around DSP which is rather tricky to program...
keyjslider1
 
Posts: 20
Joined: Tue Mar 13, 2018 2:19 pm

Re: How to realize the counter algorithm for DSP module?

Postby tulamide » Thu May 31, 2018 12:52 am

keyjslider1 wrote:
martinvicanek wrote:Imho what you are after would be more appropriate for Ruby. DSP code is for high prrformance, low latency, and no jitter. Ruby is much moreversatile for complex stuff.


Agree. Unfortunately, some Ruby live MIDI processing implementations deliver often unexpected CPU load peaks up to 20-35% on my machine - and this all without synths and effects, whereas DSP implementation constantly loads CPU less then 3-5%... I would never mess around DSP which is rather tricky to program...

That's probably more of a mistake or something else on your side. Look at Viper by Adam, pretty much everything GUI and MIDI is Ruby. Without issues.

You should notice however, that Flowstone draws if needed, not constantly. It will always prefer audio, but the rest of the cpu load is used to its fullest to draw as quickly as possible. Such spikes are normal and have nothing to do with Ruby. Maybe that's what you see?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany


Return to DSP

Who is online

Users browsing this forum: No registered users and 65 guests