gmorgan v0.16

Copyright (c) 2003 by Josep Andreu
logo

INDEX

INTRODUCTION
REQUIEREMENTS
How to start?

THE SETTINGS WINDOW
    Global settings
    Preset Files
    Preset File editor
    Note Drum Name Editor

WHAT IS WHAT?

    Sounds
    Patterns
    Styles

MAIN WINDOW

    Shortcuts
    The Play-Record buttons
    Hints for Recording

Edit Pattern Window

    The Pattern
    The Bars
    The Drums
    The Bass
    The Acc1
    The Acc2 4
        The Modes
    The Acc3 5
    The Acc4
    The Acc5

The Sounds Bank window


The Velocity Window


The Song Sequencer window

    The Scroll

Global Drum Edit


Utils

    The Keyb Window
    The Selector
    The MasterVolume

SKINNING

    BoxTypes
    LabelTypes
    AlignTypes
    Some Hints about the images



INTRODUCTION

Sorry for the english.

gmorgan is a organ, a modern organ, well, now the name for this kind of machines is rhythm stations ... or some like that.

gmorgan was born because my last project horgand generates the audio sound and was extremely hard to do an auto-accompaniment generating the audio in real time.

gmorgan is my first attempt to use the scheduled events in ALSA sequencer, and is based on a miniArp.c from Matthias Nagorni.

gmorgan use MIDI, i hope is fully configurable, or maybe will be in future versions, the most easy way to use it is with a soundfont device, a sound card or a soundfont synthesizer.

This program was developped in a debian PIII 933 with emu10k1, also is tested in a debian PII 300 with a old SB16 isa card with timidity both with kernel 2.4.20 and runs "fine".

The gmorgan webpage where you can find the lastest version is located in:

http://perso.wanadoo.fr/guy.clotilde/GMORGAN/index.html

Thanks to Guy Daniel Clotilde, the webmaster, for this big effort, also you can subscribe to our mailing list "hlsu@yahoogoups.com" for support, announces ans comments, sending a blank message to:

hlsu-subscribe@yahoogoups.com

Please, if you enjoy this program, send me your patterns, i will add in the future versions, i have a large list of imporvements to do, and i dont have time to make patterns. Please send to holborn@telefonica.net.

Remember, that program is in development, sure has tones of bugs.


REQUIEREMENTS


First the bad News

Many many bad news. Unfortunatelly, all of GM soundfonts, sounds diferent, also the same soundfont in a soundcard or in a synthesizer, sounds diferent, also the same soundfont in a diferent soundfont synthesizer sounds diferent and that's a problem, because the patterns sound really diferent with diferent soundfonts or devices, and maybe you need adjust all the volumes, and is not a easy work. The drum "velocity" mixer helps something with that problem.

Unfortunatelly, the soundfont synths arent too fast when receiving a program change MIDI message, that cause error in the sound what you hear when start the accompaniment.

I really dont know who has the problem but sometimes the exported midifiles dont run good in Muse ... i checked with pmidi and rosegarden4 and +/- works, but still problems with muse.


How to start?

gmorgan is released with preset files in General Midi, for start with this program in a easy way you need a GM soundfont file.

If you have a sound card with wave table support, you need load one soundfontfile. In a emu10k1 or awe compatible soundcard we use for this purpose the command:

sfxload "soundfontfile"

available in the awesfx package from Takahasi Iwai in:

http://mitglied.lycos.de/iwai/awedrv.html

If you dont have a sound card with wavetable device you need a virtual soundfont synthesizer like Timidity. Start this programs like a sequencer alsa client in this way :

timidity -iA -B2,8 -Os -EFreverb=0

you need also write a /etc/timidity.cfg file with this format

soundfont "soundfontfile"

Also you can use fluidsynth another softsynth, start this program in this way:

fluidsynth -m alsa_seq "soundfontfile"

unfortunatelly fluidsynth changes the banks with banklsb midi message, you need to edit all the patterns, change BankMSB 128 to BankMSB 1 in the drum channel. That's because seems the bank change are not standarized.

