An efficient binaural spatializer (azimuth, elevation)
An efficient binaural spatializer
The "binauralModeled-ircam" object is a pure-vanilla implementation of the binaural model created at IRCAM.. An example of its capabilities can be found at this page.
The object is found at my repository: https://github.com/andresbrocco/binauralModeled-pd
Main concept
Basically, it applies ITD and approximates the HRTF to a series of biquad filters, whose coefficients are avaliable here.
Sample Rate limitation: those coefficients work for audio at 44100Hz only!
Space interpolation
There is no interpolation in space (between datapoints): the chosen set of coefficients for the HRTF is the closest datapoint to the given azimuth and elevation (by euclidean distance).
Time interpolation
There is interpolation in time (so that a moving source sound smooth): two binauralModels run concurrently, and the transition is made by alternating which one to use (previous/current). That transition occurs in 20ms, whenever a new location is received.
Interface
You can control the Azimuth and Elevation through the interface, or pass them as argument to the first inlet.
Performace
Obs.: If the Azimuth and elevation does not match exactly the coordinates of a point in the dataset of HRTFs, the object will perform a search by distance, which is not optimal. Therefore, if this object is embedded in a higher level application and you are concerned about performance, you should implement a k-d tree search in order to find the exact datapoint before passing it to the "binauralModeled-ircam" object.
Ah, maybe this statement is obvious, but: it only works with headphones!
Clock Divider
@pedrobosch https://forum.pdpatchrepo.info/topic/5968/euclidean-rhythm-abstraction
..... and a video tutorial based on that discussion......
David.
Euclidean rhythms?
If you follow the algorithm in http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf, E(5,13) = 1001010010100, But if you use the much simpler one from @Stutter you get 1001001010010. Yes, they are the same if you ignore rotation, but in normal musical practice nobody would say they are the same--they'd say one had flipped the beat (or something). Sometimes the algorithms agree; both algorithms output the same pattern for E(3,8).
[1] Is there a base rotation for Euclidean rhythms?
[2] For arbitrary E(k,n), what is the offset between these algorithms?
Euclidean rhythms?
@beem said:
Mike Moreno has made these Euclidean rhythm things based on the Stutter patch I think...
https://github.com/MikeMorenoDSP/mian-
Thanks, at the link above the patch that interests me is:
eucgui-help.pd
But I don't know how to use the [midirealtimein] object, there is also no help file: connecting an external keyboard and pressing some keys nothing happens, not even when printing with [print( from outlets.
What should happen?
(I specify that [notein] object, for example, works correctly with my midi keyboard.)
Anyway I tested the patch by putting a metro and works fine.
[I use Purr Data on Ubuntu 18.04]
a.
Euclidean rhythms?
Mike Moreno has made these Euclidean rhythm things based on the Stutter patch I think...
https://github.com/MikeMorenoDSP/mian-
https://github.com/MikeMorenoDSP/Euklid
Euclidean rhythms?
@jameslo said:
@atux Can you please repost the links to the two patches you tested? I'm particularly interested in the arithmetic of post #7 but can't make sense of the text representation of @Stutter's patch (and all the hurleur links are broken for me).
Ok, I see that I was preceded.... :D
I add @kyro's patch with matrices: euclidean.pd
I tested @Stutter's patch as subpatch.
For example, with the triad: 3,0,8 the rhythm is obtained:
TUM ta ta TUM ta ta TUM ta
Bye,
a.
Euclidean rhythms?
Thank you,
very interesting. Two completely different ways: a matricial approach and an apparently simple and effective algorithm.
Ok, the graphic part is missing (with clocks and inscribed geometries ...) to "visualize" the rhythms, but the engine that generates the Euclidean rhythms works perfectly.
I have tested both patches, they are great.
Bye,
a.
Euclidean rhythms?
Hi all,
I'm looking for a well done patch for midi Euclidean rhythms generation, with the possibility to vary steps, pulses and offset.
Thanks for any advice.
[I use Purr Data on Ubuntu 18.04]
a.
Signal logic - Clocks, Division and sequences
Expanded my pulse counter a bit: Dividing the pulse magnitudes, and then re-doing the edge detection works.
If the ratio is an integer, then it's more-or-less a classical modular pulse divider (though it assumes the pulses are single-sample, which [phasor~] --> {rzero~] --> multiply-and-clip does provide).
If the ratio is rational but non-integer, then you get sorta like Euclidean rhythms for free! (1.75 is producing ONE two THREE four FIVE six SEVEN ONE two ... I also tried dividing by 8/3 and got one of the standard Euclidean clave rhythms, One two three Four five six Seven eight One two three...)
hjh