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?
6 posts
• Page 1 of 1
How to realize the counter algorithm for DSP module?
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?
Like so?
- Attachments
-
- NoteCounter.fsm
- (5.4 KiB) Downloaded 1346 times
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: How to realize the counter algorithm for DSP module?
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 1332 times
- keyjslider1
- Posts: 20
- Joined: Tue Mar 13, 2018 2:19 pm
Re: How to realize the counter algorithm for DSP module?
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.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: How to realize the counter algorithm for DSP module?
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?
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
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 60 guests