

Installation
------------

How to obtain NoteEdit
----------------------


NoteEdit can be found at

http://rnvs.informatik.tu-chemnitz.de/~jan/noteedit/noteedit.html.


Installing NoteEdit from RPMs
-----------------------------

If you find an RPM for your Linux distribution, you can install NoteEdit
from RPM.

Note!
-----
You need a TSE3 package. So if you find a TSE3 RPM for your Linux distribution install
TSE3 first. Otherwise compile TSE3 from source (http://TSE3.sourceforge.net) 

Note!
-----
If you want to use NoteEdit with aRts MIDI scheduler then make sure
the aRts headers (artsmidi.h) are installed
before you compile TSE3.

To install the NoteEdit package from a binary RPM you must be logged in as root.
Assuming that the name of the RPM is filename.rpm, do the
following at the command prompt:

% rpm -ivh <filename.rpm>

Installing from source
----------------------

Requirements for source compilation
-----------------------------------

You need the following packages:
  * g++ compiler (You can use g++-3.x, but make sure QT/KDE (others ???) is also g++-3.x-compiled/You need TSE3-0.2.5 for gcc-3.2!)
  * X11 (include and libraries)
  * Qt (include and libraries) Qtdevel2 (>=Qt-2.2.2)
  * YACC or Bison
  * LEX or flex
  * KDE-2.x.y or KDE3
  * gettext (only for text translation)
  * extractrc(from kde developement) (only for text translation)

recommended:
  * TSE3 Library Version (0.1.2, 0.1.3, 0.2.3, 0.2.5) see: http://TSE3.sourceforge.net
  * A good idea is also: LaTeX (te_latex package), MusiXTeX, xdvi, dvips, gv.
  * abcm2ps (version 3.x.y!!!)
http://moinejf.free.fr
  * and: LilyPond (for LilyPond installation MetaPost and the kpathsea headers)
  * likewise: LibKMid; see http://www.arrakis.es/~rlarrosa/libkmid.html
(Note: Not all features are available in this case! (MIDI import))
  * If you want to use NoteEdit with aRts MIDI scheduler: aRts (include and libraries; especially artsmidi.h)

Note!
-----
If you want to use NoteEdit with aRts MIDI scheduler then make sure
the aRts headers (artsmidi.h) are installed
before you compile TSE3.

You can compile the program without any MIDI-library. But in this case an

#include /usr/src/linux/include/linux/soundcard.h

occurs which can cause a lot of machine/sound card depencies. Therefore if
your sound doesn't work and you are sure MIDI works on your machine (you use
KMid successfully) then try compilation with one of the libraries! Use the
TSE3 library if you want to use all features including MIDI import!

Building
--------

Note!
-----
If you have different KDE/Qt versions make sure the PATH variable
only references the KDE/Qt version you wish to use for NoteEdit!

Please uninstall an older version especially all old noteeditui.rc files.
If you don't have the source distribution to "make uninstall" remove all in

        <path_to_your_kde_installation>/share/apps/noteedit

Decompress and configure the archive:

  tar -xvzf noteedit-2.5.0.tgz

  cd noteedit-2.5.0

  


  (t)csh                                        other shell
  setenv QTDIR <path_to_your_qt_installation>  export QTDIR=<path_to_your_qt_installation>
  setenv KDEDIR <path_to_your_kde_installation>  export KDEDIR=<path_to_your_kde_installation>

  ./configure --prefix=<path_to_your_kde_installation>

whereby  <path_to_your_kde_installation> is the path there KDE usually
resides on you system. You can always find out this path my means of the following command:

  kde-config --prefix

If you installed TSE3 library in an unusual directory:

  ./configure --with-libtse3-include=<dir_to_tse3_includes>  --with-libtse3-libs=<dir_to_tse3_libs>

If you want to use libKMid instead of TSE3 library:

  ./configure --with-libkmid

(Note: Not all features are available in this case! (MIDI Import))

If you installed libKMid in an unusual directory:

  ./configure --with-libkmid-include=<dir_to_libkmid/libkmid.h>  --with-libkmid-libs=<dir_to_libkmid.so>

If you won't use any library (not recommended; see above!)

  ./configure --without-libs

If you use LilyPond 1.2.x

  ./configure --with-oldlily

In priciple you can use the parameter --enable-final
But this is not recommended, because the resulting code is 30% greater. This is because of the -fexecption compiler option which
is applied to tho whole source. Without  --enable-final the -fexecption compiler option is only
applied to the necessary C modules.

Type:

  make

This should create NoteEdit

Type (as root):

  make install

This should install NoteEdit

If you don't like NoteEdit type (as root):

  make uninstall

This should remove NoteEdit

Then start the program: It is recommended to start NoteEdit in KDE environment. If not then make sure
the kde binaries are in your PATH.

Type:

         noteedit

or:

     noteedit < file>.not

This should start the note editor. If there is an error "error opening sequencer"
a soundcard depency (as mentioned above) avoids the access to the MIDI device. The editor
works but you can't play the music :-((.

