% -*-LaTeX-*-
+% this document should be run through the mudela-book script after lilypond
+% has been installed.
+
+
\documentclass{article}
\usepackage{a4wide}
\title{Mudela and LilyPond crash course}
\begin[verbatim]{mudela}
\score {
- \melodic { % { means voice
- c'4 g'4 % 4 means quaver, 1 beat in 4/4 meter
+ \melodic { % {...} is a voice
+ c'4 g'4 % c and g are pitches, 4 is the duration (quaver)
c''4 ''c4 % c' is 1 octave up, 'c 1 down.
- <c'4 g'4> % <> means a chord
+ <c'4 g'4> % <...> is a chord
}
}
\end{mudela}
-#!/bin/bash
+#!/bin/sh
# conflily
# ugh: must be executed from lilypond-x.x.x (bin/conflily)
ln -s $lelie $HOME/lelie
fi
-rm $lelie/current >& /dev/null
+rm $lelie/current 2>&1 > /dev/null
current=`basename \`pwd\``
echo ln -s $lelie/$current $lelie/current
ln -s $lelie/$current $lelie/current
-ln -sf $lelie/current/lily/out/lilypond bin/lilypond
-ln -sf $lelie/current/mi2mu/out/mi2mu bin/mi2mu
+ln -sf $lelie/current/lily/out/lilypond bin/out/lilypond
+ln -sf $lelie/current/mi2mu/out/mi2mu bin/out/mi2mu
if [ "x$LILYINCLUDE" = "x" ]; then
- export LILYINCLUDE=$lelie/current/init
+ echo you should make add the following to your login script
+ echo "export LILYINCLUDE=$lelie/current/init"
+ echo "export PATH=$PATH:$lelie/current/bin/out/"
fi
configure --prefix=$root --enable-debugging --enable-printing --enable-checking
Midi_stream output_stream( midi_l_->outfile_str_, midi_item_p_arr_.size() + 1, 384 );
*mlog << "MIDI output to " << midi_l_->outfile_str_ << " ..." << endl;
- header( output_stream);
+ header( output_stream);
int track_i = 1;
for (int i=0; i< midi_item_p_arr_.size(); i++) {
Midi_item * it_p = midi_item_p_arr_[i];
((Midi_track*)it_p )->number_i_ = track_i ++;
output_stream<< *it_p;
}
+ *output_stream.os_p_ << flush;
*mlog << endl;
}
Midi_text track_name( Midi_text::TRACK_NAME, instrument_str());
midi_track_p_->add( Moment( 0 ), &track_name );
- // set instrument :-)
+ // set instrument description
Midi_text instrument_name( Midi_text::INSTRUMENT_NAME, instrument_str() );
midi_track_p_->add( Moment( 0 ), &instrument_name );
-
+ // set instrument :-)
+ // lieve wendy, nu heb je mijn track_i_ / get_staff_i weggehaald...
+ // zie ook note-performer: ugh
+ // ugh, need to know channel (===track===staff) too
+ int channel_i = 0;
+ Midi_instrument instrument( channel_i, instrument_str() );
+ midi_track_p_->add( Moment( 0 ), &instrument );
+
Midi_tempo midi_tempo( get_tempo_i( ) );
midi_track_p_->add( Moment( 0 ), &midi_tempo );
}
str += String( (char)( ( key_i_ + 2 ) % 7 + 'A' ) );
else // heu, -2: should be - 1 1/2: A -> fis
str += String( (char)( ( key_i_ + 2 - 2 ) % 7 + 'a' ) );
- str = String( "% " ) + '"' + str + '"' + "; % not supported yet\n";
+ str = String( "% \"" ) + str
+ + String('"') + "; % not supported yet\n";
return str;
}