MOM - mother with oled screen and multipage support v1.2

mom_banner

MOM is yet another mother patch, but that I made for my developing needs.
If you don’t know what this is, think of it like a Organelle emulator, that let you run and develop organelle patches on your computer.

FEATURES:

  • Pretty accurate representation of the organelle screen. There is support for /oled/gFlip /oled/gClear /oled/gSetPixel /oled/gLine /oled/gBox /oled/gFillArea /oled/gCircle /oled/gFilledCircle /oled/gPrintln /oled/gInvertArea /oled/gInvertLine /oled/gShowInfoBar, screenLines and a bunch of other calls.
  • Support of the note buttons, aux, encoder, vol, foot pedal, knobs, led light, etc. All mapped to keyboard keys.
  • It’s tiny and cute :slight_smile:

How to launch the SCREEN

  • The emulated screen is made with pygame. To launch it you will need to do one of these:
    A - If you are on Windows just run oled.exe and that’s it.
    B - If you are not on Windows, or you don’t want to run a executable, you will need to have installed Python 3, and the pygame and python-osc modules. Once you have installed all this, just run oled.py.

  • the OLED toglebox on MOM.pd is for updating/restarting the screen. Be sure to have it checked.

UPDATE 1.1:

  • Change the name to something less e d g y
  • Added a .exe for those people in windows that don’t want to install python.
  • Now there is support for multipage patches!
    I test it with Zone and Jeraphy and they run fine.
    Keep in mind that to be able to run these patches on desktop, you should disable their versioncheck object! To do this, just bypass it, and connect [loadbang] directly to the [t b b] object like this:
    bypass

UPDATE 1.2:

– OLED Window’s size can be set from the script.
– Added a panic button.
– Fix bugs in the encoder. Now it send the correct calls.
– Added a reboot button for the Oled.
– Added expression pedal.

Some test of the screen:

gif_drawave
gif_pianelle

gif_poke
gif_pong
gif_roll

DOWNLOAD from patchstorage

15 Likes

This looks incredible. Thanks a lot for sharing this!

Thanks for creating this. Run on OSX and all fine except OLED. All dependencies running fine, but never got the Oled working. Comms fine. A trigger object had the wrong type but fixed. Would have liked to try the latest version but it doesn;t seem available anymore. Many thanks, P

Hello! thanks for your interest.
Also, I take this chance to say sorry I have been out of touch with the community. I’m still trying to stabilize with the pandemic, and were not able to recover my organelle. So sorry for all the unanswered questions everywhere.

About Mom: some patches were a little finicky to turn on the screen. Try different sequences of: starting Mom, then the patch, then the olen window, then the ON oled on mom, then restart the oled from the Mom patch. If not work, try starting the oled first, then the patch you want, or reboot the patch, after you have the oled listening to messages.

As you notice, apparently patchstorage links are broken…
I uploaded Mom and all my releases and unreleased patches on github. So this are the new links:

---- MOM ----

---- OTHER PATCHES AND INSTRUMENTS ----

2 Likes

Hi, no problem at all and thanks for your reply. I hope you are felling much better. Thanks for the links. I will try the different combinations of starting the components and see what happens. I have everything installed now so hopefully will manage to get it working. It is a great idea, thanks, P

1 Like

Hi, did you manage to make it work under OSX ? I aslo get an error even though pygame and python-osc are installed. It kind off worked once but now the frame juste won’t load. It works fine in debian though.

That’s what I get if it can help anyone understand what’s wrong

Blockquote
pygame 2.0.1 (SDL 2.0.14, Python 3.9.1)
Hello from the pygame community. https://www.pygame.org/contribute.html
assets/organelle.ttf
2021-01-29 00:00:47.668 Python[1558:131288] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
0 AppKit 0x00007fff32448607 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 378
1 AppKit 0x00007fff3246a27e -[NSThemeFrame _tileTitlebarAndRedisplay:] + 98
2 AppKit 0x00007fff32494ace -[NSTitledFrame _titleDidChange] + 217
3 AppKit 0x00007fff3249457c -[NSTitledFrame setTitle:] + 713
4 AppKit 0x00007fff32494204 -[NSThemeFrame setTitle:] + 50
5 AppKit 0x00007fff32457f6a -[NSWindow _dosetTitle:andDefeatWrap:] + 210
6 libSDL2-2.0.dylib 0x000000010ca1d35e Cocoa_SetWindowTitle + 110
7 display.cpython-39-darwin.so 0x000000010cbfeecf pg_set_caption + 159
8 Python 0x000000010c303f7d cfunction_call + 125
9 Python 0x000000010c2c526d _PyObject_MakeTpCall + 365
10 Python 0x000000010c39b99c call_function + 876
11 Python 0x000000010c398e33 _PyEval_EvalFrameDefault + 25219
12 Python 0x000000010c2c5a38 function_code_fastcall + 104
13 Python 0x000000010c399543 _PyEval_EvalFrameDefault + 27027
14 Python 0x000000010c2c5a38 function_code_fastcall + 104
15 Python 0x000000010c39b90c call_function + 732
16 Python 0x000000010c398e12 _PyEval_EvalFrameDefault + 25186
17 Python 0x000000010c2c5a38 function_code_fastcall + 104
18 Python 0x000000010c39b90c call_function + 732
19 Python 0x000000010c398e12 _PyEval_EvalFrameDefault + 25186
20 Python 0x000000010c2c5a38 function_code_fastcall + 104
21 Python 0x000000010c2c7ac2 method_vectorcall + 274
22 Python 0x000000010c4402b6 t_bootstrap + 70
23 Python 0x000000010c3f1a69 pythread_wrapper + 25
24 libsystem_pthread.dylib 0x00007fff60f2b2eb _pthread_body + 126
25 libsystem_pthread.dylib 0x00007fff60f2e249 _pthread_start + 66
26 libsystem_pthread.dylib 0x00007fff60f2a40d thread_start + 13
)
2021-01-29 00:00:47.668 Python[1558:131288] WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future.
2021-01-29 00:00:47.669 Python[1558:131285] !!! BUG: The current event queue and the main event queue are not the same. Events will not be handled correctly. This is probably because _TSGetMainThread was called for the first time off the main thread.
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2021-01-29 00:00:47.673 Python[1558:131285] pid(1558)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
Serving on (‘127.0.0.1’, 3000)
^CTraceback (most recent call last):
File “/Users/clemens/Downloads/Organelle/organelle-emulator-master/oled.py”, line 204, in
server.serve_forever()
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socketserver.py”, line 232, in serve_forever
ready = selector.select(poll_interval)
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/selectors.py”, line 416, in select
fd_event_list = self._selector.poll(timeout)

I haven’t got it working at all, in fact, I gave up as it was wasting my time. Am using “Stepmum” instead and works straight away without all the config nonesense…

I got this working on OSX; see this pull request on the repository:

the issue is that only the main thread can display on osx. My workaround was to put the drawing in the main thread, and in the thread that the socket is receiving on queue an event that contains the drawing instruction. (and then in the main/drawing thread dispatch the instruction to the right function in the main event loop)
thanks for all the work @varicela

edit: also check out my “downstream” branch for added gWaveform and gInvert support

1 Like

It should world on OSX now :slight_smile:
thanks to @sebshader for fixing it!