| Author |
Message |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Mon Jun 02, 2008 1:13 pm Post subject:
Modifying SinOsc to produce harmonics |
 |
|
Today I tried a bit with phase syncing with SinOsc
and turns out to hear some obvious nth harmonic when using a Phasor to phase-sync with a SinOsc,
but adjusting the Gain of the Phasor.
So, after bandpassing the exact harmonics,
the harmonics suddenly sounds very clear.
Let's make furthur use of this.
This must not be a very complex thing,
but it's easy to build and it sounds smooth.
It makes me think of building a small unit that's easier to choose harmonic number to emphasize.
Or for creating smooth harmonic-sweeping drones.
| Code: | /* SinOsc modified to produce strong n-th harmonic content version 0.1
for ChucK programming language.
Copyright (C) 2008 Kijjasak Triyanond (kijjaz@yahoo.com)
update: June 3, 2008 by Kijjasak Triyanond
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
Phasor a => Gain a_g => SinOsc b => BPF b_f => dac;
55 => a.freq; // set main frequency
3 => a_g.op;
1 => b.sync;
10 => a_g.gain; // chang to hear up to this number of harmonic
TriOsc lfo => a_g;
.05 => lfo.freq; // set LFO (sweep) frequency
2 => b_f.Q; // set bandpass filter Q
.5 => b_f.gain; // set overall gain
while(true)
{
Math.fabs(lfo.last() * a_g.gain() * a.freq()) + 1 => b_f.freq;
ms => now;
} |
|
|
|
Back to top
|
|
 |
rogan

Joined: Dec 16, 2007 Posts: 83 Location: Urbana, IL
Audio files: 5
|
Posted: Fri Jun 06, 2008 2:33 am Post subject:
|
 |
|
Wow. Kijjaz, this is great. I am listening to this with the sounds of birds chirping in the background (I'm up a bit late...). I'll have to look into this soon.
Edit: I just noticed that I've been listening to this on repeat for like 20 minutes. This is somewhat embarrassing, but I do really like the sound! |
|
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Fri Jun 06, 2008 5:09 am Post subject:
|
 |
|
| -_- me too .. I was listening to it for almost a hour after programming it -_-" |
|
|
Back to top
|
|
 |
|