Comparing Arrays
Hi,
I'm trying to compare the timings of two sets of data, consisting of only 1s or 0s.
Basically I have an input audio file that has a '1' representing each hit of a drum pattern. There are going to be different variations of this audio file as I hope to automate parameter changes in the creation of the file. Therefore I want to test this input file against a set pattern that I know is correct to see how accurate the algorithm that creates the audio file is.
I was just wondering if any of you clever guys might have any ideas on how to achieve this.
At the moment I'm using an array that stores the correct pattern from a step-sequencer in the same format as the audio input file. Then using [klashnikov] I count every '1' in both tables. By subtracting the pattern array count from the input array I'll get a number that indicates the accuracy. If the result is 0 then it must mean that there are the same number of hits in both files, if its a minus number then there must be too little in the input file and if its greater than 0 then there are too many.
However, I wanted to introduce a sort of window. So that the input file hit could be within so many samples of the pattern hits.
My knowledge of dealing with arrays is limited, but I feel there must be some object/function that would helpful that I'm overlooking.
Any ideas would be extremely helpful. Hope I've explained it properly.
Cheers,
J
Controlling Jack from PD
I'm using PD and Jack on OSX.
Is there any way I can use some sort of PD external to control the Patching/Routing of my jack server? I'm using PD to send OSC signals to control SooperLooper, a looping system that runs on jack, and I'd like to be able to use PD to control which of my DAC inputs go to each loop. I've only got two inputs, but I loop them separately and it would be nice to be able to have setups like... four loops from input one and two loops from input two switching to two loops from input one and six loops from input two without having to have ten total loops, all routed ahead of time, with several loops taking up audio processing power without actually being in use at any given time.
Can I send commands to jack (perhaps OSC?) from within PD like "route system input one to SooperLooper input 4" with some sort of object?
Does anyone else think it would be useful to control audio routing within PD?
Call for participation: LIWOLI09
Sorry for ><, please >>
--
Liwoli 2009
hacklab for art and open source
23 - 25 April 2009 - Kunstuniversität Linz
--
Liwoli 2009 is a three day long Hacklab and an open invitation to all
who would like to participate in an active process of learning,
producing and sharing around the areas of Free/Libre Open Source
Software and Art. FLOSS developers, artists and programmers such as the
collective GOTO10 or activists from HAIP (Hack Act Interact Progress)
and many others form the basis for the event and share their knowledge
in the form of workshops, hacklabs, presentations, installations and
performances.
--
Please register NOW to book a place in some of the many FREE workshops!
http://linz.linuxwochen.at/en/programm/format/2009/Workshop
- Select a workshop
- Read the description
- Interested? Click on "Register" and fill the form
DEADLINE FOR REGISTRATION: 15/04/09
--
... and do not miss out on the rest of the event!
http://linz.linuxwochen.at/en/programm/format/2009/Vortrag
http://linz.linuxwochen.at/en/programm/format/2009/Presentation
http://linz.linuxwochen.at/en/programm/format/2009/Performance
http://linz.linuxwochen.at/en/programm/format/2009/Interviews
http://linz.linuxwochen.at/en/programm/format/2009/Intervention
http://linz.linuxwochen.at/en/programm/format/2009/Installation
With the participation of:
Andrea Mayr, Andreas Trawoeger, Arjan Scherpenisse, Aymeric Mansoux,
Christoph Haag, Claude Heiland-Allen, Dan Wilcox, Daniel Turing
David Ayers, Eleonora Oreggia, Georg Jakob, Holger Schöner,
Jan-Kees van Kampen, Johannes Kreidler, Marius Shebella,
Pippa Buchanan, Ricardo Palmieri, Rob Canning, Robert Martin,
Roch Forowitz, Sascha Neudeck, StÃ(c)phanie Vilayphiou, Thomas Warwaris,
Yves Degoyon, ... and more to be confirmed!...
--
Questions?
http://linz.linuxwochen.at/en/contact
Where to sleep?
http://linz.linuxwochen.at/content/service
--
:*
Hi everyone, & a question about vline~
Hi all, glad I found this place and it's still active! I'm fairly new to pd and to synthesis in general, but I've been playing with the platform for a few months now and I recognize a few names here already from alot of examples and tutorials I've viewed, so it's good to be here.
Anyway on with my question.. I notice vline~ has two extra inputs, but all the examples I've seen use three-member lists on the hot input. And the built-in help for vline~ only explains the first input as well. What are the other two inputs for? Can all three be used to set the target, duration and delay values individually?
And if so - can I send for example:
msg[ 1, 0 ] to target, msg[ 20, 100 ] to duration and msg[ 0, 400 ] to delay inputs of vline~, instead of using:
msg[ 1 20 0, 0 100 400 ] on the first input?
This would help me alot for the simple ASR envelope I'm working on. Otherwise I suppose I can go through set & trigger hell and maybe figure out a good way to get the variables into the (list, list) format but I'm worried about lagging something up.
Thanks!
-Matt
Uni Project - endless Marco Polo
Hi everyone
I was directed to this board by my tutor, and he was certain that i'd be able to get the help i needed to implement my idea.
The concept is Endless Marco Polo
I want to recreate what it's like to play Marco Polo; but of course, you can't win
After the user input of "Marco!", i would like the program to play back the response, "Polo!", through one of the 5 channels randomly, at a random volume.
Theoretically, the response and "perceived distance" of the person playing Marco Polo with you would always be different.
Ultimately:
The setup would be a booth of sorts, with a kiddie wading pool
5.1 surround setup
microphones to pick up the user's "Marco!"
The tough/technical part would be to how i've been thinking of implementing the concept
Basically, i want to create something that would allow the response; "Polo", to be played back in a random channel after input.
Looking at my tutor's PD program he used for a generative audio program; something called Fiddle would work in converting the raw input into something that can activate the other components, but for now, i'm interested in how i could use PureData to playback a sound in a random channel, and also how to interface the program with Digidesign.....This is the system used at uni in our surround sound recording lab.
I have very limited knowledge of coding, so any help would be appreciated, and please ask if you need things clarified.
Thanks!
Frozen reverb
"Frozen reverb" is a misnomer. It belongs in the Chindogu section along with real-time timestretching, inflatable dartboards, waterproof sponges and ashtrays for motorbikes. Why? Because reverb is by definition a time variant process, or a convolution of two signals one of which is the impulse response and one is the signal. Both change in time. What you kind of want is a spectral snapshot.
-
Claudes suggestion above, a large recirculating delay network running at 99.99999999% feedback.
Advantages: Sounds really good, its a real reverb with a complex evolution that's just very long.
Problems: It can go unstable and melt down the warp core. Claudes trick of zeroing teh feedback is foolproof, but it does require you to have an apropriate control level signal. Not good if you're feeding it from an audio only source.
Note: the final spectrum is the sum of all spectra the sound passes through, which might be a bit too heavy. The more sound you add to it, with a longer more changing sound, the closer it eventually gets to noise. -
A circular scanning window of the kind used in a timestretch algorithm
Advantages: It's indefinitely stable, and you can slowly wobble the window to get a "frozen but still moving" sound
Problems: Sounds crap because some periodicity from the windowing is always there.
Note: The Eventide has this in its infiniverb patch. The final spectrum is controllable, it's just some point in the input sound "frozen" by stopping the window from scanning forwards (usually when the input decays below a threshold). Take the B.14 Rockafella sampler and write your input to the table. Use an [env~]-[delta] pair to find when the
input starts to decay and then set the "precession percent" value to zero, the sound will freeze at that point. -
Resynthesised spectral snapshot
Advantages: Best technical solution, it sounds good and is indefinitely stable.
Problems: It's a monster that will eat your CPUs liver with some fava beans and a nice Chianti.
Note: 11.PianoReverb patch is included in the FFT examples. The description is something like "It punches in new partials when theres a peak that masks what's already there". You can only do this in the frequency domain. The final spectrum will be the maxima of the unique components in the last input sound that weren't in the previous sound. Just take the 11.PianoReverb patch in the FFT examples and turn the reverb time up to lots.
Starting out with PD and Gem
Hello,
I'm really interested in the potential of PD and would love to get my head round it.
I have a basic knowledge of programming (from a college course a few years ago), but am keen to learn more to explore the possibilities of the program.
I have downloaded the pd extended file, and instealled the packages within. I have opened up the tutorial/demo files, and everything seems to be working fine...
however, there are a few basics that im struggling to get my head round. Firstly, i would like to use Gem (which i have downloaded and installed) but am unsure how to 'call' it into PD as a library.
Running OS 10.2.8, PD runs through Terminal. I am new to Terminal, and dont know how to load commands with it. If i type 'pd - lib Gem' into the existing terminal window that loads PD, and hit enter, nothing happens. If i go to FILE/NEW COMMAND and type the message, a new window loads with some information, which ends with 'logout [Process completed]' which i presume means it hasnt loaded Gem into PD, as opening Gem tutorial files gives no results.
To cut a long story short (!) I would basically like to know how to load Gem into Puredata! I think my problem lies with using Terminal on mac osX, so if there is anyone who can lend a hand and give me some guidance, I would be most grateful.
I am excited about what these programs can bring to my work, and cant wait to get stuck in!
Many thanks
I am using an ibook running OS 10.2.8
i downloaded pd-0.36-extended2-MacOSX.dmg (from which i installed all of the packages)
and
gem-0.90.0-OSX-G3-bin.tar.gz (i placed the two files - the library and the readme, into: mycomputer/library/Pd/Externals
Effects chain order
here is what i meant:
#N canvas 287 265 540 442 12;
#X obj 175 236 r~;
#X obj 14 387 dac~;
#X obj 272 236 r~;
#X obj 376 236 r~;
#X obj 174 354 s~ fx1;
#X obj 273 354 s~ fx2;
#X obj 375 354 s~ fx3;
#X obj 24 338 r~;
#X obj 18 21 osc~ 100;
#X obj 17 60 s~ input;
#X msg 175 108 set input;
#X msg 188 159 set fx2;
#X msg 197 185 set fx3;
#X msg 24 226 set input;
#X msg 34 252 set fx1;
#X msg 44 277 set fx2;
#X msg 53 303 set fx3;
#X msg 272 108 set input;
#X msg 284 134 set fx1;
#X msg 293 185 set fx3;
#X msg 376 108 set input;
#X msg 388 134 set fx1;
#X msg 398 159 set fx2;
#X connect 0 0 4 0;
#X connect 2 0 5 0;
#X connect 3 0 6 0;
#X connect 7 0 1 0;
#X connect 7 0 1 1;
#X connect 8 0 9 0;
#X connect 10 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 0 0;
#X connect 13 0 7 0;
#X connect 14 0 7 0;
#X connect 15 0 7 0;
#X connect 16 0 7 0;
#X connect 17 0 2 0;
#X connect 18 0 2 0;
#X connect 19 0 2 0;
#X connect 20 0 3 0;
#X connect 21 0 3 0;
#X connect 22 0 3 0;
C++
ok...if you want the program in c++ to be running alongside Pd and have the two programs communicate (ie exchange variables, etc), the easiest way is probably to implement tcp/ip support in your c++ program and send variables to the port that Pd is listening too. i haven't done tcp/ip programming in c++ yet, but i did write a perl program that communicated with Pd. if you'd like to use native, builtin Pd objects, netsend and netreceive are what you are looking for. however, your c++ program will be more portable and reusable if you use OSC.
make sense?
--zac
Write table with 256 values coming from a number b
I'm guessing your patch receives the 256 values in a list?
You can extract the Nth element from a list with a message box like [ $N (
But for a list length 256 this could get tedious to patch. What I suggest is making a Java program to make the patch.
Make a patch to extract the right parts from the list for a short list, say length 4, perhaps with a [ t l l l l] connected up to [ $N M (, where M=N-1, each connected to [ unpack f f ( ==> [ tabwrite ] . If you create the message boxes last, it will be easier to write the program.
Then write a Java program to generate the patch you want. It's best if the patch generated is a complete abstraction, so you don't have to edit the output patch each time you edit the Java program (say if you want different length lists).
Here is an example of a Java program that I wrote to generate a patch with 256 number boxes in a 4x64 grid. It doesn't follow my guidelines for being a complete abstraction - I edited the patch afterwards to add more stuff, which will cause me problems next time I want a different sized grid....
----snip-----
public class NumberGrid4x64 {
public static void main(String args[]) {
System.out.println("#N canvas 403 0 525 1216 10;");
int count = 0;
System.out.println("#X obj 2 18 cnv 15 110 1136 empty \\$0-canvas-r \\$1 4 12 0 10 -225280 -90133 0;"); count++;
for(int y = 0; y < 64; y++) {
for(int x = 0; x < 4; x++) {
System.out.println("#X floatatom "+(7+26*x)+" "+(42+16*y+4*((int)(y/4))+4*((int)(y/16)))+" 3 0 0 0 - #0-"+y+"-"+x+"-r #0-"+y+"-"+x+"-s;"); count++;
}
}
int count0 = count;
for(int y = 0; y < 64; y++) {
for(int x = 0; x < 4; x++) {
System.out.println("#X obj "+(120+200*x)+" "+(42+16*y+4*((int)(y/4))+4*((int)(y/16)))+" r \\$0-"+y+"-"+x+"-s;"); count++;
System.out.println("#X msg "+(220+200*x)+" "+(42+16*y+4*((int)(y/4))+4*((int)(y/16)))+" "+y+" "+x+" \\$1;"); count++;
}
}
int count1 = count;
System.out.println("#X obj "+(500)+" "+(18)+" t a;");
for(int c = count0; c < count1; c = c + 2) {
System.out.println("#X connect "+(c)+" 0 "+(c+1)+" 0;");
System.out.println("#X connect "+(c+1)+" 0 "+count1+" 0;");
}
}
}
----snip----