Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: falcon74 on December 03, 2019, 02:14:35 PM



Title: Graphical frontend for MMA still around ?
Post by: falcon74 on December 03, 2019, 02:14:35 PM
Hi,

Is there still some BIAB'esque graphical frontend for MMA around that still works reasonably well ? I tried LinuxBand, but I found that it needs JACK1 and conflicts with JACK2 -- as I understood from the information flashed by apt on my Ubuntu system.

cheers,
f74


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 03, 2019, 04:07:48 PM
If it is a front-end to MMA, why does it need Jack? MMA plays using a configurable MIDI player (default Timidity++).


Title: Re: Graphical frontend for MMA still around ?
Post by: bvdp on December 03, 2019, 04:25:32 PM
My understanding is that the program does (did?) require jack. I tried it once and offered some rejected suggestions. It does have a nice error checking feature, as I recall.

I use EMACS with mma-mode. My process is to edit a file, save it, play it using the -P option and repeat. I keep thinking that a gui would be nice ... but then I go back to emacs and wonder what the bit plus would be ... but, I'm a command line guy :)


Title: Re: Graphical frontend for MMA still around ?
Post by: falcon74 on December 04, 2019, 06:56:38 AM
Thanks @sciurius and @bvdp. Could never manage to catchup with EMACS (used to be a VIM fanboy) as a developer. From the MMA site, I notice that there is a SciTE plugin as well, might try it out.

IMHO the advantages of GUI (over a syntax-highlighting / checking / pretty-printing text editor) are:
  • Visualize the bars for entire song
  • Visualize the repetitive sections
  • Visualize progress when playing/improvising
  • Benefit from classified drop-down list of style, groove etc.

MMA is a great piece of software. If it had a GUI and some tutorial youtube videos it could well be on it's way to be a strong BIAB challenger in the Linux world (perhaps it still is, but as a newbie there is a not-too-easy learning curve).


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 04, 2019, 12:37:03 PM
I spent some time trying to get linuxband to run. Even when bypassing the jack part I get lost in lack of documentation and the config files.

One of the advantages of a GUI tool it that it can break the 'one measure per line' restriction. Often I would like to write song(part)s as

Code:
  1    Am   C    G   F
5   G   D7  E  E

to obtain 8 measures. (And no, multi-measure sequences are not a solution).


Title: Re: Graphical frontend for MMA still around ?
Post by: bvdp on December 04, 2019, 05:09:10 PM
Splitting up a line into multiples might be a good use for Plugin. Not sure from my view of the advanages, but each to their own :)

The code for the existing GUIs seems to be in PD so it should not be a big deal to get it to run. I've tried lemma in the past and it worked okay, but doesn't seem to like newer versions.


Title: Re: Graphical frontend for MMA still around ?
Post by: bvdp on December 04, 2019, 06:37:36 PM
Don't know what the changes are, or if this will help in the GUI front but there is a version of LinuxBand for Arch at

   https://aur.archlinux.org/packages/linuxband

courtesy of Jens. I'll ask him if he needed to make any changes later today. Looking at the deps on that page, you guys might just be missing bit of jack????
 


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 05, 2019, 12:39:53 PM
Splitting up a line into multiples might be a good use for Plugin.

I'm sot sure how to do that with plugins. At least not elegantly.


Title: Re: Graphical frontend for MMA still around ?
Post by: bvdp on December 06, 2019, 11:31:41 PM
Just got a note from my friend Jens and he says that LinuxBand works fine. But, you need to use python2. And, it works with both, JACK1 and JACK2.


Title: Re: Graphical frontend for MMA still around ?
Post by: falcon74 on December 07, 2019, 05:04:41 AM
Just got a note from my friend Jens and he says that LinuxBand works fine. But, you need to use python2. And, it works with both, JACK1 and JACK2.

Good to hear. I suppose it still needs changes to the build files, right ? The autoconfig script is definitely looking for the JACK(1) dev packages.
In my case the dependency check failed.


Title: Re: Graphical frontend for MMA still around ?
Post by: bvdp on December 07, 2019, 04:57:52 PM
You also need jack.h and libjackd.so. Keep us informed, please. What is your platform?


Title: Re: Graphical frontend for MMA still around ?
Post by: jr on December 07, 2019, 06:17:49 PM
Hi everybody, this is Jens. It thought it might be better, if I reply myself.

