PD cuts off other sound on the computer
I did.
For command jackd I get this terminal output:
matjaz@matjaz-NV59C:~$ jackd
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
usage: jackdmp [ --no-realtime OR -r ]
[ --realtime OR -R [ --realtime-priority OR -P priority ] ]
(the two previous arguments are mutually exclusive. The default is --realtime)
[ --name OR -n server-name ]
[ --timeout OR -t client-timeout-in-msecs ]
[ --loopback OR -L loopback-port-number ]
[ --port-max OR -p maximum-number-of-ports]
[ --midi OR -X midi-driver ]
[ --verbose OR -v ]
[ --clocksource OR -c [ c(ycle) | h(pet) | s(ystem) ]
[ --replace-registry ]
[ --silent OR -s ]
[ --sync OR -S ]
[ --temporary OR -T ]
[ --version OR -V ]
-d backend [ ... backend args ... ]
Available backends may include: alsa, dummy, freebob, firewire or net
jackdmp -d backend --help
to display options for each backend
and for qjackctl:
The same control GUI opened where I clicked start.
15:38:11.262 Patchbay deactivated.
15:38:11.263 Statistics reset.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:38:11.286 ALSA connection graph change.
15:38:11.482 ALSA connection change.
15:38:19.241 Startup script...
15:38:19.242 artsshell -q terminate
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
sh: artsshell: not found
15:38:19.646 Startup script terminated with exit status=32512.
15:38:19.646 JACK is starting...
15:38:19.646 /usr/bin/jackd -dalsa -d/dev/dsp -r44100 -p256 -n2 -Xseq
15:38:19.649 JACK was started with PID=2544.
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot lock down memory area (Cannot allocate memory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
audio_reservation_init
Acquire audio card Audio-1
creating alsa driver ... /dev/dsp|/dev/dsp|256|2|44100|0|0|nomon|swmeter|-|32bit
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
Cannot initialize driver
JackServer::Open() failed with -1
Failed to start server
15:38:19.743 JACK was stopped with exit status=255.
15:38:19.745 Post-shutdown script...
15:38:19.746 killall jackd
jackd: no process found
15:38:20.153 Post-shutdown script terminated with exit status=256.
15:38:21.703 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:38:31.152 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:38:42.143 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
15:39:02.300 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
I'm lost.
PD cuts off other sound on the computer
Hi,
Yes.
I have turned on the computer and freshly started jackd. I start it from qjackcti (http://en.wikipedia.org/wiki/Qjackctl).
Error messages:
1. first window:
Could not connect to JACK server as client.
- Overall operation failed.
- Unable to connect to server.
Please check the messages window for more info.
2. Message window:
13:55:36.236 Patchbay deactivated.
13:55:36.254 Statistics reset.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:55:36.336 ALSA connection graph change.
13:55:36.559 ALSA connection change.
13:55:36.560 ALSA connection graph change.
13:55:38.356 Startup script...
13:55:38.357 artsshell -q terminate
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
sh: artsshell: not found
13:55:38.760 Startup script terminated with exit status=32512.
13:55:38.760 JACK is starting...
13:55:38.760 /usr/bin/jackd -dalsa -d/dev/dsp -r44100 -p256 -n2 -Xseq
13:55:38.798 JACK was started with PID=2106.
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot lock down memory area (Cannot allocate memory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
audio_reservation_init
Acquire audio card Audio-1
creating alsa driver ... /dev/dsp|/dev/dsp|256|2|44100|0|0|nomon|swmeter|-|32bit
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/dsp
control open "/dev/dsp" (No such file or directory)
Cannot initialize driver
JackServer::Open() failed with -1
Failed to start server
13:55:39.278 JACK was stopped with exit status=255.
13:55:39.279 Post-shutdown script...
13:55:39.279 killall jackd
jackd: no process found
13:55:39.700 Post-shutdown script terminated with exit status=256.
13:55:40.822 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:55:54.576 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:58:38.483 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
13:59:09.197 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
As you can see the last paragraph (...jjack server is not running or cannot be started...) then repeats itself over and over again every 30 seconds.
Seems like Jack isn't working??
Thanks.
Meditation background generator
I beg your pardon if this post is slightly offtopic and deals more with hardware than the patch itself, but it should take one more message for testing results to be complete:
@az said:
If PureData only uses 50% CPU, could it be the case, that you have a DualCore CPU?
Yes, all CPUs under consideration apparently had two cores, even Atom N280 on Eee - task manager shows two 1,66GHz cores. But I'm not sure its architecture has much in common with DualCore family. It looks slower than Core2Duo 1,66GHz. Well, anyway, it turns out that 50% CPU means 100% of one core under WinXP and Pd just can't distribute calculations between both cores to use more CPU in this case.
I just installed Ubuntu 10.10 NBR as 2nd OS on this Eee, and loaded this patch with Puredata Vanilla 0.42.6. It runs with no glitches at all with 44100Hz sample rate and 50ms audio buffer size! The same result with 48000Hz. But as I turned on 96000Hz, I even started hearing through glitches: "man, its just a netbook!" No matter what audio latency was set.
Task manager (named here "system monitor") showed 50-55% average usage of both cores (when 48kHz sample rate and 50 ms latency were set). Here it didn't mean that total usage was 100% (sometimes 80%-85% peaks appeared and again, no glitches). 50% CPU usage and no buffer underruns at all.
So, it's possible to use Eee with Atom N280 or later to make complicated patches, just under Linux. As for me, main problem is small screen, not Atom CPU, that's why I use it only for small abstractions and don't care what OS is installed. Also, if you'd use touchpad instead of mouse to work with Pd on Eee, I bet you'll say at least a couple of bad words in an hour of such torture.
Meditation background generator
Оk, and here are my test results:
-
Ubuntu Studio 64 bit, Pd-Vanilla 0.42-6, 2GB RAM, Core2Duo 2,66 GHz - all works well, 17% CPU approx. (96000Hz sample rate, 10ms buffer size! I love Linux
)
-
WinXP 32 bit, Pd-Extended 0.42-5, Asus EEE 1000HE, 1 Gb RAM, Intel Atom 1,66 GHz. Works glitchy (no matter what audio buffer size is). 30-50% CPU. After changing freezeverb.pd to a simpler version with less delay lines (attached to this post) - 20-40% CPU and normal sound (48000Hz sample rate, 100ms buffer size). Rare glitches, CPU% jumps up to 50% at these moments.
-
WinXP 32 bit, Pd-Extended 0.42-5, 1GB RAM, Core2Duo 1,88 GHz. Works well, no buffer underruns, 20-30% CPU. (48000Hz sample rate, 100ms buffer size).
-
Vista 32 bit, Pd-Extended 0.42-5, 2GB RAM, Core2Duo 2,33 GHz. Couldn't open.
So, if you have difficulties with CPU consumption, try to change freezeverb.pd to a simpler version attached to this post. It sounds very close to original one.
Cpu usage
Any sound I get from PD is full of clicks and other unpleasant, weird 'effects'. Even if I put just a noise~ and dac~ I cannot get clear sound. I'm sure it's because my computer is too slow. However, on every patch I've ever measured CPU, pd uses maximum 20% cpu, while about 5% is used by system & other apps. So I still have 75% cpu free. Anyway, pd cannot make use of this power and in the result the audio quality is quite poor. Running pd as root, in realtime mode doesn't help too much. Is there any way to simply improve pd's performance? I dunno, maybe changing bitrate or sth like that may result in better cpu usage, or maybe pd had a hardcoded limit forcing using less than f.e. 30% cpu?
Maybe a good tip is that I get many DIO errors, about 2 times / second there is a 'A/D/A sync error'. I use pd on Ubuntu Linux, and I always connect it to Jack Server.
Problem compiling external on Windows
Hey,
thanks to everyone who responded to my posts both here and in the mailing list. Since then, I've figured out how to compile externals written in C using Microsoft Visual C++ 2005. There's more to document, however, such as how to compile externals using some of the other Windows compilers (Borland, djgpp, etc.), and also how to compile externals written in C++ in Windows. But one thing at a time.
one little thing to note... steps 4 and 7 may seem a little roundabout, but they account for the fact that MSVC sometimes has trouble with spaces in directory names (eg. C://Program Files/). If anyone knows how to override this behavior, post a reply, and I'll try to simplify the steps accordingly.
Updated June 29, 2007:
use [b]C://Progra~1/[/b] instead of [b]C://Program Files/[/b],
use [b]C://Docume~1/[/b] instead of [b]C://Documents and Settings/[/b], etc.
So, without further ado...
How to compile a pd external written in C using Microsoft Visual C++ 2005:
Compared to Windows, linux offers a much more user-friendly environment for compiling pd externals. However, with a little patience, a usable environment can be set up in Windows, and the good news is that everything you need is available for free. There are several reputable Windows-compatible C/C++ compilers out there, but here I'll discuss compiling externals with Microsoft Visual C++ 2005 (MSVC for short).
1. Download and Install Microsoft Visual C++ 2005 Express Edition.
a. Click the link above, then click Go! in the Visual C++ box.
b. Run vcsetup.exe to install the program
(the setup wizard should guide you through the process).
2. Download [url=http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB9267
]Visual C++ 2005 Express Service Pack 1.
a. Click the link above to download the Service Pack.
b. Run VS80sp1-KB926748-X86-INTL.exe to install the program.
3. Create a new project:
a. Open Visual C++.
b. Open the New Project window (Ctrl+Shift+N).
c. In the Project Types pane, select Visual C++.
d. In the Templates pane, select emptyproj.
e. Enter object name (helloworld).
f. Leave Create directory for solution unchecked, and click OK.
4. Import the pd header file:
a. Get m_pd.h here, or, using pd-vanilla (not pd-extended):
1. Open Windows Explorer or My Computer.
2. Navigate to the pd/src/ directory on your system.
3. Open m_pd.h in a text editor (file type is: C/C++ header).
b. Select all (Ctrl+A).
c. Copy selection to the clipboard (Ctrl+C).
d. Back in Visual C++, open the New File window (Ctrl+N).
e. In the Categories pane, select General.
f. In the Templates pane, select Text File, and click Open.
g. Copy the contents of m_pd.h into the editor window (Ctrl+V).
h. Open the Save File As Window (Ctrl+S).
i. Save as m_pd.h.
j. From the File Menu, select Move m_pd.h into; select helloworld.
5. Write the source code for the external in C.
a. Open the New File window (Ctrl+N).
b. In the Categories pane, select General.
c. In the Templates pane, select Text File, and click Open.
d. Write your source code in the editor window.
The following example is taken from the tutorial by Johannes M. Zmoelnig.
#include "m_pd.h"
static t_class *helloworld_class;
typedef struct _helloworld {
t_object x_obj;
} t_helloworld;
void helloworld_bang(t_helloworld *x)
{
post("Hello world !!");
}
void *helloworld_new(void)
{
t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);
return (void *)x;
}
void helloworld_setup(void) {
helloworld_class = class_new(gensym("helloworld"),
(t_newmethod)helloworld_new,
0, sizeof(t_helloworld),
CLASS_DEFAULT, 0);
class_addbang(helloworld_class, helloworld_bang);
}
6. Save and import the source code into the project:
a. Open the Save File As Window (Ctrl+S).
b. Save as helloworld.c.
c. From the File Menu, select Move helloworld.c into; select helloworld.
7. Access the pd library file:
a. Open Windows Explorer or My Computer.
b. Navigate to the pd/bin/ directory on your system.
c. Right-click on pd.lib (file type is: Object File Library) and select Copy.
d. Navigate to the C://TEMP/ directory on your system.
e. Paste the copy of pd.lib in the C://TEMP/ directory (right-click or Ctrl-V).
8. Set configuration properties:
a. Set configuration type to .dll:
1. Back in Visual C++, open the helloworld Property Pages window (Alt+F7).
2. In the left pane, select Configuration Properties >> General.
3. In the right pane, under Project Defaults, click on
Configuration Type, and select Dynamic Library (.dll)
(using the arrow on the right).
b. Add MSW to preprocessor definitions:
1. In the left pane, select
Configuration Properties >> C/C++ >> Preprocessor.
2. In the right pane, type MSW in the Preprocessor Definitions field.
c. Tell compiler which language to use:
1. In the left pane, select
Configuration Properties >> C/C++ >> Advanced.
2. In the right pane, select Compile As.
3. Select Compile as C Code (/TC) by clicking the arrow on the right.
d. Tell linker where to find pd.lib:
1. In the left pane, select Configuration Properties >> Linker >> Input.
2. In the right pane, select Additional Dependencies and enter
C://TEMP/pd.lib.
e. Tell linker to export the setup function:
1. In the left pane, select
Configuration Properties >> Linker >> Command Line.
2. In the right pane, type
/export:helloworld_setup in the Additional options field.
3. Click OK.
9. Compile and link:
a. Use the Build Solution command (F7).
10. Copy the new helloworld.dll file into pd.
a. Open Windows Explorer or My Computer.
b. Navigate to the
My Documents/Visual Studio 2005/Projects/helloworld/Debug/
directory on your system.
c. Right-click on helloworld.dll (file type is: Application Extension)
and select Copy.
d. Navigate to the pd/extra directory on your system.
e. Paste the copy of helloworld.dll in the pd/extra directory
(right-click or Ctrl-V).
11. Test the external in pd.
a. the external should now be a useable object in pd.
b. open a new pd patch and try to create a helloworld object.
c. add a bang to the left inlet and test it out.
d. if the main pd console window displays "Hello world !!",
the external has succeeded.
Hope this helps!
-- middlepedal
Soundflower to Decrease CPU usage for those with Firewire interfaces
Hey Guys,
I've noticed, consistently, that if I select my MOTU 828mkII as both Audio In and Audio Out in PD .39extended (newest build from Hans in daily builds, RC4) my CPU usage jumps to almost double as compared to CPU usage with my Built In audio as Audio In and Audio Out. I have not seen this behaviour in any other Mac OS X application.
I've found a way around this.
If you're a Mac OS X user, go ahead and download Soundflower from Cycling74's website: http://www.cycling74.com/downloads/soundflower
Soundflower mirrors Jack in function, but is only available for OS X. It creates a virtual 2 channel and 16 channel interface in your OS so you can route audio between applications and out the soundcard.
To work around this CPU usage bug with firewire interfaces, select Soundflower 2ch or Soundflower 16ch as your default Audio Out / Audio In within Pd. Then within the Soundflowerbed menu, select your firewire interface as your soundflower output. I don't know why this works, but it does. You can now decrease your CPU usage up to about 2x when using a firewire interface. Screenshots follow.
Builtin audio OR soundflower as output while playing the 7. datastructure sequencer demo
Firewire as audio output while playing the 7. datastructure sequencer demo
Soundflower config
Memory/cpu consume
fdn uses heaps of cpu. if you are just using it as a reverb, maybe try swapping it for another reverb patch.
>i am not sure how to do that. maybe only a few soundfiles<
more soundfiles shouldn't affect things too badly.
attached to this patch is a little cpu meter abstraction. put that in your patch, and gradually delete parts. when the cpu usage drops significantly, you will know what part of your patch is having the effect.
if there is any fft stuff in your patch that will also be using a bunch of resources.
Tabplay cpu usage
Hi,
Does the tabplay object consume cpu when it is not playing?
Let's contextualize.
I create a patch called "sample.pd" which contains:
- a table named $0-table
- a "tabplay $0-table" object
-an inlet, which is connected to the tabplay, and which is expected to receive a bang
-an outlet~ which is connected to the tabplay output
Now I create a main patch, containing N instances of object "sample", each one with a bang connected to its inlet; finally, I connect all the "sample" objects to the same "dac~".
Suppose that I fill in all tables with some audio data.
My question is...
When no tabplay is playing, or when just very few of them are playing, Is my patch consuming nearly the same amount of cpu as if all tabplay objects were playing at the same time?
Or:
Are the tabplay objects wasting cpu time by outputting a constant flow of zeros?
Is this cpu usage significant?
By the way..... what if I asked the same question about "idle" "vline~" objects which are outputting a constant 0 level? And about multiplier ("*~") objects whose left or right inlet is inputting a constant 0?
Thanks in advance
Bye
Teo
Install gridflow on linux
the last lines for 'make install' are:
cp bin/jmax2pd /usr/local/bin; chmod 755 /usr/local/bin/jmax2pd
mkdir -p /usr/lib/pd/doc/5.reference/gridflow/flow_classes
cp pd_help/*.pd /usr/lib/pd/doc/5.reference/gridflow
cp doc/*.html /usr/lib/pd/doc/5.reference/gridflow
cp doc/flow_classes/*.p* /usr/lib/pd/doc/5.reference/gridflow/flow_classes
cp -r images/ /usr/lib/pd/extra/gridflow
cp gridflow.pd_linux pd_abstractions/*.pd /usr/lib/pd/extra
for z in camera_control motion_detection color mouse centroid centre_of_gravity fade \
apply_colormap_channelwise checkers contrast posterize ravel remap_image solarize spread \
rgb_to_greyscale greyscale_to_rgb rgb_to_yuv yuv_to_rgb; do \
cp pd_abstractions/\#$z.pd /usr/lib/pd/extra/\@$z.pd; done
mkdir -p /usr/lib/pd/extra/gridflow/icons
install -m 644 java/peephole.gif /usr/lib/pd/extra/gridflow/icons/peephole.gif
(cd devices4ruby; make install)
make[1]: Entering directory `/home/bastien/Desktop/gridflow-0.8.0/devices4ruby'
install -m644 ioctl.rb /usr/local/lib/ruby/1.8/linux//ioctl.rb
install -m644 SoundPCM.rb /usr/local/lib/ruby/1.8/linux//SoundPCM.rb
install -m644 ParallelPort.rb /usr/local/lib/ruby/1.8/linux//ParallelPort.rb
install -m644 SoundMixer.rb /usr/local/lib/ruby/1.8/linux//SoundMixer.rb
make[1]: Leaving directory `/home/bastien/Desktop/gridflow-0.8.0/devices4ruby'
I don't have any other PD install. Just the ccrma.
I think (i don't remember) that i have installed ruby from the source.