×
Namespaces

Variants
Actions
(Difference between revisions)

Music keyboard example in Qt

From Nokia Developer Wiki
Jump to: navigation, search
axeljaeger (Talk | contribs)
(Update on why porting the example to QtMultimedia is delayed.)
axeljaeger (Talk | contribs)
(Update to no longer use own emulator and to longer use Qt Mobile Extensions in favor of QtMobility)
Line 1: Line 1:
 +
[[Category:Qt]][[Category:Qt for Symbian]]
 
{{CodeSnippet
 
{{CodeSnippet
 
|id=...
 
|id=...
Line 10: Line 11:
  
 
{{UnderConstruction}}
 
{{UnderConstruction}}
=News=
 
Although Qt 4.6.3 ships with an audio backend for S60, it is unusable at the moment because of this bug:
 
http://bugreports.qt.nokia.com/browse/QTBUG-9402
 
 
So a proper version that does not have to depend on native code has to wait till this bug has been fixed. Vote for it if you are interested.
 
 
 
=Introduction=
 
=Introduction=
 
The keyboard demo shows a music keyboard that can play tones in either square, saw or triangle sound wave.
 
The keyboard demo shows a music keyboard that can play tones in either square, saw or triangle sound wave.
Line 21: Line 16:
 
In portrait mode, the user can choose a waveform and adjust the volume. A small keyboard for sound-test is provided in the bottom. In landscape mode, the whole screen is filled with a keyboard to be used for actual playing of a song.
 
In portrait mode, the user can choose a waveform and adjust the volume. A small keyboard for sound-test is provided in the bottom. In landscape mode, the whole screen is filled with a keyboard to be used for actual playing of a song.
  
The whole user interface is implemented with QGraphicsWidgets in a QGraphicsScene. Animated transitions between portrait and landscape are provided. Switching modes by rotating the device is provided using the XQDeviceOrientation-mobile-extension.
+
The whole user interface is implemented with QGraphicsWidgets in a QGraphicsScene. Animated transitions between portrait and landscape are provided. Switching modes by rotating the device is provided using the QOrientationSensor.
 
+
The whole project can be compiled also for the desktop. The UI is surrounded by a device skin then and a control panel to give the device orientation is provided.
+
  
 
Sound playback is provided when compiled for S60 using native code. As soon as the is a backend for Qt multimedia for Symbian is available, the example will be ported to use the Qt audio system. Playback will then on both mobile and desktop using the same code path.
 
Sound playback is provided when compiled for S60 using native code. As soon as the is a backend for Qt multimedia for Symbian is available, the example will be ported to use the Qt audio system. Playback will then on both mobile and desktop using the same code path.
  
Because of XQDeviceOrientation, the example uses ReadDeviceData and thus cannot be self signed. Use symbian signed online for your own testing.
+
Because the sensor framework from QtMobility needs ReadDeviceData capability the example cannot be self signed. Use symbian signed online for your own testing.
 +
 
 +
=Planed updates=
 +
As soon as a solution is found for  http://bugreports.qt.nokia.com/browse/QTBUG-9402 a version with a Qt-based backend will be released
 +
As soon as nokia provides a qt-ish way to lock the screen orientation, this will be added as well
 +
 
 +
=History=
 +
 
 +
 
 +
{| border="1"
 +
|6 April 2010
 +
|Initial version that was submitted to the QtMobility-contest. This one was actually not using QtMobility but the so called "[[Mobile_Extensions|Qt Mobile Extensions]]"
 +
|-
 +
|21 September 2010
 +
|Use QtMobility instead of Qt Mobile Extensions - Remove own emulator in favor of NokiaQtSDK's new emulato
 +
|}
  
  

Revision as of 00:36, 22 September 2010

Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic, Nokia N97 mini
Compatibility
Platform(s): S60 5th Edition
Symbian
S60 5th Edition
Article
Keywords: Qt Resource System, Animation Framework, GraphicsView, Orientation
Created: (06 Apr 2010)
Last edited: axeljaeger (22 Sep 2010)

Underconstruction.pngUnder Construction: This article is under construction and it may have outstanding issues. If you have any comments please use the comments tab.

Contents

Introduction

The keyboard demo shows a music keyboard that can play tones in either square, saw or triangle sound wave.

In portrait mode, the user can choose a waveform and adjust the volume. A small keyboard for sound-test is provided in the bottom. In landscape mode, the whole screen is filled with a keyboard to be used for actual playing of a song.

The whole user interface is implemented with QGraphicsWidgets in a QGraphicsScene. Animated transitions between portrait and landscape are provided. Switching modes by rotating the device is provided using the QOrientationSensor.

Sound playback is provided when compiled for S60 using native code. As soon as the is a backend for Qt multimedia for Symbian is available, the example will be ported to use the Qt audio system. Playback will then on both mobile and desktop using the same code path.

Because the sensor framework from QtMobility needs ReadDeviceData capability the example cannot be self signed. Use symbian signed online for your own testing.

Planed updates

As soon as a solution is found for http://bugreports.qt.nokia.com/browse/QTBUG-9402 a version with a Qt-based backend will be released As soon as nokia provides a qt-ish way to lock the screen orientation, this will be added as well

History

6 April 2010 Initial version that was submitted to the QtMobility-contest. This one was actually not using QtMobility but the so called "Qt Mobile Extensions"
21 September 2010 Use QtMobility instead of Qt Mobile Extensions - Remove own emulator in favor of NokiaQtSDK's new emulato


Screenshot

Keyboard-composition.png

Download

File:Keyboard.zip

148 page views in the last 30 days.
×