FORUMS
Remove All Ads from XDA

[APP] SimplePiano V4.3 [21.06.10] [ VGA / WVGA / QVGA / HVGA ]

279 posts
Thanks Meter: 88
 
By zevele, Inactive Recognized Developer on 10th June 2010, 11:11 PM
Post Reply Email Thread
SimplePiano V4.3



SimplePiano with the SP_mickesjo WVGA Skin

As the name suggests it's a simple piano application. I took over "CrisRowlands SimplePiano" after Cris decided to give up developing it (Original thread). The main reason I took over is because I wanted to implement multitouch. I own HTC HD2 so my emphasize was on the WVGA format, but the application should also support VGA resolution. It should be pretty easy to create skins for other resolutions as well...

Features:
  • WVGA, VGA, QVGA, HVGA versions.
  • It has three octaves.
  • Record and Playback.
  • Dualtouch via the PinchToZoom events (not ideal but the best I could find...)
  • Customizable skins.
  • Customizable sounds (currently include Piano, Acoustic Guitar & Violin).

Currently in develop:
  • Continuous sliding of the keyboard view.
  • Change the skn files to support arbitrary number of keys.

CHANGELOG:
  • 21.06.10(4.3)
    • Added two single finger chord modes (Major and Minor) - Requires special skin. I don't like this solution so I didn't follow it. If anyone is interested in this please let me know...
    • Added minimum note sustain length control (in milliseconds). If minimum sustain is not specified the full sample is played.
    • Added support for looping over the sample (by looping over the sample) Two samples can be specified, one is played once in the beginning, and the second is played over and over until the key is released. If the second sample is not specified the first one is used for the loop. This feature requires appropriate sound samples to be available.
    • Sounds are controlled via "Sound.lst" file. Different behavior of the notes (those mentioned above) can be controlled via this file.
    • Added OK/Cancel button to the settings dialog.
    • Vibration LED index can be now set via the "Device" tab in the settings dialog.
    • Polyphony can control to the "Device" tab in the settings dialog.
    • Fixed a problem where SimplePiano closed if an incompatible skin was chosen.
    • Fixed issue where bitmaps were not always clipped to bounds.
    • Fixed crash when sound file did not exist.
    • Changed applications icon (thanks mickesjo)
  • 11.06.10(4.2) Added some exception handling during initialization and a vga skin for the Default skin. Fixed the link to point here.
  • 10.06.10(4.0) Initial release including the new features (dualtouch, recording etc. as desribed in this post).

Screenshots:


Download:

Quote:

SimplePiano V4.3 (WVGA/VGA/HVGA/QVGA)
Alternative Download(Uploading) (including mickesjo's skin and Osprey00's alternative piano sounds - thanks to Osprey00)

