Newby python, newby mididings

105 views
Skip to first unread message

Norbert Schreiber

unread,
Jan 28, 2020, 4:56:30 AM1/28/20
to mididings
Hello,
congratulations for your mididings project.
As far as I can see mididings can do all the things I want to do, but ...

I'm a newby with all that stuff and so I need more tutorials etc.
For example: I've updated my Raspi 3B and installes mididings with apt-get install mididings.
Than I inserted the first example (transpose.py), saved it and started it in the commandline with: python transpose.py
But the Raspi says: No module named 'mididings'

Please excuse my bad english and my stupid question. Perhaps there is a page where I can go step by step ...
I'm looking foreward to have a nice midicontroller.🌈🎶🎹💥

Ralf Ramsauer

unread,
Jan 28, 2020, 5:17:34 AM1/28/20
to midi...@googlegroups.com, Norbert Schreiber
Hi Norbert,

On 28/01/2020 10:56, Norbert Schreiber wrote:
> Hello,
> congratulations for your mididings project.
> As far as I can see mididings can do all the things I want to do, but ...

pretty sure you can! :-)

>
> I'm a newby with all that stuff and so I need more tutorials etc.
> For example: I've updated my Raspi 3B and installes mididings with apt-get install mididings.
> Than I inserted the first example (transpose.py), saved it and started it in the commandline with: python transpose.py
> But the Raspi says: No module named 'mididings'

Your default python interpreter is probably python3, and I guess you
distro's doesn't come with mididings python3 support.

Try to enforce python2 with:

#!/usr/bin/env python2

Which, honestly, sucks, as python2 is EOL. Or - short advertisement
session - try my branch that comes with python3 support:

https://github.com/rralf/mididings

Which me reminds me of the idea to maybe fork to mididings-ng, as there
seems to be no upstream work...

>
> Please excuse my bad english and my stupid question. Perhaps there is a page where I can go step by step ...
> I'm looking foreward to have a nice midicontroller.🌈🎶🎹💥
Checkout Stephane's configs

https://github.com/stefets/live-config

Cheers
Ralf

norbert....@t-online.de

unread,
Jan 28, 2020, 9:40:59 AM1/28/20
to midi...@googlegroups.com
Hi Ralf,
Is. it possible to download an image?

von Norbert Schreiber gesendet

-----Original-Nachricht-----
Von: Ralf Ramsauer <ra...@vmexit.de>
Betreff: Re: [mididings] Newby python, newby mididings
Datum: 28.01.2020, 11:17 Uhr
An: midi...@googlegroups.com, Norbert Schreiber <norbert....@t-online.de>

--
You received this message because you are subscribed to a topic in the Google Groups "mididings" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mididings/JmHc4xk1QwE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mididings+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mididings/b0cdc726-2042-2fe6-398b-5a25c5d23390%40vmexit.de.

Ralf Ramsauer

unread,
Jan 28, 2020, 3:22:57 PM1/28/20
to midi...@googlegroups.com, norbert....@t-online.de
Hi Norbert,

On 1/28/20 3:39 PM, norbert....@t-online.de wrote:
> Hi Ralf,
> Is. it possible to download an image?

oeh, yes -- simply clone it or download it as zip. But you will have to
build it on your own. Simply follow the instructions in README.md.

Cheers
Ralf

>
> von Norbert Schreiber gesendet
>
> -----Original-Nachricht-----
> *Von:* Ralf Ramsauer <ra...@vmexit.de <mailto:ra...@vmexit.de>>
> *Betreff:* Re: [mididings] Newby python, newby mididings
> *Datum:* 28.01.2020, 11:17 Uhr
> *An:* midi...@googlegroups.com <mailto:midi...@googlegroups.com>,
> Norbert Schreiber <norbert....@t-online.de
> <mailto:norbert....@t-online.de>>
> You received this message because you are subscribed to the Google
> Groups "mididings" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mididings+...@googlegroups.com
> <mailto:mididings+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mididings/5e3047fa.1c69fb81.d0609.4bc4SMTPIN_ADDED_BROKEN%40gmr-mx.google.com
> <https://groups.google.com/d/msgid/mididings/5e3047fa.1c69fb81.d0609.4bc4SMTPIN_ADDED_BROKEN%40gmr-mx.google.com?utm_medium=email&utm_source=footer>.


--
Ralf Ramsauer
GPG: 73F94D11C85252CC

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 29, 2020, 7:15:24 AM1/29/20
to mididings
Hi all,

You can check out my procedure on how I build Mididings in my Wiki page


Thanks
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mididings/b0cdc726-2042-2fe6-398b-5a25c5d23390%40vmexit.de.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "mididings" group.
> To unsubscribe from this group and stop receiving emails from it, send

