Sputnki contributions


#47

Well, i don't really have a precise objective in mind, however i think these tools might be useful to some geeks.
Also, exploring 2D and 3D space might (might!) be interesting for some kinds of modulations.. Who knows?

If you have some ideas i'm curious to hear them.


#48

Objects added:

sptnk/math/projection.axo
sptnk/math/projection s.axo

These objects project a 3D set of coordinates into 2D, with a weak perspective algorithm https://en.wikipedia.org/wiki/3D_projection#Weak_perspective_projection
attr_plane allows to select the plane of projection (plane = xy -> camera axis = z; plane = yz -> camera axis = x; plane = zx -> camera axis = y; )
Scale parameter allows to scale the output (standard axoloti format), eye specifies the distance on the camera axis of the eye. This means that if the eye is set to 64 and the plane of projection is xy, coordinates at z = 0 will appear unscaled. z<0 will result in smaller figures, while z>0 bigger.
At z approaching 64 the magnification approaches infinity


#49

Thanks @Sputnki many interesting objects for my oscillographics patches to try out!
I tested the projection.axo ... with yz plane I'm getting this error:

rootc::instanceprojection__1::calc_Px(int32_t, int32_t, int32_t, int32_t, int32_t)':
/Users/akirasrebirth/Documents/axoloti/build/xpatch.cpp:2219:3: error: expected primary-expression before '<<' token
{<<1
^
make: *** [/Users/akirasrebirth/Documents/axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 2
Compiling patch failed ( /Users/akirasrebirth/Documents/axoloti/akirasrebirth/3d Oscillostudio.axp )


#50

Thanks for the report, corrected!


#51

Added some looper objects:
sptnk/looper/pos m.axo
sptnk/looper/pos speed m.axo
sptnk/looper/record speed.axo

The first is a looper/pos with modulation inlets for parameters.

Second and third object allow glitch reduced stretched recording.

I'm still far from the quantized looper, however i'll come to that object eventually (it's not so easy to code!)


#52

Any chance of letting me know how to do some slicer implementation?


#53

I've made a slicer object (there are two instances of it, one with inlets and one with mod parameters), with an help patch. Not sure if it's what you need, however it's not really a flexible object.
I was thinking to make some all-in-one sample player, however i fear it's too big of a project and i'd give up sooner or later...


#54

sptnk/logic/shift register.axo

It's a shift register that can do SISO and SIPO.


#55

sptnk/logic shift register 2d.axo
2 dimensional 4x4 shift register.
Data is organized in a 4x4 matrix. You can access singular values with x and y coordinates.
You can find a brief schematic of the matrix inside the local data of the object


#56

i can't find the slicer help patch?


#57

Have you tried clicking on the arrow of the object?


#58

Ah...by patch you mean help information? Yeah I've seen that.


#59

sptnk/effect/sat ur hate 2.axo

Yet another polynomial waveshaper, antialiased, with internal feedback loop, but also variable waveshape and modulation inlets. You can see some shapes it can do here:

IMPORTANT! Input is hard saturated to normal range, but no antialiasing is applied in this stage!

Feedback can be either positive or negative, sets the amount of output signal that is mixed with the input (it can beef up the sound, but also totally destroy it). Tame option automatically lowers input volume according to feedback amount.

A filter can be inserted in the feedback loop (no filter / lowpass 1 pole / highpass 1 pole) to stabilize or cancel dc.

Shape, feedback and filter pitch can be modulated, with little or no artifacts.


#60

sptnk/effect/hard 1.axo
Waveshaper distortion (hardclipping + crossover). Antialiased.
The amt parameter controls the position of the peak (it's basically a gain).

sptnk/effect/hard 2.axo
Waveshaper distortion (pseudo tanh). Antialiased

Plots are courtesy of wolfram alpha


#61

sptnk/math/rot 2d
sptnk/math/rot 2d k
sptnk/math/rot 3d
sptnk/math/rot 3d k

Geometric rotations for 2d and 3d coordinates.. Useful for lissajous applications.
Based on this: https://en.wikipedia.org/wiki/Rotation_matrix

sptnk/math/knee
sptnk/math/knee 2
Some k-rate mappings. You can see the meaning of parameters in the pictures. m stands for angular coefficient (in y = mx + q)

sptnk/math/grid
sptnk/math/grid k
Not sure if they should go in the math folder... Again, they're for lissajous purposes. These objects will generate a set of coordinates (with pitch) to form a grid with R rows and N columns.
Available in k-rate and s-rate


#62

Pitch detection objects:

sptnk/detect/0x k.axo
sptnk/detect/0x s.axo

These are very naive zero crossing detection objects, the former working at k-rate and the latter at s-rate.
These objects count how many samples occur between consequent zero crossings. The number of samples (green outlet) refers to the corresponding rate: k counts samples at k-rate and s count samples at s-rate.
No interpolation of any kind is implemented in these objects. The k-rate objects outputs a trigger pulse when a zero crossing has occurred.

sptnk/detect/0x k f.axo
sptnk/detect/0x s f.axo
Again, zero crossing detection in s-rate and k-rate. These however are slightly more precise, as they work in floating point and interpolate the wave in zero crossings. A conversion between sample period and frequency is also implemented (it's the frequency of a saw wave that goes from 0 to 64 in a number of samples equal to
the detected period

sptnk/detect/period mono.axo
This object is based on zero crossing detection, however it keeps track of the "mean value" and filters out readings that are too slow or too fast (maximum and minimum periods can be specified in the spinner boxes)
The objects starts to count when it finds a zero crossing in the signal.
While counting it checks if it encounters another zero crossing, and if the mean value of the signal is sufficiently close to zero (how close is specified by the tolerance knob) it outputs the readout.
Output is in number of samples (integer)
sptnk/detect/period mono f.axo
A variation on the previous object. This one interpolates the wave during zero crossings to achieve a better readout, and also outputs a frequency.

sptnk/conv/ftom.axs
This one converts a frequency to a midi note. You can see it as the "inverse" function of mtof. I tried to make it the most precise possible, however it still has a very little error, due to the non perfect logarithm computation. The error however is distributed as evenly as possible inside the whole -64 : 64 range


Feasibility of a spesific patch
#63

Distortion objects:

sptnk/effect fold 1.axo
Symmetrical waveshaper distortion based on 5th order polynomial, that folds the signal for sufficiently great values of the m parameter. Mildly antialiased, wild, with internal feedback and the ability to chain several waveshaper units with different m values.

sptnk/effect fold 2.axo
Symmetrical wavefolder distortion based on 5th order polynomial, looks like a sine shaper for intermediate values. Mildly antialiased, very very very wild, with internal feedback and the ability to chain several waveshaper units with different m values.

sptnk/effect waveshaper 16p.axo
Symmetrical waveshaper with user definable shape, similar to waveshaping with a table, but with "some sort of antialiasing that works well if you like it" added. This object has internal feedback and allows to chain several units together for utter sound devastation
Also
sptnk/effect waveshaper 16p coefs.axo
Allows to generate coefficients for the previous object.

You can see all the objects in action in the help file


#64

Hello Sputnki! i'm totally n00b but gettin my head around things and having a very good time :slight_smile: i'm struggling with euclidean objects. i had in mind to recreate the simple behaviour of Mutable Instruments Grids in euclidean mode, which is fairly simple (and has no offset or rotate parameter). it has a clock in and then you have three channels, on each one you can control length and fill (same as length and notes on yours). at first i had problems understanding that i needed a counter for your objects to work, now i kinda grasped it but still i don't know if i misunderstand them or if they behave in a way that i think is not how i understand euclidean pattern generators:
1) if you change the length parameter you also have to change the MAX count on the counter, otherwise if you have (say) length=8 and max count=16 you end up with only half of the pattern working. i managed to put a range dial controlled by midi cc that contemporarily controls MAX and length to have them always the same value. then another range dial for notes. it kinda works but i noticed that after a certain amount the actual filled steps start to decrease. then i realized it probably has something to do with the clock resolution i'm feeding it. i usually put up a midi clock receive object and then divide it by 6 to get a tick for each 1/16th. but , and here maybe i'm totally off, i think that for this to work correctly one will have to change the clock resolution WITH the max count AND the length, otherwise it doesn't work as i suppose it to. other problem i have to implement it for live purposes is that if notes > length it stops working, i'd have to find a way to constrain notes maximum range to length...but still bashing my head on the wall to find a solution :slight_smile: obviously the goal here is to have a realtime performance euclidean drum machine. thanks for any guidance in advance :slight_smile: i attach a zip with my patches if anyone wanna give it a check ! https://www.dropbox.com/s/qnh2dflp2vgmk4b/hyeuclid.zip?dl=0


#65

The basic principle of euclidean rhytms is to spread a number of notes and rests in the most uniform way possible.
The euclid.axo object i made (the one with notes and rests) takes notes and rests as parameters, so if you set it to work with 3 notes and 4 rests it will create a rhythm of 7 steps in total length, and it will spread notes and rests among these 7 steps.
Everything outside that range is treated as a rest (output is 0).
You can chain several objects together, to create complex rhythms, i.e. you could spread 2 notes and 3 rests over the first 5 steps and then 1 note and 2 rests over the next 3 steps.
If you want to wrap the rhythm over 8 steps you must do this before the first euclid object (use divremc)
Also, check the help patch in case you didn't!
P.s: euclid length.axo is really not much different, but instead of reasoning with notes and rests it deals with a total length and a number of notes. Rests are calculated as a difference between total length and notes


#66

sorry but still find it very confusing, i ask you a simple question:
with your implementation will i be able to just have one clock in , one knob to control length and one knob to control notes given just a maximum length, all realtime?
let's suppose i say the limit is 16 steps, will i be able to control realtime the two parameters, seamlessly changing both length and notes without issues? if it is possible i will do my best to understand it and implement it in my patch :slight_smile:
(by the way, ciao! :smiley: )