If you have an AWE-64 (or - 32 (???)) don't forget to load your orchestra 
(sfxload) before starting noteedit!

First test
----------

File-->Open examples/example1.not

or:

File-->Open examples/example2.not

or: ...

or:

File-->Open examples/example12.not

Press the play button(

). If you hear the music the
program works :-))

If not then try to change the MIDI device (
Settings-->Configure NoteEdit 
-> Sound --> MIDI Devices).

Or (only with TSE3)
 change the TSE3 MIDI scheduler
by unchecking the ALSA option:

Settings-->Configure NoteEdit 
 --> Sound --> Sequencers

and restart NoteEdit.

(see also: Working with TSE3)

BTW: The quality depends on soundcard. Hear the beginning of example2.not
on AWE 64/ 24 MB RAM and soundfont 8mbgmsfx.sf2: 
example2.mp3 (http://rnvs.informatik.tu-chemnitz.de/cgi-bin/nph-sendbin.cgi/~jan/noteedit/example2.mp3)  (625 Kbyte)

The TiMidity server
-------------------

(only with TSE3)
You can use the MIDI to WAVE converter and player TiMidity++ (
http://timidity.sourceforge.net) in server mode. 
This approach is interesting for all those who can't bring
the MIDI device to work.

Note!
-----
Please load the newest version via CVS (as explained on that page)

Note!
-----
This requires an ALSA (http://www.alsa-project.org)  sound system!

A presupposition is that TiMidity++ is compiled with (at least) the configure options:

        
--enable-audio=alsa --enable-server --enable-alsaseq

You sould also try to change "the orchestra" by installing a different
soundfont. Please have a look at http://www.hammersound.net and search for
FluidR3 soundfont!

Unfortunately, this soundfont is in sfArk compression format.
There is no Linux program to de-compress this. But you can do do it with the help
of the Windows-Emulator wine. A step-by-step instruction follows
(see below)!

If you've got the soundfont file store it somewhere as (for instance)
FluidR3.sf2 Then in /usr/share/timidity/timidity.cfg
(or /usr/local/share/timidity/timidity.cfg) change:

     dir<<path_to_the_directory_there_the_FluidR3.sf2_file_is_situated>>

and:

     soundfont FluidR3.sf2

Comment all other lines! If all is ok, you can start TiMidity++  with:

        
	timidity -iA -B2,8 -Os1l -s 44100     

Select on NoteEdit sound configure dialog
(
Settings-->Configure NoteEdit --> Sound).
You should see 4 new MIDI devices:
  * Timidity port 0 128:0
  * Timidity port 1 128:1
  * Timidity port 2 128:2
  * Timidity port 3 128:3

Choose one of them and the replay should work!

Tip: If the replay interrupts during turn over then start TiMidity++ as root. This 
increases the priority of the TiMidity++ process. Use the following command in this case:

     timidity --realtime-priority=100 -iA -B2,8 -Os1l -s 44100

Note!
-----
 This can lead to operating system problems if your CPU
performance is too small! If so, then try to decrease the priority
and/or the frequency:     timidity --realtime-priority=60 -iA -B2,8 -Os1l -s 22050

Installation of FluidR3 soundfont
---------------------------------

First create a directory (for instance) /tmp/SOUNDFONT:

     cd /tmp

     mkdir SOUNDFONT

Store the file FluidR3122501.zip there an un-"zip" the file:

     unzip FluidR3122501.zip

The result is  FluidR3 GM.sfArk. Download the de-compressor from
http://www.melodymachine.com.
Choose there sfArk v2.15 and store the
.exe at /tmp/SOUNDFONT! Start the setup:

     wine sfark_setup.exe

If this doesn't work please attach a virtual drive to /tmp.
Edit the file $HOME/.wine/config and register  /tmp
as new drive:
[Drive E] 
"Path" = "/tmp"
"Type" = "hd"
"Label" = "Tmp Drive"
"Filesystem" = "win95"


Make sure the letter is really new and not already in use!

After launching setup.exe choose
E:\tmp\SFARK (i.e /tmp)
as install direcory! To avoid problems please use the command line version
of sfArk (because of the spaces in file name the apostrophs are
necessary):

     wine sfArkXTc.exe "FluidR3 GM.sfArk"

     wine "FluidR3 GM.sfArk.exe"

It is recommended the rename the resulting fileFluidR3  GM.SF2
because the Linux shell has problem dealing with spaces in file names:

     mv "FluidR3 GM.SF2" FluidR3.sf2

Use FluidR3.sf2 as described above!

How to obtain KDE
-----------------

KDE can be found on
The KDE FTP site (ftp://ftp.kde.org)  or one of it's
mirrors (http://www.kde.org/ftpmirrors.html) .

Compilation and Installation of KDE
-----------------------------------

KSnapshot may be installed from the kdegraphics package either by
installing a binary RPM or by compiling the source package.