Ross Mohn

unread,
Jan 29, 2020, 1:06:20 PM1/29/20
to midi...@googlegroups.com
STEFETS: for your JACK Backend TODO, the solution on my UbuntuStudio v19.10 was:
sudo apt install libjack-jackd2-dev
and I then also had to do this for mididings to compile:
sudo apt install libboost-python-dev libboost-thread-dev
-Ross
To unsubscribe from this group and stop receiving emails from it, send an email to mididings+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mididings/0da86ad2-2d06-44fd-97ce-3722950f568f%40googlegroups.com.


STEFETS - https://github.com/stefets/live-config/

unread,
Jan 31, 2020, 7:41:01 PM1/31/20
to mididings
Hi Ross,

Thanks for your help for my installation procedure Wiki !

Great tip on the two boost libs, instead of liboost-all-dev which was overkill.

My last TODO is the optional dependencies for : 

Optional:

  • pyliblo (to send or receive OSC messages)
  • dbus-python (to send DBUS messages)
  • pyinotify ≥ 0.8 (to automatically restart when a script changes)
  • Tkinter (for the livedings GUI)
  • libsmf (to read/write standard MIDI files using the process_file() function)

To unsubscribe from this group and stop receiving emails from it, send an email to midi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mididings/0da86ad2-2d06-44fd-97ce-3722950f568f%40googlegroups.com.


Norbert Schreiber

unread,
Feb 27, 2020, 11:02:20 AM2/27/20
to mididings
Hi Mididingers,
here I am again. Please excuse my outtime, but I had no time to force mididings.

I have problems to start, because I'm new to python and the raspi. But I'll try it.
I try to do the first steps in the beginners tutorial.
But, for example
if I try to make the first example I hear no result.

I use a raspi 3B, a usb-midi-cable and a yamaha S80 in local-off-mode (for testing purposes)
I have done all the first steps (install mididings etc)
If i give aconnect 20:0 20:0 in the template the returning midi commands let the S80 play the notes.
But if I insert the first example (transpose (3)) the s80 says nothing.
I believe I have to insert the right midi-port-names. But I do not know how to do this.

I hope you can give me a tip for the further steps.

Fyi: I have build a zynthian and now I want to build an optimal user-interface to control my performances by footswitches, so that I do not use my fingers to do PChs or CC-changes etc.

I'm looking foreward to have a nice equipment. Thanks for your help!

STEFETS - https://github.com/stefets/live-config/

unread,
Feb 27, 2020, 11:21:23 AM2/27/20
to mididings
Hi, 

Can you post your python script ? That will help us to help you !

Norbert Schreiber

unread,
Feb 27, 2020, 3:42:17 PM2/27/20
to mididings

Hi,
I am using your script (Example 1) from mididings getting started (das nasophon)

from mididings import *
run(Transpose(3))

I've made the script, stored it in my md-folder  and started it there in the terminal using 

python transpose.py

The script runs, but the midi-commands do not make any sound in my s80-keyboard. 
So I think, I have to tell the raspi what ports are to use for midi-input and -output.
But if I use the python aconnect-command, the kb plays. But that's not my target, because I cannot control the midi-flow.

STEFETS - https://github.com/stefets/live-config/

unread,
Feb 27, 2020, 5:35:24 PM2/27/20
to mididings
Hi,

It's normal that nothing happen. You are missing important section in your script. 

Mididings is a good learning curve and I suggest you to go through all the documentation.

Then, check  differents scripts and Wiki about Mididings.

I have a huge setup with Midigings as brain so you can check it out on GIthub here : https://github.com/stefets/live-config

Check the file static.py in the bin folder.

Good luck !

norbert....@t-online.de

unread,
Feb 27, 2020, 5:52:56 PM2/27/20
to midi...@googlegroups.com
Thanx Stefets,

I'll try to go thru 'all the documents' 🤓😏



Gesendet mit der Telekom Mail App

-----Original-Nachricht-----
Von: STEFETS - https://github.com/stefets/live-config/ <stefe...@gmail.com>
Betreff: Re: [mididings] Newby python, newby mididings
Datum: 27.02.2020, 23:35 Uhr
An: mididings <midi...@googlegroups.com>

--
You received this message because you are subscribed to a topic in the Google Groups "mididings" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mididings/JmHc4xk1QwE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mididings+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mididings/cb9e96b6-127a-4923-a228-827ab2c28db7%40googlegroups.com.

Norbert Schreiber

unread,
Feb 29, 2020, 9:26:44 AM2/29/20
to mididings
So, I did my first steps. After adding the config command an adding the in- and output ports i could play my first notes using example 1 from the getting started document.