The auto configure script is looking for any JACK implementation >= 0.102.  (The line in configure.ac is: PKG_CHECK_MODULES(JACK, jack >= 0.102.0)). This does not necessarily mean JACK1. As for me, I have only installed JACK2 on my ArchLinux PC and it does build fine with the original auto config file. I am not sure about the deb package and its dependencies, thought. But it does compile and run with JACK2, though.

Best regards
JR


Title: Re: Graphical frontend for MMA still around ?
Post by: falcon74 on December 07, 2019, 06:47:10 PM
Much appreciated Jens. I will try to see if I can make progress then. Do not remember the exact error, but will retry.


Title: Re: Graphical frontend for MMA still around ?
Post by: falcon74 on December 09, 2019, 02:53:16 PM
Progress. Have Linux Band GUI started up now after a little bit of struggle sorting out the dependencies. The Autocofigure scripts helps with the C library dependency checks, but it doesn't help with the dependency check of the required Python modules and libraries. Here is what I had to do on my Lubuntu 19.10 setup.

Code:
$ sudo apt-get install libjack-jackd2-dev
$ sudo apt-get install libsmf-dev
$ sudo apt-get install python-glade2
$ sudo apt-get install gtksourceview2

The challenge was to find the right Jack2 dev library and stumbling a step at a time with Python dependencies.

However, I hear nothing playing when I hit 'Play' button on Linux Band with the default song loaded (6 bars with Dm / G7 / CM7 /). I have checked that JACKd is running (through Qjackctl), and that Qsynth is started and connection from linuxband (midi-out) to qsynth (midi-in) is made, qsynth (stereo audio-out) is made with system stereo-playback in. In the Qsynth message window I can see the MIDI events as well, as follows:

Code:
Type=176 (0xb0) Chan=00 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 0 120 0
Type=176 (0xb0) Chan=01 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 1 120 0
Type=176 (0xb0) Chan=02 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 2 120 0
Type=176 (0xb0) Chan=03 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 3 120 0
Type=176 (0xb0) Chan=04 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 4 120 0
Type=176 (0xb0) Chan=05 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 5 120 0
Type=176 (0xb0) Chan=06 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 6 120 0
Type=176 (0xb0) Chan=07 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 7 120 0
Type=176 (0xb0) Chan=08 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 8 120 0
Type=176 (0xb0) Chan=09 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 9 120 0
Type=176 (0xb0) Chan=10 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 10 120 0
Type=176 (0xb0) Chan=11 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 11 120 0
Type=176 (0xb0) Chan=12 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 12 120 0
Type=176 (0xb0) Chan=13 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 13 120 0
Type=176 (0xb0) Chan=14 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 14 120 0
Type=176 (0xb0) Chan=15 Key=120 (0x78) Val=000 (0x00).
fluidsynth: cc 15 120 0

The export to midi works fine (tried with fluidsynth). Will probably have to figure out what's up with Qsynth -- perhaps something not quite right with settings.


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 09, 2019, 06:44:22 PM
I could get it to run but never to pass the initialization. It kept complaining about missing and/or invalid config files (that I did not have, of course).


Title: Re: Graphical frontend for MMA still around ?
Post by: jr on December 10, 2019, 07:21:08 PM
@falcon74: Maybe a stupid question: did you load a proper soundfont into fluidsynth/QSynth?


Title: Re: Graphical frontend for MMA still around ?
Post by: falcon74 on December 11, 2019, 04:58:09 AM
Hi @jr,

Once you know where the default sound-font or the additional downloaded soundfonts are, all you need to do after starting up Qsynth is to click on the 'Setup' button, and on the pop-up you'd see a tab called 'Soundfonts'. Click it and the hit the button labelled 'Open', now use the file-browser popup to navigate to the directory where your soundfonts are, select one and hit OK. You should be good to go.

cheers,
f74


Title: Re: Graphical frontend for MMA still around ?
Post by: falcon74 on December 11, 2019, 07:03:26 AM
Linuxband - fully working !! Yay !

Had to do a bit of MIDI connection troubleshooting and reading of how MIDI routing works between JACK and ALSA, a2jmidi as a bridge tool and use of MIDI passthrough ports. Finally got it working. What really helped with the MIDI event monitoring function of Qsynth (enable it and see the Message window).

