Posted in Musical on June 6th, 2009 by Christopher Souvey – 2 Comments
I just released a small update for Musical Pro with a couple minor graphics changes. First off, Google recently (just over a week ago, I believe) released the Android Icon Design Guidelines. Musical Pro’s icon did not meet these new guidelines, so I started planning a new one. I’m proud to unveil my latest revision, seen here, and now in the latest version of Musical. They guidelines also included standards for main menu icons. I had been planning to add icons to the menu in Musical Pro for a while, and I figured this would be a perfect opportunity, so I have also created icons for each item in Musical (also seen here). Sorry if you were hoping for something more exciting, but rest assured there will be some fun new features coming out in the next month.
It’s been a while since I made a post, so I thought I’d post an update of what I was up to during May.
Attended Google IO, learned lots of new techniques I can apply to Musical (mainly in the realm of optimization) and got a brand new free HTC Magic (branded as the Google Ion) so I can test Musical on two devices
Sang in Chorus, Jazz Choir, and Chamber Choir (as well as a solo in Loch Lomond) for the Spring Concert
Reformatted and re-setup my Android development environment on the Windows 7 Release Candidate
“Redecorated” a hallway, Mario style
This month (June) should be a good one for Musical (I had almost no time time for programming last month), as I have many updates planned and much free time to implement them.
Posted in Musical on May 3rd, 2009 by Christopher Souvey – 4 Comments
Now that Cupcake is rumored (I don’t think it has been officially confirmed) to have been officially released as an OTA update, I’ve decided to make a big update of my own. Musical now has a real live tuner, complete with microphone input. Musical still works completely on Android 1.0 and 1.1, but if you are running 1.5 (Cupcake), the tuner will look completely different (as pictured right). The “Frequency Analysis” section displays an FFT graph of the audio coming into the microphone. The graph updates approximately every second and has a resolution of 1hz. Based on my testing, it seems to be quite accurate.
The rest of the application has been also updated to ensure Cupcake compatibility (mainly the physical keyboard mapping on the Keyboard, which had stopped working under 1.5).
Go ahead and download the new version of Musical Pro today, and as soon as your G1 is updated, the new Tuner will show up. You can also takes things into your own hands and update now with JF’s latest 1.5 update (and therefore be able to use the multitouch drums).
NOTE: Musical Lite has also been updated with a bug fix release to ensure Cupcake compatibility.
I’ve been working on a tuner for Android 1.5 (Cupcake) that displays an FFT graph so you can see the frequencies being played and tune your instrument (to be included in a free update for Musical Pro). I have all the code for the microphone input and FFT analysis working, however it is having some issues in actual testing on the device. I’m going to look into it further, but so far, it appears as though recording live audio requires an immense amount of garbage collecting (and therefore CPU). In fact, in my testing the FFT takes well over 10 times longer if audio input is enabled. This means that until I find a workaround (if there even is one), there are either two choices: low accuracy or slow update rate. I’ll post more info as I have it, but for now, if you have any feedback about speed vs accuracy, feel free (as always) to voice your opinion.
UPDATE: It seems this was just a bug in the pre-release I was using, as it now running fine on the final version of 1.5
Posted in Musical on April 13th, 2009 by Christopher Souvey – 4 Comments
Google has just released a preview of the Android 1.5 SDK (aka Cupcake). Because 1.5 makes dramatic changes in the sound APIs, any development I make using the old SDK will be counterproductive, so I have decided (unless I get enough email objections from users) that I will continue future development of Musical with the newer SDK. The meaning of this is twofold for users of Musical:
1. I can add new features that were not possible before: full grand piano, faster response times, smaller application size, dynamic synthesized instruments, and the big one, a real tuner!
2. The downside, is that users won’t be able to use any of these improvements until Google releases the 1.5 update to your phone. I repeat, there will be no more regular updates to Musical until Cupcake is released (at which point, there will be a very large update with hopefully many many new features).
I encourage anyone who has an opinion on this to email me, but I think it will be best in the long run if I get a head start on the new features, rather than having to rewrite everything later.
I’ve just released an update for Musical with a much requested feature: multitouch drums! This is currently an experimental beta and requires that you have a rooted G1 with a hacked JesusFreke build (v1.4 and up). If you don’t know what this means, then you won’t be able to use the multitouch. When I say “experimental”, I don’t mean it can cause any damage or anything, it just isn’t yet up to my standards (visually and feature-wise). You may have noticed that the title of the post includes “sort of”. That is because there are three major caveats of the G1′s screen (which was not intended for multitouch):
It only supports 2 fingers (hardware limitation)
You have to try and keep your fingers as far apart as possible. When your fingers are very close, the screen tends to treat them as one large finger.
Adding another vertical layer (creating a grid/table), would not work, because the multitouch information only provides the radius and not the actual points (so you could no longer tell what was being pressed)
This is my first foray into multitouch on Android, so I would really like to hear feedback from users. If it seems like enough people are interested and have their G1 rooted, I will consider adding some more multitouch features (although the piano, because of the caveats I mentioned, won’t work).
I just published Musical Pro 1.2 with piano scroll locking, computer MIDI input over WIFI, and the ability to switch the upper and lower octaves on the keyboard (as requested this morning by a user). More details about the scroll-locking and the MIDI support are explained in my post Musical Pro Update Preview (MIDI Support) from last week. For now, the Desktop Client (required for MIDI input over WIFI) is in beta, mainly due to the lack of documentation. If you would like a copy of the application, please email me (souvey+androidmusicalpro [at] gmail [dot] com — this address also appears on the Market page for the application) and I will assist you in setting it up. Once a couple people have tested it out, I’ll post a public release to download here on my blog.
One of the things that has always annoyed me with cell phones is that there is no good way to handle multiple people having the same home phone number. Android’s contact manager allows multiple contacts to share the same number (because the database is not indexed by phone number, like on many older phones). This still wasn’t perfect for me, however. When a phone number shared by multiple contacts calls, the first match (sorted alphabetically A-Z) is displayed on the caller ID screen and in the call log. Fortunately, this consistency means we can manipulate the system to display a custom name. The following steps illustrate the technique:
1. Lets say we have a theoretical family: John and Jane Smith. They each have a cell phone, but live together and therefore share a home phone number. They each are added in Android with their mobile number as their primary number, and their home number as their secondary number. Both can be called at either their home or mobile number from the contact list. When a phone call is recieved from their home number, Jane Smith is displayed in the caller id and call logs because she is first alphabetically.
2. For this technique to work cleanly (without any additional clutter), you must have your Android contact manager set only to display “My Contacts” (this settings is under Contacts > Menu > Display Group > My Contacts)
3. Log into Gmail and switch the contacts view
4. Create a new group to put these combined “metacontacts” (I called the group “Metacontacts”)
5. Force your G1 to synchronize contacts (Home Screen > Menu > Settings > Data synchronization > Uncheck and then recheck “Contacts”)
6. Tell your G1 to synchronize this new “Metacontact” group (Contacts > Menu > Edit sync groups > Check “Metacontacts”)
7. On your Gmail Contact Manager, in the “Metacontact” group, press the new contact button (person with a +)
8. Enter the name you want to display when the number calls (ex: “The Smith Family” or “John and Jane Smith”)
9. Add some form of symbol in front of the contact’s name to cause it to be first alphabetically. I used a period because it takes up the least space, and then put a period at the end as well for symmetry ( .The Smith Family. )
10. Add the shared home phone number to this new contact
11. Press the save button
12. Press the “Groups” button and then click “Remove from… My Contacts”. This will prevent the contact from showing up in Android’s contact list, but because we chose to synchronize the “Metacontacts” group, it will still be in Android’s database when it does a caller ID lookup.
13. Repeat steps 7-12 for each custom home phone number contact
14. Force your G1 to synchronize contacts again (Home Screen > Menu > Settings > Data synchronization > Uncheck and then recheck “Contacts”)
15. The new custom contact name will now show up in the call logs and when the number calls, but each individual contact (ex: John and Jane) will still have the number stored, so you can call their home number by clicking their name in contacts.
It works almost perfectly for me, but there are few caveats to this method that you should be aware of:
Every time you change the combined contact (“metacontact”), it automatically readded to the “My Contacts” group and you will have to remove it
The combined contact (“metacontact”) will have the symbol you chose (in my case, a period) in front of their name, so if this bothers you, this isn’t the technique for you
Posted in Musical on March 19th, 2009 by Christopher Souvey – 23 Comments
I just finished up the latest update to Musical Pro, which I will hopefully be publishing tomorrow. I just have to finalize the Desktop Client (more on that in a bit). I’ll post a more comprehensive explanation tomorrow, but there are two new features (one minor feature that everyone asked for, and one major feature that almost nobody asked for).
On the minor front, the scrollable piano can now be locked so it doesn’t scroll by accident.
The major feature is that the Piano and Keyboard can now act as MIDI controllers for your computer over WIFI. This means, for example, that you can use the touchscreen to record or input notes into Finale/Sibelius/GarageBand/etc. This will be made possible by a Desktop application that will run in the background and communicate with the G1 over WIFI (although, it is technically possible to use USB as well, but it will require some setup). It will initially (hopefully tomorrow) be released for Windows only, because I don’t have a Mac, but the application is written in Java, so it should (in theory) also work on a Mac. If anyone wants to test it for me, shoot me an email and if it works, I’ll release official Mac support.
The idea for the MIDI support came from a user, so remember, don’t hesitate to email me if there is anything you would like that Musical doesn’t currently have.
UPDATE: The desktop client is available for download here http://www.souvey.com/musical. You must have the latest version of Musical (released on June 18th)
Posted in Android on March 17th, 2009 by Christopher Souvey – 3 Comments
I’ve decided that from now on, along with all my Musical updates, I’m going to post some useful advice/tips/code/etc to help others solve any problems I might have encountered during the development of the update. So, here is the first of hopefully many “Android Development Details”
Today’s One Liner:
Get the current “android:versionCode” from AndroidManifest.xml: getPackageManager().getPackageInfo(getPackageName(), 0).versionCode
Problem/Solution:
Once a media file has been detected on the SD card by Android’s MediaScanner, it is automatically to the MediaStore. The MediaStore is a SQL database used by all media-based applications instead of directly accessing the file system. Unfortunately, once an item has been added to the MediaStore, it is not immediately automatically removed when you delete the original file off the file system. This has to manually be done in the database. The easiest way I could find to do this is to get access to the Content Provider with getContentResolver() and call the delete() method with the arguments MediaStore.Audio.Media.EXTERNAL_CONTENT_URI (external because it is on the SD card) and a SQL WHERE clause indicating which file to remove. In my case, I needed the WHERE clause to find a specific file based on its path on the file system (since I had just deleted the original based on its path). The unix absolute path is stored in the MediaStore.Audio.Media.DATA (Note: this is a constant not a String–it must be concatenated into the SQL WHERE clause) column in the MediaStore database.
Hopefully these tips are helpful to some other Android developers, and as always, feel free to email me with any questions!