New Engine : Aeolus


#1

Following ou discussion on another thread, I’ve successfully ran Aeolus on Zynthian.
All the configuration has been done on the command line, so there is no real engine integration for now, but this should now be easy as it is known to work.

Here below is the process i did :slight_smile:


Zynthian RPI install Aeolus HOWTO

  1. connect to your box
    ssh -Y root@zynthianIP

  2. install aeolus
    root@zynthian:~# apt-get install Aeolus

  3. start Aeolus
    root@zynthian:~# aeolus &

  • (X window is opening on local computer, Aeolus is creating stops files automaticly with blinking buttons, wait a moment)
  • shell says : “Can’t open ‘/root/.aeolus-presets’ for reading” as the file does not exist
  1. lsit jack ports to check is it ok
    root@zynthian:~# jack_lsp
    system:playback_1
    system:playback_2
    ttymidi:MIDI_in
    ttymidi:MIDI_out
    Zyncoder:output
    Zyncoder:input
    aeolus:out.L
    aeolus:out.R
    aeolus:Midi/in

  2. connect audio and midi ports
    root@zynthian:~# jack_connect aeolus:out.L system:playback_1
    root@zynthian:~# jack_connect aeolus:out.R system:playback_2
    root@zynthian:~# jack_connect ttymidi:MIDI_in “aeolus:Midi/in”

  3. set Aeolus midi ports
    go to aeolus panel, open MIDI window, select midi channel for the keyboards (P,I,II,III)