Additional Skins:
(must be installed in the same location as the main application)
HVGA Rescale of the original skin (thanks to sam-2007 on post #130).
MewSkin (WVGA/VGA)
SP_mickesjo (WVGA/VGA/QVGA), thanks mickesjo. atlaswing created replacements key images, these can be found on post #47. HVGA version (thanks to sam-2007 on post #130).
Saplorer UI (WVGA), thanks xclarinetistx

Additional Sounds (thanks conantroutman):
(must be installed in the same location as the main application)
Violin
Acoustic Guitar
Piano Samples 8bit (lower quality) - these samples replace the default piano samples that comes with SimplePiano.
Alternative piano samples (thanks to Osprey00)

Rectangular QVGA (320x320) patch - extract the files from the zip files into the "Default" skin folder.

Previous version:
Other Notes:
If I may quote Cris:
Quote:

I hope you folks like it
Feedback is appreciated, improvements can only happen if I know what you folks want.

Attached Thumbnails
Click image for larger version

Name:	SimplePiano1.jpg
Views:	1123
Size:	19.0 KB
ID:	340959   Click image for larger version

Name:	SimplePiano2.jpg
Views:	647
Size:	19.9 KB
ID:	340981   Click image for larger version

Name:	SimplePiano3.jpg
Views:	532
Size:	20.8 KB
ID:	340982   Click image for larger version

Name:	SimplePiano4.jpg
Views:	452
Size:	22.7 KB
ID:	340996   Click image for larger version

Name:	SimplePiano5.jpg
Views:	340
Size:	17.2 KB
ID:	340997   Click image for larger version

Name:	SimplePiano6.jpg
Views:	332
Size:	28.1 KB
ID:	340998   Click image for larger version

Name:	SimplePiano7.jpg
Views:	3454
Size:	27.4 KB
ID:	340999   Click image for larger version

Name:	SimplePiano8.png
Views:	624
Size:	40.6 KB
ID:	341127  
 
 
10th June 2010, 11:11 PM |#2  
zevele's Avatar
OP Inactive Recognized Developer
Thanks Meter: 88
 
Donate to Me
More
Some documentation
Some useful information about the *.skn files and the Sound.lst file.

The *.skn files
These files define the location of the different items on the screen. For each screen resolution the skin supports there should be one skn file. When a skin is chosen, SimplePiano search the skin directory for a compatible skn file and loads the skin according to its content.

here's an example for a skn file
Code:
Display=0,0,480,800
This line declare the target resolution of the skin. It is given in the following format: 0,0,Width,Height

Code:
Name=mewskin
The name of the skin, currently not used for anything.

Code:
Octave1=360,10,120,120
Octave1Image=OneNormal.png,OnePressed.png
Each key should include those two lines. The first line describe the location and size of the image, using the following format:
KeyName=Left,Top,Width,Height
The second line points to the images to be used with this key. The following format is used:
KeyNameImage=NormalStateImage, PressedStateImage
Where KeyName is one of the following:
Octave1, Octave2, Octave3
Quit, Settings,
Record, Replay,
NormalKey1, ..., NormalKey8
SharpKey1, ..., SharpKey6
All these keys must be specified.

NormalKey# stands for the normal note keys (C,D,E,F,G,A,B & C)
SharpKey# stands for the semitone keys (C#, Eb, F#, Ab, Bb & C#)

In addition the toolbar background has to be specified as well:
Code:
Toolbar=360,0,120,800
ToolbarImage=Background.png
unlike a regular key here only one image is supplied.

In addition the optional chord modifier keys can be specified (using the same logic):
Code:
ChordMajor=-30,0,60,60
ChordMajorImage=MajorNormal.bmp,MajorPressed.bmp
ChordMinor=-30,60,60,60
ChordMinorImage=MinorNormal.bmp,MinorPressed.bmp
The Sounds.lst file
This file defines the sounds to be used with the selected instrument. First of all it binds a note to a wav file. In addition different properties can be set for each note, as I'll explain below:

Code:
[1]
The file is divided into octave, currently there are 4 octaves (since SimplePiano also includes C4 &C#4). Each octave is titled with its number.
Code:
C=Data\C1.wav, Loop=0
Then, the sound files for this octave are given. The following format is used:
Note=FileName, Option1=value1, Option2=value2,...
Note is one of the 12 notes in an octave. The following notation is used: C,Cs,D,Eb,E,F,Fs,G,Ab,A,Bb,B.
Then a relative path to the sound file is specified. Followed by a list of parameters and values pairs separated by comas. These parameters are optional. The following parameters can be declared:
Loop=#
This specify how many times to loop over the sample (0 - plays the note once, -1 loop infinitely). If a non-zero value is given for a note, the note will be played as long as the key is pressed, once the key is released the playing will cease immediately. By default (if not specified) Loop=0.
MinimumLength=#
This specify the minimum length (in milliseconds) a note is to be played. If this value is -1 the sample will be fully played. any other (non-negative number), the note will be played at leas this amount of time. For example, if a value of 500 is specified, every touch on the keyboard will generate a 500ms sound. If the key is held longer than 500ms the sound will stop when the key is released (or the sample reaches its end). The default behavior depends on the "Loop" setting: If Loop=0 MinimumLength=-1. Otherwise MinimumLength=0.
10th June 2010, 11:34 PM |#3  
Senior Member
Thanks Meter: 1
 
More
Good job man
Good luck with this

I don't suppose you could maybe send me a copy of the source code etc?
Maybe upload it & give me a link.

The main reason I wasn't able to implement these features is because I don't know how. It would be quite interesting to learn about how you did it
10th June 2010, 11:35 PM |#4  
ephestione's Avatar
Senior Member
Flag Rome
Thanks Meter: 58
 
More
good job on significantly improving chris' already nice work
And dang you've beaten me to first reply
10th June 2010, 11:48 PM |#5  
zevele's Avatar
OP Inactive Recognized Developer
Thanks Meter: 88
 
Donate to Me
More
Quote:
Originally Posted by ephestione

good job on significantly improving chris' already nice work
And dang you've beaten me to first reply

Quote:
Originally Posted by cris_rowlands

Good job man
Good luck with this

I don't suppose you could maybe send me a copy of the source code etc?
Maybe upload it & give me a link.

The main reason I wasn't able to implement these features is because I don't know how. It would be quite interesting to learn about how you did it

Thanks guys...

Cris... no problems, just let me tidy the project a little...
11th June 2010, 02:50 AM |#6  
ai6908's Avatar
Senior Member
Flag Land of Lincoln
Thanks Meter: 269
 
Donate to Me
More
I love your simple piono 4.1. Now 4.2 should be better than 4.1. Thanks for the updated version...
11th June 2010, 06:48 AM |#7  
PoisonWolf's Avatar
Senior Member
Thanks Meter: 489
 
More
OP, thanks for the APP. I look forward to future updates once more of the bugs have been knocked out!
11th June 2010, 10:49 AM |#8  
zevele's Avatar
OP Inactive Recognized Developer
Thanks Meter: 88
 
Donate to Me
More
Update: added a download link to the mewskin, this is nicer looking especially for the VGA resolutions (but also on the WVGA). Kudos to the author (xxmewstarxx)...

Just install the mewskin.cab after installing SimplePiano (no need to reinstall).

Z.
11th June 2010, 12:09 PM |#9  
ephestione's Avatar
Senior Member
Flag Rome
Thanks Meter: 58
 
More
for now, I vote for default to 0 interval between multitouch keypresses, instead of 300ms
Not much of a big deal as you can change it yourself, yet if you already restarted to register multitouch, and you change that option later, you need to restart again

I am also thinking about spanning through more than 3 octaves, and a different method of changing the octave that lets you do that faster and more easily, will report back when I have a better idea
11th June 2010, 12:27 PM |#10  
Retired Recognized Developer
Thanks Meter: 67
 
More
Nice!

Unfortunately the space on the screen ins't that much but if there was a way to "somehow" squeeze in and create spaces for Chord Symbols/Buttons and when these are being pressed, a chord is being played (a flat chords, an arpeggio). Said chord-sounds could be default-sounds distributed with the application or pre-recorded by the user. Something similar to those Casio-chords (or whatever they are called) which do the fingering for you. Another option could be that it played just the root of the chord so one could create some variety and a little base-line while playing the melody on the normal keyboard.

The problem, I guess, is surely the space on the screen and the limit of two touches simultaneously.

Just some thoughts....
11th June 2010, 01:01 PM |#11  
zevele's Avatar
OP Inactive Recognized Developer
Thanks Meter: 88
 
Donate to Me
More
Quote:
Originally Posted by ephestione

I am also thinking about spanning through more than 3 octaves, and a different method of changing the octave that lets you do that faster and more easily, will report back when I have a better idea

Quote:
Originally Posted by tilleke

Nice!

Unfortunately the space on the screen ins't that much but if there was a way to "somehow" squeeze in and create spaces for Chord Symbols/Buttons and when these are being pressed, a chord is being played (a flat chords, an arpeggio). Said chord-sounds could be default-sounds distributed with the application or pre-recorded by the user. Something similar to those Casio-chords (or whatever they are called) which do the fingering for you. Another option could be that it played just the root of the chord so one could create some variety and a little base-line while playing the melody on the normal keyboard.

Well, as for the 3 octave limitation, that could be easily broken, just that I don't have the sounds... If someone's willing to generate them I'll include them in the application.
About changing octaves I thought of two possibilities, one would be to just add two buttons at the end of the keyboard that moves one octave up or down. Another possibility is to create a slider above (or below) the keyboard on which you can slide left or right to change octaves. Sliding can also be continuous so that the first note is necessarily C. Such slider can also have some buttons to toggle chords buttons as tilleke suggeted...

Quote:
Originally Posted by tilleke

The problem, I guess, is surely the space on the screen and the limit of two touches simultaneously.

I really hope HTC will release some proper API that supports real multitouch...

Z.
Post Reply Subscribe to Thread

Tags
multitouch, piano, windows mobile

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes