Signature
-
seb-harmonik.ar
posted in technical issues • read more@Dizzy-Dizzy just wanted to mention
afaik the usual algorithm is to have an array of size N, with every number from 0 up to N-1 (e.g. [0, 1, 2, .. N-1])
then, when you need a random number pick a random index from 0 to N-1, output it, and move the last element (at index N-1) into its index. next time you need a random number you will choose from N-1 elements instead of N elements, excluding the one you just moved/swapped to the end. And repeat
example: vurn.pd -
seb-harmonik.ar
posted in patch~ • read moreIf I were you I'd peruse (preferably non-copyleft) code on github
https://github.com/r9y9/MelGeneralizedCepstrums.jl
https://github.com/sp-nitech/SPTK
https://github.com/SuperKogito/Voice-based-gender-recognition
https://github.com/suryaturaga3142/dsp-toolkit-v1
https://github.com/talkhouse/noyesthis one says it has a formant detector..
https://github.com/parsa-mz/Pitch-and-Formant-Detectoralso this answer seems pretty good: https://dsp.stackexchange.com/questions/37141/preserving-formants-using-cepstrum
and this resource
https://ccrma.stanford.edu/~jos/SpecEnv/Spectral_Envelope_Extraction.html -
-
seb-harmonik.ar
posted in technical issues • read more@Basalt well it has to have some way of remembering/storing which notes ore still pressed.. that's what the list does.
If you don't need it to go back to the still-held/playing pitch maybe you could get away with a counter, increment for note-ons and decrement for note-offs -
seb-harmonik.ar
posted in technical issues • read more@Basalt idk what version of pd daisy uses but my example only uses pd vanilla objects
Most complex/newest object functions are in [list store] -
seb-harmonik.ar
posted in technical issues • read moreTried to make an example, maybe could be simpler:
last_note_priority.pd
edit: removed some unnecessary routing logic -
seb-harmonik.ar
posted in technical issues • read moreOne way is just to keep a list of notes and only play the last one added to the list. When a key is released you have to iterate through the list and find that note, then remove it
(when the list becomes empty that's when you provide your note off for the last one) -
seb-harmonik.ar
posted in technical issues • read morewell feel free to copy it if you want.. else has a far more steady release schedule anyways

-
seb-harmonik.ar
posted in technical issues • read more@porres I think I implemented it after reading about the algorithm
the fundamental preserves the 'residual' phase when it the cycle completes, and at that point the center frequency phase is reset to 0the frequencies can only be updated when fundamental or center frequency phase rolls over (or they are already 0)
it checks to see if there's enough 'space' in the fundamental phase to fit another center frequency cycle (that's the
phsinc = outfreq/infreq; routphase = shadylib_min(1.f - phsinc, duty); routphase = routphase - outphase - res;part)
but does so while considering the phase it had wrapped around at the beginning of this cycle ('res')This was to avoid the last cycle of the center frequency from popping in and out depending on the starting phase of the fundamental