Table of Contents

Introduction
Getting to Know the Denemo Interface
Using Denemo
Score Setup
Simple Note Entry
Editing
Score Playback
Publishing
Advanced Features
Customizing Denemo
Working With Lilypond Files
Music Analysis with denemo
Appendix I
A. Keymaps
B. Denemo File Format

Introduction

Why Use Denemo

GNU Denemo is a modal, graphical music notation program. http://www.gnu.org/software/denem/denemo.html and http://denemo.sourceforge.net/. It is

Relationship of Denemo to Lilypond. 

Denemo is intended to be used in conjunction with GNU Lilypond http://www.lilypond.org, but is adaptable to other computer-music-related purposes as well.

Getting to Know the Denemo Interface

The main window of Denemo is where all notation tasks are performed; Creating a New Score, Simple Note Entry, Editing, and Publishing. The Main window cotains the following menus:

This menu permits you to add staves above or below the default staff.

Using Denemo

The primary way to interact with Denemo is with the keyboard. Denemo is extremely keyboard centric, this permits the user to acheive touch type control of musical editing.It is easy to assign key binding to functions that don't have a default one.

In graphical music editing there are at least two dimensions - up and down (the staff lines), right and left (forwards and backwards).With graphic note entry the adding of note values and pitches is slow going. No wonder most of all music notation programs rely on midi entry as the primary way of operationl. Lilypond notation removes the up and down aspects because it is plain text (ascii), which is linear by nature. Denemo, a graphic editor responds to the same ascii (text) commands, permitting you to enter notation linearly and display it graphicly. To get the most out of Denemo it is recommended that you do the LilyPond tutorialshttp://www.lilypond.org and the VIM http://www.vim.org tutorial. (At the command line type #vimtutor) Denemo adopts a unique note entry system using lilypond notes and vim shortcuts. These keyboard shortcuts permit rapid note entry. If you prefer a different keyboard shortcut scheme, denemo is fully customizable. (see customize (Input via MIDI keyboard is planned for later versions of denemo.

Score Setup

Creating a New Score. You can create a score from scratch or choose one of the many templates that come with Denemo. To start a new notation project the procedure is as follows

  • Go to the File menu and click on New.

  • Next from the File menu Choose Header. In the Header dialog box fill in the Composer, Title and Subtitles fields and click Ok.

    Note

    If you are setting up a Custom score see Customizing Denemo.

  • Next setup your Clef, Key signiture, and Time Signiture:

    • Go to the Clef menu and click Set initial Clef. Choose the Clef you want from the drop down list and click OK

    • Next go to the KeyMenu and click Set initial Key Signiture Choose the key signiture you want from the drop down list and click the select the proper choice for major or minor key. Click OK

    • Now go to the Time menu and click Set initial Time Signiture type the time signiture into the fractional text boxes and either check or uncheck apply to all staffs as needed and click OK.

Setting up a Custom Score. While Denemo comes with a variety of templates to choose from, you may need to create your own custom score, The procedure is fairly easy:

  • Using either theStaff menu or keyboard shortcuts add as many staves as you need. From the Staff choose Add New Staff After Current Staff or type ctrl+shift+A If you need to add staff before the current one type ctrl+shift+B. To delete the current staff type ctrl+Shift+x or ctrl+shift+delete.

Simple Note Entry

Adding pitches. The best way to understand note entry in denemo is to compare note entry in lilypond and movement keys in Vim to those in Denemo.This can be seen in the following table.

Table 1. Denemo, Lilypond,and Vim Movement keys

Keyboard comboLilypond Useage Vim Usage Denemo Usage
H left arrown/a Move the cursor to the leftMove the cursor to the left
J down ''n/a Move the cursor down one lineMove the cursor down one note
K up ''n/a Move the cursor up one lineMove the cursor up one note
L right ''n/a Move the cursor to the rightMove the cursor to the right
ctrl+H left '' n/a Move the cursor to the left one paragraphMove the cursor to the beginning of the measure
ctrl+J down ''n/a Move the cursor down one paragrahMove the cursor to the next staff
ctrl+K up ''n/a Move the cursor up one lineMove the cursor up one note
ctrl+L right ''n/a Move the cursor to the right one paragrah move the cursor to the beginning of the next measure
Homen/an/aMove cursor to the first measure of piece
End n/a n/aMove cursor to the final measure of piece
a the note a n/a jump to nearest a
b the note b n/a jump to nearest b
c the note c n/a jump to nearest c
d the note d n/a jump to nearest d
e the note e n/a jump to nearest e
f the note f n/a jump to nearest f
g the note g n/a jump to nearest g
, (comma) make note one octave below move cursor one octave below 
' (apostrephe) make note one octave above currentmove cursor one octave above 
+ Sharpen note at courser 
- Flatten note at courser 

Moving Around. Now that we know the basic movement and note entry keys, it is time to try our hand at entering notes.

Example 1. In the Drivers seat

Lets look at example 1. We see a c major scale and a chord spread over two octaves. Type a 'c', the cursor jumps to the nearest c, (if it is in the wrong octave, type a comma [to go down] , or an apostrephe [to go up]) . We have reached middle c, we can start moving the cursor up note by note using the k key and then down note by note usng the k key. Alternetly we could type the note names to jump to the right note. This hold true for the notes of a chord or arpeggio, we jump to the note by typing the note name and adjust the octave with the comman and apostrophe. this works if within an octave.Often you will want to enter notes that jump a large interval. To speed up note entry in such curcustances help Denemo deterimine the direction by moving one step in that direction using the j or k keys. So if you have entered a note on middle c and want to enter a b one octave higher, hit the k key before intering the note (this doesn't always work but deserves some investigation)

Rhythm Entry. Now that we have an idea how to move around the staff we are ready to addn note values. Note values are entered using the numberpad or the number keys. Try to avoid the number pad however as much as possible because it takes your hands off of touch typing position. Below is a table listing the default keys for entering note values. Notice how the whole note and quarternote have two shortcuts. You will have to experiment to see which is more comfortable, although we recommend using the space bar for the quarter note.

Table 2. 

Shortcut keyAction
0 or ` insert a whole note at the current cursor position.
1insert a half note at the current cursor position
2 or SPACE BARinsert a quarter note at the current cursor position
3 insert an eighth note at the current cursor position
4 insert a 16th note at the current cursor position
5 insert a 32nd note at the current cursor position
4 insert a 64th note at the current cursor position
. period insert a dot to the previous note
shift+. period remove dot to the note at cursor position

Entering Rests.  Rests are entered two ways:

  1. By using alt with the note value keyboard shortcuts

    Example 2. contains a half rest, a quarter rest, an eigth res and a sixteenth rest. While you could add theses rest by typing ESC, alt+4 for the 16th rest and alt+3 for the eigth rest and so on for the others will prove to be the quickest.

  2. By typing escape Esc to changes into rest entry mode

Note

If your windowmanager isn't set to trap Alt plus a number key you can probably disable it in your window manager so it will work with Denemo. For example, with WindowMaker one would right-click on Denemo's title bar and navigate to the Window Attributes->Advanced Options->Don't Bind Keyboard Shortcuts option. For Gnome or KDE consult your documentation.

Example 2.  Rests

Accidentals. 

Chord Entry. To enter a chord choose a pitch and a rhythm for your base note. Next move the cursor to the next chord tone and hit enter to add the note. To toggle chord tones on and off or to switch them to rests use Enter to add tones or convert a rest to a chord tone,and Shift+Enter to remove tones/switch to rests.

Example 3. Chords

Example three contains a series of chords. Chord entry in Denemo is easy. Create a new file and save it to a convient location. Navigate to the E above middle C, either typing the alphabetical note names or the hjkl movement keys. Create a Half Note by typing a 1. Move the cursor to the G one line above and type Enter. Move the cursor to each additional chord tone in the first chord typing Enterto add chord tones. Shift+Control will delete chord tones if a wrong note is added accidently. Continue creating chords until example 3 has been copied.

To alter the pitch chromatically, type the plus sign to sharpen the note at the cursor by one half-step and the minus sign to flatten the current note by a half step..

Note

Entering a chord when you are already at the end of the measure (the cursor turns red when this happens) may cause your next note to be added to the _beginning_ of the next measure, or even create a next measure if one didn't already exist.

Editing

Commands. To edit quickly in Denemo use the following keyboard shortcuts:

Table 3. 

commandfunctioncomments
m Add a new measure to all staves at the current cursor position 
M Add a new measure to all staves at the end of the score. 
ctrl+shift+AAdd a Staff after current Staff 
ctrl+shift+BAdd a Staff before current Staff 
ctrl+shift+x or >ctrl+shift+deleteDelete current Staff 
Control-Spaceset a markpoint at the cursor 
Control-CCopy selection to the Clipboard but leave the area selected 
Control-X Copy the area between the markpoint and the current cursor location to the paste buffer and clear the selection 
Control-VPaste the buffer at the current cursor position 

Copying, cutting and pasting:Control-Space: set a markpoint at the cursor Control-C: Copy the area between the markpoint and the current cursor location to the paste buffer. Control-X: The same as above, but clear the selection after doing this. Control-V: Paste the buffer at the current cursor position.

Note

the behavior of cut-and-paste is a little bit idiosyncratic. Play around with it a little bit to get the hang of it. The intention is for it to behave in a manner that's reasonable, and easy to correct if that isn't exactly what you would have liked Denemo to do. For example, paste will not add new measures to the score unless the paste operation conflicts with music that has already been entered; cut will delete measures if every staff is in the selection, but otherwise it will simply clear them, and so on. Here is where adding a number to the l key would be nice, I could 4 l to select 4 notes or 4 cntrl l to select 4 measures etc. I tried this and it is more than idiosyn.. it annoys me. I would like to see a mouse select here as and option and a clearer way to deselect.

Adding dynamics and phrasing marks. 

Adding Lyrics. 

Repeats. 

Score Playback

Midi

Midi playback. Denemo has the ability to sound your chords through /dev/sequencer as you enter them. It accomplishes this by opening /dev/sequencer and holding it open as long as your still entering notes; if you pause, a timeout will elapse and /dev/sequencer will be closed down until you start note-entry again. This is intentional; it is there to facilitate the use of an external midi player for full-score playback or to have multiple instances of Denemo running at once. Sometimes, though (particularly if you have a fast machine), Denemo may hold open /dev/sequencer for long enough that it interferes with an invocation of playmidi. If this happens, simply be patient and try again.

The above holds true if you are not using alsa for midi playback if you are using alsa for midi playback you will need to either use timidity or if your soundcard has midi capabilities load a soundfont.

To configure Denemo to use a sequencer other than /dev/sequencer and play midi. Go to the Edit menu and chooseSet Preferences. The Set Preferences dialog box will open. In the External Midi Player text box enter the name of your midi player. Example 4 has Timidity entered, but it could be any midi player of your choice. Next enter the name of your audio player. Click the Set Playback Output box and click Ok to save your settings and exit the dialog box. To play your score go to the Playback menu and click Play.

Csound

In addition to permittion playback by a wide range of synthesysers, Denemo permits playback using C sound. Denemo will create a simple orchestra file on the fly to play your file, or you can use your own custom orchestra file. The default output of Csound csound -d -W, currently to get denemo to accept different flags you must hard code it into the Denemo source code.A simple orchestra file has been kindly provided by Dave Phillips, and can be found in the templates folder.

Publishing

Creating scores with Denemo is quick and easy. Once your masterpiece is done, don't rush to the file menu and click print, if you do you will be disppointed. The reason for this is that Denemo is a score preparation application. Once your score is ready it must be then forwarded to a utility to publish your score in its final intended format. This could be a PDF for printing hard copy, a png for inclusion in a web page, a dvi for sending to press, to name a few. The publishing act is handled by backends which currently are LilyPond and abc. If you have used Denemo's LilyPond mode you may have done much of this work already. The steps to publish your score are as follows:

  1. Convert to an ascii format (Lilypond or abc)

  2. Run your score through convert(for lilypond files)

  3. Run your file through a parser, check for errors and correct them touch up your file (you will need to read the documentation on Lilypond and ABC)

  4. Reparse your file and continue touchups until the output is how you want it

  5. Output your final product according to your needs

These steps will be detailed below.

Example 4. 

Above is a screen shot of the first few measures of a score prepared in Denemo. It has not been edited using lilypond mode.

Example 5. 

Next is the lilypond output of the above score opened in Emacs.And the abc file:

Example 6. 

Next is the Lilypond file with slurs and dynamics and additional header information added:

Example 7. 

Example 8. 

Finally the output from lilypond as a .png image

Advanced Features

This section will explain how to enter advanced rhthms, chords polyphony etc

Display Command. Control-Shift-left: Decrease the minimum display width of all measures by 10 pixels Control-Shift-right: Increase the same by 10 pixels Control-Shift-up: Decrease vertical space alloted to each staff by 10 pixels Control-Shift-down: Increase vertical space alloted to each staff by 10 pixels

Adding Tuplets. Tuplets in denemo work like those in Lilypond, where tuplets are treated as a fraction with the top (numerator) signify the amount of notes normally displayed and the denominator the amount of notes to be displayed instead. Here will go more details and examples for the lilypond docs and letters for the lilypond group. Control-0, Control-1, or Control-2 to bring up a dialog that allows you to specify what coefficient you want to use for your tuplets. (e.g., "Times 2/3"). Control-3 through Control-7: Inserts a tuplet group with a common coefficient.

Changing Stem direction. S: insert a stemboth directive +: stemdown->stemboth, or stemboth->stemup -: stemup->stemboth, or stemboth->stemdown

Figured Bass Entry. Under the menu item Other->Insert/Edit Figured Bass is a dialog to enter figures for editing figured basses in the LilyPond output. This is currently only useful when editing a LilyPond file with a figured bass in the score (it can be an empty skeleton, see examples/figuredBassTemplate.ly). It is also possible to use the lilypond text window to edit directly (see README.lilypond)

Polyphony. Denemo permits the use of mutiple staves for part work, as well as allowing mutliple vioces on a single staff. To add voices to the current staff do the following:

  1. Go to the measure(s) where you want to add the second voice

  2. Open the the add second voice to current staff dialog box, either by clicking the Staff menu and then the Add Voice3 to CurrentStaff item.The dialog box will appear.

  3. If this is a different instrument than the other voice, open the instrument drop down list and choose the appropriate instrument. The default name for this voice should be ok.

  4. Click Ok to close the dialog box.

  5. Next navigate to the new voice, either with by clicking the Navigaion menu and then clicking ToNextScore, or using the keyboard shortcutt cntrl+j((shift+F)

    Note

    The stem positioning positioning may not look correct in the Denemo window, but it will look correct in the published output.

  6. For every beat your voice is silent you need to add a null note, which is acheived with the following sequence of key strokes: 1. n puts you in null mode, 2. r toggles a rest 3. then type the rest value you need to add, with the appropriate keybinding.

  7. For the beats that contain notes just enter them as you would normally see section x.

    Note

    If you choose not to enter rests in null mode the visual output will be the same but these notes will be heard during midi playback of your score.

  8. To leave the new voice and return to the previous one type

.

Customizing Denemo

This section will detail custom keyboard shorkcuts, adjusting audio setting, and other tkeaks to denemo

Working With Lilypond Files

Denemo lets you edit lilypond files. Currently there are two ways you can interact with lilypond files using Denemo:

  • Create your score and then generate lilypond output

  • Open a lilypond format file and edit it both graphically and as text.

These two methods of permit a great deal of flexiblility. If you desire to do all your notation within Denemo's graphical enviroment but still use LilyPond's parser and conversion engine to create PostScript for printing, just do all your work in denemo and save it as a lilypond file. You can then run the resulting file through LilyPond as you would any other LilyPond file. If you want to combine the ease of graphic entry with the power of text entry.(in many cases text entry is acturally faster). The process of editing a lilypond file within Denemo is as follows:

Open a Lilypond file the same way you would open up a file created in Denemo.

Note

Currently not all lilypond files will be editable within Denemo. This is dependent on which version of Lilypond you file was created with. Denemo however will open files created within lilypond and exported to lilypond format.

The file is broken up into chunks, which are displayed as text in a specialized text editor which pops up under the main notation window.

Example 9. Lilypond mode

The Text Window contains the following buttions Reload,Toggle Window, Top Levelright arrow Left arrow. The Top Level button take you to the Lilypond header letting you edit header information such as Title, Composer Tagline etc. Interspersed In This Top Level Text Is Music Data - You Can Step Around At The Top level using the previous and next buttons. Anything you type here will be saved when you save your work. The music data is what is being displayed in the normal denemo graphical window. When you edit graphically the lilypond text corresponding to the current note is shown in the text window. You select between these two windows with the toggle window button. You can move about in the lilypond text for the current measure using the previous and next buttons. You can edit the notes textually here, but the changes are not automatically reflected in the graphical window - you have to hit reload for that..

One of the things you will notice is that when you have the lily text loaded, the cursor steps on items, such as the initial key signature setting, barlines etc. So if some directive is placed between two notes then the cursor will step on to it, allowing you the option of editing in the text window. The text of the measure is split up into chunks, one for each note, directive etc in the measure. At any stage you can click the reload button. This saves to a temporary file and the reads back in. If you have introduced some lilypond syntax errors then you are offered the chance to re-edit the file and reload. If you have the environment variable set (eg to emacs or vi) then that editor is started with the line number where the problem occurred.

Having the top level text available means you can edit voices separately or put them temporarily onto separate staves, all without quitting the program - the technique is called "commenting out" and I illustrate this in the example below. The normal way to use denemo to write a lilypond file is to start with a template (though it could be some previous, similar piece). The simplest thing you can have is \score { \notes { c'' }} which gives you a score with one staff with a single note, middle c. This is only useful for the simplest of purposes.

A more extensible example is the file in examples/simple.ly Clef = \clef treble Key = \notes \key c \major TimeSig = \notes \time 4/4 MyViolin = \context Voice = MyVln \notes { \Clef \Key \TimeSig c''4 } MyViolinStaff = \context Staff = MyStaff \MyViolin > \score { \MyViolinStaff \paper {} }

The names starting My... are just any made up names you like. In this case MyVln is the name of the voice while MyViolin is the name of the music that has been given to that voice. The music found in the score block at the end is what denemo displays. You can load up this file, edit the Key and TimeSig definitions, hit reload and start putting in notes denemo style, saving to a file of your choice at the end.Another template examples/header.ly gives you access to all the titling features of lilypond and so on.One of the benefits of editing lilypond is better handling of voices. The examples/twovoices.ly file shows how two voices can be put on one stave. It looks like this:

Key = \notes \key c \minor TimeSig = \notes \time 3/4 ViolinI = \context Voice = VlnI \notes { \Key \TimeSig c''4 d'' e'' } ViolinII = \context Voice = VlnII \notes { \Key \TimeSig a''4 b'' c'' } Violini = \context Staff = Vlns \ViolinI \ViolinII > \score { \Violini \paper {} }

However, denemo doesn't give an easy way of editing the second voice. One way you can do this is to "comment out" the first voice by putting a % sign at the start of the line that puts it on the staff, thus Violini = \context Staff = Vlns %\ViolinI \ViolinII

when you reload, the first voice is temporarily hidden. However you only see one voice at a time this way. A bolder way is shown in examples/editTwovoices.ly where a temporary staff is created with the same second violin part as appears in the real staff. Now you can edit either voice and see them both on the top staff. When finished you comment out the extra staff thus \score { \Violini % \tempStaff > \paper {} }

and you are ready to print. I should say that denemo was not written expecting the same music in two staffs, so there may be bugs lurking for the adventurous.

A third way is to create a new score block in the file with just the voice you wish to edit - under the Navigate menu is the option to cycle through the score blocks in the file. If the score block has no \paper block then it will not print out and can just be used for editing. These multiple score blocks are how you include several movements of a piece in a single file - you can then print them all at once getting the page numbering correct.

This version of denemo for lilypond editing is just a proof-of-concept exercise really. Before fleshing out the (large) parser with actions for all the rules that lilypond has I wanted to see that this would work. There is a lot of lilypond which this version will not read; note especially that include files are not opened, and only the default Dutch note names are understood and the \relative type of notes are not handled, nor lyrics,etc etc. On the plus side, there is the full set of dynamics (denemo had only a subset), tuplets fancy \bars, \partial, \grace, \repeat volta 2, \alternative and much more. Some bugs: the ties do not show in denemo when read back in - this is a bit structural and needs a design decision to fix - and if you edit the duration of the last note in a measure the first note of the next measure may need to have its duration set. The handling of the barline '|' is not nice - again we should decide where we are going with this sort of thing. And watch out for deleting the key signature etc if you delete the first measure - on reload you will have to add them back in. Also beware that this version leaks memory - Adam's Brandeburg score gobbles up 2% of my RAM everytime I hit reload. Several of the denemo menu items are redundant when you have a lily file loaded - for example you set headers just by typing in the text (see examples/headers.ly for a complete set of possibilities) - these menus just refuse to respond - they should be hidden really. The lilypond editing stuff is only enabled when you build with gtk version 2 ie ./configure --enable-gtk2 it could all be done in gtk 1.0 no doubt, but I hope people will have moved on before we get round to it

Music Analysis with denemo

This section will explain denemo's musical analysis abilitlies

Appendix I

A. Keymaps

Table A.1. 

    
    

B. Denemo File Format

Table B.1. Denemo XML