Now I have made a script with 8 buttons and they should send midi commands like note on and -off and they should switch scenes etc.
My problem is, that I don't find examples how to send midi commands
To unsubscribe from this group and all its topics, send an email to mididings+unsubscribe@googlegroups.com.

Norbert Schreiber

unread,
Feb 29, 2020, 9:34:23 AM2/29/20
to mididings
and to play a wav-file after pushing a button.

STEFETS - https://github.com/stefets/live-config/

unread,
Feb 29, 2020, 10:27:18 AM2/29/20
to mididings
Hi,

Mididings have a built-in patch for that and it's called the CONTROL PATCH.

The documentation is clear about that : 
The control, pre and post patches as well as any of the init patches are optional and can be omitted if they are not needed. The control patch can be used for any event processing that does not depend on the currently active scene.

You have to inject the control patch in the Run section
To unsubscribe from this group and all its topics, send an email to midi...@googlegroups.com.

STEFETS - https://github.com/stefets/live-config/

unread,
Feb 29, 2020, 10:30:17 AM2/29/20
to mididings
Hi,

I have encapsulated the mpg123 application inside my mididings script. It allows me to play mp3 file from my midi keyboard.

Again, check my file static.py in my bin directory and search for mpg123 and you will find how I control it.

Stef
To unsubscribe from this group and all its topics, send an email to midi...@googlegroups.com.

norbert....@t-online.de

unread,
Mar 1, 2020, 4:44:41 AM3/1/20
to midi...@googlegroups.com
Hi Stef,
I beliefe you are a gooood programmer and if I read your scripts, I can imagine how good it will be one time. But
yesterday I've looked for the Control Patch.
I did not fond it in static.py, not in the manual, not in getting started.
I did not find examples or options and I did not find syntax explanations.
Nothing.

Yes, I will go the long way and now I am doing excercises to get better python skills.
But it would help a lot, when you give examples, when you say what to import or define in the top of a script.
Thanks for understanding.
Yours
Norbert




Gesendet mit der Telekom Mail App

-----Original-Nachricht-----
Von: STEFETS - https://github.com/stefets/live-config/ <stefe...@gmail.com>
Betreff: Re: [mididings] Newby python, newby mididings

Datum: 29.02.2020, 16:27 Uhr
An: mididings <midi...@googlegroups.com>

To unsubscribe from this group and all its topics, send an email to mididings+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mididings/bf8ff8fa-044e-409f-82da-1f2a10834d44%40googlegroups.com.

STEFETS - https://github.com/stefets/live-config/

unread,
Mar 1, 2020, 2:57:00 PM3/1/20
to mididings
Hello Norbert,

Here is an example of the control patch :

My MIDI controller is a Behringer FCB1010

# The patch for the control patch in run section
fcb1010=(Filter(CTRL) >> CtrlSplit({
    20: SceneSwitch(offset=1),
    21: SceneSwitch(offset=-1),
    22: System("mpg123 -q example.mp3")),
}))

# The scenes for the run section
_scenes = {
    1: Scene("Initialize", init_patch=InitSoundModule, patch=piano_base),
    2: Scene("Trumpet", patch=trumpet),
}

# Verbose
_pre  = Print('input', portnames='in')
_post = Print('output',portnames='out')

# Run
run(
    control=fcb1010,
    scenes=_scenes,
    pre=_pre,
    post=_post,
)

CC20 Switch scene next
CC21 Switch scene previous
CC22 Play a MP3 file

Stef

Norbert....@t-online.de

unread,
Mar 2, 2020, 11:00:32 AM3/2/20
to midi...@googlegroups.com

Thanks,

I´ll try that in the next days.

Thanx for your work!

Norbert

 

 

 

-----Original-Nachricht-----

Betreff: Re: [mididings] Newby python, newby mididings

Datum: 2020-03-01T20:57:07+0100

An: "mididings" <midi...@googlegroups.com>

 

 

 

Hello Norbert,
 
Here is an example of the control patch :
 
My MIDI controller is a Behringer FCB1010
 
 
# The patch for the control patch in run sectionfcb1010=(Filter(CTRL) >> CtrlSplit({    20: SceneSwitch(offset=1),    21: SceneSwitch(offset=-1),    22: System("mpg123 -q example.mp3")),}))
# The scenes for the run section_scenes = {    1: Scene("Initialize", init_patch=InitSoundModule, patch=piano_base),    2: Scene("Trumpet", patch=trumpet),}
# Verbose_pre  = Print('input', portnames='in')_post = Print('output',portnames='out')

 

--
You received this message because you are subscribed to the Google Groups "mididings" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mididings+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mididings/931aff37-baa3-4fff-844b-11524ea60f7c%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages