< Back to IRCAM Forum

OM-pd - New OpenMusic library

Hi,

I developed an OpenMusic Library to work with PureData. It is similar to OM-Sox but with PureData. You can check the article where I explain (English) how it works in this link: Article Link. In the article, I used OM-Sharp, but it is the same object.

You can download it on: GitHub - charlesneimog/OM-pd: OM-pd aims to put the PureData (mainly offline mode) inside OM-Sharp and OpenMusic. It could help to work with processing a lot of samples using VST plugins, SoundFont, and general audio processing.

I composed this piece using it: Ideias Roubadas II (2021) - YouTube

On Windows (pd.exe) and Mac (pd), you need to specify where the pd executable is.

It works on my computer, but I did not test it on MacOS, so please report errors.

5 Likes

Hi Charles,

thanks for sharing !
I did a mirror project so as to “host” your lib in a more visible way.
https://forum.ircam.fr/projects/detail/om-pd/

I look forward having fun with it !

1 Like

Hi Charles!
In Portuguese (Eu vou escrever essa resposta em inglês porque talvez as soluções encontradas possam ser úteis para outros usuários).

I’m trying to run your library on my Mac and I’m having some issues (listed below):

  • I had to change the function “ompdGetPdExe” in order to make the library find the correct file “pd” (code below).
  • I’ve renamed all files from /resources/pd-patches/ (all spaces were removed from all pathnames).

(defun ompdGetPdExe ()
(let* (
(pd-exe
#+Windows(if (equal *app-name* “om-sharp”) (ompd-list->string-fun (list (namestring (get-pref-value :externals :PureData)))) (ompd-list->string-fun (list (namestring PD-EXE))))
#+mac (if (equal *app-name* “om-sharp”) (namestring (get-pref-value :externals :PureData)) (concatenate 'string (directory-namestring *PD-EXE*) “pd”)) ;(namestring *PD-EXE*)) **<===
#+linux(if (equal *app-name* “om-sharp”) (get-pref-value :externals :PureData) PD-EXE)
)
(pd-executable
(if (and (not (equal (software-type) “Linux”))
(not (equal (software-type) “Darwin”))) ;;;<===added this line with "and"
(if (not (or (equal (type-of (read-from-string pd-exe)) 'string) (equal (type-of (probe-file (read-from-string pd-exe))) 'pathname)))
(progn
(om::om-message-dialog “Error: Pd executable not found, set in Preferences”)
(if (equal *app-name* “om-sharp”)
(om::abort-eval)
(om::om-abort)))))))
; probe for pd executable

Now I believe PureData was found (It opens in background), but nothing happens when I try to run your first demonstration patch.

When I run “pd-open-patches” I’ve got this:

OM => #<mp:process Name “Open PureData” Priority 0 State “Running”>
:: /Applications/Pd-0.54-1.app/Contents/MacOS/pd -d 0 -audiooutdev 0 /Users/phraposo/OM/Libraries/OM-pd/resources/Pd-Patches/1-mk-senoide.pd

And I also can see an opened app called Wish.

When I try to run “pd~” nothing happens and I have to abort.

I’ve also noted that every time I run a function a new instance of PD is opened too.
Captura de Tela 2024-03-21 às 19.46.12

Do you know how to fix this?

Many thanks!

Best,
Paulo