The "soundfontfile" contains the sampled sound, is the sound what you hear, personally i use the GM soundfont file "8RealGS20.SF2" available in :

ftp://ftp.lysator.liu.se/pub/awe32/soundfonts/8RealGS20.zip

Is not the best but is smaller 8MB and sounds pretty good. If you use another one, sure can sound better, but you will need to remix many patterns.

I think the best way is start gmorgan, save the settings and restart gmorgan, then he try to connect to your devices and is ready for play.

The example files are located in /usr/local/share/gmorgan in the default installation, in the settings window go with the browser button to this path and select the apropiate for each category.

The Preset file is named "GMPresetList.txt".

The Drum Note Name File is named "GMDN.txt".

The Help file is located in /usr/local/share/help/help.html for the default installation.

The Skin file is named "skin.txt" and is located in the default installation in /usr/local/share/gmorgan/skins/ , then you can select a skin name. Due the tree architecture of skin, select always this file, if you wanna edit your own skin, always edit this file.

Also you can the use command line to load the sounds, the patterns and the styles etc.

gmorgan v0.01 - Copyright (c) 2003 Josep Andreu (Holborn) Usage: gmorgan [OPTION]

-h , --help display command-line help and exit

-d File --drump=File get the drum map file list

-p File, --preset=File get the preset file list

-l File, --load=File loads the Styles

-b File, --load=File loads the Sound Bank

-r File, --load=File loads the Patterns

Some examples are located in /usr/share/gmorgan, load and enjoy. An example of command line to start gmorgan overriding the config files:

./gmorgan -l MisStyles.gms -b MisProgs.gmo -r MisPat.gmp


The Settings Window

Global Settings

Two browsers of ALSA sequencer Midi Ports in this window, one for MIDI In an the other for MIDI Out, select one device in each one, when you restart gmorgan hi try to connect to the specified devices in your configuration.

Browse your paths and select the files what gmorgan loads when hi starts, remember, the files are located in /usr/local/share/gmorgan in the default installation.

Skin file are located in usr/local/share/gmorgan/skins un the default installation.

When you restart gmorgan, hi try to load this files, and then hi is ready to play. Anyway the command line -l -b -r override this files. Use it if you wanna load a different Sound,Pattern,Style or preset file.

Mute pattern dependant, check this box if you want the patterns controle the mute (On/Off) of each accompaniment channel.

The Preset Files

gmorgan uses two files with the preset names, one for the bank-sounds names, and another for the drum-notes-names, gmorgan install this two files in /usr/share/gmorgan and are called GMPresetList.txt and GMDN.txt, you can add your soundfont preset names editing this files. gmorgan loads both when start, or edit your own ones and load with a command line parameter.

The format of Preset list is exactly what have a small utility that comes with a wonderfull program of Takashi Iwai called vkeyb, the utility is called sftovkb.

The format is :

Bank Program Name

0 0 Piano

The format fo Drum note file list is from my own and at this moment can be edited by hand. The format is:

Program Note Name

0 44 Pedal Hi-Hat

The Preset File Editor

Modify the selected Bank-Preset Name or adds new ones.

The Note Drum Name Editor

Modify the selected Program-Note Name or adds new ones.


What is what?

Sounds

Sounds are the four first channels in the mixer, your left and rigth hand, gmorgan can load 100 sounds with the settings of the mixer. Also can be changed with MIDI program change, if you wanna change when you play, or with Alt-B shorcut open the Bank window and you can select or store in it, then you can save the whole bank or sound by sound.

Patterns

Are the most important thing, gmorgan can load 500 patterns, each pattern contains the rest of the mixer, Acc1, Acc2 ,Acc3,Acc4,Acc5, Bass & Drums and of course the musical pattern. You can select with left click in the browser or edit with rigth click. Also you can save the whole, or one by one. Patterns parameters i will explain in the Pattern Editor. All changes made in the mixer pattern section are stored in the pattern, and be carefully because if you save the file, this changes will be saved.

