why saw and square 'sound' louder?
@brendanmac lets look at it.
from an electronics perspective it looks like a square wave represents a steady DC signal the closest (meaning if you were to flip the 0 to -1 part it would be a straight line) besides at the crossings and the others look filtered.
Its interesting how there's a subtle difference at the peak of a sine vs a triangle, the sine hits red a little. In vintage analog synths a "dirty" triangle wave could be mislabeled on the synth as tho it is a sine but it looks like it has the least energy. Also from vintage synths if you look at the waves in a scope they look different than you would think, especially something like a 303 (filtering out the DC maybe?). A function generator (which this basically is) is more like what you think of these basic waveforms in your head.
the live electronics tutorial included in [else] is top notch btw (as is the audio section in the help browser, thats supplemented with a free online book on miller's website). a saw has all the harmonics, a square odd, triangle even, and they can be separated or combined. a (co)sine wave is the only signal that can travel through electronics without change phase (which can mess up what you are seeing) one reason why its used to probe inside audio electronics
also to note, the oscope~ on the top was just to show that the [phasor~] normally comes out at 0-1 (normalized float which is easy to use as a looping function) so it has to be stretched out to be used like a sawtooth
testWaves.pd
why saw and square 'sound' louder?
@brendanmac If I remember correctly from school the power of a signal is the area under the curve.... which is why a compressed signal (then normalized) sounds louder and compression is often used when mastering a recording.
A square wave has a large area under the curve..... it is always at +- 1 ....... and will be 6db louder than a sine wave for the same peak values.
A saw contains all the higher harmonics (like the square wave) but the perceived loudness has more to do with the richness of the timbre than the actual power I think. The square wave of course also has that perceived increase in power from the harmonics.
A saw wave actually has less power than a sine wave, so the effect is purely psychoacoustic.
The harshness comes from the higher harmonics (especially the highest), so you cannot change that. A low pass filter will progressively return the waveform to a sine as the cut off frequency is reduced, because the higher harmonics are being reduced...... and it will introduce a phase shift (a slight lag in the waveform).
A wavetable will produce the same effects as your maths...... it is in the nature of the waveform and there is nothing wrong with your method.
You can use a [lop~] to reduce the effect though if you actually want a less harsh sound.
David.
Coarse-grained noise?
@manuels I was not prev aware of these other kinds of white noise but they are all smooth and so don't produce the kind of texture I want. To give you a sense of what I'm looking for, here is the sound of a drip into an empty tin can: tinCanDrip1.wav. Convolved with binary white noise, you get this: tin can conv binary noise.wav. Now here is my nasty-sounding whitening of bubbling water and it's convolution with the tin can: whitened bubbling.wav & tin can conv whitened bubbling.wav. See how the result sounds a little like a small stone being rolled around the bottom of the can?
Also, that's interesting about [noise~] in overlapped windows, I'll go back and modify my version of that patch to see if the lo-fi mp3 quality goes away.
@whale-av "randomly modulated in its amplitude"--yes, that's what I tried with the 64 band 1/5 oct graphic. It's not bad, but it's not natural sounding either. Could be useful anyway, depending on the effect you want.
@ddw_music My problem isn't the convolution (I'm using REAPER's ReaVerb for that), I'm just wondering how to make the kind of IR that produces the effect I want. Your rifft strategy is what I speculated about in my original post and what I first tried using [array random] to generate freq domain moduli with a similar distribution as [noise~]. FYI Pd's real inverse FFT automatically fills in the complex conjugates for the bins above Nyquist, so you don't have to write them--leaving them as all 0 is fine. Also note that your [lop~] is filtering the change between successive bin moduli in a single window, not the change of each bin from window to window. I'm speculating that the latter (maybe using asymmetric slewing rather than low pass filtering) would make frequency peaks hang around longer (and hence more audible) whereas I'm not sure what the former does. That said I think the strategy of modifying natural sound is paying off faster than these more technical methods.
Is it possible to group different soundfiles in only one message?
Hi all,
I'm creating a project with lots (literally hundredths) of samples I want to play kind of randomly. I'm new on PD, and right now I'm working on my prototype with the classic message [open soundfile.wav, 1] to play each one of them. But I need to scale it more efficiently and I'm not finding a solution. Does anyone know if there is a method to group different files in a message and select one of them randomly?
I was wondering if it is possible to build something like this:
[O]
|
[random 858]
|
[sel $1]
|
[O]
|
[file_0.wav, file_1.wav, file_2.wav, file_3.wav, file_4.wav, file_5.wav (...) file_857.wav]
|
[readsf~]
|
[dac~]
Thanks in advance, I'm learning a lot in this community.
Cheers!
Phase of sine
I have created a kind of pulse width sine thingie where I can define the nr of sine waves in one period by use of a comparitor
Works great , more or less
Obviously the sine needs to be stationary (0hz° ) and the phase input is modulated by a phasor .
The issue is settting the starting phase of the sine because when it's a cosine there are discontinuties ( becasue it starts from 1) , the starting phase sometimes works with the nr. 1.429 ,but most of the time not (blue rectangle on picture )
Max msp obviously suffers from the same issues with cycle~ but it has a sinx~ object which takes 2*pi as input.
Here's the stuff
narrow sine.pd
Why does the same program have different output?
In order to transition from a sine wave to a triangular wave, I combinined the two sound waves by adjusting the gain of the two waves to each other, i.e. the triangular wave gain (a) drops uniformly from 1.0 on the left to 0.0 on the right, while the sine wave gain increases accordingly (always 1-a).
It worked well at first. However, when I ran it again, the volume changed. The exact same procedure, which I can only explain in metaphysical terms
Maybe someone can answer it for me? Thanks so much
Here is the picture view of my problem:
Broken Square Waves?
Hi, I'm looking for someone with a deeper understanding of PD and audio synthesis to help me understand why my patch sounds the way it sounds. I don't know why the audio is generated this way. I don't know if it is because of some expected behavior of square waves and the math behind it, or if it is because of some quirk of PD and the way I'm generating the square wave. If you think you can help, please stay with me, I don't know who to go to or what to study to help me understand this.
I was attempting to make a square wave from scratch, I saw some tutorials and I know there are more "proper" ways of doing this, but the simplest I could think of was -1 and 1 alternating. The osc I built is a metronome with a route alternating between -1 and 1 at a given hertz. But the result doesn't sound like a single square wave, there are some harmonics, almost like having senoidal waves mixed with the square wave.
Experimenting, I noticed a cycle of the resonances going from 1hz to 1378.125hz where it completely stops, like zero hz, or one tick in several, several minutes. Other cycles multiples of this frequency exist, like this:
n=1378.125hz
Cycle0 = 1 to n* 2^0
Cycle1 = n*(2^0) to n*(2^1)
Cycle2 = n*(2^1) to n*(2^2)
Cycle3 = n*(2^2) to n*(2^2)
? Cyclen= n2^(n-1) to n(2^n) ?
C0 and C1 are very similar, with subtle differences, but inside of C2 it seems like 2 times C0 or C1 (I didn't check it, but it sounds like this). Inside C3 there are 3 times, and next, C4, 4 times, and so on, the same cycle but more times and faster in each power of two.
I have made a patch that makes it easy to clone the osc to generate each Cycle. For example, clone 10 times to get audio files from C0 through C9.
Where do the resonances come from? Why these cycles exist? Are they some kind of harmonic series? Why 1378.125hz? Is this expected from the math, or is it a quirk result of some PD object (like inputing very low numbers to the metronome)? Does someone understand why this is happening?
main_oscs_cycles.pd
square-from-scratch-osc.pd used in main
square-from-scratch-osc-lineramp.pd used in main
osc~ presentation with or without arguments
@auaa If you just "put" an array without setting its size then it will be 100 samples wide.
For a 50Hz sine wave to do a complete cycle.... 0 to 1 to 0 to -1 to 0.... requires 882 samples at 44100 samples per second or 960 samples at 48000 (samplerate... samples per second / cycles per second).
So you just see a small part of the wave in your 100 sample window.
And they are different because which bit of the wave you see in the array depends on the point that the wave is at in its cycle when you bang [tabwrite~]
You can make them the same by banging them at the same time and reseting their phase just before they write.....
David.
Also you can write a sine wave into the array using the [simesum( message.
15.array.pd
There isn't much help, but I remember there being more help in the "Pd Floss Manual" which you should find with a google search.
Here...... https://archive.flossmanuals.net/pure-data/list-of-objects/introduction.html
Or more specifically here.....https://archive.flossmanuals.net/pure-data/audio-tutorials/generating-waveforms.html
osc~ presentation with or without arguments
Hi, I'm a total newbie on pd, and I was trying to compose a sine wave. But there's something I really confused about.
So why these two patches behave differently, like in opposite? (1)
I have read the help file but still cannot figure out the reason, besides, it's saying [osc~] used to compose cosine wave, then why use it for sine wave? I'm aware that sin wave and cosine wave are the same shape but different starting point, in that case, how does [osc~] here handle? (2)
Also, it seems like every time I run the patches, the outcome is different, why is that? (3)
My questions may be naive, but still thanks in advance.
NoxSiren - Modular synthesizer system <- [v15]
NoxSiren is a modular synthesizer system where the punishment of failure is the beginning of a new invention.
--DOWNLOAD-- NoxSiren for :
-
Pure Data :
NoxSiren v15.rar
NoxSiren v14.rar -
Purr Data :
NoxSiren v15.rar
NoxSiren v14.rar
--DOWNLOAD-- ORCA for :
- x64, OSX, Linux :
https://hundredrabbits.itch.io/orca
In order to connect NoxSiren system to ORCA system you also need a virtual loopback MIDI-ports:
--DOWNLOAD-- loopMIDI for :
- Windows 7 up to Windows 10, 32 and 64 bit :
https://www.tobias-erichsen.de/software/loopmidi.html
#-= Cyber Notes [v15] =-#
- added BORG-IMPLANT module.
- introduction to special modules.
- more system testing.
#-= Special Modules [v15] =-#
- BORG-IMPLANT (connects ORCA MIDI system to NoxSiren system)
#-= Current Modules [v15] =-#
- VCO (voltage-controlled-oscillator)
- VCO2 (advance voltage-controlled-oscillator)
- WAVEBANK (additive synthesis oscillator)
- ADSR (Attack-Decay-Sustain-Release envelope)
- C-ADSR (Curved Attack-Decay-Sustain-Release envelope)
- CICADAS (128 steps-Euclidean rhythm generator)
- CICADAS-2 (advance 128-steps polymorphic-Euclidean rhythm generator)
- COMPRESSOR (lookahead mono compressor unit)
- DUAL-COMPRESSOR (2-channel lookahead mono compressor unit)
- STEREO-COMPRESSOR (lookahead stereo compressor unit)
- MONO-KEYS (virtual 1-voice monophonic MIDI keyboard)
- POLY-KEYS-2 (virtual 2-voice polyphonic MIDI keyboard)
- POLY-KEYS-3 (virtual 3-voice polyphonic MIDI keyboard)
- POLY-KEYS-4 (virtual 4-voice polyphonic MIDI keyboard)
- POLY-KEYS-5 (virtual 5-voice polyphonic MIDI keyboard)
- POLY-KEYS-6 (virtual 6-voice polyphonic MIDI keyboard)
- BATTERY (simple manual triggered machine for drumming.)
- REVERB (reverb unit with lowpass control)
- STEREO-REVERB (stereo reverb unit with lowpass control)
- RESIN (advanced rain effect/texture generator)
- NOISE (generates black,brown,red and orange noise)
- NOISE2 (generates yellow,blue,pink and white noise)
- COBALT (6-stage polyrhythm generator)
- SHAPER (basic shaper unit)
- FOLDER (basic wave folding unit)
- STEREO-FOLDER (stereo wave folding unit)
- DUAL-FOLDER (advance wave folding unit)
- POLARIZER (transform a signal into bi-polar, uni-polar, inverted or inverted uni-polar form)
- CLOCK (generates a BPM clock signal for sequencing other modules)
- CLOCKDIVIDER (a clock divider with even division of clock signal)
- CLOCKDIVIDER2 (a clock divider with odd division of clock signal)
- DELAY-UNIT (delay unit)
- STEREO-DELAY (stereo delay unit)
- CHORUS (chorus unit)
- STEREO-CHORUS (stereo chorus unit)
- SEQ (advance 16-step/trigger sequencer)
- KICK (synthesize kick unit)
- KICK2 (synthesize flavor of KICK module)
- KICK3 (synthesize flavor of KICK module)
- SNARE (synthesize snare unit)
- CLAP (synthesize clap unit)
- CYMBAL (synthesize cymbal unit)
- RAND (RNG generator for other modules parameters)
- FMOD (feedback modulation unit)
- AM (amplitude modulation unit)
- RM (ring modulation unit)
- LFO (low-frequency-oscillator)
- LFO2 (advance low-frequency-oscillator)
- COMBINATOR (combine two waves)
- COMBINATOR2 (combine three waves)
- COMBINATOR3 (combine four waves)
- STRING (Karplus-Strong string synthesis unit)
- STRING2 (advance Karplus-Strong string synthesis unit)
- DETUNER (parametric 4-channel detuner unit)
- CRUSHER (basic audio resolution unit)
- STEREO-CRUSHER (basic stereo audio resolution unit)
- DUAL-CRUSHER (advance audio resolution unit)
- FILTER (basic filter)
- VCF (voltage-controlled-filter)
- MAR (Moog-analog-resonant filter)
- VCA (voltage-controlled-amplifier)
- DUAL-VCA (advance voltage-controlled-amplifier)
- FMUX (multiplexer with fast A/D internal envelope)
- MMUX (multiplexer with medium A/D internal envelope)
- SMUX (multiplexer with slow A/D internal envelope)
- FDMX (demultiplexer with fast A/D internal envelope)
- MDMX (demultiplexer with medium A/D internal envelope)
- SDMX (demultiplexer with slow A/D internal envelope)
- MIXER (mix 1-4 possible waves)
- SCOPE (oscilloscope analyzer)
- MASTER (fancy DAC~)
- BOX (useless decorative module)
NoxSiren integrated modules menu system.