Index: /trunk/gui/src/PatternEditor/PianoRollEditor.cpp
===================================================================
--- /trunk/gui/src/PatternEditor/PianoRollEditor.cpp	(revision 551)
+++ /trunk/gui/src/PatternEditor/PianoRollEditor.cpp	(revision 818)
Index: /trunk/gui/src/PatternEditor/PianoRollEditor.h
===================================================================
--- /trunk/gui/src/PatternEditor/PianoRollEditor.h	(revision 551)
+++ /trunk/gui/src/PatternEditor/PianoRollEditor.h	(revision 818)
Index: /unk/gui/src/FilePreview.h
===================================================================
--- /trunk/gui/src/FilePreview.h	(revision 162)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * Hydrogen
- * Copyright(c) 2002-2007 by Alex >Comix< Cominu [comix@users.sourceforge.net]
- *
- * http://www.hydrogen-music.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-
-
-#ifndef FILE_PREVIEW_H
-#define FILE_PREVIEW_H
-/*
-#include <hydrogen/Object.h>
-
-#include <QLabel>
-#include <QPushButton>
-#include <QWidget>
-#include <Q3FileDialog>
-
-#include <string>
-using std::string;
-
-class FilePreview : public QWidget, public Q3FilePreview, public Object
-{
-	Q_OBJECT
-	public:
-		FilePreview( QWidget *parent=0 );
-		~FilePreview();
-
-		void previewUrl( const Q3Url &u );
-
-	public slots:
-		void playClicked();
-
-
-	private:
-		QPushButton *m_pPlayBtn;
-		QLabel *m_pNBytes;
-		QLabel *m_pSamplerate;
-		string m_sFilename;
-};
-
-*/
-
-#endif
Index: /unk/gui/src/FilePreview.cpp
===================================================================
--- /trunk/gui/src/FilePreview.cpp	(revision 162)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/*
- * Hydrogen
- * Copyright(c) 2002-2007 by Alex >Comix< Cominu [comix@users.sourceforge.net]
- *
- * http://www.hydrogen-music.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-/*
-#include "FilePreview.h"
-#include <hydrogen/sample.h>
-#include <hydrogen/Hydrogen.h>
-
-#include <fstream>
-#include <QLabel>
-
-FilePreview::FilePreview( QWidget *parent )
- : QWidget( parent )
- , Object( "FilePreview" )
-{
-	infoLog( "INIT" );
-	m_pPlayBtn = new QPushButton( trUtf8( "Play sample" ), this );
-	m_pPlayBtn->move( 100 - 50, 200 - 30 );
-	m_pPlayBtn->resize( 100, 25 );
-	m_pPlayBtn->setEnabled( false );
-	connect( m_pPlayBtn, SIGNAL(clicked()), this, SLOT(playClicked()) );
-
-	m_pNBytes = new QLabel( this );
-	m_pNBytes->move( 10, 10 );
-	m_pNBytes->resize( 150, 25 );
-
-	m_pSamplerate = new QLabel( this );
-	m_pSamplerate->move( 10, 50 );
-	m_pSamplerate->resize( 150, 25 );
-
-	setMinimumSize( 200, 200 );
-	setMaximumSize( 200, 1000);
-	resize( 200, 200 );
-
-}
-
-FilePreview::~FilePreview()
-{
-	infoLog( "DESTROY" );
-}
-
-
-
-void FilePreview::previewUrl( const Q3Url &u )
-{
-	m_sFilename = u.path().latin1();
-
-	// file exists?
-	std::ifstream input( m_sFilename.c_str() , std::ios::in | std::ios::binary);
-	if (input){
-		// the file has a supported extension?
-		if 	(
-			( u.path().endsWith( ".wav" ) ) ||
-			( u.path().endsWith( ".WAV" ) ) ||
-			( u.path().endsWith( ".au" ) ) ||
-			( u.path().endsWith( ".AU" ) ) ||
-			( u.path().endsWith( ".aiff" ) ) ||
-			( u.path().endsWith( ".AIFF" ) ) ||
-			( u.path().endsWith( ".flac" ) ) ||
-			( u.path().endsWith( ".FLAC" ) )
-			) {
-
-			// FIXME: evitare di caricare il sample, visualizzare solo le info del file
-			Sample *pNewSample = Sample::load( m_sFilename );
-			if (pNewSample) {
-				m_pNBytes->setText( trUtf8( "Size: %1 bytes" ).arg( pNewSample->getNBytes() ) );
-				m_pSamplerate->setText( trUtf8( "Samplerate: %1" ).arg( pNewSample->m_nSampleRate ) );
-
-				delete pNewSample;
-				m_pPlayBtn->setEnabled( true );
-				playClicked();
-			}
-			else {
-				m_pNBytes->setText( trUtf8( "Size: - " ) );
-				m_pSamplerate->setText( trUtf8( "Samplerate: - " ) );
-				m_pPlayBtn->setEnabled( false );
-			}
-		}
-		else {
-			m_pNBytes->setText( trUtf8( "Size: - " ) );
-			m_pSamplerate->setText( trUtf8( "Samplerate: - " ) );
-			m_pPlayBtn->setEnabled( false );
-		}
-	}
-	else {
-		errorLog( string("File not found. filename = ") + m_sFilename );
-	}
-}
-
-
-
-void FilePreview::playClicked()
-{
-	Sample *pNewSample = Sample::load( m_sFilename.toStdString() );
-	if (pNewSample) {
-		Hydrogen::get_instance()->previewSample( pNewSample );
-	}
-	else {
-		errorLog( "[playClicked()] pNewSample = NULL" );
-	}
-}
-
-*/
Index: /trunk/libs/hydrogen/include/hydrogen/instrument.h
===================================================================
--- /trunk/libs/hydrogen/include/hydrogen/instrument.h	(revision 571)
+++ /trunk/libs/hydrogen/include/hydrogen/instrument.h	(revision 818)
@@ -25,4 +25,5 @@
 #define INSTRUMENT_H
 
+#include <QtCore/QString>
 #include <hydrogen/globals.h>
 #include <hydrogen/Object.h>
@@ -127,4 +128,5 @@
 
 	/// Returns a layer in the list
+	/// See below for definition.
 	inline InstrumentLayer* get_layer( int index );
 
@@ -309,5 +311,17 @@
 };
 
-
+inline InstrumentLayer* Instrument::get_layer( int nLayer )
+{
+	if ( nLayer < 0 ) {
+		ERRORLOG( QString( "nLayer < 0 (nLayer=%1)" ).arg( nLayer ) );
+		return NULL;
+	}
+	if ( nLayer >= MAX_LAYERS ) {
+		ERRORLOG( QString( "nLayer > MAX_LAYERS (nLayer=%1)" ).arg( nLayer ) );
+		return NULL;
+	}
+
+	return __layer_list[ nLayer ];
+}
 
 
Index: /trunk/libs/hydrogen/src/local_file_mgr.cpp
===================================================================
--- /trunk/libs/hydrogen/src/local_file_mgr.cpp	(revision 817)
+++ /trunk/libs/hydrogen/src/local_file_mgr.cpp	(revision 818)
@@ -861,5 +861,5 @@
 			InstrumentLayer *pLayer = instr->get_layer( nLayer );
 			if ( pLayer == NULL ) continue;
-			Sample *pSample = pLayer->get_sample();
+			// Sample *pSample = pLayer->get_sample();
 
 			TiXmlElement layerNode( "layer" );
Index: /trunk/libs/hydrogen/src/instrument.cpp
===================================================================
--- /trunk/libs/hydrogen/src/instrument.cpp	(revision 571)
+++ /trunk/libs/hydrogen/src/instrument.cpp	(revision 818)
@@ -41,19 +41,19 @@
 		, __muted( false )
 		, __name( name )
+		, __pan_l( 1.0 )
+		, __pan_r( 1.0 )
+		, __gain( 1.0 )
 		, __volume( 1.0 )
 		, __filter_resonance( 0.0 )
 		, __filter_cutoff( 1.0 )
+		, __peak_l( 0.0 )
+		, __peak_r( 0.0 )
 		, __random_pitch_factor( 0.0 )
 		, __id( id )
+		, __drumkit_name( "" )
 		, __filter_active( false )
-		, __pan_l( 1.0 )
-		, __pan_r( 1.0 )
+		, __mute_group( -1 )
+		, __active( true )
 		, __soloed( false )
-		, __active( true )
-		, __peak_l( 0.0 )
-		, __peak_r( 0.0 )
-		, __gain( 1.0 )
-		, __drumkit_name( "" )
-		, __mute_group( -1 )
 		, __stop_notes( false )
 {
@@ -77,20 +77,4 @@
 	delete __adsr;
 	__adsr = NULL;
-}
-
-
-
-inline InstrumentLayer* Instrument::get_layer( int nLayer )
-{
-	if ( nLayer < 0 ) {
-		ERRORLOG( QString( "nLayer < 0 (nLayer=%1)" ).arg( nLayer ) );
-		return NULL;
-	}
-	if ( nLayer >= MAX_LAYERS ) {
-		ERRORLOG( QString( "nLayer > MAX_LAYERS (nLayer=%1)" ).arg( nLayer ) );
-		return NULL;
-	}
-
-	return __layer_list[ nLayer ];
 }
 
Index: /trunk/libs/hydrogen/src/sequencer/sequencer.cpp
===================================================================
--- /trunk/libs/hydrogen/src/sequencer/sequencer.cpp	(revision 560)
+++ /trunk/libs/hydrogen/src/sequencer/sequencer.cpp	(revision 818)
Index: /trunk/libs/hydrogen/src/midiMap.cpp
===================================================================
--- /trunk/libs/hydrogen/src/midiMap.cpp	(revision 576)
+++ /trunk/libs/hydrogen/src/midiMap.cpp	(revision 818)
