Sunday, March 22, 2015

outdated assumptions

I have just discovered that, as of iOS 8, Core Audio no longer requires either C or fixed-point sample values. This hugely simplifies the task at hand!

At least my difficulty in putting together enough time to get anything done has saved me from having any code to speak of that needs to be rewritten.

Saturday, July 26, 2014

the perils of spare-time programming

So, it was only three days ago that I posted this, but already I'm having second thoughts and afterthoughts. These appear below as block quotes.

Frankly, I wasn't making much headway before, hardly managing to keep up with changes to Objective-C, and significant changes to the frameworks, like ARC, and to the developer tools.

Shortly after completing RatioKey 1.1, I became involved with the Robots Association, the organization behind Robots Podcast and Robohub.org. This involvement relates to another consuming interest of mine, which is detailed in my Cultibotics blog. As I began to feel I was making headway on that front, the amount of time I gave to it increased until it consumed nearly all of the spare time I could muster, at which point I burned out (not completely, but I had to dramatically reduce my level of involvement to keep it going). However, I couldn't just pick up where I'd left off with RatioKey, because the intervening time had left me unfamiliar with my own code, and only vaguely acquainted with the changes Apple has introduced, so I began the process of getting back up to speed.

Now there's a whole new language (Swift) to learn, and learn it I will, even if it means putting off everything else until I've done so.

(Hopefully not to the point of another burn out!) The introduction of Swift has helped to focus my attention. Since I don't have a large Objective-C code base, it doesn't make much sense for me to continue to work in that language, especially considering that the language has continued to change while I was looking the other way.

Even if, as I expect is the case, Swift can't yet be used with Core Audio, which is a C-based API, it will be otherwise applicable, and important for me to get an early start with it, rather than trying to put off the inevitable change.

Actually, I may be wrong about Swift not working with Core Audio. At the very least, I should be able to import a C header into Swift.

Besides, there's quite a bit to like about Swift. It's clear that a lot of thought has gone into its design, and it continues the trend, which began with the addition of declared properties to Objective-C, of reducing the amount of code needed to get something done.

Beyond that, from what I've seen so far, it strikes me as being closer to the metal, not of the machine, but of the essence of programming. I presume this is a result of it evolving out of compiler technology, rather than the compiler being created to fit the language. This impression gives me confidence that what I haven't yet seen will also make sense to me.

...out of compiler technology and modern programming concepts...

Understand that I wasn't one of those who was easy to convince regarding the need for a new language. I like both C and Objective-C. In particular I like being able to use numerical variables as logical values (zero being false and everything else being true), and, while I haven't used it much, pointer arithmetic strikes me as an elegant solution. Admittedly, it took me more time and fretting than it should have to wrap my mind around expressions like primativeValue** or &scratchpadMemory, but I did eventually catch on, and now I appreciate the precise control they allow. On the other hand, having to use malloc() to obtain scratchpadMemory is a pain.

It's actually worse than that, because you sometimes have to first ask for the size of the data to be received, then allocate a block of memory to hold that, then ask for the data itself, passing in a pointer to the memory block you've allocated, but that pattern typically applies to C APIs and likely isn't going away just yet.

But this is all moot. Apple wouldn't have introduced Swift with such fanfare if it weren't destined to be the future. There are already Swift versions of frameworks that worked with Objective-C, and lower-level frameworks, like Core Audio, are sure to be given the same treatment or replaced with updated versions that are Swift compatible, and that's a trend I don't care to buck.

Actually, "Swift versions of the frameworks" is probably imprecise. It's more like they've created a very fast translator, but I really don't understand how it works, only that it does and is fairly easy to use.

So, RatioKey 2.0, or whatever it ends up being called, if and when I get it done, and provided that it's accepted for distribution by Apple, will be a complete rewrite, using Swift, and probably targeted for iOS8, or, realistically, maybe even iOS9.

Emphasis on "if and when"...

Thank you for your patience!

Thursday, September 26, 2013

Ratio Key still runs on iOS 7

Having recently updated my third generation iPad to iOS 7, it was with some trepidation that I launched the legacy version (1.1) of RatioKey, which hasn't seen an update for three years, but remains on the app store (last I checked).

Eureka! It ran perfectly, perhaps even better than under iOS 6.1.

So I'll be retargeting the update I'm currently working on for iOS 7.

Friday, August 09, 2013

at work on an update

In the anticipation that RatioKey version 1.1 may no longer work on iOS 7, I've begun work on an update that doesn't make use of deprecated programming techniques. I can't promise to have this done before iOS 7 ships, but I am further along with it than with any past attempt since pushing 1.1 out the door.

This update, which I'm calling version 2.0, will also be free, assuming I get it done and Apple accepts it.

If it turns out that 1.1 does run on iOS 7, I'll probably retarget for that, which will add some time, but may also add functionality.

What's been the holdup? I've been distracted by another strong interest, robotics. For more about that, check out the links on my home page.

Sunday, July 15, 2012

intentions, constraints, & future possibilities

I do not intend to abandon this project, and do intend to produce further updates.

I'm happy to say that among the constraints that have held me back from doing so sooner is the abundance of options, more than I could possibly juggle for a single iteration. Another is embarrassment, over the initial version's lack of usability, and frustration over initially not knowing how to fix it.

The future offers even more options, as new and interesting ways of interacting with computers become available, such as The LEAP.

How much of what has already been bubbling on the back burner I may ever actually get done, much less the new possibilities that are opening up, I can't say. Not only do I not know myself, but even if I did that would be promising something I haven't yet delivered. I just want to say, in case there's anyone out there waiting for version 1.2, or 2.0, or whatever it might be called, I'm looking forward to it also!

Friday, October 01, 2010

RatioKey Version 1.1

Version 1.1 adds the ability to independently control the volume and duration of each stage of the ADSR envelope. Even though the tone produced remains a simple sine wave, with no undertones, overtones, or other elaboration, this provides quite a bit of range to the sound.

As before, start with http://itunes.apple.com/us/app/ratiokey/id387640139?mt=8, and then follow the link labeled "View In iTunes" to go to the app's page on the App Store.

Saturday, September 25, 2010

Thanks for the very helpful reviews!

After three weeks of silence, there are now two, very helpful reviews of RatioKey on the App Store.

My thanks to the authors, especially with regard to the suggestion to use a Diamond Marimba interface (see also tonality diamond). I wish I'd known about that six months ago!

I can't talk about plans for future versions, if any, but such suggestions are sure to find their way onto my todo list, or, if they're already there, increase their priority. I have a lot of ideas for RatioKey or related applications, which are waiting on time, focus, and clarity (a clear notion of the larger context, which is largely about data formats). Given clarity, I can find focus and make time. Of course, anything I come up with must pass muster with Apple's reviewers, so I can't promise anything until it's actually available for download.

Let me say that I welcome competition. I'd hate to think that the potential of the iPad (and touchscreen devices in general) to help liberate us all from the equal tempered scale depended on the spare-time application of my own modest programming skills. RatioKey as it currently exists is, as much as anything, a vector for getting the idea of specifying ratios by adjusting their prime power components out into the noosphere. I hope to see and hear that come back in the form of new apps written by others.

Meanwhile, I'll be struggling with that clarity issue and whittling away at my todo list.

Please note that there's a lag between the completion of a new version and its availability on the App Store, even assuming that it's approved promptly, once reviewed, so if a new version were to appear within the next few days, it wouldn't reflect what's been discussed here. That will have to wait for later.