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:
Skins: Default WVGA skin, MewSkin WVGA skin, MewSkin VGA skin, SP_mickesjo WVGA skin, Saplorer UI WVGA skin
Settings Dialog
Download:
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.
Click to expand...
Click to collapse
Previous version:
SimplePiano V4.2 (WVGA/VGA)
For QVGA the modified default skin has to be installed too.
Skins:
Default (WVGA/VGA/QVGA)(CrisRownlands' original skin)
MewSkin (WVGA/VGA)
SP_mickesjo (WVGA/VGA/QVGA), thanks mickesjo
Click to expand...
Click to collapse
Other Notes:
If I may quote Cris:
I hope you folks like it
Feedback is appreciated, improvements can only happen if I know what you folks want.
Click to expand...
Click to collapse
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,HeightThe second line points to the images to be used with this key. The following format is used:
KeyNameImage=NormalStateImage, PressedStateImageWhere KeyName is one of the following:
Octave1, Octave2, Octave3
Quit, Settings,
Record, Replay,
NormalKey1, ..., NormalKey8
SharpKey1, ..., SharpKey6All 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.
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
good job on significantly improving chris' already nice work
And dang you've beaten me to first reply
ephestione said:
good job on significantly improving chris' already nice work
And dang you've beaten me to first reply
Click to expand...
Click to collapse
cris_rowlands said:
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
Click to expand...
Click to collapse
Thanks guys...
Cris... no problems, just let me tidy the project a little...
I love your simple piono 4.1. Now 4.2 should be better than 4.1. Thanks for the updated version...
OP, thanks for the APP. I look forward to future updates once more of the bugs have been knocked out!
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.
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
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....
ephestione said:
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
Click to expand...
Click to collapse
tilleke said:
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.
Click to expand...
Click to collapse
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...
tilleke said:
The problem, I guess, is surely the space on the screen and the limit of two touches simultaneously.
Click to expand...
Click to collapse
I really hope HTC will release some proper API that supports real multitouch...
Z.
tilleke said:
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....
Click to expand...
Click to collapse
zevele said:
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...
I really hope HTC will release some proper API that supports real multitouch...
Z.
Click to expand...
Click to collapse
I was thinking the exact same things regarding octave switching, more like automatic recognition, as in when you press a key near the border, the keyboard gets slided past the border of a X length to accomodate for the "direction" you're taking
And tilleke suggestion is very interesting.
Here's my take: just like you play two sounds together when you do multitouch, you don't need to really record a chord, you only need to play 3 sounds together.
Example, put a swith on top, with three positions:
1) Normal
2) Major chord
3) Minor chord
Then you press, say, C
Cases:
"normal" : the note C is played
"major" : the notes C E and G are played
"minor" : the notes C D# and G are played
THe switch would be a slider onr, because a toggle one (1-2-3-1-2 and so on) would take too long if you need 1 and you're currently on 2.
Glad to see somebody picking up on this where Chris left off.....
If you want more octaves I'd be happy to provide them.
Just out of interest, are the samples in this version the same ones from Chris' original version?
conantroutman said:
Glad to see somebody picking up on this where Chris left off.....
If you want more octaves I'd be happy to provide them.
Just out of interest, are the samples in this version the same ones from Chris' original version?
Click to expand...
Click to collapse
More samples can't hurt, but at the moment I'm trying to solve the chords feature...
The samples are the same ones from the previous version.
Thanks,
Z.
Totally awesome. Poor WM support. it seems like everyone writes off Windows platform as thou its limited, but if you had the support you show with this simple piano, the experience level and communication would be thought on a positive (note) about windows platform... GOOD JOB!!
Thanks zevele for the work!
xda member TWolf has a FlashPiano that he stopped developing. The program itself has a great sample of 4 instruments in mp3 form, but I don't know enough about music to rename them. Maybe somebody here can take a look and rename the files. Here's the link and source code from TWolf:
http://forum.xda-developers.com/showpost.php?p=2806409&postcount=126
Would be nice to include mellotron in this, like the Manetron for iPhone
http://www.youtube.com/watch?v=pcIRG1X0VMs
dio62000 said:
Would be nice to include mellotron in this, like the Manetron for iPhone
http://www.youtube.com/watch?v=pcIRG1X0VMs
Click to expand...
Click to collapse
Seeing these applications on the iphone just depresses me... they run so much better than on the windows mobile...
Specifically to your question... If you mean playing several instruments in parallel, it shouldn't be to complicated to implement...
Okay, here's my idea for a solution for the chords feature, I've added two buttons below the keyboard one toggles a major chord and the other a minor. As all other buttons these can be moved and changed through the skin files. Please try it and let me know what you think...
SimplePiano
http://rapidshare.com/files/398328285/SimplePianoV43beta.CAB
MewSkin
http://rapidshare.com/files/398329265/mewskincabV43beta.CAB
Thanks,
Z.
Can this be hosted somewhere else? Rapidshare gives some of us problems and the the download limitation sucks. I can't download the v43beta after just downloading the v42 version. My suggestion is drop.io or dropbox... You can even use the free Skydrive for this.
Thanks for the good work...
This may sound a little trivial to some people, but the percentage sign on the calculator app seems to work differently to many standard calcutors I've used before e.g. on a standard calculator enter:
10*17.5%+ (would give 11.75 correct).
some other calculators you could even use 10+17.5% would also give the correct answer, but using HD2 app using:
10*17.5%+= (gives an error)
10*17.5%= (gives 1.75 correct, but you then have to +10 to get the full answer which is not good if your starting figure is not an easy number like 10 )
10+17.5%= (gives the wrong answer)
Sorry for the moan.
we've had this discussion before. I assume you are flipping the phone to landscape to get the % symbol, right? and i assume the wrong answer you are getting is 1.75?
In portrait mode the calculator acts like a business calculator, , in landscape it acts like a scientific calculator.
All scientific calculators would give 1.75 because what it is seeing is
10 x (1/100 x 17.5) ((mathematically, 17.5% is the same as saying 1/100x17.5, or 17.5/100)
= 10 x (0.01 x 17.5)
= 10 x 0.175
= 1.75
To do the sum you are doing in portrait, (adding VAT, are you?) use 10 x 1.175
to remove vat do 10 / 1.175
To do it in landscape, as you discovered, you would use 10+10x17.5% (personally I would use 10+(10x17.5%) for clarity, but thats just habit)
10+10x17.5% reads as "Ten plus 17.5 percent of ten"
Heres another one for you , , in portrait mode, type ' 2 + 3 x 4' answer 20
now do teh same sum in landscape mode, , , , , answer 14!, , , good eh?
Its because a scientific calculator follows mathematical rules that mean multiplication is perfiormed before addition, which is why in maths you would put (2+3)x4 to get 20, whereas a business calculator calculates as you go, so when you press the x it adds 2+3 automatically.
Many thanks for your reply.
I totally understand all the forumulas but it just seems a long way round to get a simple percentage, especially when compared to using a normal calculator such as a Casio.
hehe, yeap, and if there was a % button in portrait mode, it would probably work like you expected, sadly there isn't.
Hi there,
Can anyone pls tell me if there is any financial calculator for HD2. Many thanks in advance.
I have been converting some 3D movies to watch on the Evo 3D. 16:9 movies display perfectly. However, if a movie has an aspect ratio wider than 16:9, the Evo 3D always plays it stretched. The Evo does not allow you to change the playback mode between "best fit" and "full screen" while in 3D mode. That being said, if you choose "full screen" while in 2D mode and switch to 3D, the result is as expected: no black bars, but video stretched. If you choose "best fit" while in 2D mode and switch to 3D, black bars appear (as you would expect), BUT the video remains stretched, and the black bars actually trim the image.
So, other than editing the video and adding black bars, it looks like we're stuck with stretched faces. =(
Has anyone else noticed this? Any other solutions?
Thanks!
M
EDIT: Forgot to mention, 1st picture is 3D full screen, 2nd picture is 3D best fit, 3rd picture is 2D full screen, and 4th picture is 2D best fit.
It was right in front of my stoopid face!
Change Handbrake's cropping to custom, at least for videos whose source is 16:9 anamorphic.
Continuing the monologue...
I came across a 1920x800 file, and Handbrake doesn't seem to have the ability to add black bars, so I ended up cropping Left/Right to fill screen while maintaining the correct aspect ratio. This is good in a way because you maximize the use of the Evo 3D screen, but I may not want to do that to every wider 3D movie I come across.
Does anyone know of a quick and easy way to add black bars to an mp4?
Thanks.
M
EDIT: Yeah... don't do what I did (crop left/right). Pretty dumb move.
Yes, the cropping thing is a bad idea because it will crop the right side of the right image and the left side of the left image, leaving you with a completely misaligned 3d image.
I am at the same point as you are (or were). Cropping is not the way to go, but i will try to add black letterboxing bars. This seems to be not possible in Handbrake, but there must me some video encoding software that will let me do this. I will post if i have a solution.
As i do not like letterboxing, it would be ideal to have a solution here it would be possible to crop from the middle of the video, where the left border of the right and the right border of the left image are, if you know any video software that can do this, please post it!
I crop them, because if I don't I have black bars and I wanna use the whole screen when watching 3D.
How do you crop a SBS 3D video? All video encoder programs i know let you cut away the right and left border, but if you have a SBS 3D video, you would need to cut away the middle of the video too, where the other borders of the two images meet.
If you have a method to do that, please share it, as i too would like to use the whole screen.
---------- Post added at 12:58 AM ---------- Previous post was at 12:41 AM ----------
Okay, i have had success in adding letterbox bars. I have converted a 1280x538 video to a 960x540 and added letterbox bars, so it is displayed without distortion now. I don't like the black bars though, so i hope DexterMorganNL will elaborate on his method to crop the sides of 3D SBS video.
P.S. I used Sothink video converter, in the "advanced" tab on the right side of the window just select 960x540 as "Dimension" and click on convert.
I crop the Top and Bottom below away when converting with handbrake. It works good, I already watched 3D movies that I needed to crop.
It looks like we misunderstood each other then. It seems you were talking about movies with a lower aspect ratio than the phone's screen, for instance 4:3 (=1.33:1). If you add black bars to the sides of a video, it is actually called pillarboxing, by the way.
However i was talking about movies that had a higher aspect ratio and are therefore wider than the phone screen. For instance the video i converted to test the letterboxing had a resolution of 1280x528 which roughly equals 2.39:1, a common aspect ratio in cinemas.
For those videos, i currently have no alternative to letterboxing, as you cannot crop the sides because of the reason already described.
OK, i have sucessfully cropped the left/right borders by creating an avisynth script that first crops away everything but the center part of the left image that i want to keep, then does the same to the right image and finally combines the two center portions of the two images side by side. This is the script:
Code:
Sourcevideo = FFVideoSource("C:\Example\Example.mkv") # <= Loads the 3D-SBS source video
Lefteye = Sourcevideo.Crop(80,0,-720,-0) # <= Cuts away 80 pixels from the left side and 720 pixels from the right = the center portion of the left image is kept
Righteye = Sourcevideo.Crop(720,0,-80,-0) # <= Cuts away 720 pixels from the left side and 80 pixels from the right = the center portion of the right image is kept
Combinedvideo = StackHorizontal(Lefteye, Righteye) # <= puts togeter the two center portions side by side
Return Combinedvideo # <= Outputs the two portions as SPS 3D video.
This script was made for the 1280x528 mkv video i mentioned earlier. Obviously you have to change the amount of pixels to be cropped if you want to crop video of a different resolution. For a 1920x800 video, it would be 1084 and 124 pixels, for instance.
I used MediaCoder to load the avisynth script and encode the new cropped video. As the audio does not need to be changed, i extracted it from the original .mkv file with MKVextractGUI2 and loaded it with Mediacoder, enabling the "External File" checkbox (and also the "Copy Audio" one, as the audio should not be reencoded).
Of course you need Avisynth installed in order to do this, plus the FFmpegSource2 plugin.
So, i'm pretty happy and i think this answers the original question of the OP.
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Wow! Thanks! Will give it a shot.
lufc said:
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Click to expand...
Click to collapse
Sorry. Was the Q&A forum there back in August? My bad.
Mexico said:
Wow! Thanks! Will give it a shot.
Click to expand...
Click to collapse
No problem, it would have been a waste spending time and effort to find a way to do this and then not share it.
If you have any question, let me know.
Oh, and btw, additionally to avisynth you need to have the FFmpegSource2 plugin installed, at least for .mkv files. It is possible you'll need other plugins for different input files, i am no expert on this stuff.
Heho
isn't there a community for software development for the evo 3d?
I`ve downloaded the SDK and got the 3DS Examples running well
using eclipse and my shooteru. I would like to programm a small
opengl 3d menu using min3d Framework. (see attachment)
Now i would like to use the code of the s3d demos to display this
menu in 3d, but i wasnt able to use the code for min3d renderer.
So i hoped there is a community for development for the evo 3d
but don't seem to be.
I made some changes to the min3D code to display stereoscopic 3D. It works on most samples, except 'Panorama', '3D in layout' and 'transparent layout'
The 3D can be enabled/disabled from the menu.
hey sound nice .. can you tell me how or send me some code snippets or something inspireing?
Both you guys might want to shoot toast a PM I know he was trying to get the 3d feature working on CM7. There might be lots of fun stuff there for you guys!
I had a look cm7's web and found that it only works on cdma evo. I unfortunately have a gsm phone. But thanks =)
Here is a link to the app:
http://www.fileserve.com/file/NwNcW2X/min3dSampleProject1.apk
You cannot tune the stereo convergence or separation. It 's fixed.
Enjoy
Thanx,
Nice,but apperently the speed of the Demo apps are noticeable slower.
Hmm now i see that its working but am not a bit smarter
Got some Tips how you did it? Also i have a question about the Panaorama Example.
I´m still new @ all the GL programming. I also created a skybox with nice skybox
textures from humus.name but i always see the borders of the box..
The textures are clamped to the edges of the box but if i rotate my Skybox
i see the edges.
thanks
Thomas
TommyX235 :
I also tried to make a skybox to display panorama, and I also got visible edges. I tried to displace cube's face, and/or displace textures with no result. I tried small box sizes 0.1 and large 10000 with same bad results.
The panorama sample is written by me and is not part of the min3D sample. It's a textured sphere.