Git Product home page Git Product logo

mididings's People

Contributors

aldanor avatar askask avatar dsacre avatar spotlightkid avatar wkoziej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mididings's Issues

Microtonal tunings

This is not an issue, but a question. Is it possible to do microtonal adjustments on single midi-notes of a specific track? And if so, how?

Won't build with clang 5+ on OSX

Because unordered_map is no longer in tr1 namespace in libc++ (see e.g. https://groups.google.com/forum/#!topic/ceres-solver/RWAvy0TbI4A or http://stackoverflow.com/questions/7870897/why-some-include-files-only-reside-in-tr1)

In file included from src/engine.cc:13:
src/engine.hh:22:10: fatal error: 'tr1/unordered_map' file not found
#include <tr1/unordered_map>
         ^
1 error generated.
error: command 'clang' failed with exit status 1

One way to handle this on all platforms, I guess, is to use unordered_map from boost (since boost is used already anyway).

Pass() >> Port(n) // Print('xyz') outputs to port 1 as well (jack)

When using 'jack' or 'jack-rt' backend, when the command Print() is in parallel with another command, such as Pass() or Transpose(), and that the command sends to a port number higher than 1, it also causes port 1 to activate.

Consider:

config(
  backend='jack',
  in_ports = 1,
  out_ports = 2,
)
run(
  Pass() >> Port(2) //
  Print('test')
)

This will output MIDI signals to port 1 and 2. The workaround I am using is to simply use a dummy port 1 and leave it unused.

Feature suggestion: make mididings hotplug-capable

It would be nice if mididings was hotplug-capable, so that when I plug in a device after it was started the ports get automatically connected; the same way already existing devices are.
This would be especially useful on a setup with a headless computer were you can't easily check whether all ports are connected or restart.

Error if scene init_patch is not a list

When assigning a scene's init_patch, a TypeError occurs upon running mididings if the init_patch is not a list.
i.e. This raises an error:
run(scenes={ 1:Scene('myScene',Pass(), Pass() ) })
while this does not:
run(scenes={ 1:Scene('myScene',Pass(), [Pass()] ) })
Notice the second Pass(), which is the init_patch.

I am not sure whether this is desired behaviour since it is not clear from the documentation.

Did not run in python 3.6.4 ?

I received the following. Suggestions?

Traceback (most recent call last):
  File "./Distribute", line 30, in <module>
    from mididings import *
  File "/usr/lib/python3.6/site-packages/mididings-2015-py3.6-linux-x86_64.egg/mididings/__init__.py", line 13, in <module>
    import _mididings
ImportError: dynamic module does not define module export function (PyInit__mididings)

mididings is not listed on PyPI

For this reason it is not easily installable via pip.

mididings should have a PyPI entry and the latest source distribution package should be hosted there.

At the moment one needs to know/use the URL of the source distribution to install with pip:

pip install http://das.nasophon.de/download/mididings-20120419.tar.gz

send bank and program change on portsplit

HI, I can't find how to send both program and bank change on a specific port. my setup is :
8: Scene("amsynth - sweptbass",
PortSplit({
'nomad25': Output('am1', 1, 108),
'lpk25': Transpose(0) >> Output('ch1', 2)}
),
),

which sccessfully change to the good sound on amsynth, except that it doesn't change the "bank".
I have read on the reference guide :
Output(port, channel, program=None, volume=None, pan=None, expression=None, ctrls={})

Routes incoming events to the specified port/channel. Optionally, when switching to the scene containing this unit, a program change and/or arbitrary control changes can be sent. To send a bank select in addition to the program change, program can be a tuple with two elements, where the first element is the bank number, and the second is the program number.

could you give me an example on the syntax of the "tuple", I might miss something, here is what I tried :
8: Scene("amsynth - sweptbass",
PortSplit({
'nomad25': Output('am1', 1, (4,108)),
'lpk25': Transpose(0) >> Output('ch1', 2)}
),
),

I want to change to bank 4 and program 108... Thanks

mididings links to wrong libboost_python version when shell has non-english locale

When running python setup.py install with a Python version >= 3 and the shell locale is set to something causing gcc to output non-english messages, the lib_dirs function in setup.py fails to return the proper list of library directories, because it can not parse the gcc output. The result is that libboost_python3.so is not found in the usual library dirs (i.e. /usr/lib) and setup assumes the Boost library name to be libboost_python.so. On my system (Arch-based) this version of libboost_python links to the Python 2 library. As a result, mididings will be linked to the wrong library and an import will fail with an ImportError or even a segmentation fault

This can be fixed by prepending LC_ALL=C to the gcc command run via getstatusoutput. I'm not sure whether this is a Bash-ism, but it should work on OS X as well. Another solution would be to use subprocess.check_output([cc, '-print-search-dirs'], env={}), which also eliminates the use of a subshell, but it need Python >= 2.7.

Also, lib_dirs should normalize the library directories to make the compiler putput much nicer to read.

Fix for SubSceneSwitch with an offset value < 0 and wrap = True

When the SubSceneSwitch offset value is < 0 and wrap is True, n eventually becomes < 0 and SubSceneSwitch stops working. To correct this, after calculating the remainder, check for n < 0 and if true then add num_subscenes to n. This will give n the intended offset value in both directions.

Here's the fix (just the if (n < 0) {...} statement):

if (_wrap) {
    n %= engine.num_subscenes();
    if (n < 0) {
        n += engine.num_subscenes();
    }
}

Here's an example from a mididings script in which I map the two rightmost control pads on a Korg nanoPAD2 controller to cycle up and down through a list of sub scenes (wrap is True by default).

ControlMap.append( KeyFilter(PadMap["U8"]) >> SubSceneSwitch(offset = -1) )
ControlMap.append( KeyFilter(PadMap["L8"]) >> SubSceneSwitch(offset = +1) )

I will create a pull request, but again I'm wondering about the maintenance of this excellent project since the last pull request processed was 5 years ago.

ubuntu 21.04: /usr/bin/ld: cannot find -lboost_python

cannot find libboost-python-dev on ubuntu, when doing final linking stage

git clone https://github.com/dsacre/mididings.git
cd mididings
sudo apt install -y libjack-jackd2-dev libboost-dev libboost-python-dev libboost-thread-dev 
./setup.py build
./setup.py install

output:

⏚ θ127° [id:~/.builds/mididings] master ± ./setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/mididings
copying mididings/unitrepr.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/scene.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/overload.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/constants.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/patch.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/misc.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/__init__.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/arguments.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/event.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/util.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/setup.py -> build/lib.linux-x86_64-3.9/mididings
copying mididings/engine.py -> build/lib.linux-x86_64-3.9/mididings
creating build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/call.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/init.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/filters.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/splits.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/modifiers.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/generators.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/__init__.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/base.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/printing.py -> build/lib.linux-x86_64-3.9/mididings/units
copying mididings/units/engine.py -> build/lib.linux-x86_64-3.9/mididings/units
creating build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/key_color.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/per_channel.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/polyphony.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/latch.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/osc.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/gm.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/floating_split.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/dbus.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/ctrl_sysex.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/inotify.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/__init__.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/panic.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/pedal_noteoff.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/memorize_scene.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/voices.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/engine.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/suppress_pc.py -> build/lib.linux-x86_64-3.9/mididings/extra
copying mididings/extra/harmonizer.py -> build/lib.linux-x86_64-3.9/mididings/extra
creating build/lib.linux-x86_64-3.9/mididings/live
copying mididings/live/livedings.py -> build/lib.linux-x86_64-3.9/mididings/live
copying mididings/live/osc_control.py -> build/lib.linux-x86_64-3.9/mididings/live
copying mididings/live/widgets.py -> build/lib.linux-x86_64-3.9/mididings/live
copying mididings/live/__init__.py -> build/lib.linux-x86_64-3.9/mididings/live
running build_ext
building '_mididings' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
creating build/temp.linux-x86_64-3.9/src/backend
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/backend/alsa.cc -o build/temp.linux-x86_64-3.9/src/backend/alsa.o
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/backend/base.cc -o build/temp.linux-x86_64-3.9/src/backend/base.o
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/backend/jack.cc -o build/temp.linux-x86_64-3.9/src/backend/jack.o
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/backend/jack_buffered.cc -o build/temp.linux-x86_64-3.9/src/backend/jack_buffered.o
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/backend/jack_realtime.cc -o build/temp.linux-x86_64-3.9/src/backend/jack_realtime.o
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/engine.cc -o build/temp.linux-x86_64-3.9/src/engine.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from src/midi_event.hh:19,
                 from src/patch.hh:16,
                 from src/engine.hh:15,
                 from src/engine.cc:13:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/patch.cc -o build/temp.linux-x86_64-3.9/src/patch.o
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/python_caller.cc -o build/temp.linux-x86_64-3.9/src/python_caller.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from src/midi_event.hh:19,
                 from src/python_caller.hh:15,
                 from src/python_caller.cc:13:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/python_module.cc -o build/temp.linux-x86_64-3.9/src/python_module.o
src/python_module.cc: In function ‘void mididings::init_module__mididings()’:
src/python_module.cc:163:24: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
  163 |     PyEval_InitThreads();
      |                        ^
In file included from /usr/include/python3.9/Python.h:145,
                 from src/config.hh:17,
                 from src/python_module.cc:12:
/usr/include/python3.9/ceval.h:130:37: note: declared here
  130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wfatal-errors -fvisibility=hidden -fvisibility-inlines-hidden -DVERSION=2015+rbbec99a -DENABLE_ALSA_SEQ=1 -DENABLE_JACK_MIDI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/id/.platformio/penv/include -I/usr/include/python3.9 -c src/send_midi.cc -o build/temp.linux-x86_64-3.9/src/send_midi.o
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.9/src/backend/alsa.o build/temp.linux-x86_64-3.9/src/backend/base.o build/temp.linux-x86_64-3.9/src/backend/jack.o build/temp.linux-x86_64-3.9/src/backend/jack_buffered.o build/temp.linux-x86_64-3.9/src/backend/jack_realtime.o build/temp.linux-x86_64-3.9/src/engine.o build/temp.linux-x86_64-3.9/src/patch.o build/temp.linux-x86_64-3.9/src/python_caller.o build/temp.linux-x86_64-3.9/src/python_module.o build/temp.linux-x86_64-3.9/src/send_midi.o -lboost_python -lboost_thread -lasound -ljack -lglib-2.0 -o build/lib.linux-x86_64-3.9/_mididings.cpython-39-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lboost_python
collect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
⏚ θ127° [id:~/.builds/mididings] master 1 ± 

async is now a reserved word, beginning in python 3.7

async is now a reserved word, beginning in python 3.7. This throws a syntax error in file mididings/units/call.py. Just needs the variable to be renamed, something like a_sync, or anything else will do. I've tested in my own build and that seems to be the only issue. Thanks! -Ross

Error running interactive shell: 'module' object has no attribute '_start_backend'

I just stumbled on your GitHub repo, very cool to see mididings is continuing to evolve!

I'm trying to run the interactive shell with mididings -J -s and am getting this error:

Traceback (most recent call last):
  File "/usr/bin/mididings", line 282, in <module>
    app.run_interactive(args[0] if len(args) else None, False)
  File "/usr/bin/mididings", line 152, in run_interactive
    mididings.engine._start_backend()
AttributeError: 'module' object has no attribute '_start_backend'

same error when I use -A or -R too, and I can run it in print mode just fine
(haven't tested anything else yet) I didn't notice any errors while compiling, so I'm assuming it is installed correctly?

Not run on python 2.7

I have a fresh instalation of mididings:
$python --version
Python 2.7.15rc1

$ mididings
Traceback (most recent call last):
File "/usr/bin/mididings", line 18, in
import mididings
File "/usr/lib/python2.7/dist-packages/mididings/init.py", line 13, in
from mididings.setup import config, hook
File "/usr/lib/python2.7/dist-packages/mididings/setup.py", line 13, in
import _mididings
ImportError: dynamic module does not define init function (init_mididings)

I have no idea how to get rid of this error.

In the last time I have feeling that Linux is corrupted a lot these days. :-((

ProgramFIlter acting as if SuppressPC is running

I am trying to filter messages by program change numbers or continuous control numbers and send them to a specific port with the following code:

(ProgramFilter(6,7,8,9,10) | CtrlFilter(96,97,98,99,100)) % Port('UMC204')

This works, but when I try to send the same program change number more than once, all messages after the first one are filtered out, unless I send some other message or PC number in between. This is how I understand SuppressPC() to work, but I did not include that, and I need to be able to send repeated program change messages.

Is there some option to change this behavior, or some other workaround to get the same result?

Thank You,
Ted

Arpeggiator

What is the right approach to write an arpeggiator using mididings?

couldn't find package 'jack'

Hello,

I am trying to install mididings but am running into this issue: "couldn't find package 'jack'"

I am new at using terminal but here is what I have installed:
-Mac OS High Sierra
-Python 2.7.10
-Python 3.6.5
-pip 10.0.1 from /Library/Python/2.7/site-packages/pip (python 2.7)
-jackOSX Version 0.92_b3
-jackdmp 1.9.11

A run through what I have tried:
-downloaded the ZIP from mididings github
-installed Jack 2 for OS X going through the installation menu
-in the terminal I cd to the mididings folder and trying to install I get the following:

mididings-master$ ./setup.py build [--disable-jack-midi] [--disable-alsa-seq]
couldn't find package 'jack'
mididings-master$ ./setup.py install
couldn't find package 'jack'
mididings-master$

Any idea what I am doing wrong?

mididings crashes on ARM

I tried to run mididings on my RaspberryPi. When I use a script which contains scenes, it crashes as soon as it gets any events:

# cat crash.py 
from mididings import *

run(
    scenes = {
        0:  Scene("Test Scene",
                Transpose(3) >> Channel(2)
            ),
    },
)
# mididings -f crash.py &
[1] 256
# aconnect -l
(...)
client 20: 'nanoPAD' [type=kernel]
    0 'nanoPAD MIDI 1  '
client 128: 'mididings' [type=user]
    0 'in_1            '
    1 'out_1           '
# aconnect 20:0 128:0
(after pressing a pad:)
[1]+  Segmentation fault      (core dumped) mididings -f crash.py

This doesn't happen in scripts which don't contain scenes.
I uploaded the core dump here: http://akling.org/tmp/core.mididings.0.5d87128af0374910a869ef16357bd834.256.1412381814000000.xz

Python 3.11 : AttributeError: module 'inspect' has no attribute 'formatargspec'.

Need help to fix this problem

File "/home/stefets/src/.venv/mididings/lib/python3.11/site-packages/mididings-2015+r5ec70c1-py3.11-linux-x86_64.egg/mididings/arguments.py", line 73, in call
'%s%s' % (f.name, inspect.formatargspec(*signature)),
^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'formatargspec'. Did you mean: 'formatargvalues'?

RPN & NRPN support

are RPN & NRPN going to be supported directly as their own types of events ?

of course, workarounds and kludges can be done, but a lot of hardware using them, so it would be much better to support them directly.

mididings should use setuptools

So that python setup.py develop and other extensions, which make development easier, are supported.

Changing:

from distutils.core import setup, Extension

in setup.py to:

try:
    from setuptools import setup, Extension
except ImportError:
    from distutils.core import setup, Extension

should be enough.

Organ Short Octave in mididings

Dear Sirs,
Before I try to program it myself, I ask if someone has not done it already.

Old organs have so called short octave:
https://en.wikipedia.org/wiki/Short_octave

In the deepest octave:
if you press E it plays C, Similarly:
F# - > D
G# -> E
the rest keys and notes remains the same
notes C#, D#, F#, G# are simply missing.
I need a mididings script to practice on this crazy keyboard before I go to real organ with a short octave.
Up to now I have this:

[ ~KeyFilter(notes=['c1', 'c#1', 'd1', 'd#1','e1', 'f#1', 'g#1']), KeyFilter(notes=['e1', 'f#1', 'g#1']) >> Transpose(-4)] >>
May be you have something smarter.

Thanks
Xerostomus

current_scene() in init patch returns previous scene number

When using current_scene() in an init patch, the returned scene number is still the previous scene.
Example:
Scene y's init patch is Process(myFunc), and in myFunc I call current_scene().
When switching from scene x to scene y, current_scene() within scene y's init patch (i.e. within the myFunc call) returns x and not y.

Can´t find the right start

Hi everybody,
I try to find a startpoint to run mididings.
But everytime I give a command to the commandline i get a failure.
e.g.
image

Is there a tested workaround, that I can go step by step?
Thanx for helping

'git' version not compatible with Boost 1.60

The stable version seems to work fine with Boost 1.60, but the 'git' version gives me the following at runtime:

TypeError: No to_python (by-value) converter found for C++ type: boost::shared_ptr<mididings::backend::BackendBase>

NoteOn with zero velocity are discarded

The documentation mentions: "When sending events through a MIDI output port, or by using the Sanitize() unit, velocities greater than 127 will automatically be reduced to 127, and events with a velocity less than 1 will be removed."
This is a problem with AKAI control surfaces which use a MIDI note on with zero velocity for turning LEDs off.
Please provide a way for zero velocity note ons to pass through (either by a compile flag, by a runtime option, or by a function argument).
Thank you!

Connect to jack-rt ports with their alias

[sent that message twice to the ML and subscribed to it, but messages don't show up there]

Hi,

I'd like to subscribe to jack midi ports by using their aliases, as port
names might change.

E.g., jack-lsp -lA reports:

[...]
system:midi_capture_3
   alsa_pcm:Arturia-KeyStep-32/midi_playback_1
   Arturia-KeyStep-32:midi/playback_1
	port playback latency = [ 0 0 ] frames
	port capture latency = [ 0 0 ] frames

I can establish the connection if I use 'system:midi_capture_3' in
mididings, but if I use 'alsa_pcm:Arturia-KeyStep-32/midi_playback_1' or
'Arturia-KeyStep-32:midi/playback_1', it fails:

warning: regular expression 'alsa_pcm:Arturia-KeyStep-32/midi_playback_1' didn't match any JACK MIDI ports

Even wildcards, like '.*Arturia.*', won't establish the connection.

Any suggestions?

Thanks!
Ralf

Using mididings engine from C++

Hi @dsacre!

I'm @jofemodo from zynthian project. We are thinking of using mididings for our new "core", that it's planned to be C++. I can't find anything about how to use mididings engine as a C++ library, but i don't see any reason for not doing so.
Please, could you give me some tips or examples of how can we use the mididings engine from C++, without using the "Python UI"?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.