Follow us: social_twitter_button_blue_16social_facebook_button_blue_16

Deskew Blog

Programming, music, software and hardware!

Well, it has been a few months since I wrote the previous articles on my development of a custom alternative to Apple MainStage. After using it for a few months, I started to figure out what else I really needed and as of today, I am comfortable that I have created an update worthy of being called version 2 (or I suppose I should call it version 2012!)

It's going to take a while to finish this article and I've decided to make it visible along the way, otherwise I can't say how long it will be before I finish it. Of course, having it visible before it's finished will most likely act as a catalyst to get it finished ASAP.

The key new features of this version are


Using Max with the Eigenharp Alpha

Posted by: dhj in Music Technology

Tagged in: OSC , Open Sound Control , MIDI , Max MSP , Eigenharp , EigenD

dhj

The Eigenharp Alpha is a wonderful electronic instrument controller with amazing sensitivity for expressive control of synthesizers such as MIDI devices or VST soft synths. Unfortunately, I found the EigenD environment too difficult to learn. As a result, after some initial attempts to work with it, it ended up sitting in the corner of my studio.

I'm quite heavily invested in Max/MSP (Max from now on) as an environment for managing my live music environment. Although used by some programmers, Max is very accessible to people in the art/theatre world who are not particularly experienced (if at all) in the art of software development. It's very easy to manipulate MIDI and audio data using Max objects and there are a number of third party libraries (free and paid) that add even more functionality.

Just recently, the Eigen folks added support to send raw data over OSC. Since Max/MSP already has OSC support, this was a wonderful opportunity to try and use Max/MSP instead of the EigenD environment. As with my previous work to start using Max to manage my live music rig, the goal was to make it as painless as possible to create new patchers with minimum work.


The earlier articles are

Part 1

Part 2

 


To make it easier for our customers to extract images out of PDF files without using our cloud-based PDF conversion process, I decided to investigate the use of the Python Image Library to build a utility program.

After downloading the source code, I tried to build it and soon ran into errors such as the following:

lipo: can't open input file: /var/folders/.........(No such file or directory)
error: command 'gcc' failed with exit status 1

or


In part 1 of this article, I introduced some of the basic Max patchers I created such as generic MIDI input and output devices and then instrument-specific versions. After a few days of testing, I ran into some bizarre behavior where Scorecerer would not change pages via MIDI remote control, but only for some songs.

I finally tracked the problem down and it turned out that there was a 'double-bug', one in Scorecerer and one in my Max implementation. These conspired to cause the problem. What was happening was that when I pressed the button on my MPK61 to go to the next page in Scorecerer, Scorecerer didn't respond at all but the (highly recommended) MIDI Monitor app I was running reported that two copies of the CC event were being sent to Scorecerer. I'll get back to the reason two copies were being sent in a moment as that caused me to change the original design of the MIDI device patches.

The reason Scorecerer didn't respond at all (as opposed to changing the page twice, which is what should have happened) is because I was (stupidly) using the length of the incoming packet to decide whether I was getting a CC event (3 bytes) or a ProgramChange event (2 bytes). However, in this particular case, the packet length was 6 (two CC events) and so was just being ignored. I fixed this by switching on the actual Status byte but I'm glad I found this issue as if it had been reproduced by customers but not by us, it would have been very difficult to track down.


New version of Scorecerer for iPad has MIDI support

Posted by: dhj in Software Development

Tagged in: Untagged 

dhj
We have just submitted a new release of Scorecerer iPad to the App Store. Version 5 has support for CoreMIDI and has three new functions
1) Selecting a song can send a program change to your DAW or live rig manager
2) Scorecerer iPad can open a song automatically upon receipt of a program change

Typically, you would use either 1 or 2 depending on whether you want Scorecerer to be the master or the slave in a live environment.

3) Scorecerer iPad can respond to MIDI CC events and change to the next or previous page of a song. This lets you use buttons on a keyboard or a pedal attached to a keyboard to change the page.

I've been using these features with my band for a while now and they are very effective.

Hopefully, Apple will approve the new update quickly.

I have a large live keyboard rig with  7 keyboards (including a wireless MIDI keytar), several pedalboards with MIDI,  as well as an Eigenharp and various other control surfaces. I also have several synth modules in a rack that also contains two MOTU 8-port MIDI interfaces and a MOTU 828mkIII/8Pre combo that is fed by an SSL X-Patch so that I have complete control over how audio is routed from place to place.