In Qjackctl, both of these connections work:

Option-1):
(a) MIDI-connection: linuxband-player.midi_out <--> a2j.FLUID Synth (PID)[xxx] (playback)...
(b) ALSA-connection: None

Option-2):
(a) MIDI-connection: linuxband-player.midi_out <--> a2j.MIDI Through [ZZ] (playback): MIDI Through Port-0
(b) XX: MIDI Through.0:Midi Through Port-0 <-->  YY: FLUID Synth (PID). 0: Synth Input port (PID:0)

Also, there seems to be something about the order of application startup, and perhaps a reboot after installing a2jmidid software that seems to have solved some of the routing and startup-order issues. Here is what did work for me (but other order of operations might be fine too):
- Reboot (I hope this is a one-time thing, after installing a2jmidid)
- JACK2d auto-started
- QJackCtl (no connections made)
- QSynth (Setup> MIDI > alsa_seq as the MIDI-driver & Enable-MIDI-input checkbox 'on')
- Linuxband (reconnect to JACK enabled and explicitly reconnected)
- QJackCtl to setup the connections explained above (option-1 or option-2)

Hopefully, others find this useful. Note that, I am using Lubuntu 19.10 but I think that the instructions should work well on any Ubuntu variant (Ubuntu, Xubuntu, Kubuntu etc.).


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 11, 2019, 10:58:34 AM
This is as far as I get:

Code:
% linuxband
(linuxband:2913): libglade-WARNING **: 11:57:54.814: could not find a parent that handles internal children for `vbox'
11:57:54 INFO save_config Saving configuration to '/home/jv/.linuxband/linuxband.rc'
11:57:54 ERROR __load_grooves_from_cache Unable to load grooves from cache '/home/jv/.linuxband/grooves.cache'
Traceback (most recent call last):
  File "/usr/share/linuxband/linuxband/mma/grooves.py", line 142, in __load_grooves_from_cache
    infile = file(fname, 'r')
IOError: [Errno 2] No such file or directory: '/home/jv/.linuxband/grooves.cache'
Traceback (most recent call last):
  File "/usr/bin/linuxband", line 77, in <module>
    main()
  File "/usr/bin/linuxband", line 67, in main
    Gui()
  File "/usr/share/linuxband/linuxband/gui/gui.py", line 512, in __init__
    grooves.load_grooves(True)
  File "/usr/share/linuxband/linuxband/mma/grooves.py", line 41, in load_grooves
    self.__grooves_model, grooves_list = self.__load_grooves()
  File "/usr/share/linuxband/linuxband/mma/grooves.py", line 90, in __load_grooves
    self.__do_load_grooves(grooves_list, self.__config.get_mma_grooves_path())
  File "/usr/share/linuxband/linuxband/mma/grooves.py", line 115, in __do_load_grooves
    grooves_list.append([gname, doc, gdesc, author, time, full_name])
UnboundLocalError: local variable 'doc' referenced before assignment


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 11, 2019, 11:44:35 AM
In Qjackctl, both of these connections work:

Option-1):
Option-2):


Do you know you can start TiMidity++ as a MIDI server? Just connect midi_out of the linuxband_player to one of the inputs of TiMidity++ and you're ready to go.
(Unless you want to play with Qsynth, that is...)


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 11, 2019, 04:20:18 PM
I use EMACS with mma-mode. My process is to edit a file, save it, play it using the -P option and repeat.

Emacs' MMA mode has a built in facility to play your current file: C-c C-p (mma-play).

Attached is a version of Emacs' MMA mode that I have enhanced with a preview command, C-c C-v (mma-preview). To use it, insert a line

Code:
/**** End Preamble ****/

in your file, at the end of the settings and definitions, i.e. just before the chords start.

Then you can select an arbitrary part of the chords and stuff and have just that part played using MMA. Of course, you need to select something that is playable :) .


Title: Re: Graphical frontend for MMA still around ?
Post by: bvdp on December 12, 2019, 04:28:17 PM
Nice to see mma.el getting some of the love and attention it deserves!


Title: Re: Graphical frontend for MMA still around ?
Post by: sciurius on December 12, 2019, 09:23:36 PM
I've put my fork of mma-el on GitHub: https://github.com/sciurius/mma-mode .