MIDI and recording
In Linux the JACK 'system' inputs and outputs are limited to what you physically have on your soundcard, but inputs and outputs of the software that connects to JACK are controlled by said software.
In the preferences in PD you can specify how many input and output channels you want PD to use.These channels will show up in the JACK patchbay under 'puredata'.
The DAW that I use is Ardour, and when you add tracks in the program, those channels show up in the JACK patchbay. Each track will get an input and an output that can be connected to the input or output of another program. In this case you want your outputs from puredata to connect to the inputs of the individual tracks in Ardour.
If you don't see the inputs and outputs from puredata or your DAW in the JACK patchbay then:
- your software is not connecting to JACK...it's probably connecting directly to ALSA
or - you are starting the software before you start JACK, in which the software isn't getting registered with JACK, and JACK can't manage the connections.
I'll make some screenshots for you if that will help
Export patch as rtas?
@Maelstorm said:
If you're on OSX, jack can be used as an insert plug-in so you can avoid the separate tracks, but you still get the latency.
which you can, depending on your host, eliminate by setting the track delay for the track with the plugin. So if the buffer is 512 sample/11.82 ms then set the delay to that and it should be spot on.
I've had the whole Jack graph latency explained to me numerous times by Stephane Letz and it still doesn't go in.....Heres what he told me...
> > Its the Pd > JAck > Ableton latency. (Ableton has otoh 3 different
> > ways of manually setting latency compensation - I'm just not very
> > clear on where to start with regards to input from JAck)
> >>>>
>
> This is NO latency introduced in a Pd > JAck > Ableton kind of
> chain; the JACK server activate each client in turn (that is Pd *then*
> Ableton in this case) in the *same* given audio cycle.
>
> Remember : the JACK server is able to "sort" (in some way) the graph
> of all connected clients to activate each client audio callback at the
> right place during the audio cycle. For example:
>
> 1) in a sequential kind of graph like IN ==> A ==> B ==> C ==> OUT,
> JACK server will activate A (which would typically consume new audio
> buffers available in machine audio IN drivers) then activate B (which
> would typically consume "output" just produced by A) , then activate
> C , then produce the machine OUT audio buffers.
>
> 2) in a graph will parallel sub-graph like : IN ==> A ==> B ==> C
> ==> OUT and IN ==> D ==> B ==> C ==> OUT (that is both A and D are
> connected to input and send to, then JACK server is able to
> activate A and D at the same time (since the both only depends of IN)
> and a multi-core machine will typically run A and D at the same time
> on 2 different cores. Then when A *and* D are finished, B can be
> activated... and so on.
>
> The input/output latency of a usual CoreAudio application running
> is: driver input latency + driver input latency offset + 2
> application buffer-size + driver output latency + driver output
> latency offset.
>
this next part is the important bit i think...
> For a graph of JACK clients: driver input latency + driver input
> latency offset + 2 JACK Server buffer-size + ( one extra buffer-
> size ) + driver output latency + driver output latency offset.
>
> (Note : there is an additional one extra buffer-size latency on OSX,
> since the JACK server is running in the so called "asynchronous" mode
> [there is also a "synchronous" mode without this one extra buffer-size
> available, but it is less reliable on OSX and we choose to use the
> "asynchronous" mode by default.])
>
> Stephane
>
No audio, WTF?
You say you have other app running. Maybe when they load they steal the output - check your routing in Jack
otherwise...
Assuming you;re in Jack mode in Pd, Jack router doesn't show 'pure data' in the routing list no?
Sometimes Pd doesnt deregister itself from Jack i found - say if you have crash. The pd engime is still leftover and relaunching Pd wont fix it because the old 'engine' is blocking it. Does the output in pd say something like Jack returned error 33?
Latency Jack OS X/portaudio firewire soundcard
So I'm running on 1.33GHz Powerbook G4, OS X 10.3.9 Panther.
Is Panther why Jack is worse than portaudio or am I simply configuring Jack poorly?
I don't need Jack to do any funny business...I simply need it to route audio from pure data out dac 1 2 and dac 5 6 to my firebox (soundcard) and then to the amp. (I also have inputs on ADC 1-4). So I don't need any virtual ins outs whatnot - the only time I got it working I did have to setup "routing" so that "puredata out0" is connected to "firebox out1" etc... Should I mess with the buffer? I also unchecked everything in preferences/ jack router because I was pissed - maybe I should leave some of those checked? But I do not need the router - at all - I can't run another app anyway with what PD is doing.
With portaudio I run a 100ms buffer in puredata - with Jack, it all went to hell, but I'm really hoping to get down to 50ms so that I'm not a f'in 16th note behind.
That said, I'm going to get a PC when I'm not poor...yeah right, I live in the States...20% unemployment...before the riots and looting start (maybe I should wait it out actually). Anyway, I'll start a thread for dream computers but I'm pretty single-minded right now:
3GHz processor
1GHz front-side bus (or one of those fancy new things that's faster than FSB if I can afford it.) FYI, my G4 has 133MHz FSB...ewww.
Load Debian.
Load Puredata.
Also, is there any way to put priority to audio above the GUI? - I'm running close to 10 16-step sequencers and other graphics that give me info, but I don't need them to run well - I wish there was a separate graphics buffer.
How do you guys use PD with other audio programs?
didnt know jack also worked for windows xp?
EDIT:just downloaded jack from the website,but i get all kinds of errors when i try to unzip?
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open Versions\Current\Headers (jack-1.9.2\bin\osx_32bits\Jackmp.framework\Headers --> Versions\Current\Headers)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open Versions\Current\Jackmp (jack-1.9.2\bin\osx_32bits\Jackmp.framework\Jackmp --> Versions\Current\Jackmp)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open Versions\Current\Resources (jack-1.9.2\bin\osx_32bits\Jackmp.framework\Resources --> Versions\Current\Resources)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create ersions\Current\Headers
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Jackservermp
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Resources
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open jack-1.9.2\bin\osx_32bits\Jackservermp.framework\Resources (A --> jack-1.9.2\bin\osx_32bits\Jackservermp.framework\Resources)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Panda
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Resources
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open jack-1.9.2\bin\osx_32bits\Panda.framework\Resources (A --> jack-1.9.2\bin\osx_32bits\Panda.framework\Resources)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Headers
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Jackmp
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Resources
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open jack-1.9.2\bin\osx_64bits\Jackmp.framework\Resources (A --> jack-1.9.2\bin\osx_64bits\Jackmp.framework\Resources)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Headers
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Jackservermp
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Resources
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open jack-1.9.2\bin\osx_64bits\Jackservermp.framework\Resources (A --> jack-1.9.2\bin\osx_64bits\Jackservermp.framework\Resources)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Panda
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create Versions\Current\Resources
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot open jack-1.9.2\bin\osx_64bits\Panda.framework\Resources (A --> jack-1.9.2\bin\osx_64bits\Panda.framework\Resources)
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Symbolic link points to missing file
! C:\Documents and Settings\administartor\Desktop\jack audio\jack-1.9.2.tgz: Cannot create
Ubuntu Studio 9.04 and pd-extended
Yeah but OSS doesn't work either. Will mess around with both ALSA and OSS settings within pd a little more, but seems like my only option is jack even if it keeps crackling.
I wouldn't know about mac, but so far Linux has been the best option for me. Earlier I didn't have to do anything and everything worked automatically (Ubuntu Studio 7.10 for around a year and a half maybe), but as soon as I updated I've been having problems I don't seem to be able to solve.
EDIT: Ok my bad, I had jack running while I tried to use OSS, OSS works fine. But I would prefer some day (when I get better at pd) using it connected to other programs (Renoise), and when I try to use jack the terminal says: "cannot lock down memory for RT thread (Cannot allocate memory)" and jack gets dozens of xruns in seconds, so it crackles the whole time. The same thing with ALSA.
I tried to use OSS with jack but that didn't work at all, my mouse started lagging and the jack messages window was filled with "delay of 2656.000 usecs exceeds estimated spare time of 2621.000; restart ..."
How to run pd w/o gui?
I use:
pd -jack -alsamidi -nogui -open /some/file
but I still cannot see puredata in Jack Control 'Connections' window.
Same problem here. I use
pd -jack /some/file.pd but pd won't show up in the Jack Control Connections window. When I change to ALSA manually after pd launched I get an error (obviously) since Jack already uses the alsa output. After changing back to Jack in pd it suddenly works.
Another question: how can I set "audio ON" straight from the command line?
PD-Jack synchronization
After searching for a while I found a very interesting PD object:
jack_transport~
(The code is available at http://artdent.homelinux.net/svn/jack_transport~/ )
it's very useful for my application. It can have in PD information about the jack transport like:
BPM
Ticks
beat
measure
I use the command line application jack_transport as master control to set the BPM and other tempo settings for the jack transport.
Then i can finally synchronize PD and Hydrogen.
Audio routing for windows (Jack for windows)
I use jack with Pd on OSX, so I don't know if this helps or not. But to run Pd with jack, you first fire up the jack server via JackPilot. You thn select jack from the Media menu, which I noticed is not on my Windows Pd-extended. But basically what this does is open Pd's Audio Settings window and automatically change the driver to the JackRouter. (By the way, Gobbi, I hate to burst your bubble, but this considerably speeds up Pd on OSX as well.) Doing this shows Pd in JackPilot's Connections Manager (sometimes I have to close and reopen the window first) without having to start Pd's dsp.
Beyond that, there's a video on youtube showing jack, Live, and Pd in Windows:
Pd output to another audio software
under preferences:
input device1: jack, channel 2
output device1: same as input.
compute audio is checked on
under the media menu:->port audio:
input device 1 : jack router 2 channels
output device 1: jack server 2 channels
under the media menu->jack
input device1: jack, channel 2
output device1: same as input. channel 2
the machine i'm using is a g5 xserve machine with a virtual output, located in a rack far away from me, behind the locked doors of an IT dept that has granted me remote desktop access. Though while it was at my place it was connected to an USB audio interface it had sound output when doing the audio/ MIDI tests or just patching an oscillator.
I'm not doing realtime audio output but recording to an mp3. my mp3 contains sounds generated from oscillators and samples, but none from the MIDI instrument i am triggering inside pd and played through simple synth.
Curiously jack display in its routing window both pd and simple synth, but also another instance of pd, named: pure_data_0, though i don't have two instances of pd running simultaneously.
I emailed jackosx and stephane letz replied back saying:
"Last time i checked the way PureData access jack, it was just broken! I mean the PD jack
code (implemented in a s_audio_jackd.c) has several problems, one of which is *never*
correctly closing the jack client. This could explain the fact you see several instances
of jack client.
I suggest to send a mail to PD developer and signaling the problem."
his comments makes me think the same problem cold be encountered using soundflower. so before i go down that patch, i'd rather finish thoroughly troubleshooting this combo, with the help of other users...
jean