Historically I have used Apple MainStage to control my rig but even though I considered it to be brilliant in conception, it was never (and sadly still is not) 100% reliable. I have never gotten through a single rehearsal (never mind performance) without several glitches such as plugins randomly stopping as well as occasional stuck notes. Although I stopped using audio plugins and added a Muse Research Receptor to handle such things, even MIDI routing fails to work reliably. The Receptor was also surprisingly flakey as well, and subject to many reboots as well as occasional failure to respond to MIDI.

After considering the available alternatives, including switching to a Windows box as there are a couple of interesting alternatives there, last weekend I decided instead to bite the bullet and just develop my own MIDI routing environment. The main criteria was that it had to implement the MainStage indirection mechanism where you can define devices (keyboards, knobs, pedals and so forth) which respond to incoming MIDI but which can then control  other devices that want different MIDI values without having to be focused on knowing the actual MIDI data all the time (a key highlight differentiator that separated MainStage from other systems with similar functionality) and it had to be very easy to add new "patches" representing new songs.


I can't stand it anymore. I honestly don't understand why some developers (particularly those coming from the C world) continue to vertically line up else underneath if

Nobody would ever write *

switch (expression) {
   case true:
      DoSomething;
break;

case false:
   DoSomethingElse;  break;
}

So write







Upgrading my live keyboard rig - the good, the bad, and the ugly

Posted by: dhj in Musings

Tagged in: Untagged 

dhj

I use a pretty sophisticated live keyboard rig with my band, No Sleep Tonite, and have just finished a major overhaul whose goal was to reduce significantly the setup/teardown time from about 2 hours down to about 10 minutes.

For those of you interested in music technology, my live rig consists of six keyboards including a Korg Oasys, Roland VK88, Minimoog XL, Prophet '08, Yamaha AN1x (used only as a controller) and an Akai MPK61 controller. I also have a Roland AX-1 keytar which I use occasionally with a wireless MIDI setup, and more recently, I've started playing the Eigenharp (but that's a whole 'nother story). Of course I also use Scorecerer on an iPad (shameless plug) to view my sheet music, notes and setlists. There are also about 9 footpedals in the rig, for audio volume and MIDI CC control used for volume, expression, sustain and so forth.

Everything is managed through Apple MainStage although I use very few AU plugins with it and instead added a Muse Research Receptor for that. MainStage is mostly responsible for MIDI control (it sends out all program changes) along with routing, layering and splits. It also enables knobs, sliders and buttons on several of my boards to control parameters of any sound in real-time as needed.


How I use Scorecerer

Posted by: dhj in Musings

Tagged in: Untagged 

dhj

There are a lot of different ways in which Scorecerer can be used. One key differentiator is its ability to facilitate the import of your own paper sheet music into digital form.

Most of the other products on the market are giving away sheet music viewers on the iPad but the goal there is to get you to buy and download your songs.

However, if you're like me, over the years, you have probably amassed a significant collection of individual songs, song books, collections, fakebooks, and perhaps your own chord charts and lead sheets. You may have added your own pencilled in fingerings, accents, or other comments ("play loud here") all of which you would like to keep around, something not possible if you just repurchase the song online, even if you could find a suitable version.


I have been bitten for years whenever I have used precompiled headers with C++ platforms. It doesn't matter what platform I'm using, they just never quite seem to work properly and reliably. From time to time you just get bizarre error messages that just don't make any sense. So as a matter of course I just leave that option turned off and suffer the extra compilation time.

Recently, I've been working with Xcode 4 which we use for our Scorecerer iPad development. Precompiled headers are enabled by default and one of the first things I did was turn that option off and forgot about it.

However, one of my partners who also just switched to Xcode 4 did not turn off that option and guess what --- he just got bitten. In his case, he built an update of the product with changes that I checked into our version control system. The code compiled and built perfectly but the Xcode IDE still displayed a bunch of those red error marker icons in various places and suggested that some classes and some variables were missing. Cleaning the project and rebuilding made no difference.


 
Mac OSX App Store
If you use Qt to build your application for Mac OSX – you must have heard about the new OSX App Store that just opened in January, 2011.
 
The App store resembles the app store used for iOS devices hoping to bring the similar, streamlined experience, to the end-user. For us developers – this is great news … as long as we make our software so it doesn’t break the rules that Apple set forth.
 
