-
freakanth
Hey,
I'm trying to read a polyphonic MIDI file (using "seq"), parse it (using "midiparse") and simultaneously write the data to a text file (using "textfile"). There seems to be a mistake in the way I'm using textfile but I cannot figure out what it is. I'm using the first method from a tutorial patch "using-textfile_pt3" that Maelstorm had shared on the forums but it isn't working in my case.
In the attached patch, I read the MIDI file with the first input to the patch "loadMIDIfile" and then (try to) write it to a file while playing it back really fast, using the second bang. It would be great if someone could also suggest a better way of doing this.
I also attached an example MIDI file.
Thanks a lot!
Srikanth
-
freakanth
Hey,
I'm trying to read a polyphonic MIDI file (using "seq"), parse it (using "midiparse") and simultaneously write the data to a text file (using "textfile"). There seems to be a mistake in the way I'm using textfile but I cannot figure out what it is. I'm using the first method from a tutorial patch "using-textfile_pt3" that Maelstorm had shared on the forums but it isn't working in my case.
In the attached patch, I read the MIDI file with the first input to the patch "loadMIDIfile" and then (try to) write it to a file while playing it back really fast, using the second bang. It would be great if someone could also suggest a better way of doing this.
I also attached an example MIDI file.
Thanks a lot!
Srikanth
-
freakanth
Hi,
I'm writing an external (analyze~) for Pd that uses libsvm (http://www.csie.ntu.edu.tw/~cjlin/libsvm/), which is a C++ library for Support-Vector Machines. I want to compute frame-level features from Pd's audio buffer and do classification/regression on this data.
I'm compiling the program using g++ (as libsvm is written in C++). It compiles without any errors.
When I try to load the object, I get the following error
analyze~
... couldn't createI tried using extern "C" with the function analyze_tilde_setup() as this function is called by Pd and I thought compiling with g++ mangles the function name. But this did not help.
Can anyone tell me where else there could be a problem? What is the exact sequence of steps while loading a Pd object (of is there a page where these details are documented)?
I've attached a ZIP archive with my source files and the Makefile that I use, if required. Please let me know if I can provide any more details.
Thanks!
Srikanth
Thanks!
-
freakanth
Yes, I copied analyze~.pd_linux to my /usr/lib/pd-extended/extra which is in the path.
I actually did try running the patch before connecting it with libsvm by simply printing out values input to it via the osc~ object and it worked fine. I was using only my Pd library file analyze~.c then.
On putting it together with libsvm, which is in C++, I couldn't compile the code with cc. So I modified the Makefile (which I got earlier from another thread in this forum) such that the compiler is g++ instead of cc. I have a feeling it's this change that led to the issue.