(simple and fast screenshots here in french https://doc.ubuntu-fr.org/aeolus#installation )

  1. play
    play on you midi keyboard and Voilà !

aeolus process is using ~15% cpu on RPi2 when idle


PART 2 : mididings filter

  1. install mididings
    root@zynthian:~# apt-get install mididings

  2. start script
    root@zynthian:~# python aeolus.py &

  3. start alsa midi bridge
    root@zynthian:~# a2jmidid &

  4. list jack ports
    root@zynthian:~# jack_lsp
    system:playback_1
    system:playback_2
    ttymidi:MIDI_in
    ttymidi:MIDI_out
    Zyncoder:output
    Zyncoder:input
    aeolus:out.L
    aeolus:out.R
    aeolus:Midi/in
    a2j:Midi Through [14] (capture): Midi Through Port-0
    a2j:Midi Through [14] (playback): Midi Through Port-0
    a2j:aeolus [128] (playback): In
    a2j:mididings [129] (playback): in_1
    a2j:mididings [129] (capture): out_1

  5. disconnect jack midi ports (if connected)
    root@zynthian:~# jack_disconnect ttymidi:MIDI_in aeolus:Midi/in

  6. connect midi ports
    root@zynthian:~# jack_connect ttymidi:MIDI_in “a2j:mididings [129] (playback): in_1”
    root@zynthian:~# jack_connect “a2j:mididings [129] (capture): out_1” aeolus:Midi/in

  7. set Aeolus midi ports
    go to aeolus panel, open MIDI window, select midi channel for CONTROL

  8. play
    play on you midi keyboard and Voilà !
    Notes are still going through, and CC filter is ready

(see video if i can upload somwhere)


I’m really happy with it, great latency, superb sound !

One more hint : after you clicked “Save” on Aeolus interface, files are created
Writing ‘/usr/share/aeolus/stops/Aeolus/definition’
Writing ‘/root/.aeolus-presets’
Writing ‘/usr/share/aeolus/stops/Aeolus/definition’
Writing ‘/root/.aeolus-presets’

Can someone help to create the necessary engine/script files to be able to use Aeolus as an instrument ?

The wiki page http://wiki.zynthian.org/index.php/Zynthian_Devel_Engine doesn’t says much about starting another program like mididings (needed for stops control)


#2

I don’t think, @jofemodo will approve mididings as requirement.
It has to be setup without.


#3

If the CC calculations could be done without mididings (integrated zynhian midi filter ?) Then hopefully we can have it working.
Unless we could display the aeolus Gui, not having acces to the CC control renders the software useless.


#4

You might have a look at -

Which is pretty short and clear.

I think the CC issue will sort itself with the midi changes coming along but all this boring clerical work of making the zynengine file for it needs to be done as well.


#5

@hammerandtongs yes i will do this file so the engine can be started as is for now.

The midi CC input of Aeolus is just non standard, In order to change a button state (called a “stop”), you need to send two CC messages.
So declaring something like [‘reverb’,91,4,127,‘reverbmix’] would not make sense.

May we do the midi tweaks inside this file or is it just declarative ?


#6

Well looking here - https://github.com/zynthian/zynthian-ui/blob/a084967b541bbf2ee41233dd52366aa053b90c6c/zyngine/zynthian_engine.py#L386

It looks like a straight mapping. This is part of where whatever new midi remapping logic would have to go in concert with some kind of logical way of describing the behaviour via the zynengine file for the synths.


#7

you are absolutely correct !
with a keyword in the controllers definition, one could hope for a change from “Default implementation uses a static controller definition array” to “a little bit of python code to change the midi messages” :slight_smile: (and that’s exactly what the mididings script does)


#8

videos here
setup
play


#9

Hi @jerash,

Great work!! Could you give some examples of MIDI mapping with mididings and eolus?
I will come back from holidays the Next week and i will give a deeper look …

Thanks!!


#10

Hi,

Midi mapping is « simple »

  1. all midi NOTE messages go thru, nothing to do with those, whatever midi channel.
  2. I have not tried PC and Bankchange messages explained here under.
  3. CC messages used to enable/disable a button in aeolus need to be « filtered » with a special calculation, that’s exactly what the mididings script does (in python with a convenient library), and is self-explanatory :
def aeolus_button(ctrl, group, button):
    return CtrlFilter(ctrl) >> CtrlValueSplit(64,
        [ Ctrl(98, 0x50 | group), Ctrl(98, button) ],
        [ Ctrl(98, 0x60 | group), Ctrl(98, button) ]
    )

run(
    Filter(CTRL) % (
        [ aeolus_button(     n, 0, n) for n in range(12) ] +
        [ aeolus_button(12 + n, 1, n) for n in range(13) ] +
        [ aeolus_button(25 + n, 2, n) for n in range(16) ] +
        [ aeolus_button(41 + n, 3, n) for n in range(16) ]
    )
)

A « Stop » is the pipe organ name for panel buttons enabling a certain pipe sound.
The script is expecting on input :

  • a CC message between 0-56
  • a value < 64 means : deactivate button
  • a value >= 64 means : activate button
    Those CC message are mapped to the 57 buttons of the Aeolus default instrument.

Aeolus is expecting 2 CC98 messages (default defined in global.h at compilation) to move one button, because buttons are organised into « groups » and you first need to explicitly select the group, this is where the calculation occurs when a message is received.
The first CC message to send is the « group » selection
The second midi message to send is the « button » action

Examples (calculation by head, hopefully correct) :
When the script receives a CC 07 with value 32, it means switch off the seventh button, and translates to :

  • CC 98,0x50 (select group 0, and set off)
  • CC 98,0x06 (on seventh button of this group)
    When the script receives a CC 13 with value 90, it means switch on the thirteenth button (first button of group 1), and translates to :
  • CC 98,0x61 (select group 1, and set on)
  • CC 98,0x01 (on first button of this group)

here under is the explanation in details from https://github.com/fugalh/aeolus :

The protocol uses one controller number. The default is #98, but you
can change this in global.h. The message is accepted only on channels
enabled for control in the midi matrix.

The value is interpreted as follows:

v = 01mm0ggg

  This type of messages (bit 6 set) selects a group, and either
  resets all stops in that group or sets the mode for the second
  form below.

  mm = mode. This can be:

     00  disabled, also resets all elements in the group.
     01  set off
     10  set on
     11  toggle

  ggg = group, one of the button groups as defined in the instrument
  definition. In the GUI groups start at the top, the first one (for
  division III) being group #0.

  The values of mm and ggg are stored and need not be repeated unless
  they change.

v = 000bbbbb

  According to the current state of mode, this command switches a
  stop on or off, or toggles its state, or does nothing at all.

  bbbbb = button index within the group.

  Buttons are numbered left to right, top to bottom within each
  group. The first one is #0.

Presets can be set and recalled with the MIDI Program Change message. The bank
of presets can be selected with the bank select message.

1100cccc 00sppppp
Program change (on channel c): set or recall program §. If s is 0,
preset is recalled, if s is 1 preset is stored

1011cccc 00000000 000bbbbb
Bank select on channel c.

As always the message is only accepted on channels enabled for control in the
midi matrix.

hope this helps

Raphaël


#11

this part is not implemented int the mididings script for sake of simplicity, that’s why it always send 2 CC98 message, which doesn’t hurt.


#12

OK! Understand …
I’m thinking the best way of integrating mididings as an advanced option. Why not? :wink:

Regards,