Simple Arp

Post any examples or modules that you want to share here
Post Reply
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Simple Arp

Post by Exo »

Here is the simple arp module that I was previously selling...

There has been a report of stuck notes, but right now I couldn't fix it. So this is open sourced do what you like with it :)
Attachments
Simple Arp8Demo.fsm
(80.71 KiB) Downloaded 2569 times
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Simple Arp

Post by Spogg »

Hi Exo
Thanks for that. It seems to be almost there and I like what it does.
In my case every note latches ON from my MIDI keyboard. I'm currently ignorant about the code but I do wish someone here would sort it out; I think it would be a nice thing to have working.
Cheers
Spogg
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Simple Arp

Post by Spogg »

It's a shame but nobody has sorted this yet.

I don't yet know much about Ruby but I did experiment a lot with the code.
The #note off line in Ruby is always ignored even though I've checked that the note-off MIDI is coming in correctly.
Even if I put illegal code in the line it's still ignored. How can this be?
I'd love to understand what's wrong here.

Cheers
Spogg
Attachments
note off problem.png
note off problem.png (74.67 KiB) Viewed 57762 times
TheOm
Posts: 103
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Simple Arp

Post by TheOm »

Everything after a "#" until the end of the line will be ignored by the interpreter.
These are comments and they are only there to improve the readability of the code for humans.
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Simple Arp

Post by Spogg »

Hi TheOm
Sorry, it's the 2 lines under the # comment that are ignored and I can't see why.
Cheers
Spogg
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Simple Arp

Post by tulamide »

Spogg wrote:Hi TheOm
It's the 2 lines under the # comment that are ignored and I can't see why.
Cheers
Spogg

There's two ways, externals send a midi off. The one according to the midi specification is 128 (note off with reported velocity at key release). That's looked for here.
Some manufacturers take another path and simply send 144 with velocity 0. This is not a specification, so if you have an external that sends this, it won't be recognized by the arp.

You can try if it is the case here by changing the following code:

Code: Select all

if(midi[0]==144)
         @notes.push(midi[2])
         @notes.uniq!


into this

Code: Select all

if(midi[0]==144)
         if midi[3] == 0
            @notes.delete(midi[2])
         else
            @notes.push(midi[2])
            @notes.uniq!
         end
"There lies the dog buried" (German saying translated literally)
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Simple Arp

Post by Spogg »

Hey tulamide!
You are SO clever! You mended it!

Does this mean that my mark 1 M-Audio Keystation 61es is a POS for not being standard? Thing is, I checked and the keyboard is sending 128 so I'm confused. Plus, very occasionally in my Quilcom projects I get a stuck note. Now I'm wondering if it's the MIDI implementation on the keyboard that's not ideal. Also, does your modification preclude some other keyboards from working correctly?
Anyways, many thanks for such a quick and useful response.

I've uploaded the Exo ARP with your fix applied.

Cheers

Spogg
Attachments
Simple Arp8 Fixed by tulamide.fsm
(85.07 KiB) Downloaded 2516 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Simple Arp

Post by tulamide »

Good to hear it works now!

Spogg wrote:Does this mean that my mark 1 M-Audio Keystation 61es is a POS for not being standard? Thing is, I checked and the keyboard is sending 128 so I'm confused.
The question has to be answered with yes, I'm afraid :mrgreen: Part 2 now confuses me. I had a look at the appendix of the 61es manual. It says to support Velocity Note On (which is 144) but not Velocity Note Off (which is 128), so I wouldn't expect it to send 128 on note off. And if it works now with the addition it indeed sends 144 with velocity 0.

Spogg wrote:Plus, very occasionally in my Quilcom projects I get a stuck note. Now I'm wondering if it's the MIDI implementation on the keyboard that's not ideal.
Stuck notes are pretty much normal. They can occur for many reasons (for example, your system doing an update, bringing all other threads to a halt until finished). It isn't related to the midi implementation, nor the keyboard itself.

Spogg wrote:Also, does your modification preclude some other keyboards from working correctly?
No, it is just an addition that also takes care of those sending 144 with velocity 0. 128 still is supported. I can't force my controller keyboard to play at 0 velocity, human fingers just can't, even at the finest velocity curve. Also, most DAWs restrict the velocity range to 1-127 anyway (to support those controllers sending 0 velocity as note off). So there shouldn't be any issue.
"There lies the dog buried" (German saying translated literally)
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Simple Arp

Post by Spogg »

Spogg wrote:Does this mean that my mark 1 M-Audio Keystation 61es is a POS for not being standard? Thing is, I checked and the keyboard is sending 128 so I'm confused.
tulamide wrote:The question has to be answered with yes, I'm afraid :mrgreen: Part 2 now confuses me. I had a look at the appendix of the 61es manual. It says to support Velocity Note On (which is 144) but not Velocity Note Off (which is 128), so I wouldn't expect it to send 128 on note off. And if it works now with the addition it indeed sends 144 with velocity 0.


I just downloaded MIDI OX and checked and you are (of course) correct. I can't recall how I came to believe it was sending 128 but it's not, for sure. It sends 144 with velocity 0, just as you say. So, sorry for the confusion! :oops:

You are such a valuable asset to this forum tulamide, and thank you again for your help.

Cheers

Spogg
carlbeat
Posts: 8
Joined: Wed Jan 02, 2013 1:45 pm

Re: Simple Arp

Post by carlbeat »

In the last fsm-example seems to be a big bug in this arp. Everytime when I press a key on the keyboard and the arp is activated (e.g. Up-Mode or down-mode) then I can't change the knob settings of the synth anymore (like changing the value of the cutoff from the filter). Is there a chance to fix it, tulamide with an new example?
Post Reply