Remember in General Midi, drums are asigned to Bank 128, you need to change the Bank MSB parameter to 128 in the Extra Params win (+) if you use General Midi SoundFonts. Empty Patterns are "harcoded" to use the 128 Bank for the drums section, but you need to change it if you dont use General Midi.

Styles

Styles only store the "number" of each pattern for Var1 Var2 Fill1 Fill2 Intro and Ending, the tempo selected , and the sound program selected. Also you can save the whole, or one by one.


Main Window

Only few thing need to be explained. Two lines of buttons named Pattern and Next Pattern can "only" be used when you select a style, the line Pattern changes in real time the played pattern, the Next Pattern line changes the pattern when they finish, button Var1 F2 and Var2 F1 changes the pattern playing the "F" (Fill) pattern before start the next pattern, REMEMBER to edit your Fill1 and Fill2 patterns with minus bars than the Var1 or Var2 Pattern.

Shortcuts

Press F1 for Help.

Pattern:

Next:

The Next line also can be controlled with a MIDI Pitch Bend, try ... is not easy.

The HMode controls how the rigth keyboard is harmonized, they are six types, mode unison dont harmonize, the rest are third, sixths, triad 1, triad 2, soli 1, soli 2. Carefully with the polyphony of your devices because, de soli mode uses 4 notes for each note , and -> 4 notes * 2 channels = 8 notes for each note played. If you play four .... = 32 notes, most devices dont support that polyphony.

The button "+" for each channel in the mixer open a window with extra parameters for this channel.

The Play-Record buttons

This buttons Record/Play what you play in the organ, also in the menu you can Save/Load or Export as Midifile. gmorgan record also all Pattern/Sound changes or whatever you change in the mixer during recording. In this Play Mode the organ and the sequencer operation is disabled, but you can "play" with the mixer to correct volumes, this changes in play mode can not be recorded, is only for monitoring.

You can record 64.000 events, a large song :)

The Export Midifile of this events is a "little" bit slow ... be patience, i will improve in future versions, also .. i'm not very happy with the resolution, and maybe that's a buggy part of the program.

Hints for Recording

Is extremely hard to click on record and start play, but you can use a special trick, edit your favorite style and put as intro a count or a empty pattern, then select this style click Intro in the current Pattern line and Var1 in the Next Pattern line ... then click "Record", gmorgan starts with the Intro pattern and then will change to the Var1 pattern.

Also, when you Record, gmorgan writes in "bar 0" the actual "Sound", if you wanna record with new "sound" contents you need to write a new "sound".


Edit Pattern Window

That is the most important part, and needs to be really improved in future versions. Edit a pattern is not a easy work. You can edit the pattern and listen at the same time.

All the patterns can be edited in Major tone, because all the changes what gmorgan made when you play is referenced to the major chord.

The Help Button display the correct values for notes and lengths.

Remember that... the number of vars of the fill patterns needs to be minor than the Var patterns.

The Pattern

The first parameters are the name, the number of bars, (1 to 8) and the Nominator, nominator meants the "nominator bar" 3/4 4/4 -> 3 for Waltz, 4 for Disco .. etc.

The swing parameter of course is the amount of what each second eigth note for each black note in the whole pattern delays. That's swing. :-)

The button copy, copies the whole contents of a pattern in the selected pattern.

The button clear, reset the pattern to a "Empty" state.

The Bars

This counter, selects the bar of the pattern to be edited. The Copy button in this section, copies the selected bar for all the sections in the pattern.

The Drums

The Copy Button in this section, copies a bar, for the whole drum notes.

In the subsection, The slider select the drum note you want to edit, also you can hear with the button listen, If you load non GM standart soundfonts, you need to edit a file with drum note names, that is explained later.

The Copy button, copies only the selected instrument. The button Clear, clear the bar for the selected instrument.

The groups of four inputs values are de 16th notes for the bar, in the case of the drums, you select the note in the slider, the length is fixed, and only you need to put the velocity. (0-127).

The Bass

