Analyse envelope spectrum
Hi again guys. I was wondering how I could analyse the envelope spectrum of a signal, and find the peaks of this signal. What I am trying to do is to estimate the formants of speech by finding the peaks of the envelope spectrum in given frequency ranges, after the signal has been passed through [lop~] and [hip~], leaving only the desired frequencies to analyse. Currently, I am having to use [bp~] and [env~] to manually create these "peaks" (sort of like the fourier transform), like shown in the puredata tutorial website, but I was wondering whether I could create these partials dynamically and then get the frequency where the peak (maximum) occurs. I read a little bit about the [sigmun~] object, but I didn't quite get it and I can't really find any tutorials on it.
triggering packed items all at once? order of operations?
Hi!
I have a group of floats i.e. [1 2 3 4 5 (
I have to process these floats to create new values.
So I use unpack to extract each item... I apply some function to 1 some function to 2 etc etc...
For example.
Say 1 gets multiplied by 2 . 2 gets divided by 3, 4 gets divided by 10...
I now have a new list of values that I have derived from the original list...(they are all seperate objects) this is where my problem arrises. I want to pack these items to send them to another functions, however they all must arrive at the same time! when I use pack, the first items triggers pack regardless of if the next calculation is complete. What i need to do is this.
Each item in the list [1 2 3 4 5 ( must complete its following calculations and then be repacked and sent to the next part of the chain.) The next part of the chain unpacks the corresponding values. Only once all the values are recieved should the unpack commence.
If this is confusing here is an example.
[1 2 3 4 5 (
unpack f1 f2 f3 f4 f5
f12 = x1
f23 = x2
f34 = x3
f410 = x4
f5*0 = x5
pack x1 x2 x3x4 x5 -> outlet
in a seperate abstraction: inlet -> unpack... now what I need is to unpack only after all the calcuations are finished. Does anyone know how to do this? Should i not use pack?
Working Peaks for VU
Hello again,
The documentation for the GUI VU meter is pretty vague and I couldn't find any info on how to use the peak indicator. So this is my idea for a working peak.
I would really like to have the peak indicator slowly reset (eg [line] but then you miss the peaks occurring during that time or get interference from the current values
Cheers Balwyn
Problem with using $1,$2 and $3. "Argument out of Range"
@MatteoC47 Hello Matt...... Usually "argument out of range" means that the [pack] object does not have the same number of variables as the [message( that it feeds into..........so.....
[pack s f s f]
should be followed by......
[$1 $2 $3 $4( and if you put a $5........... you will see "argument out of range" in the terminal as the $5 will receive no value.........
But...........[pack] will not "pack" the message until it gets a "bang"....... or in fact "anything" on its left inlet (see the help file for what actually "happens").... and then it will execute..........
dunno.pd
I have put a trigger so that the new data from the slider forces [pack f f] to output.........
Please come back here if that doesn't help.
If you are indeed new to Pd...... I always recommend http://puredata.info/docs/manuals/pd/x2.htm up to..... but not including chapter 2.9...... as great bedtime reading!!
David.
Speech Formant Synthesizer (With bonus Turkish vowels pack :P)
the thread has been quiet for some time but thought Id also like to thank you for the formant sample pd files..really useful and hopefully once I get back into the pd interface I can make proper use of them. One question I have about jimqode's example is I seem to get some clipping artifacts when changing vowels and was wondering if there is a way to remove it? I added a little lop~ which seems to help a little but only with lower frequency settings. I'm running on asio drivers and so at least I hope I can rule out my soundcard (LYNX).
I'm working on a kind of random vowel generator so getting the vowels to flow in a speechy way but not understandable is what im heading for.
FFT Normalization with different block sizes
FFT normalization factor depends on FFT frame size (which is equal to blocksize for fft~ & Co.), overlap, and window type.
In my experience you can normalize where ever you want: in time domain before FFT, in frequency domain, or in time domain after FFT. It is also possible to normalize in two steps, each of sqrt(normalization-factor), for example when you want the bin content normalized for certain processing or analysis jobs. Then you do one step before processing and the second after processing.
In frequency domain, you can either normalize amplitude of polar coefficients, or real and imaginary part of rectangular coefficients. This has no consequence for normalization factor.
If you would do normalization outside the reblocked subpatch, that is also possible, before or after FFT patch. But you must still consider blocksize and overlap.
You can verify all these possibilities by tweaking mentioned patch. The fact that normalization factor does not depend on the point in the process where you apply it, is convenient. However, for analysis or processing, that point of normalization does matter sometimes.
Consider for example a single-sample click: it's energy is spread over all frequency bins. With no normalization before spectral analysis, magnitude would be 1 for each bin. Next, consider a perfectly white noise, or a complex linear chirp over the full spectrum. With sqrt(normalization-factor) before analysis, the magnitude is 1 for each bin. Next, consider a pure sinusoid. With full normalization before analysis, the magnitude is 1 for a single bin, or the leaked equivalent of that.
You see, it depends on signal type how spectral magnitude can be shown independent of FFT size. Probably, the signals you want to process resemble a white noise rather than single pulses or full-scale pure sinusoids. So my guess is, that you would opt for the two-step normalization if you want to mix spectral data of different FFT sizes.
Good luck,
Katja
GEM alternative for Tk GUIs?
@sonsofsol said:
start C:\Programme\pd\bin\pd.exe -noaudio D:\koffa_root\camera\gui.pd
start C:\Programme\pd\bin\pd.exe -nogui D:\koffa_root\camera\audioplayer.pd
That's a good idea to start a -noaudio Pd for the GEM GUI.
OSX does not like to start two instances of a process, but there is a syntax to do it from a single terminal window. As a script (example):
#!/bin/bash
/Applications/Pd-extended.app/Contents/Resources/bin/pd /Users/katja/pd/Slicejockey/SliceJockey.pd &
/Applications/Pd-extended.app/Contents/Resources/bin/pd -noaudio /Users/katja/pd/GEMdingen/draggable-guis/1WaveRefinery.pd
The '&' option does it.
Now you would need a different script for each OS, and even for each user because paths are always different. I'm thinking of ways how to make this user friendly so the patches can be shared without the user selecting and rewriting the correct script.
Say you first open the audio patch in a Pd with gui and audio. On that patch is [ggee/getdir] to find the working directory and the GUI patch. Now it would be great to open a second Pd with -noaudio and load the GUI patch, from *within* the first Pd. There is a variety of shell objects for Pd:
[motex/system], [ggee/shell], [flatspace/open] and [moonlib/open]. They all work different and it's easier to crash Pd with them than get anything useful done, like starting a second Pd. I have not yet succeeded in this. Further, to make it work for everybody, the path to the Pd executable should be somehow found in runtime. I have the feeling that these things can be solved.
Katja
Swept sine deconvolution
@katjav said:
Hi Bassik,
These comparisons look quite promising! And this is done with the old wiggly chirp. The low frequency ripples over which I'm cracking my brains hardly play a role because the system's response starts at around 100 Hz. I'm curious, what is actually the system under test?
Katja
Hello Katja,
the system under test is a big exhibition hall in london (http://www.vam.ac.uk/collections/fashion/galleries/40/index.html) measured using a genelec 8030A monitor and an omni directional mic only.
Keeping it simple to understand teh results quicker.
Regarding your exp chirp computation, I am afraid this goes above my current knowledge so I need to study a bit before giving you an answer or even a comment.
But we should bear in mind that exp Sweep sine technique is done for measuring acoustic spaces (hence the storing of non linearities of the reproduction and recording system in the anti casual part of the IR) and to obtain high quality IR for convolution and auralisation use.
In this case I don't really get the point why you are researching the exact sample value of the peak value.
In my experience, analysis of simple IR don't give substantial different results if the time zero of the IR is not exactly on the peak but probably I am missing something here expecially regarding the signal processing.
base of the exponentianl or logaritmic sweep is that the instantaneous frequency vary exponentially with time (see http://www.acoustics.net/objects/pdf/article_farina02.pdf)
Hope this can be of help.
Also Farina described a method for fast convolution for ambiophonics that can maybe be of inspiration for the deconvolution engine (see http://www.acoustics.net/objects/pdf/article_farina04.pdf)
Regarding STI, it is a measure of the speech intelligibility in a given space and takes into account many factors of which th emost important are the S/N ratio and the frequency masking.
Voice is a very complex mathematical beast as it has a characteristics frequency respone that vary with spl and also a frequency modulation mechanism that we use to articulate words. this is obvioulsy different for different languags but has been standardised in a certain way.
I will send to you the ISO standard that clearly explains th emethod of calculation impplemented in any commercial software in teh next days.
Also I would like to discuss possible development after the chirp issues are resolved.
I believe that it can be useful to implent the following in the patch:
-
Sound editor to delete the anti casual part of the IR and move the arrival time of the peak to zero
-
Room acoustics parameters calculation (I will send you the relative ISO and I will write more info later)
-
Multichannel IR recording and processing including an Ambisonics module; IEM in Gratz (http://iem.at/Members/noisternig/bin_ambi) has done a great work on this. Our implementation would be much simpler and would include A-format to B-Format encoding and additional analysis.
Hope everything is well in life in the meantime
speak to you soon
Bassik
Constructing midi messages from sensor data
I’m just reading you project idea.
To read a value of a sensor (mic for example) with a PIC (or Arduino)you have to read this data using an analogue input of the PIC (Arduino).
A PIC can understand values DC between 0 and 5V. An outgoing signal of a mic (it has to be preamplified)is a AC signal and can’t be interpreted by a PIC (or at least you get only some random results).
To make a readable signal for a PIC from a mic (or pressure sensor) you need to use an envelope follower.
The Arduino has 8 analogue-inputs with a 10bit resolution, 4,7mV.
Now to send this bites wireless you have to create some protocol with (8bit) bytes to tell Pd the how to interpret the incoming data flow.
In my project I send 3 bytes to Pd. The first byte is a 0X00 value to initiate a switch, the second byte is “result_hi-byte” and the third byte “result_lo-byte” of the PIC.
If the value of the analogue input trops to 0x00 (no mic pressure) a last byte with a number of the input channel is sent to Pd. In this way I can define the duration of a Note, very similar to a Note-Off message of a midi_message.
I made a program for Pd and if you want I send it to you.
To send a value of a button is much easier. A button has only the value On/Off, Yes/No, so with one byte you can define the value of 8 buttons.
In my webpage I have information about envelope followers and other things. www.drumanart.com
saludos Martin