Jump to content

piano, virtual keyboard vst in second life


painthemoon
 Share

You are about to reply to a thread that has been inactive for 1086 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

That's not what I'm looking for. I'm looking for a way to make a script that plays audio files when you hit cetrain keys, in this case ~64 audio files that represent each note on piano. Use basic computer keys awsedftgyhujokplp etc to play them back. And using 2 keys to change the octave/audio file. Just like in Logic Pro.

Link to comment
Share on other sites

7 minutes ago, painthemoon said:

plays audio files when you hit cetrain keys

It's not impossible but with the random lag and latencies involved in SL, you won't end up with anything more than a complicated toy. I created a few 1-note gestures as a proof of concept, and I have a music box script. they both work, just they do not at all work well.

Link to comment
Share on other sites

1 hour ago, Lucia Nightfire said:

https://marketplace.secondlife.com/stores/72153

IIRC, this store used to offer a "program" that would connect between a MIDI capable keyboard and an SL piano object.

They also once sold a gesture based keyboard that would use letters for piano keys.

Maybe contact the creator for details.

See their "Grand Organ". Map 48 keys of your keyboard into organ notes.

Link to comment
Share on other sites

6 hours ago, animats said:

See their "Grand Organ". Map 48 keys of your keyboard into organ notes.

Yeah, but they demo'd something entirely different to me a few years ago that is no longer in their store.

They were playing a synthesizer in RL and it was connected to an in-world keyboard.

Link to comment
Share on other sites

this is a interesting problem

is possible to map clientside a keyboard to the LSL control keys

when map to two control key combinations then is 34 uniquely trappable control events

w,a,s,d,e,c,sa,sd,m. sa = shift+A, sd = shift+D. m = left mouse

w+s,w+e,w+c,w+a,w+d,w+sa,w+sd,w+m
s+e,s+c,s+a,s+d,s+sa,s+sd,s+m
e+c,e+a,e+d,e+sa,e+sd,e+m
c+a,c+d,c+sa,c+sd,c+m
a+d,a+sd,a+m
d+sa,d+m
sa+sd,sa+m
sd+m


then if we can program our rl keyboard to output 34 keydown events suppressing keyup, and 34 keyup events suppressing keydown events then it gives us 68 control key combinations that can be trapped/read by our script


from knowing this then we could LSL script some kind of 64 key piano which would play the appropriate note and depress the appropriate key on a visual inworld keyboard

Link to comment
Share on other sites

1 hour ago, Mollymews said:

this is a interesting problem

is possible to map clientside a keyboard to the LSL control keys

when map to two control key combinations then is 34 uniquely trappable control events

w,a,s,d,e,c,sa,sd,m. sa = shift+A, sd = shift+D. m = left mouse

w+s,w+e,w+c,w+a,w+d,w+sa,w+sd,w+m
s+e,s+c,s+a,s+d,s+sa,s+sd,s+m
e+c,e+a,e+d,e+sa,e+sd,e+m
c+a,c+d,c+sa,c+sd,c+m
a+d,a+sd,a+m
d+sa,d+m
sa+sd,sa+m
sd+m


then if we can program our rl keyboard to output 34 keydown events suppressing keyup, and 34 keyup events suppressing keydown events then it gives us 68 control key combinations that can be trapped/read by our script


from knowing this then we could LSL script some kind of 64 key piano which would play the appropriate note and depress the appropriate key on a visual inworld keyboard

Molly's hit the technical side right on the head here. Both overcoming the limited number of controls that LSL scripts can detect and generating them in the first place.

You would need to have some kind of programmable MIDI "virtual keyboard" that would translate individual keys into a unique combo of the limited controls an SL viewer can respond to and send to the server (way back in the day I put in a feature request JIRA for being able to designate arbitrary keystrokes as "controls" and make these user-defined controls scriptable - ie, if configured, they would raise control events when pressed -  but it never went anywhere. hey ho.)

Even if there was a reasonable chance it would work right at the end, it would be a lot of code and not a project I'd want to take on.

Link to comment
Share on other sites

9 hours ago, Da5id Weatherwax said:

Even if there was a reasonable chance it would work right at the end, it would be a lot of code and not a project I'd want to take on.

yes is a lot of work for a result that would be performance patchy

clientside keyboard mapping can be useful sometimes. Like I had a hoverboard which did maneuvers and animation changes based on control key combinations. So as a exercise I mapped the combinations to other keys on my keyboard to see if it would be easier to fly. It used single, double and triple control combinations. Lots of them

but I stopped using the mapping after awhile. Just learned how to fly the board with both hands. WASDEC left hand. Arrow/Page keys with right hand. Coordinating left and right to get the combinations I wanted

 

i think if I was ever to get into note-based musical instruments then I probably look more into avatar animation. Like guitar chords for example. Am pretty sure most guitar playing live performers would like that

pass the script a string (dialog picker maybe) which contains some kind of chord progression: Like 12-bar blues for example:  