The St-Lt slider means "Stacatto/Legatto", this affects the length of the note. The Copy Button in this section, copies a bass bar. The Clear Button clears bass notes in the selected bar. Here you need to specify the note, the length and the velocity.

The note is referenced to the fundamental of the chord. In the major tonality.

Value Note
-12 2º grade flat
-11 2º grade
-10 3º grade flat
-9 3º grade
-8 4º grade
-7 5º grade flat
-6 5º grade
-5 6º grade flat
-4 6º grade
-3 7º grade flat
-2 7º grade
0 No sound
1 Fundamental
2 2º grade flat
3 2º grade
4 3º grade flat
5 3º grade
6 4º grade
7 5º grade flat
8 5º grade
9 6º grade flat
10 6º grade
11 7º grade flat
12 7º grade
13 8º grade

The Length is the same valor as ALSA sequencer

Value Length
1 whole bar
2 white note
4 black note
8 eigth note
16 sixth note

also you can use the intermediate values for do a "dot" note ..

The Velocity is like in the drums .. (1-127) remember, velocity means

"Velocity Sensitivity", some thing like a volume of the note.

The Acc1

Is a "soli" accompaniment whit the note what you play with you left hand, if you dont play ... no sound is produced in this kind of accompaniment.

The parameters are Length and Velocity exactly like in the bass section.

The St-Lt slider means "Stacatto/Legatto", this affects the length of the note. The Clear Button clears Acc1 notes in the selected bar. The Copy button copies bars like in the other sections.

The Acc2 4

Edits Acc2 or Acc4.

Is a melodic accompaniment,the parameters are the same than the Bass section.

The St-Lt slider means "Stacatto/Legatto", this affects the length of the note. The Octavate button plays also one octave bellos the same note. The Thirds button plays in "thirds" whit the notes chords, maybe sometimes are foths.. The Sixths button plays in "shiths" ehit the notes chords, and maybe sometimes are fiths.. The Clear Button clears Acc2 notes in the selected bar. The Copy button copies bars like in the other sections. The Mode parameter can be at this momment (0 to 2).

The Modes

gmorgan now uses three different types modes to play the melodic accompaniments. Each one produce different results. My personal recomendation is use mode 2 if you want to play the pattern with the organ.

If you want to use the Batch Player, you can copy the pattern to an empty pattern and change the mode, in this way you have, the same pattern copied with differents melodic accompaniments and you can select the most appropiate for each bar in the sequence.

Mode 0

This mode transports the melody to the fundamental of the chord what you play of course changing the chord notes for harmonize a little bit. Exactly like the bass. Be carefully with your melodies because the use of some grades cant be harmonized by gmorgan.

Mode 1

This mode try to harmonize the melody in a most sure way than mode 0, but the changes what gmorgan makes in the melody are sustantial big than the mode 0. This mode is a little bit hacked, takes the first chord played as the tonality and relativize all the melodys to this tonality, use it if your song starts with the tonality chord, otherwise you can obtain unexpected results.

Mode 2

This is the safe mode, moves the notes of the melody to the nearest chord note. Use this if you plan to put notes higher than twelve.

The Acc3 5

Edits Acc3 or Acc5.

Is a melodic accompaniment harmonized with the chord notes, also has mode, but that is a sure way to harmonize. The parameters are the same like always.

The St-Lt slider means "Stacatto/Legatto", this affects the length of the note.

The Clear Button clears Acc3 notes in the selected bar. The Copy button copies bars like in the other sections.

The Acc4

Exctaly than Acc2.

The Acc5

Excatly than Acc3.


The Sounds Bank

This window is for select the sound in the left and rigth hands.

Like always, left click to select and rigth click to store the changes. Remember to save your files.


The Velocity Window

Opened with the small "v" button in Drums mixer channel.

That is an attempt for facilitate mix the drums when you use differents soundfonts, remember that only reduces-increses the velocity sensitivity of each note. You can save your settings for each diferent soundfont.


The Sequencer Song

That can be changed a lot in the future, because i think people is most interested in that then int the part of a organ.

