ruby keyboard

Post any examples or modules that you want to share here
Post Reply
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

ruby keyboard

Post by Nubeat7 »

hi all,
here is a keyboard built with ruby,

i tried to comment the code with sense but some parts will be a bit confusing because it has 2 area containers one for black notes and one for white notes - it was the only way for me to make it work, maybe there are some better ways to built it up

its fully resizeable and also offers a latch mode where you can turn notes on with one click and off with a second click on the note.

v.04 : fixed out of range bug when dragging out of keyboard area
v.06 : last fix did just half of its job (4.3.15)
rubykeyboard_006.fsm
(29.98 KiB) Downloaded 1642 times


v.08 bmp: the bitmap version which uses images for the the keys
rubykeyboard_008bmp.fsm
(45.28 KiB) Downloaded 1553 times

key.png
key.png (30.97 KiB) Viewed 38481 times
Last edited by Nubeat7 on Fri Feb 19, 2016 9:06 am, edited 14 times in total.
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: ruby keyboard

Post by Exo »

Nice work NuBeat, resizable too :)

I think the structure is fine, keeping the black and white keys separate makes sense to me.

Thanks for sharing.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: ruby keyboard

Post by RJHollins »

Just a fast check ... Man you do nice work NuBeat ! 8-)

Will take a closer look later tonite ... thanks for posting !
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: ruby keyboard

Post by nix »

Thanks so much mate!
Structure looks clean IMO
Very nicely done- much appreciated.

DJ Brynte check this mod out man!
Brynte- I can try and hack MIDI in if you like,
but I'm not sure I will succeed,
it will be very difficult for me,
as even simple things in Ruby-
it's hard to find the method, then the right syntax
Let's use this keyboard though prolly hmm

Let's talk about MIDI in if you'd like peeps-
anyone want to get it going?
the first thing to do is parse the MIDI message hash and get the keys IMO
Will perhaps do this tonight. I've done that before with NB's help.
I will get that up in the next few days if this doesn't progress.
I may use some hacks- ie. MIDI split will tell us what we need to know about the incoming MIDI.
I think it functions semi-polyphonically___hmm maybe not ideal though
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: ruby keyboard

Post by djbrynte »

Nubeat your the Geek ;) of the geeks :P awesome man i will check this out. Hope it works. Let me let you know later i will test now.
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: ruby keyboard

Post by djbrynte »

Btw you can stop doing pianos it wont work in flowstone. Because if you wana see the midi when its playing it has a bugg. So its useless having a piano in this program. Seem like waste of time. Will always be 100 buggs.

I mean if we should have a piano. Then you wana see when the midi is pressed. Otherwise we can have an image instead. So this piano shit is just to leave.
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: ruby keyboard

Post by djbrynte »

But anyway thanx for the thing :)
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: ruby keyboard

Post by Exo »

Just to give some details of what djbrynte means.

The bug comes when the keyboard is being redraw while notes are playing and you open a drop down selector, it causes the audio to freeze and loop. This is Flowstones thread protection working and look like only way to avoid such a situation is to not redraw the notes with incoming midi.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

Re: ruby keyboard

Post by djbrynte »

thank you exo. I dont know mybe its working some way. I hope some one have a smart idea for this. Because if flowstone have a working keyboard will be +.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: ruby keyboard

Post by tulamide »

Exo wrote:This is Flowstones thread protection working and look like only way to avoid such a situation is to not redraw the notes with incoming midi.
Has anyone already tried Ruby's Thread.new in this context?
"There lies the dog buried" (German saying translated literally)
Post Reply