"CM,C,C,C,C,.,F,F,C,C,.,G,F,C,C,.,r"
"GM,G,G,G,G,.,C,C,G,G,.,D,C,G,G,.,r"

where CM is C Major, GM is G Major. Cm would be C Minor and so on
"." is a break. "-" could be a hold. Example: ..,C-,.. Hold longer could be C--, and so on
"r" means repeat the progression

the performer can compose their own progressions, saved in a notecard. Picking whichever as they perform

then on each note change in the string, play the appropriate animation. Which would be quite cool with bento finger animations

lots of work tho as well to make all the animations. If a commercial product then would need animation sets for different sized avatars and appropriately sized guitars for each

the script itself tho would be pretty straightforward to write

Link to comment
Share on other sites

23 minutes ago, Mollymews said:

...then on each note change in the string, play the appropriate animation. Which would be quite cool with bento finger animations...

Allow me to mention that making bento fingers animate into chord shapes is a monumental and profound PAIN IN THE A........

I got as far as making three before I screamed, threw my mouse across the room and said "F realism" then made loops out of combos of those three that were "good enough" along with the other hand doing a basic fingerpicking "roll" :P

What the heck, you can play anything with three chords, right?

Link to comment
Share on other sites

11 hours ago, Mollymews said:

this is a interesting problem

is possible to map clientside a keyboard to the LSL control keys

when map to two control key combinations then is 34 uniquely trappable control events

w,a,s,d,e,c,sa,sd,m. sa = shift+A, sd = shift+D. m = left mouse

w+s,w+e,w+c,w+a,w+d,w+sa,w+sd,w+m
s+e,s+c,s+a,s+d,s+sa,s+sd,s+m
e+c,e+a,e+d,e+sa,e+sd,e+m
c+a,c+d,c+sa,c+sd,c+m
a+d,a+sd,a+m
d+sa,d+m
sa+sd,sa+m
sd+m


then if we can program our rl keyboard to output 34 keydown events suppressing keyup, and 34 keyup events suppressing keydown events then it gives us 68 control key combinations that can be trapped/read by our script


from knowing this then we could LSL script some kind of 64 key piano which would play the appropriate note and depress the appropriate key on a visual inworld keyboard

 

A standard (non electric) keyboard has 88 keys. Some electronic keyboards have 66 or 44. I wonder how many keys are on the OP's keyboard?

Link to comment
Share on other sites

18 minutes ago, Da5id Weatherwax said:

Allow me to mention that making bento fingers animate into chord shapes is a monumental and profound PAIN IN THE A........

I got as far as making three before I screamed, threw my mouse across the room and said "F realism" then made loops out of combos of those three that were "good enough" along with the other hand doing a basic fingerpicking "roll" :P

What the heck, you can play anything with three chords, right?

yes we can accompany any song with 3 chords. Is known colloquially where I live as the pacific strum. Just go faster or slower as needed 😸

and yes is so tedious making fret board finger animations

the closest I ever got to doing this for my own guitar was to use the poser in Niran's Black Dragon, and then writing a external program to convert the BD poser file to .anim which could be uploaded

i really would like Linden and Niran to come to some arrangement over the poser tool, and have  the poses write seamlessly to .anim. I would be quite happy if the .anim write capability was restricted to animation creator, so that we can't  thru the viewer rip other people's animations

 

 

  • Like 1
Link to comment
Share on other sites

11 hours ago, Mollymews said:

yes we can accompany any song with 3 chords. Is known colloquially where I live as the pacific strum. Just go faster or slower as needed 😸

and yes is so tedious making fret board finger animations

the closest I ever got to doing this for my own guitar was to use the poser in Niran's Black Dragon, and then writing a external program to convert the BD poser file to .anim which could be uploaded

i really would like Linden and Niran to come to some arrangement over the poser tool, and have  the poses write seamlessly to .anim. I would be quite happy if the .anim write capability was restricted to animation creator, so that we can't  thru the viewer rip other people's animations

 

 

Virtual hugs to another "SL luthier" :) I got into making guitars almost by accident - I wanted to be standing on the SL stage playing the same guitar I was playing on the stream IRL. So I fired up blender and made copies of both of mine. Then I went nuts and made a copy of my RL stage rig too (with a little artistic license, I'm too much of a cheapskate to buy trussing in RL, live IRL I use a rig constructed from scaff) and packed in a flight case rezbox it works pretty darn well. (I sneak around in "off hours" before my first gig at any SL venue and measure up their stage so I can customize the rezzing params). Since then it's become a bit of a "bad habit" for me to ask other SL musicians what they are playing and make them mesh copies of their RL instruments.

Along the way, I've retired both of the guitars I regularly performed with at the start and pretty much the first thing I did after each replacement was to mesh up copies of the new one :D (regular dreadnought bodies are SO much easier to mesh well than bowl-backed Ovations)

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1086 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...