At the moment no denominators bar changes can be in the song, the denominator is for all the song, and you have the responsability to put patters with the same denominator, maybe can run, but the display numbers of the bars will mistake at this momment, i need to think about that.

The Inv. buttons are the fist inversion played for the ACC1 ... value 1 for the first inversion of the chord and 2 for de third inversion, thats only in the start moment, because gmorgan "try" to change the inversions in real time to do a natural accompaniment.

The Scroll

128 bars for each song, each blue box is a black note in this bar, if their are blank.. last chord is played. The available chords are in a box down of the window ... obviously are relativized to C.

Please load the "Mendigation" song for see an example ... this chords are from Antonio Carlos Jobim ... hope can be distributed in this way .. i really dont know...

The available chords are displayed in the window, in fact they are more than that, but i need to think about how to use chords with 5 notes.

The diminished (ejem ... ) chord C°7 is with the "grade" simbol

° -> Shift + Alt-Gr + 0 in my keyboard.

The eigth buttons A,B,C,D,E,F,G,H are markers. only one bar in a song can be selected with the same marker.

The Go input value ..... can be filled with A B C D ... gmorgan check that before play the bar, the next blank input value are the times the sequencer goes to the marker, after this times the sequencer plays the bar.

The second Go input value .... can be filled also with A B C D ... and means ... "go after x times" ... the next blank input value is the times. That is for emulate the ... -1----- -2----- in a score pentagram.

The Pattern, is the number of pattern is played in this bar, if number is 0 the last pattern is played.

The X Button is the finish point of the song, gmorgan stops when finds a X button enabled, also stop here when exports a Midi File. Otherwise the song continues to the eternity, but not when gmorgan export a MidiFile, if X point is not present gmorgan stops in sequence bar 128.

The 8 and 16 buttons meants "ritmic" anticipation, gmorgan plays the chord in the next bar in the las 8 or 16 position of the bar. Of course that has effect if the pattern has ritmic anticipation in their music contents. Please see the song FourAntiR.gmsong for an example.

The slider selects the bar position for start the song, carefully with this because if the selected bar does not contain a pattern number, gmorgan search for the last pattern number, but that can produce unexpected results because starts with the first bar of the pattern in the selected bar, anyway when gmorgan finds the next pattern change all turn to the correct way.


Global Drum Edit

This window is a mix of scrolls, and sometimes are not perfectly graphic buffered, maybe will be better in future versions.

Click on the instrument note to select and hear the instrument.

Click on a grid and drag to change the value or use the keyboard to enter the desired value.

Instrument Copy: Copy bars form the selected instrument only. Bars Copy : Copy bars from-to.


Utils

The Keyb Window

This is the "funny" chord virtual keyboard. Is divided in two sections, a musical keyboard and a box keyboard. That's the "clickered chord" :-)

In the musical keyboard part, click on the note desidered.

In the box keyboard use left and rigth click for obtain the different notes.

The Selector

Select what kind of values you wanna change (Sounds, Patterns or Styles) then enter in the computer keyboard the selected value and pres Return, gmorgan change the Sound. Pattern or Style to the desired value.

Also numbers are assigned to some keys in this way:

Key Number
A 1
Z 2
E 3
R 4
T 5
Y 6
U 7
I 8
O 9
P 0

Backspace and Supr keys clear entry even the entry displays the actual sound, pattern or style. Also the Arrows are dsiponible:

The MasterVolume

This is a MIDI volume, when is activated adds a percentage volume to the "saved" volume of each channel, in fact multiply (0-1.25) the volume of each channel.


The skins

My fist attempt to skin something. Skins rigth know only works for the main window, the others will be added in future versions. You need to know the name of the fltk widgets of gmorgan and some patience for do new skins, run fluid (the Fast Ligth GUI Tollkit) and load GMORGAN.fl located at the /src in the sources package, and you can obtain this names. If you have problems email me, also we hope to add some help in the new webpage about this.

The skin file contents is located in the default installation directory and contains the skin changes in this format:

