Wednesday, December 7, 2011

How to use Nokia N9 as music production tool - encoding your sequencer's tracks with Dolby Headphone using the Nokia N9

Nokia N9 has Dolby Headphone effect, which is gives pretty neat effect - makes the sound being perceived to be less inside the head. I have tried with several tracks that it can be helpful sometimes and I could even use that in my music. However, I don't have Dolby Headphone encoder in my Logic Studio (as far as I know). However, if you want to spend the time, you can use N9 for the task and here is how:

1. Record your (stereo) audio track in your audio sequencer (like Logic, Cubase, whatever). Add a loud beep or loud peaky drum sample to the beginning of the track.
2. Mount the N9 to your computer. Then copy the track to N9. I have not tried wav files, if these don't get indexed, you may have to do a detour and encode the file to lossless flac format.
2. Go to Settings application -> Applications -> Music. Turn on the switch Dolby Headphone.
3. Connect your computer audio input to the headphone output of your N9 (assuming you have the cable)
4. Start recording on sequencer (another stereo track) and go to Music player on N9, locate your track and play back the sound.
5. Now cut the track so that it starts from the loud peak in the beginning.
6. Line up the original track and the track you just recorded visually - the peaks should align exactly with each other.
7. Now you can cut the synchronization sound from your track and mute the original track and you have a track with Dolby Headphone encoding on it.

This roundtrip will add noise of course because it goes through analog domain (DA->analog head phone amp->analog input->AD-conversion) and it will also otherwise reduce the quality slightly. However, many synthesizers I use have only analog outputs and it does not prevent me to use them and I have never had trouble with noise. The added noise may be negligible.

This is not the fastest way to do Dolby Headphone encoding for your audio track in your sequencer probably and certainly is not the official way, but this is a neat effect that you can do with the built-in software of your N9 and is kinda awesome feature. And I think the quality of the audio output in the N9 is so good that I could consider using this myself like I explained above.

I have been using this kind of syncing with a peaking signal in DSLR movie making (where I have recorded the sound separately with a audio recorder (I have Zoom H4N for that)) and it works because unlike in the prehistoric times when you could not sync two tracks if they were from separate machines (as there was speed variation, e.g. if you had two drum machines from same manufacturer, set both to 120 bpm and then record both separately and then try to line up the tracks, it started going out of sync in mere seconds if these were not midi synced with each other), but with modern equipment this is not a problem. The tracks will line up nicely.

N9 Software Update with MacOSX or Linux (part 1)

This has been available for some time, but in case you have not noticed it, the new software release really worths installing as it significantly improves the performance of the device. You can see that for example the scrolling smoothness will be improved after updating from. Latest software release for Nokia N9 via Nokia page is 20.2011.40-4.

You can get a Mac and Linux flasher from here: http://tablets-dev.nokia.com/maemo-dev-env-downloads.php

The flash image is not currently available outside Nokia but is inside the exe that you can download from the Nokia web site for updating the N9. Unfortunately this exe obviously only runs on Windows (I for example don't have any Windows machines around and for me the Windows exe is completely useless).

If someone manages to extract the flash image from the exe, it can be in theory flashed with Mac and Linux flashers. If you manage to succeed with that, please let me know and I will mention about it on my blog. Please write me at karoliina dot t dot salminen at gmail dot com or write to the comments on this post (please note that the comments are moderated to avoid spam and it will take time for me to approve them, so don't be afraid if you don't see them appearing immediately).

I tried to send a question about this to Nokia customer care [about how can I update my N9 with my Mac] but I was unable to do so because the form required all the lengthy numbers like serial number and my personal N9 was not with me today so I could not check it.

UPDATE: Got information that there indeed is a beta version (unstable) Mac Nokia Updater out there. http://betalabs.nokia.com/apps/nokia-software-updater-for-mac It does not state that it would support Nokia N9. I downloaded it and tried it with my N9. It didn't work, it stated that N9 is not supported.

Also people have been using a software called navifirm to extract the flash image out of the Nokia software updater exe to enable flashing it using Mac. However, according to my Googling this software also runs on Windows, so it may not be so straightforward for Mac users to use that route. Maybe the beta version of the software updater for Mac is the best bet at the moment in case it would start supporting N9 (that I hope but don't know).

It seems I still don't have a solution for this. If you know a working solution how to get N9 flashed with Mac, please let me know. If I will find a solution for this, I will post a new blog post with instructions how to do it with Mac.

Sunday, February 27, 2011

More QML learnings

I was trying to figure out how to connect button click to C++. Here is very short how (sorry for bad formatting due to this html which does not like code):
main.cpp:

For this I had these includes:
#include < QtGui/QApplication >
#include < QString >
#include < QDeclarativeEngine >
#include < QDeclarativeView >
#include < QtDeclarative >
#include "qmlapplicationviewer.h"
#include < QDebug >

Then continued with my program specific includes
...

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationViewer viewer;
qmlRegisterType < Metar > ("MetarClasses",1,0,"Metar");
viewer.setOrientation(QmlApplicationViewer::LockPortrait);
viewer.setMainQmlFile(QLatin1String("qml/PilotHelper/main.qml"));
viewer.show();
Metar met;

return app.exec();
}

metar.h (from my unfinished application):

#include < QDeclarativeEngine >
#include < qdir.h >

class Metar : public QObject {
Q_OBJECT
public:

explicit Metar(QObject *parent = 0);
~Metar();
QString readMetar(QString location);

public slots:

void replyFinishedSlot(QNetworkReply *reply);
void retrieveMetarClickedSlot();

private:
QNetworkAccessManager* nam;

};

metar.cpp:

implements clicked function


void Metar::retrieveMetarClickedSlot(){

qDebug () << "Click" << "\n";
QString myreply = readMetar("EFHF");
qDebug () << "METAR=" << myreply << "\n";

}

Then QML:

Imports:

import Qt 4.7
import QtQuick 1.0
import MetarClasses 1.0

Then button that sends click to the metar class:
Metar
{
id: met

}

Button
{
anchors.centerIn: parent
height: 50; width: 400
text: "Retrieve metar"
onClicked:(met.retrieveMetarClickedSlot())
}

(The button is custom button not defined in this snipplet, use your own button or button from meego (follow Kate Alhola's Forum Nokia blog's instructions how to do that).