PD Crash within pd.dll in connection with usage of pd for java (pdj)
Thanks for inspecting my problem
However it is difficult to reproduce safely. For me it seems that things are sent to fast to the out let.
For example the case I described arise sometimes....in this case I load multiple wave files to tables. This is triggered one after the other by a java programm sending commands to the outlet. The crash can be avoided if a short delay (thread.sleep(10) ) is set befor sending each command to the outlet.
How ever I ll try to reproduce the error.
Due to your experience as PDJ developer I ve some other question: Can you explain the following exception
dj: java.lang.NullPointerException
pdj: at com.cycling74.max.MaxObject.doOutletAnything(Native Method)
pdj: at com.cycling74.max.MaxObject.outlet(MaxObject.java:571)
pdj: at main.LeanSampler$PDOutputThread.run(LeanSampler.java:147)
pdj: at java.lang.Thread.run(Thread.java:595)
the arguments /int, String ATOM[] are definitivly not null. Im not sure whether I can debug max code so I ask you.
Br regard for any hint
absalom
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
>
Pd integration - audio streams
Hi,
How can you feed an audio stream to pd (encoded or uncompressed) from another software (in windows particularly)?
I have a java software which generates and uncompressed (raw) audio signal including a single channel, I want to process this audio signal with pd and get some parameters back to java. I can use netsend to receive output parameters back to java, however I'm not able to send the audio stream to pd.
The closest things that I found were netsend~ and netreceive~. They seem to work in pd. I use wireshark (formerly ethereal) to capture the traffic on the network interface in order to check the message format. The format of the data transferred through network is not trivial and undocumented (as far as I know). Without knowing the format (and protocol), I can't write the corresponding java source code.
Do you know any library for java and pd to integrate both?
Java.lang.ArithmeticException: negative exponent
Hi everybody!
I'm facing a strange error when i try to generate Key-Pair to be used for encryption purposes.
Either in linux or in windows, it is working perfectly with SUN JDK.
But in RedHat GNUClASS+jamvm, it's wrong as follow.what should I to do ?
Thanks and waiting your replies!
-------------------------------------The error showing is:
genKeyPair failed: java.lang.ArithmeticException: negative exponent
java.lang.ArithmeticException: negative exponent
at java.math.BigInteger.pow(BigInteger.java:1001)
at gnu.java.security.key.dss.FIPS186.generateParameters(FIPS186.java:200)
at gnu.java.security.key.dss.DSSKeyPairGenerator.generate(DSSKeyPairGenerator.java:305)
at gnu.java.security.jce.sig.KeyPairGeneratorAdapter.generateKeyPair(KeyPairGeneratorAdapter.java:93)
at java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:289)
at cn.com.webinfo.security.RSA.generateKey(RSA.java:100)
at cn.com.webinfo.stest.MainRSA.main(MainRSA.java:23)
java.lang.NullPointerException
at cn.com.webinfo.security.RSA.generateKey(RSA.java:102)
at cn.com.webinfo.stest.MainRSA.main(MainRSA.java:23)
Generating private key is failure!
----------------------------------------my code:
MainRSA.java:23 RSA.generateKey("001","prikeyRSA.dat", "pubkeyRSA.dat");
public static boolean generateKey(String id, String priFileName, String pubFileName) {
try {
KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA");
SecureRandom secrand = new SecureRandom();
secrand.setSeed(id.getBytes());
keygen.initialize(1024, secrand);
RSA.java:100 KeyPair keys = keygen.genKeyPair();
RSA.java:102 PrivateKey prikey = keys.getPrivate();
PublicKey pubkey = keys.getPublic();
.........
Java.lang.ArithmeticException Error
Hi !
I also have the same matter, It's good , either in linux or in windows, with SUN JDK.
But in RedHat GNUClASS+jamvm, it's wrong as follow.what should I to do ?
Thank you !
genKeyPair failed: java.lang.ArithmeticException: negative exponent
java.lang.ArithmeticException: negative exponent
at java.math.BigInteger.pow(BigInteger.java:1001)
at gnu.java.security.key.dss.FIPS186.generateParameters(FIPS186.java:200)
at gnu.java.security.key.dss.DSSKeyPairGenerator.generate(DSSKeyPairGenerator.java:305)
at gnu.java.security.jce.sig.KeyPairGeneratorAdapter.generateKeyPair(KeyPairGeneratorAdapter.java:93)
at java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:289)
at cn.com.webinfo.security.RSA.generateKey(RSA.java:100)
at cn.com.webinfo.stest.MainRSA.main(MainRSA.java:23)
java.lang.NullPointerException
at cn.com.webinfo.security.RSA.generateKey(RSA.java:102)
at cn.com.webinfo.stest.MainRSA.main(MainRSA.java:23)
Generating private key is failure!
MainRSA.java:23 RSA.generateKey("001","prikeyRSA.dat", "pubkeyRSA.dat");
public static boolean generateKey(String id, String priFileName, String pubFileName) {
try {
KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA");
SecureRandom secrand = new SecureRandom();
secrand.setSeed(id.getBytes());
keygen.initialize(1024, secrand);
RSA.java:100 KeyPair keys = keygen.genKeyPair();
RSA.java:102 PrivateKey prikey = keys.getPrivate();
PublicKey pubkey = keys.getPublic();
.........
Java.lang.ArithmeticException Error
Hi everybody, i'm facing a strange error when i try to generate Key-Pair to be used for encryption purposes. I try to run the following code on Ubuntu:
KeyPairGenerator myPriPubKeys;
myPriPubKeys = KeyPairGenerator.getInstance("RSA");
SecureRandom myRandom = SecureRandom.getInstance("SHA1PRNG");
myPriPubKeys.initialize(1024, myRandom);
myKeyPair = myPriPubKeys.genKeyPair();
The error showing is:
genKeyPair failed: java.lang.ArithmeticException: negative exponent
java.lang.ArithmeticException: negative exponent
at java.math.BigInteger.pow(libgcj.so.81)
at gnu.java.security.key.dss.FIPS186.generateParameters(libgcj.so.81)
at gnu.java.security.key.dss.DSSKeyPairGenerator.generate(libgcj.so.81)
at gnu.java.security.jce.sig.KeyPairGeneratorAdapter.generateKeyPair(libgcj.so.81)
at java.security.KeyPairGenerator.genKeyPair(libgcj.so.81)
Can any one support.
BTW, i tried to run this code with window XP and it was working perfectly.
Thanks and waiting your replies.
Cu,
Ahmed Banihammad
How do I get dumpOSC, sendOSC and outher Opens Sound objects to work?
I think I have the same problem, on the Mac OSX 10.5.2. I downloaded the source tarball off sourceforge (0.39-3), went to the oscx directory, did ./configure with no problem I noticed, and then make. With make I got this output:
June -d, 2008 @ 01:39:42AM: ~/Documents/projects/boogiepants/Pd-0.39.3-extended/externals/OSCx
[jstoner@erzulie]> make
cd libOSC && make
cc -c -g -O2 -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 -I../libOSC -I../../pd/src -I../../../pd/src -I../src -I../libOSC -I../../pd/src -I../../../pd/src -I../src OSC-client.c
OSC-client.c: In function ‘CheckTypeTag’:
OSC-client.c:341: warning: implicit declaration of function ‘printf’
OSC-client.c:341: warning: incompatible implicit declaration of built-in function ‘printf’
ar srv libOSC.a OSC-client.o
ar: creating archive libOSC.a
a - OSC-client.o
rm -f OSC-client.o
cc -c -g -O2 -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 -I../libOSC -I../../pd/src -I../../../pd/src -I../src -I../libOSC -I../../pd/src -I../../../pd/src -I../src OSC-timetag.c
ar srv libOSC.a OSC-timetag.o
a - OSC-timetag.o
rm -f OSC-timetag.o
cd src && make
cc -g -O2 -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 -I../libOSC -I../../pd/src -I../../../pd/src -I../src -I../libOSC -I../../pd/src -I../../../pd/src -I../src -c -o sendOSC.o sendOSC.c
cc -g -O2 -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 -I../libOSC -I../../pd/src -I../../../pd/src -I../src -I../libOSC -I../../pd/src -I../../../pd/src -I../src -c -o htmsocket.o htmsocket.c
cc -g -O2 -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 -I../libOSC -I../../pd/src -I../../../pd/src -I../src -I../libOSC -I../../pd/src -I../../../pd/src -I../src -c -o OSC-system-dependent.o OSC-system-dependent.c
OSC-system-dependent.c: In function ‘fatal_error’:
OSC-system-dependent.c:65: warning: implicit declaration of function ‘exit’
OSC-system-dependent.c:65: warning: incompatible implicit declaration of built-in function ‘exit’
cc -bundle -bundle_loader ../../../pd/bin/pd -flat_namespace -o sendOSC.pd_darwin sendOSC.o htmsocket.o OSC-system-dependent.o -lc -lm ../libOSC/libOSC.a
ld: file not found: ../../../pd/bin/pd
collect2: ld returned 1 exit status
make[1]: *** [sendOSC.pd_darwin] Error 1
make: *** [all] Error 2
any ideas?
Problem compiling external on Windows
Great tutorial, very detailed!
Thanks for this addition..
Sorry for coming later on this subject but I'll try to add few lines about
compiling externals in Win without going through MSVC Express
edition (by the way: what are the limitations of the express edition
w.r.t. the full package?).
Even if MSVC offers an integrated environment for developing there
can be some good reasons for giving a try to the old-man "unix" way of
compiling, which in windows is best represented by MINGW32 and
cygwin. Both offers linux-like environments (i.e. command line tools)
for compiling and other shell tasks which, sometimes, in windows are
a pain in the ass.
There are at least three good reasons for giving a look at mingw:
- gives strong linux compatibility on external compilation
(almost same command lines arguments etc.) - there is the possibility to use makefiles in an almost straightforward way
(with minor modifications to linux makefiles). - no dependency on expensive MS programs (except for the
small, bug-free Operating System
I did this exercise by porting the E. Lyon "LyonPoutpourry" externals for win
(http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/Pd/). Give a look at
the win source package: inside there is a makefile for darwin (MAC)
linux and win. I added the latter, and as you can see the modifications
are minor.
----------- 1. Prelude: compilation environment ------------------
First of all we have to set once for all the compilation environment.
Let's forget for the moment cygwin and concentrate on mingw32 (http://www.mingw.org/). The following is taken from (H.C. Steiner's wiki http://www.puredata.org/docs/developer/mingw)
Download the MinGW package installer and run it:
(http://prdownloads.sourceforge.net/mingw/MinGW-5.1.1.exe)
Choose the Candidate distribution. Install the defaults and add the g++ compiler, g77 compiler, and MinGW make or you can just download my MinGW install, MinGW-Pd.tar.bz2, and uncompress it so that its installed into C:\MinGW.
Then we need MSYS which is a shell (an interpreter of the commands, like a
colorful dos prompt
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe
Now you will be using the MSYS shell that was installed from the MSYS installer. You can launch it from the Desktop shortcut or Start -> Programs -> MinGW -> MSYS -> msys
----------- 2. Allegro: compilation trial ------------------
a. open MSYS
b. at the prompt type:
cd c:
(or the drive you whish to go for the pd external compilation)
c. go to the external directory (note the backslashes instead of slashes !),
mine is external-compiling. Inside I have helloworld.c
cd alberto/backup/PureData_Archive/patches/AlbertoZ/external-compiling/
d. copy m_pd.h (from the PD distribution directory) into external-compiling
(or whatever is its name)
e. type:
gcc -c helloworld.c -o helloworld.o
f. type:
ld -export_dynamic -shared -o helloworld.dll helloworld.o c:/Programmi/pd039e
xt4/bin/pd.dll
(this is the linker step. note that I linked to a particular version of pd.dll - 0.39 extended test 4, so probably (I'm not sure about this) the external will
run on 0.39 only. Can someone confrm this?)
g. If everything was ok then you should have a helloworld.dll in your
directory. Move it on the extra folder of your pd distribution
(I assume that extra folder is in the pd predefined path) and make a
new patch with the helloworld object. Again, if everything is correct,
you should have a "Hello world!!" printed on the console.
----------- 3. Adagio: makefile ------------------
A makefile can be used for compilation. Even if a simple helloworld
application does not need it, complex programs may do.
The makefile.win is attached with this post. Modify it according to your
path in
Make sure you have
helloworld.c
m_pd.h
makefile.win
in your directory. Now type at MSYS prompt:
make -f makefile.win
This will automatically produce:
the object, the linker step (the dll) and will copy the helloworld.dll
in the extra folder of you pd distribution (overwriting the existing one .
----------- 4. Allegro con brio: conclusions ------------------
Why not give a try to the old-man compilation on Win?
----------- 5. Minuetto: greetings ------------------
I apologize if I said some crap somewhere, just let me know if it
doesn't work. Have fun!
Best regards,
Alberto
Online mixing sound
I've been looking for informations about using netsend/netreceive to communicate with an sql server.
It seems that we have to open a socket in the server (http://fr3.php.net/manual/en/transports.php)
I haven't tried yet, the server I am using for my site doesn't allow this function.
I might change this free site provider with a better one that allows socket opening and file writing for having FUDI available,
but I doubt that it will be free.
Maybe someone has found a better solution or some informations about how to get/send data between pd and a server without using OSCx?
Just tried pd but....
> yes, probably. but now I'll try to run it on my Atari ST
Seriously try it if you get time one day. Oddly the Atari ST is still *THE* choice for some serious techno musicians. Why? The simplicity of how the UART is addressed and clocked gives it rock solid midi timing. It's something that seems to elude complex architectures even with the best preemptive scheduling, buffering etc. I've watched top producers take a midi file on floppy disk from their $5000 super Mac/PC systems to have it play back on an Atari for final mixdown. It's one of those analog vs digital type debacles where real experience of good ears trumps what "technically shouldn't be so". The ST lacks enough grunt for useful audio DSP, but as a midi processing hub or sequencer it could be an astonishingly powerful tool with pd if you can compile it.
>mhh... this is just a anthropomorphic vision of reality...
You got me.
>what I need to ask now is where I can find reference for all objects:
>I know that there's no menu of them and i have to type their name in those little boxes, but
>I need to know, at least, what objects I can create, typing their names, is it true?
Yeah that bothers me too. Even after using for it some time I forget the name of an atom and have to go looking for it. I often do something like "ls /usr/lib/pd/externs/ | grep pd_linux$ | less" to see if I actually have something. For windows likewise search the externals directory for .dll files
>so, I would like to have a list with the object identifier (for oscs, filters etc.), their
>details (kind of filters, slopes, ripples etc. for filters, as example ), their parameters (cutoff, Q, etc.)
>is there a documentation like this?
The help files are detailed, well written and easy to use. Once you know that such an object exists. Just right click any atom and select "help". Usually there's an example case.
Check these to find common atoms
http://puredata.hurleur.com/sujet-248-suggestions-noobs
http://ccrma.stanford.edu/courses/154/pd-reference.html
http://pure-data.sourceforge.net/documentation.php
>I know... but I still feel more confortable with a traditional language (C++, pascal), also
>for writing my personal VSTs (you know, for those weirdest things...) I think it's still easier to write "algorithms" with a textual language,
>without a graphical metaphore.
Raw code is not an expedient or practical way to make music. Having used Music(N), Csound, Nyquist (LISP/SCHEME), and all that stuff I can say this from the bottom of my heart after 15 years experience. Pd gives you two really important things from a software engineering point of view. It's modularity and clarity of interface in abstracting things just beats any C++ classes hands down for it's intended purpose - digital signal dataflows. Consequently you get better decoupling and better reuse. One of the few pitfalls for a trad programmer imho is that pd is very dirty on types, in a way it's one of the most badly typed languages I've ever experienced. Ironic for a tool called "pure data", but you get used to it's lovable idiosynchrocies vis lists, messages, numbers, arrays, symbols and generic "anys". Also it's scoping rules leave a lot to be desired, everythings global within one instance of the server unless you say $0- at the head of a name.
>But now I need to teach a course on "languages for electronic music" in classical, academic shool.
>they don't know DSP matchematics or something like,
>so I need to urgently search for use a more "abstract" instrument for doing the lessons...
You couldn't wish for a more appropriate tool. For non maths/physics students you can use the power of abstraction to build "black boxes" like synths, analysis tools and sequencers and then open them up later in the course. As Claude says, it takes about 9 months or more before you really take to PureData. Electronic music is BIG, really big, not as big as space but it's a discipline that just explodes in scope once you get into it. You can waste weeks writing externals in C, or designing a synth, or creating a composition method...you can get really lost on a random walk in d>2. The best way forward is to have a context and a goal. Teaching this course sounds like an excellent vehicle to focus your scope.
>Tried also Jmax but on Windows (required OS, because > 95% students use billgatesware ) is quite unstable
I would make it "unrequired". Put your foot down as course leader/tutor that Windows is unsuitable. In order of preference I would go with Mac, then Linux, then Win. If the students only have Windows then try Dyne:bolic ( http://dynebolic.org/ ), a minimal GNU/Linux distro that runs from a CD in RAM and comes preconfigured with PureData and a smorgasboard of other digital media tools. That said, I've seen it work really well on Windows. Once. I've no hard evidence to back this up, but I feel a disturbance in the force when Pd runs on Windows, as if a million threads cried out at once and were suddenly silenced. I don't think it likes heavily loaded machines and I guess 99% certain the reason it's unstable on Win is down to *other* things running. Hint: a music machine shouldn't double as an email server and GCHQ spyware centre. Start with a clean install and nothing else running and you may have better luck, but that will probably remain stable about as long as a schizophrenic Z-boson particle if you network it.