Dont use blank spaces in the SkinName.

The changes are the functions implemented in this format:

WidgetName Function Value Value

Example:

TECLADODE 1 345

That changes the color for the TECLADODE widget to the value 345 (Fltk RGB function).

Here the list of functions and values implemented:

Function Description Value1 Value2
0 Hide -- --
1 Color Number --
2 Box type Boxtype (see bellow) --
3 Label Color Number --
4 Label Font Number --
5 Label Size Number --
6 Label Type Labeltype (see bellow) --
7 Position Pos x Pos y
8 Size Heigth Width
9 Selection Color Number --
10 ImageLabel Path to a file --
11 Align Aligntype (see bellow) --

BoxTypes

Put this text as Boxtype, hope you understand what is what, anyway you can check each one.

FL_NO_BOX, FL_FLAT_BOX, FL_UP_BOX, FL_DOWN_BOX, FL_UP_FRAME, FL_DOWN_FRAME, FL_THIN_UP_BOX, FL_THIN_DOWN_BOX, FL_THIN_UP_FRAME, FL_THIN_DOWN_FRAME, FL_ENGRAVED_BOX, FL_EMBOSSED_BOX, FL_ENGRAVED_FRAME, FL_EMBOSSED_FRAME, FL_BORDER_BOX, _FL_SHADOW_BOX, FL_BORDER_FRAME, _FL_SHADOW_FRAME, _FL_ROUNDED_BOX, _FL_RSHADOW_BOX, _FL_ROUNDED_FRAME, _FL_RFLAT_BOX, _FL_ROUND_UP_BOX, _FL_ROUND_DOWN_BOX, _FL_DIAMOND_UP_BOX, _FL_DIAMOND_DOWN_BOX, _FL_OVAL_BOX, _FL_OSHADOW_BOX, _FL_OVAL_FRAME, _FL_OFLAT_BOX, _FL_PLASTIC_UP_BOX, _FL_PLASTIC_DOWN_BOX, _FL_PLASTIC_UP_FRAME, _FL_PLASTIC_DOWN_FRAME, FL_FREE_BOXTYPE

Labeltypes

Put this text as Labeltype, hope you understand what is what, anyway you can check each one.

FL_NORMAL_LABEL, FL_NO_LABEL, _FL_SHADOW_LABEL, _FL_ENGRAVED_LABEL, _FL_EMBOSSED_LABEL, _FL_MULTI_LABEL, _FL_ICON_LABEL, _FL_IMAGE_LABEL, FL_FREE_LABELTYPE

AlignTypes

Put this text as Aligntype, hope you understand what is what, anyway you can check each one.

FL_ALIGN_CENTER, FL_ALIGN_TOP, FL_ALIGN_BOTTOM, FL_ALIGN_LEFT, FL_ALIGN_RIGHT, FL_ALIGN_INSIDE, FL_ALIGN_TEXT_OVER_IMAGE, FL_ALIGN_IMAGE_OVER_TEXT, FL_ALIGN_CLIP, FL_ALIGN_WRAP, FL_ALIGN_TOP_LEFT,FL_ALIGN_TOP_RIGHT, FL_ALIGN_BOTTOM_LEFT, FL_ALIGN_BOTTOM_RIGHT, FL_ALIGN_LEFT_TOP, FL_ALIGN_RIGHT_TOP, FL_ALIGN_LEFT_BOTTOM, FL_ALIGN_RIGHT_BOTTOM, FL_ALIGN_NOWRAP

Some Hints about the images

gmorgan can load at this moment .png .jpg files.

Remember in fluid images are image-labels, if you plan to put images, first you need to put the labeltype of the widget as a FL_NORMAL_LABEL, and align the image inside the widget puting the widget align to FL_ALIGN_CLIP and then the image function.

Another important thing is the main window is resizable, and the images are not tiled, is your responsability to put a image with reasonable size in each widget.

See the skin examples.


That's all folks, please ... remember to send me patterns or skins , i'm involved in improve this "small" program and help are welcome.