It is currently April 25th, 2024, 9:34 am

PIANO, for Rainmeter

Media controls, music players, video and animated visualizers
User avatar
perfectdork
Posts: 7
Joined: December 28th, 2012, 7:29 am

PIANO, for Rainmeter

Post by perfectdork »

I proudly present you with PIANO, for Rainmeter. By pushing Rainmeter into a direction which it's always been capable of, but has never fully reached yet, PIANO was born.

This is a fully functional 88 key piano which supports both white and black keys. The GUI is elegantly designed into a virtual keyboard display. The sampled notes are sustained for 3 seconds in order to deliver the realistic audible distinction of a piano key being struck. The length of the notes however, do not interfere with faster than normal piano playing. Animations have also been integrated into the GUI, which mimic keys being struck.

The code itself is minimal in terms of complexity. In other words, it's not. I've taken very minimal, very practical and rather "short and simple" code to deliver the concept. The .rmskin can be downloaded on DeviantArt. I hope you enjoy the release.


Last edited by smurfier on December 28th, 2012, 2:21 pm, edited 1 time in total.
Reason: Changed to use Hsimg tags for large images.
StarburstSpectrum
Posts: 35
Joined: November 28th, 2012, 1:10 pm
Location: Canada

Re: PIANO, for Rainmeter

Post by StarburstSpectrum »

I Love It! Great Job! :thumbup:

EDIT: I think the 7th and 8th key are the same, but Great skin!!!!
User avatar
perfectdork
Posts: 7
Joined: December 28th, 2012, 7:29 am

Re: PIANO, for Rainmeter

Post by perfectdork »

I'm thrilled that you love it. It's a really great feeling to receive positive feedback. As per the 7th and 8th keys however, E♭1 and E1 respectively, I triple checked both the .wav files and coding. I've even downloaded and re-installed my own .rmskin. I can safely say that they're different from one another. Perhaps they just sound really similar to you?
StarburstSpectrum
Posts: 35
Joined: November 28th, 2012, 1:10 pm
Location: Canada

Re: PIANO, for Rainmeter

Post by StarburstSpectrum »

Uhm, maybe i guess it's possible they just sound the same.

Here is the code i think, they are both playing KEY(13).wav

Code: Select all

[STRING_G1]
Meter=STRING
X=r
Y=r
H=132
W=24
LeftMouseDownAction=!Execute [PLAY KEY(13).wav][!RainmeterHideMeter KEY_G1][!RainmeterShowMeter ALT_G1][!RainmeterRedraw]
LeftMouseUpAction=!Execute [!RainmeterHideMeter ALT_G1][!RainmeterShowMeter KEY_G1][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter ALT_G1][!RainmeterShowMeter KEY_G1][!RainmeterRedraw]
.
.
.
[STRING_A1]
Meter=STRING
X=r
Y=r
H=132
W=24
LeftMouseDownAction=!Execute [PLAY KEY(13).wav][!RainmeterHideMeter KEY_A1][!RainmeterShowMeter ALT_A1][!RainmeterRedraw]
LeftMouseUpAction=!Execute [!RainmeterHideMeter ALT_A1][!RainmeterShowMeter KEY_A1][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter ALT_A1][!RainmeterShowMeter KEY_A1][!RainmeterRedraw]
User avatar
perfectdork
Posts: 7
Joined: December 28th, 2012, 7:29 am

Re: PIANO, for Rainmeter

Post by perfectdork »

Well that's embarrassing. I'm glad no one can see me blush. But I thank you ever so kindly for bringing that to my attention. I can't believe I haven't picked up on that error yet. In any case, I have promptly corrected the coding in the .ini so that each key plays the proper .wav. I have repacked the new .rmskin and made the correction to DeviantArt. The new version 1.0.3 is all that much better thanks to your participation. Thank you!

On a side note, I'm glad to inform everyone that the 7th and 8th keys, E♭1 and E1 respectively, are 100% different as before stated. The 11th and 13th keys which were miscoded, G1 and A1 respectively, I managed to completely overlook.

[!ShowMeter Facepalm]
StarburstSpectrum
Posts: 35
Joined: November 28th, 2012, 1:10 pm
Location: Canada

Re: PIANO, for Rainmeter

Post by StarburstSpectrum »

We all make mistakes, glad I could help. :great:
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: PIANO, for Rainmeter

Post by smurfier »

FYI, you're using deprecated code in your skin. Bangs do not need to begin with !Rainmeter. (!ShowMeter). Also, !Execute has been deprecated. Instead just surround the commands with brackets.

[!ShowMeter Blah][!HideMeter Blah_Alt][!Redraw]
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
perfectdork
Posts: 7
Joined: December 28th, 2012, 7:29 am

Re: PIANO, for Rainmeter

Post by perfectdork »

Yes, I believe I am. Thank you, sincerely. However, if I may so kindly draw your attention for a second.
[!ShowMeter Facepalm]
I have this deficiency, you see. I'm a dork. So, I do stupid things like waste my time writing outdated code. In my defense though, I learned Rainmeter coding by reading Rainmeter code. You see, I believe in doing. In my opinion, it's the most efficient way to learn these types of things. However, the flaw in this is that if you read outdated code, you do stupid things like write outdated code. Sadly it's become a habit at this point. Ah, the shame. I do plan on remedying it in the future, but I'm... lazy...

I really am thankful for your input however. If I had cookies, I would so consider giving you one of them... maybe... as I ate five.

[!HideMeter Shame]
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: PIANO, for Rainmeter

Post by smurfier »

Tearing apart other people's code is the most common way to learn Rainmeter.

That is the main reason I tell everyone when they're doing things the outdated way.

Thus the reason I now present you with another method for having a hover effect. You can of course use it with LeftMouseDown and LeftMouseUp as well. This method eliminates the need for a second, or third, meter.

Code: Select all

[Meter]
Meter=Image
H=25
W=25
SolidColor=0,255,0,255
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor 255,0,0,255][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor 0,255,0,255][!UpdateMeter #CURRENTSECTION#][!Redraw]
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
fragrant.monkey
Posts: 51
Joined: September 18th, 2010, 1:03 am

Re: PIANO, for Rainmeter

Post by fragrant.monkey »

Very unique, clever idea! Bravo


So what's up for Version 2.... Bösendorfer ? :rofl:
fragrant.monkey :: deviantArt: aka snuffleupagus | coding: ThemeSaver for RocketDock | musician: Madera Dulce