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
Stuck midi notes; Maybe Ruby may fix it?
7 posts
• Page 1 of 1
Stuck midi notes; Maybe Ruby may fix it?
Its kinda old bug that never fixed: FS's midi inputs and modules doesn't support "All notes off" massage, so maybe there would be a Ruby alternative to add before the midi input prim' to kill sustained notes when switching between
midi inputs or changing midi pitches instantly? So far, couldn't find a solution for that with green
midi inputs or changing midi pitches instantly? So far, couldn't find a solution for that with green
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Stuck midi notes; Maybe Ruby may fix it?
This has been discussed before. We have tried several approaches. One was, to send note-off massages to all notes, but that created massive CPU spike and even considerable LAG. Then I tried different approach - to save midi-number of notes that are on and delete them when they get off. Then a trigger input may be used to turn off all notes that are on.
At that time I was total noob at ruby, but now I made it in 5 minutes. Here's the code:
the module should have first input for midi in and second for a green trigger and one midi output. And also it doesn't pass midi through - you have to put it in parallel with your midi chain.
At that time I was total noob at ruby, but now I made it in 5 minutes. Here's the code:
the module should have first input for midi in and second for a green trigger and one midi output. And also it doesn't pass midi through - you have to put it in parallel with your midi chain.
- Code: Select all
def init
@notes=[]
end
def event i,v,t
#process incoming midi
if i==0
note=@ins[0].to_array
#midi note on - save to array
if note[0]==144
@notes << [note[1],note[2]]
end
if note[0]==128
@notes.delete([note[1],note[2]])
end
end
#when all notes off trigger is received
if i==1
@notes.each{|note|
#create new midi off message with respective channel and pitch
out=Midi.new 128,note[0],note[1],100
output 0,out,t
}
@notes=[]
end
end
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Stuck midi notes; Maybe Ruby may fix it?
Totally off-topic, but I just couldn't resist
You both are in such loving care for your notes! Yes, I heard that cows given a massage shall result in much more tasty steaks, but do notes really sound better after a massage?
kortezzzz wrote:..."All notes off" massage...
KG_is_back wrote:...send note-off massages to all notes...
You both are in such loving care for your notes! Yes, I heard that cows given a massage shall result in much more tasty steaks, but do notes really sound better after a massage?
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Stuck midi notes; Maybe Ruby may fix it?
xD totally didn't noticed that off course - everything and everyone sounds better after a massage...
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Stuck midi notes; Maybe Ruby may fix it?
Well, I'm still getting never ending pampering massage from my stuck notes here... Maybe because they are
are scared to death from the option to be killed? Poor notes, they will do anything to survive
Unfortunately, your concept, @KG, doesn't works here. Tried to connect your code in so many ways without success. Thanks anyway.
Maybe we better forward another reminder to Malc? This bug probably should be fixed, not "bypassed".
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Stuck midi notes; Maybe Ruby may fix it?
works as suspected.. just add the module output to the desired midiconnection
but a note to malc to accept the "all notes off" message would be good, this really is a basic midi function which should work!
but a note to malc to accept the "all notes off" message would be good, this really is a basic midi function which should work!
- Attachments
-
- all notes off.fsm
- (8.44 KiB) Downloaded 864 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Stuck midi notes; Maybe Ruby may fix it?
Yes, it works now. Thanks guys. My problem was that when feeding few midi outputs with a midi input straight from a selector, its wasn't responding to change from 1 to 0. The "changed" primitive did the trick.
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 78 guests