ADSR and [poly], weird behaviour
In my class demos about envelopes, I did it like this:
(velocity source)
|
[moses 1]
| |
| (envelope attack/decay segment messages)
|
(release segment message)
And both of the messages to vline~.
Instead of sending the velocity down both branches and stopping the flow for one of them, this way splits the velocity into on and off paths directly.
hjh
a way to do acoustical Room Analysis in Pure Data would be awesome
I would like to build a quick and dirty analysis tool, such that I could sweep a sine wave or perhaps give a quick impulse response to a space and then, using a microphone analyse what the room does to this signal (thus revealing harmonic resonances of the space).
I think maybe the new (and amazing) AudioLab library could be useful for this, and there is the older Pd Spectral Toolkit that allows for working with complex numbers and is amazing, and of course William Brents TimbreID,
but since I don't really need this to do everything that programs like this do: https://www.roomeqwizard.com/
I was trying to think of the simplest way to do this, before I commit to a six month project
I am feeling lazy, it happens.
I wondered if anyone had any suggestions or new of some patches that already did this?
I thought the simplest way might be to sweep a sine wave and simultaneously record it back in, then play this recording into sigmund~
...but here is where it gets confusing because since room sounds are not musical instruments, the most resonant partials are not....well, the whole point is that one doesn't know where they are, so I wouldn't know which partials to tell sigmund~ to analyse ahead of time.
so, it might be better if the recorded sound was played into another spectral analysis tool (but which?) and then the output of this could be filtered to find x number of strong partials (or all partials about a certain strength).
Wouldn't that be awesome?
I am dreaming but maybe somebody has already started on this?
Jorge
Best way to pitch track a Bell Kit instrument?
Hi there —
I'm trying to detect pitches from a Bell Kit instrument for a music education app; and so far I'm having trouble picking up MIDI pitches above the 90s/100s; which is the target range for this instrument.
Here's a test patch I'm using to determine whether [sigmund~] or [helmholtz~] does a better job at reporting higher pitched content. It seems that sigmund~ is generally better at detecting the higher pitches but it seems to stop picking things up above the MIDI pitch 100 range; which is the range of the second recording in the zip file. Can anyone tell me if there is a limit for these objects for higher frequency detection, or suggest parameter configurations or different methods for tracking this instrument?
sigmund to trigger sampler
[sigmund~ notes] - give it a go! You could also try [sigmund~ pitch env] and use the latter for additional thresholding.
Struggling hard
@Toostupefiant Definitely learn to use arrays, in particular, [tabwrite] and [tabread}. Make 2 arrays, one to save the segment start indexes and one to hold their lengths. Next, decide what the minimum and maximum length of each segment should be, in number of samples. With these numbers at hand, you can use [random] to generate a random segment length. When you load the sound file, save its length to use for comparison later.
Now, to construct a random partitioning of your sound file, start at start index 0 (i.e. the beginning of your sound file) and generate a random length. That defines your first segment, segment #0, but it also tells you what the next start index is, for segment #1. Save each start and length generated this way in your two arrays. Repeat until you've reached or gone past the end of the sound file. Keep track of the number of segments you generate because you'll need that for when you play them back at random. Pick a number less than or equal to the number of segments, look up its start in the start array and its length in the length array. Pass them to whatever you use for playback.
If you can manage that, then you'll probably want to protect against uselessly short last segments. That's a matter of looking at how much is left after each step of segment definition, and making some adjustment if it's less than your max + min segment length. I'm being vague about the adjustment because it just depends what compromise you want, e.g. you could just decide to ignore the last segment.
[sigmund~] creation arguments/parameters setup
@cfry The background noise includes things like fan and hard drive noises from your computer, white noise that is generated by the mic and its amplifier, and wind noise, if all of these noises are at or near equal in volume to the birdsong, [sigmund~] can not pick them out, even if you can hear them through the noise, our brains are good at filtering out what we do not want to hear. A quick test shows my cheap MXL large diaphragm condenser mic and Behringer interface is sensitive and quiet enough for [sigmund~] to get the crow that is cawwing away right now even with my windows closed, would pickup the quieter birds no problem as well if the windows were open and the wind/waves were not up. [sigmund~] will do the job, but it's output is only as good as its input.
[sigmund~] creation arguments/parameters setup
Hi,
this morning I had a cup of coffee outside and tried to have [sigmund~] catch on to the birds singing. My own whistling was copied perfectly, but I only got a few hints of the bird song.
I tried many different settings of -hop and -npts, and also tried multiplying the audio signal, [*~] , before going into [sigmund~] but I notices no difference in pitch response, although I noticed that the envelope outlet had a raised value, I made sure the mac laptop mic had noise reduction off.
I was hoping to hear layers and clusters of sinus tones as [sigmund~] would try to track the noise from raised gain microphone signal.
So I have searched around the forum and downloaded a few patches but I have not been able to figure out how to set up [sigmund~] to achieve something along the lines of what I am trying to do.
Help plz?
Can rfft~ output sinusoidal peaks and amplitudes? (alt to fiddle~ and sigmund~)
Hello, I am wondering if it is possible to use the rfft~ object to analyze an incoming sound, and output it's harmonics (sinusoidal peaks, including their amplitude) in order of frequency from low to high?
sigmund~ and fiddle~ are great at detecting them, but both seem to re-order the peaks in order of their amplitude not frequency (which unfortunately won't work for me ...sadly because they do EVERYTHING else I need!)
I'm trying to detect the first 7 harmonics of a sound that is run through my patch. Is it possible to route the frequency and amplitude of each harmonic to it's own outlet (like with fiddle~ or sigmund~) with the rfft~ object? Or, alternatively, is it possible to lock the order of the harmonics in fiddle~ or sigmund~ so that they always output in order of frequency from low to high?
Many thanks in advance, any help would be greatly appreciated!
Best way to detect individual attacks from continuous stream of notes?
@chmod Yes, that makes sense. The problem is that if there is no silence to speak of, and the pitch stays the same, how can we know that there is a new note being played?
I would think that, even if the consecutive notes are tongued, [sigmund~ pitch] would detect some crazy pitch for a few milliseconds during the transition, however smooth that might be (which would be the Ls in your "lalalaaaa" example). So perhaps taking an average of the last n pitches from [sigmund~ pitch], and try to spot the transitions whenever there is a sudden jump in the average? Or something like that.
That being said, I don't think it's going to be so easy to get a universal method that works all the time, but sigmund is the best we've got in Pd for this kind of stuff.
If you don't mind sharing a couple of samples of some particularly critical sources I can do some experiments as well.
Sigmund~ Parameter_Setter: Use guitar notes to set patch parameters
Sigmund~Parameter_Setter: Using guitar notes to set patch parameters
sig-setter~-help.pd
sig-setter~.pd
Preface: I have been doing a lot of work recently setting up an electric guitar as an "arduino guitar" (with additional knobs, switches, etc.) to run my patches.
Occurred to me a couple of days ago (while considering buying a second ard to make a guitar for a friend), I could harness sigmund~ to just capture pitch (as digital values) and envelope (as the analog values) without ever changing the inside of the guitar.
The result is this patch.
Instructions:
The [ON] toggle triggers a [switch~] and would be used during setup and (probably) not performance (without severely cramping one's playing style).
The grid of hradios represent the fret board (in standard guitar tuning). Low on the bottom, high on the top.
The first three (bottom hradios) strings (low-E,A,D) run from midi-pitch 40 thru 54. So if you play for example pitches 40-44, it changes the first string hradio between the values of 1 and 5. The A and D strings do the same but for their respective hradios. (The first 6 outlets (from left to right) represent the 6 strings).
The three high strings also capture hradio values. But in the special case of being in "open", (using the [env~], in other words how loudly you play the note) they send analog values between the range of 0 and 1 (as shown in the val0, val1, and val2 sliders and are sent to the right three outlets). So if you play the note loud it sets the parameter/slider closer to 1, softer closer to 0.
The "threshold" (sigmund~ minpower param) is used to filter for ambient noise and add sensitivity control and defaults to 66. So it can be set to capture the softer sounds and change the range of the analog values. (It's max is 100. Changing that value would need to be done internally within the patch).
I am pretty sure if configured properly, this makes my arduino guitar idea mute.
On the other hand, I love to play with knobs and switches so am Not going to abandon that tool for this patch.
However, I think this patch might prove useful to others.
If not to actually use, then at least for the sake of an idea-generator about how to use the fretboard (potentially instead) of arduino to set param values.
Happy Pd-ing,
Scott
p.s. This is setup to use standard guitar tuning but other tunings could easily be fashioned.
You can see the effect in action by clicking on the messages (which represent (midi) pitches)) at the top right of the help file. Changing the "gain(log)" before clicking a message impacts the analog values.
p.p.s. Sorry, it's so large, but my eye-sight is very poor and this scale just makes things a helluva a lot easier on me.
afterward:
If it bounces between values on you, try (in this order): a cleaner sound (un-effected), changing the threshold, or if necessary the parameters inside the sigmund~ object.