Pitch to MIDI converter - need help


#1

Hi, just starting with the Axoloti and I need some help, please.
I once created a pitch to MIDI module in SynC Modular and I want to re-create it in the Axoloti.

I have two questions, hopefully somebody can clarify:
1) How do I create an audio signal clipper, so the output is 1 if the audio sample is above 0 and -1 otherwise? (or 64 and -64)

2) How do I create a "relay" for an audio signal, for example if the absolute value of a signal is above a given value, let the signal pass, if not set to 0. (I found the math/abs module, but not sure how to implement the relay part.
Thanks!


#2

FOr this use the math objects that does "less than" and "more than". I dont remember the real names of them.


#3

Thank you for the suggestion. math/< and math/> I see that these accept "green" or "blue" signals and output a boolean only, so they cannot process the audio (red) stream. Or am I wrong here?

The relay object I am looking for has ideally 4 inputs: input, Threshold, A, and B. If the input is above Threshold, then output A, else output B. I am surprised there isn't such an object already available.

Also this triggers another question, can I modify the objects? If so do these need compiling or similar?
I cannot find any documentation for this type of questions. Thank you in advance.


#4

Maybe you can convert the s-rate(red) signal to k-rate(blue) signal, which is for modulation. This is just a long shot and have not tested it or anything.....:

But s-rate is 16 times k-rate.
S-rate= sample rate = Axolotis sample rate is 48000 hz
K-rate= modulation = 3000hz
3000 X 16 = 48000hz

Take the audiosignal you want to use and route it into a div/16 object(blue version) and then to the math objects.... Again I have NO IDEA if this will work or if it is right way to do it but try.... Converting from k-rate to s-rate is easy .cause there are objects for it... the other way around I am not sure about... But try the above and see what comes out of it :smile:

Let us know if this works or not.


#5

If that doesnt work, maybe check this thread with the yin object:

Maybe that can be used in some way. It has s-rate in in and k-rate out.


#6

you can use my muls 16bit, it's in my contributions. the signal will be 0 to 64 then.