In particular, there are certain steps one needs to perform to create a package compatible for submission to the app store and the application itself needs to follow certain guidelines.  Files cannot be written to certain folders, UI must have a consistent OSX look and so on …
 
We are not sure yet what that means for Qt based applications, but we are willing to give it a shot.
Our music notation product – Scorecerer has a desktop application that is built on top of Qt and it runs on OSX and Windows. We have built a free version of Scorecerer (Scorecerer Lite) and submitted it to the OSX app store. We are still waiting for the verdict and will soon know if Qt applications can or cannot be included in the OSX app store.
 
There seems to be a big debate going on in various forums, but most seem to simply speculate and paint Apple as “evil” without even trying to submit their app. Once we have the verdict – we will share it here with you so you will know for sure.
 
If Scorecerer Lite gets approved and published on the OSX app store – I will post the exact steps on how to prepare and submit your Qt app to the app store. Make sure you check our blog often for the latest news on this.
 
In the meantime we can only wait and hope that Qt libraries themselves do not break some of the Apple’s rules.
 
UPDATE: Today we got a rejection email from Apple. The list of reasons is long and we could address most of the issues, but there is one related to Qt itself
 
The application is creating files or writing to the following locations:

~/Library/Preferences/com.trolltech.plist
 
This is obviously done by Qt itself and as long as it is there - we will not be able to submit to the app store. We will try to see if there is a  solution to this problem, but in the mean time - your Qt application will be rejected because of this!
 
 

Using the Eigenharp Alpha to play the Lament from Riverdance.

Posted by: dhj in Musings

Tagged in: Untagged 

dhj

I recently started learning to play the Eigenharp Alpha. It's an amazingly expressive electronic controller. The keys are sensitive, apparently to within one micron, in all three directions (in-out, up-down, left-right) and it also has ribbon controllers and a breath controller. Unfortunately, the accompanying software for the Eigenharp is very awkward to use and not well documented. The good news is that it's not too hard to just get MIDI out of it and so external software can be used to do the processing.

Here's a video of me playing the Lament (from Riverdance) using Max/MSP to produce background chords (triggered by my right hand) and then both chords and the solo (played with my left hand) are being handled by Apple MainStage. The string and choir sounds are being produced by Omnisphere and the Uillean Pipes solo sound is coming from Kontakt 4.

Of course, I scanned the sheet music into my Macintosh with Scorecerer and published it to my iPad. Unfortunately, I still haven't found a decent stand for the iPad and although I suppose I could just use a regular music stand, I just balanced the iPad on my leg! I suppose you could argue that that's another advantage of using the iPad instead of paper, which would just flop around.


For years, I have been a skeptic about the open source movement. While I have certainly been happy to benefit from all the free stuff available (to witness, my linux server running lots of good stuff in the background), it has been rare that an open source solution has been better for me than a commerical product.

The argument for free is, in my opinion, very shaky. Yeah, there are lots of poor college students (nothing personal, I was one once too!) who are happy to to get stuff for free and then spend their time hacking on it to make it work for them.

But time is a precious commodity, and the fact that the initial cost of a product may be free is often just a red herring. Yes, Photoshop CS5 will cost you a few hundred dollars. However, if your plan is to make a living as a graphic artist (say), then that initial cost is completely irrelevant. You care far more about the quantity (and quality) of support and infrastructure that is available. Just go into any book store and count the number of Photoshop books there.


Ouch --- again, bogus assumptions from forum posts

Posted by: dhj in Software Development

Tagged in: Untagged 

dhj

A week ago or so, I was working on some backend code for a new application we're developing. For various reasons, I was using a language called PHP which happens to be very convenient for website development, particularly if you're also leveraging a database like MySQL. You can cobble stuff together pretty quickly without too much trouble.

Now, I'm no expert with PHP and basically I just know enough to be dangerous. But I know what I need to say and so my learning process for this kind of thing is to search the web or refer to a book or two to find out how to say it with PHP.

Although it would not be my first choice for large projects, you can definitely get the job done quickly. Unfortunately, the very features that let you cobble stuff together quickly can return the favor and bite you in the ass without even breathing heavily.


