[PD] ofxPd on Linux with Jack

Alexandros Drymonitis adrcki at gmail.com
Wed Jun 8 13:21:12 CEST 2016


Coming back to this thread since I've solved the issue, and even though
it's an openFrameworks thing, it might be helpful to others looking here.

I cloned openFrameworks from GitHub (
https://github.com/openframeworks/openFrameworks) and made the following
changes:
In the libs/openFrameworks/sound directory, I changed lines lines 96 and
224 from ofSoundStream.h, and line 25 from ofBaseSoundStream.h, replacing
UNSPECIFIED with JACK (to be honest, I'm not sure if this is really
necessary).
Then, in a test app with ofxPd, in testApp.h I included the following line
inside the testApp class:
ofSoundStream soundStream;

plus the sample variable rate like this:
int samplerate;

and in testApp.cpp, inside the setup function, I created an instance of the
ofSoundStreamSettings like this:
ofSoundStreamSettings settings;

I initialized the sample rate:
sampleRate = 48000;

then I setup JACK like this:
auto devices = soundStream.getDeviceList(ofSoundDevice::Api::JACK);
settings.setOutDevice(devices[0]);

and finally I made the ofSoundStreamSettings like this:
settings.setOutListener(this);
settings.sampleRate = sampleRate;
settings.numOutputChannels = 2;
settings.numInputChannels = 0;
settings.bufferSize = ofxPd::blockSize()*ticksPerBuffer;
soundStream.setup(settings);

Initially I left the settings of Dan:
ofSoundStreamSetup(2, numInputs, this, sampleRate,
ofxPd::blockSize()*ticksPerBuffer, 3);

but compiling failed and prompted me to use the ofSoundStreamSettings
object.


An that's it, it worked with JACK!

Thanks for the tips and Dan, thanks a lot for the addon, it's great!

On Thu, Jun 2, 2016 at 11:30 PM, Alexandros Drymonitis <adrcki at gmail.com>
wrote:

> Thanks for the tips guys. I'll try it out and if I manage I'll come back
> here for the record, even though it's an openFrameworks issue.
>
> On Wed, Jun 1, 2016 at 9:48 PM, ub at xdv <ub at xdv.org> wrote:
>
>> On 01.06.2016 17:55, Alexandros Drymonitis wrote:
>> > I'm trying to use the ofxPd addon and even though the examples provided
>> > compile fine on my computer exchanging data between OF and Pd (I did
>> some
>> > tests with some modified examples too), I can't find a way to use the
>> addon
>> > with Jack.
>>
>> i have no direct experience, but maybe this part of the readme is
>> interesting for you:
>> """
>> libpd as utilized in ofxPd does not handle any of the audio interfacing
>> itself, but is called via the ofSoundStream system within
>> OpenFrameworks. If you have any issues with the sound interface / audio
>> apis themselves, please log an issue to the OpenFrameworks Github repo.
>> """
>>
>> https://github.com/danomatika/ofxPd#audio-interfacing--debugging-audio-issues
>>
>> the topic of ofSoundStream with jack really seems to be curiously absent
>> from the public discussions. there is an old thread, suggesting to use
>> rtAudio, compiled with --enable-jack instead of ofSoundStream.
>> might be worth looking into:
>> https://forum.openframeworks.cc/t/openframeworks-with-linux-jack/4242
>>
>> > Any ideas? A search I did didn't seem to give any insight (of course
>> > someone might show up with a link with very specific instruction, but
>> > haven't found something myself).
>> > I'm on Debian Jessis XFCE with openFrameworks-0.8.4 and the respective
>> > ofxPd addon.
>>
>>
>>
>> >
>> > I also tried to find libpd's mailing list (or is it a forum?), but it
>> seems
>> > to be down, hence I'm sending the mail here.
>>
>> cheers,
>> ub
>>
>> >
>> > Thanks
>> >
>> >
>> >
>> > _______________________________________________
>> > Pd-list at lists.iem.at mailing list
>> > UNSUBSCRIBE and account-management ->
>> https://lists.puredata.info/listinfo/pd-list
>> >
>>
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> https://lists.puredata.info/listinfo/pd-list
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160608/23d4657e/attachment.html>


More information about the Pd-list mailing list