Sunday, June 5, 2016

Convert JPG pictures to desired size limits

You clicked a selfie and want to reduce its size from some MBs to few KB as a profile pic? Or a huge scanned document to smaller size? There are software to achieve this task.


1. Jpegoptim

This is free open-source app which optimizes jpg files. You can build it from source for whatever supported Operating system your want. I ported it to Android and with ease it allows JPG optimizations and size reduction without changing resolution. Download it from herer - http://play.google.com/store/apps/details?id=org.greh.imagesizereducer



2. ImageMagick 6.9+

This is free, OpenSource and multiplatform application which is available on almost all latest popular Linux distros and can be downloaded on Windows, Mac. Download it and convert images like this command:

convert -define jpeg:extent=100KB input.png output.jpg


There can be some problem in older versions and jpg to jpg might not work. At-least this is what i encountered while converting from jpg to jpg using extent. ImageMagick 6.8.



3. IrfanView + RIOT plugin
Download IrfanView windows app and using jpg saver plugin we can choose target maximum file size.

Monday, May 23, 2016

Play midi files without midi driver using soundfonts on Android

Audience: Normal user
Platform:  Android


After trying to setup midi in Linux i decided to use Software Synthesis based players with custom soundfonts. Before that i will give basics of midi. Skip to APPs section if you don't want to read about midi system below.


How MIDI works?
Suppose you have memorized a pattern on piano notes and playing it on piano. Unfortunately there is no synthesizer (synth) & speaker attached. So before setting it up with synth you wrote every piano key activity on a paper or a file. You saved it like "C4 C4 D4# ... PITCH_WHEEL ... VOLUME_UP etc". Now you know the pattern, raga or rhythm of your music. Midi file is exactly this saved record!. Means there is no SOUND DATA. You write on paper that you payed a sitar or guitar. But how does that sound? To save that we really need sound file itself. That is the reason midi files are very small because there is no sound data inside mid files.

Now we know what is MID file. Now comes Synthesizer. That missing sound is produced by synth that is why the name. Midi tells a synth to play an instrument named guitar. Therefore depending upon a synth midi sound different. The big problem is that we create a music with our instruments and assume mid file will play same but if instruments are of low quality or even different in timbre may give totally different music. There are many solutions to this. Easiest solution is to produce stream music like mp3 ogg. However what is there are 1000 midi musics but very less disk space?. Its always recommended to keep midi files with original set of instruments so that in future we can reuse them for editing, remixing or other work. What we do is collect all the instruments sounds recorded and save in a bundle called SoundFont. Just like a font which contains set of Alphabets of a language.



So we have a solution.
Midi + SoundFont = Low size & preserved quality of OST (original sound track). 
More details about the topics covered can be found on wiki or tutorials on web.



APPs:

For windows, Mac related midi can be found on this link http://adamrehn.com/articles/playing-midi-soundfonts/


Android Version:
There are some apps which play midi using soundfont viz -

DroindSound, Timidity AE Player, LiveMidi, Midi Voyager, SoundFont-Midi-Player


SoundFont-Midi-Player is my own player i developed to play midi files with different soundfonts fast. It can change soundfonts easily and fast!. Do try it here -

https://play.google.com/store/apps/details?id=org.greh.soundfontmidiplayer

  • Switches between SoundFonts fast
  • Test SoundFont instruments using piano & USB MIDI Keyboard
  • Play Piano together with Midi music. However it also changes the instrument being played in Midi music.
  • Supports USB MIDI keyboard. Supports PITCH BEND messages, Pedal, Volume, Key events. AFAIK not all android apps do this. Tested M-AUDIO KeyRig 49 on Moto-G phone. Doing pitch bend on Android phone using USB Midi keyboard needs good response. I tested this app on some low end phones and it works fine.
  • Samplerates from 22050 to 96000Hz
  • Reverb & Chorus effects
  • Crystalizer audio effect. (Currently disabled)
  • FluidSynth is powerful and i think my app is the only one using latest FluidSynth 1.1.6 with GLIB Android build. Powered by Unmodified FluidSynth 1.1.6 Android Version. If modified source is used i will make the source available here.
  • More features described in PlayStore page.


Features to add:
- Hack Soundfont instrument without altering soundfont files to test midi music


Pro version i am planning to build with more useful features:
- Export as streaming music to ogg- Export self contained midi music i.e. rmid, (mod?)

Sunday, March 13, 2016

How much Android Non-Promoted Apps Earn?

UPDATED part of article begins "UPDATE"  section below.

This article will be short and straight to what a developer must know. If you come across articles like “how I earned millions and blah blah” then in many cases they are doing their marketing only. In business many people don't want to create competitors for free and one making such money will not make noise every place like spammer. Most people publish such articles just to attract people do some affiliate marketing, get visits/installs or sell their contents by making you dream high.


When one says “some of our people earn millions” truly means only some of them earn. Some can even be only one. What this article is about? Well by seeing the figures you can judge yourself how much real money comes even after publishing 5-10+ apps with ads. I came to see even much more poor stats for paid apps.

Lets look at the stats, screen-shot of Adsense Mobile app -










This is screen-shot of income from 5+ apps in total. Looking at stats you might feel how disastrous the income is? You are right, it is disastrous to shut down anyone's career. I used to make 200x than this in Nokia Ovi store. I will not disclosure the exact links of apps and detailed income report.


The screen-shot shows LifeTime 27,709 Ads shown in screen and made $47+. Great thing is that this will still be deducted when Google will take 30% of this and then US government will deduct taxes and Indian Government will deduct taxes. I have rough estimate that will result in total real income in hand ~$20-25. With this anyone can buy 1+ Birthday cakes. So what do you think where is the problem? It is not in Ads. It is in lesser number of downloads. So how much is less? Let me tell how much these apps got producing above income. Out of ~8 apps 4 didn't got any downloads to be shared here. Without giving names I am sharing stats: Puzzle Game - ~950 Downloads in 3yrs. Action Game - ~6000 downloads in 9 months. App 1 - ~250 downloads in 2yrs. 3 Apps launched in December 2015 - < 50 downloads (Were utilities like Fake SMS, Notification tool etc). Some more apps recently launched which have crossed 100+ downloads in less time with zero promotion.



At present all downloads I get are from organic users by nearly zero promotion. I don't have enough money for promotion. Most apps don't even cross 50 downloads in months. I was talking about how much daily downloads is less. Well I am sharing how much do I get then you take average of how much these numbers make money. Last year I was getting around ~80 downloads daily for my Bestial Kungfu game. It used to make ~$0.2+ daily. Today all apps get 30-100 daily downloads and earn always less than ~$0.2.

If they get downloaded 100x more then income becomes $20 daily. That means 500+ daily downloads are absolute minimum. Rest calculation is up to you. I can give one important tip which is its useless to make lots of apps. Quantity will not work. I tried making FakeSMS, Gallery, Notification tool, File Monitoring app, runner 2d games, 3d games like Temple Run, 3D tools etc. This article does not means there is no money. I know many are making great money from very simple apps. What really matters is timing. If some app is not there it can be you to build it. I am working on those apps and focusing on website more than before.



UPDATE

I have got more stats to share. My app imagesizereducer. From past 2-3 months gets 500+ downloads daily. Sometimes 750+. From all apps i get ~1000 downloads a day. I use Banner ads on above app and users mostly come from Asia. The daily income is still not USD 1 a day. Sometimes it goes 1+ but on average its not even $1.