While there have been a few devices around to display music notation, the problem was that it took far too long for me to actually get my sheet music into those devices. As a technologist and a serious amateur musician, I always wanted to use one of those devices and so many years ago with great excitement I bought a MusicPad tablet. However, I found that the process of pulling in my sheet music was painfully slow and I had to use external image processing software such as Photoshop to clean up the scanned images and so forth. Consequently, it took about 5-10 minutes to import each page of sheet music. No way could I afford to spend that amount of time.

So I ended up not really using the tablet for anything serious.

Years later, along came the Kindle DX from Amazon. This thing had the ability to display images and PDF files and I thought, if only I had an easy way to get my sheet music into it efficiently, this could be really cool. So along with my partners, we created Deskew Technologies, LLC. By the way, the word "deskew" (pronounced dee-skew) means to straighten. Amazingly, the domain deskew.com was not taken so we grabbed it.


If you are using Qt as your development tool – most likely you are targeting different platforms. Deployment techniques for different platforms vary and there are a few “gotchas” that you should be aware of.
 
For OSX – you should use the macdeployqt command that comes with Qt on OSX. To use it – simply go into the folder where your application is and run the tool giving it your app name as the parameter. 
 
macdeployqt Foo.app
 
This packages everything nicely into one bundle that you can distribute to someone who does not have Qt installed on their system. I assume that this build is a “Release” build and I assume that you will be able to either create an installation package or an installable .dmg file
On Windows – things seem to be simple at a first glance as well, but there are a few things you should pay attention to.
 
Copy your .exe into a new folder and try to run it. You will immediately get a note about some missing dlls. You can keep trying this and copying the dlls needed into the folder, but a better way is to use Dependency Walker tool and drop your executable into it. It will show you most dlls you need to run the application.
 
The fun starts when these modules are loaded on demand in the application’s code. This is the case with the Qt “plugins”. They will not show on your dependency tree and your application may appear to be running, while in fact it will crash or worse – continue to work without desired functionality when these plugins are required and you are NOT on a machine that has Qt installed.
 
The real trouble is that Qt will look for those in a specific folder within your application AS WELL AS the main Qt plugins folder - this makes your installation impossible to test unless you are on a machine that does not have Qt installed.
 
An example of this are the Qt image processing plugins that allow you to load various file formats into a QImage object. 
 
Plugins are located under the “plugins” folder in your main Qt installation folder. Within that folder you will have subfolders for each group of plugins. For image processing – the name is “pluginsimageformats”. 
 
To make this available on the target machine – you have to place the folder called “imageformats” under the main folder where your executable file is. So if you are installing your application into “C:Program FilesMyGreatAppMyGreatApp.exe – you have to install a folder “C:Program FilesMyGreatAppimageformats” into it and copy all the dlls you need there.
 
So – it’s really easy to deploy a Qt App on Windows or Mac, but watch for a few of these little tricks. Always test your build on a machine that does not have Qt Installed before deployment. (something I didn't do last time and a reason for this blog entry :))

Sync your songs with Apple iPad

Posted by: djogon in Software Development

Tagged in: Untagged 

djogon

The new Scorecerer v0.5b for OS X and Windows works really well with the new iPAd app v1.1 

If you have an iPad - make sure you update both before you attempt to transfer your own songs to the iPad.
We have written a simple step-by-step guide on how to sync songs with iPad. Please use the link below to read it.

How to synchronize your songs with Apple iPad


iPad sync problem solved

Posted by: dhj in Software Development

Tagged in: Untagged 

dhj

Well, we just took delivery of a couple of iPads today so now we can figure out exactly why syncing of Scorecerer files from our desktop program to the iPad worked fine in the simulator but (apparently) fails with the real thing.

Glad to know we're not the only ones who had grief. Today's NY Times had an article about this problem.

We'll get this fixed ASAP and we appreciate the interest we've received in Scorecerer.


Workflow and Scorecerer - it's about time.

Posted by: dhj in Software

Tagged in: Untagged 

dhj

Anyone who has attended an introductory economics course has probably heard the question "What is the only thing left for a millionaire to economize" and the answer is of course "Time".

We all have a finite amount of time in which to live our lives and so it's a shame to have to waste time on stuff we shouldn't have to do. Further, if you work for a living, then it makes economic sense to pay for products or services that cost less than what it would cost you to do the work yourself. In general this is true for anything where the experience itself is not beneficial or of interest. (For example, don't bother paying somebody else to exercise for you!)

The above is the philosophy that has driven much of my work, essentially building applications and tools that saved users time.