ofxPd


#102

There’s a trick to speed up table loading via using a smaller block size within a subpath. Check the pd-list archives.


#103

This might be a few years late, but I added info on setting the audio background mode for iOS projects to the readme: https://github.com/danomatika/ofxPd#running-app-in-the-background-on-ios


#104

Attention @cerupcat, et al.

I created a “reinit” branch which automatically reinits the libpd audio settings if the current values are different than the incoming sound stream values aka buffer size & number of channels. This should be helpful on iOS since the incoming buffer size seems to change depending on other apps.

You can find it here: https://github.com/danomatika/ofxPd/tree/reinit

Please test this and let me know if it’s working. My tests seem fine but I don’t have the newest hardware or a ton of other audio apps.

Related discussion: How to get audio buffersize through Audio Unit RemoteIO


#105

Awesome, thanks! I’ve been using a somewhat hacky way of doing this in the past, but this solution is much better. I’ll give it a try when I can get a few minutes.


#106

Went ahead and merged the reinit branch. Seems to be working as far as I can tell. Note: produces a verbose log print on a change, so turn on verbosity when debugging.


#107

have you guys had issues recently using ofSoundPlayer with ofxPD?

Once an ofSoundPlayer has been played the mic input to PD then sounds like a saw/square wave


#108

I haven’t tried it, no. I bet ofSoundPlayer is somehow changing the samplerate and/or buffer size of the sound stream.

Why not use [readsf~] in your patch and send it the full path to the file to play?


#109

Sorry, i should have followed up…
I found that i had to define the AudioSession Category, ofSoundplayer seemed to set it as just Playback, not Playback and record.
Also I’ve found that ofSoundplayer crashes on iPhone 6s, i beleiiive to be because of the 48Khz capability


#110

iPhone 6S is locked to 48k, regardless of what you try to set. We noticed this with libpd & the Obj-C wrapper.


#111

oh ok, interesting. so to have it work on 6S properly, would you set the sample rate of PD to 48khz?


#112

Yes. It’s always 48KHz no matter what you try to tell CoreAudio to use.


#113

gotcha, so it’s a case of making sure that sample calculations for timings etc within PD are done using a value relative to the sample rate, not just a fixed int of 44100.


#114

ofxPd now updated to libpd 0.9.0 which include pd vanilla 0.47-0:

  • new clone object
  • expr now BSD licensed

Also, now that OF uses C++11, ofxPd now uses the PdBase std::mutex.

It is recommended to regenerate your projects with the ProjectGenerator as there are new pd source files and a define which needs to be set for the mutex.


#115

ooo lovely stuff!
Is the current ofxPD working on Android? I’ve tried to implement, but with no avail


#116

Hey guys, I am interested in using this addon too. But I am on Windows so wondering if it’s even remotely possible: I don’t use Code::block anymore, looking for a solution for either Visual Studio or Qt Creator.

So far I couldn’t find anything compiling but looking at the libpd page, I see that it can be compiled on Windows using msys2, which is installed on my computer since it is needed for Qt Creator.
Do you guys have any hint if it would be possible to compile libpd with msys2, then include it in Qt Creator for example?

Thanks


#117

If the openFrameworks Project Generator can generate QT Creator project files, it should build fine in QT Creator as long as it’s using MinGW & the gcc compiler on Windows. libpd currently doesn’t compile well in Visual Studio, but should be fine in gcc.


#118

I’ve updated ofxPd to use Semantic Versioning. The changelog has been updated and ofxPd-specific version tags to replace the previous tags which were based on OF versions.


#119

I tried to include ofxPD in a Project but I became a linker error, 30 duplicate symbols. I tried to compile the examples, but was the same, again 30 duplicate symbols.
I found some similar posts, but I couldn’t find any solutions. I looks like there is a problem with “g_list_all.h” . I follow the instructions from Readme file. The errors are lister below.
I’m working with OF 0.98 on OSX Sierra, Xcode 8.3
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_array.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_bang.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_canvas.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_clone.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_editor.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_graph.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_guiconnect.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_hdial.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_hslider.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_io.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_mycanvas.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_numbox.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_readwrite.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_rtext.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_scalar.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_template.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_text.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_toggle.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_traversal.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_vdial.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_vslider.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
g_vumeter.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
m_binbuf.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
m_pd.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
s_inter.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
s_loader.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
x_array.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
x_misc.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
x_scalar.o
duplicate symbol _glist_reloadingabstraction in:
g_all_guis.o
x_text.o
ld: 30 duplicate symbols for architecture x86_64


#120

Did you do this in your Xcode project?

You will also need to include some additional C Flags for building the libpd source:

-DHAVE_UNISTD_H -DUSEAPI_DUMMY -DPD -DLIBPD_EXTRA -DLIBPD_USE_STD_MUTEX


#121

Yes. The following flags are included under “Apple LLVM 8.1 - Custom compiler Flags -> Other C flags: -DHAVE_UNISTD_H -DUSEAPI_DUMMY -DPD -DLIBPD_EXTRA -DLIBPD_USE_STD_MUTEX -DHAVE_LIBDL”