• Converting audio signals to binary with no externals ?

How do i convert an audio signal to binary without using bitsplit~ from creb external in Pure Data ?. Do i need to use snapshot~ in combination with something else or there is a better way ? I was thinking about doing signal quantification using snapshot~ and then converting the decimal magnitude to binary. Is this the right way or is something else that i miss ? Many thanks.

• Posts 24 | Views 423
• @Boran-Robert It is always great to see @seb-harmonik.ar and @alexandros contributing to the audio discussion on this forum.
We can learn....... rather than fumbling in the dark...!
David.

• @seb-harmonik.ar , @whale-av Many thanks for help. So what i want to do is this :

i want to have 2 oscillators (both sine waves. one a carry oscillator and the other one a modulator) with different frequency. And i want their audio signal to be processed in [expr~ ] using bitwise XOR modulation. This is different from [+~] , [-~] , [*~] , [/~]. This paper describes this in detail.

dafx08_13.pdf

Here is a plot of the waveform result using bitwise XOR (from the paper above) :

Here is a schematic view of the oscillator structure :
So to control both oscillators i need to control the theta (phase) , f (frequency) and A (linear amplitude). Also S1 is unipolar. So the idea is that i can use the basic operations on the audio signals like (addition,multiplication,bitwise OR,bitwise AND) or i can use something different (bitwise XOR). So i tried to make somehow the bitwise XOR using a formula : bitwise XOR equivalent <- (S1 | S2) - (S1 & S2) (not working). The bitwise operations like "&" and "|" works for [expr] not [expr~].

Also i just found this about [expr~ ] object so maybe i am missing something or i am wrong
What is this operator "^" it is bitwise XOR ? or exponential ? or something else ?

Thanks to all a lot for the help. I also tried what @alexandros was talking about and it is almost working. But the waveform is really off so i need to learn more about this idea.

• @Boran Robert i think & and | do work with expr~ and ^ is XOR, see this example for & and | in use: bitshift_sound.pd
here is a list with all operators:

• @Jona Many thanks. This is perfect. With what you are saying you can build Bitchip (bitwise chiptune) music. Fantastic.

Looking at where ^ is in the list I am pretty sure it is bitwise XOR....... and you can check it manually in that patch.
David.

• @whale-av Thanks you are right i found it. It is bitwise XOR operation.

• I have been playing a little bit with many ideas from you guys. And thanks to @Jona inspirational idea i came up with this Bytechip music formulas. This can be further extended to pink insanity :

1583675931651-bitshift_sound.pd

ByteChipv1.pd

• @Boran Robert actually clip~ is not needed, instead divide through 256. the recursive trance sounds quite interesting.
bit.pd

• @Jona Thanks again for the idea. This concept can be extended into something really interesting. I was thinking that it is possible to connect a counter that counts N steps and at different steps could replace the values of a particular parameter in a sequential manner with a specific pattern parameter. So you have a polymorphic formula where each parameter \$f2,\$f3,\$f4 is replace by a pattern sequence at different steps. The pattern sequence loading into the formula can be started at a random step in one of the sequencers. Or modulated by other sequencers to be set at a specific step. So you could have one of the sequencers to decide the step value for another sequencer. You could use the gap between steps to hold a specific value in the formula.

``````<this is just one sequence for one parameter >
[counter]
|
[sel 0 1 2 3 4]
|
[2] <- at step 0 send a message to \$f2 ; at step 1 send a different message to \$f2 ...
|
[expr~ (\$v1 & \$v1 % 255) - (\$v1 * \$f2 & \$v1 >> \$f3 & \$v1 >> \$f4]
``````
Posts 24 | Views 423
Internal error.

Oops! Looks like something went wrong!