Author |
Message |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Tue Nov 04, 2008 5:20 am Post subject:
|
 |
|
I have one idea for a Hi Hat, i'll try to program one in my free time.
first idea:
Stick connects to Cymbal1
(use LPFed Noise and Karplus-Strong model)
then Cymbal1 - offset for bias, then connect to HalfRect
HalfRect connect to Cymbal2 (LPFed Noise and Karplus-Strong again)
combine these signals to form the sound from the hi-hat.
then pass the signal of Cymbal1, Cymbal2 to a BPF
and automate that filter's frequency according to hi-hat's open/close state.
hmmm this is quite complex.
there should be many more parameters to play with, for example, damping of each Cymbal. |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Tue Nov 04, 2008 5:37 am Post subject:
|
 |
|
Well, I don't know drums that much, the only reason I asked about hi-hat is that a friend of mine listened to the music and said "don't you think you need a little hi-hat?". Maybe just a cymbal will do... _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Nov 04, 2008 10:17 am Post subject:
|
 |
|
radarsat1 wrote: | Kassen wrote: | (but it has internet streaming as well)... |
url? |
http://www.radiotonka.nl/
Radio Tonka started as a pirate station in the The Hague squat scene (squatting is legal here for buildings that have been unused for at least a year). The Hague has a rather unique alternative musical culture mainly around garage/blues and electro/acid with a lot of small semi-legal stages and cross fertilisation from the conservatory.
Tonka is now broadcasting legally, piggy-backing on the official "town radio" in the small hours. It has a (LONG!) history of experimental and "unexpected" music. If there are any constraints to what I can play or say at all I'm unaware of them and typically I join in the rich tradition that Tonka has of having a drink while presenting ;¬).
Aside from my regular slot every 2nd and 4th Tuesday night (so actually Wednesday morning) from 1-2am I sometimes fill in (like tonight from 12-2). In the past I already featured Les's work and Perry's anthem as well as some excerpts from performances that were published through Toplap.
The Hague is GMT+1 so that places it in the afternoon on the N.A. continent and morning in -say- Australia. Because of the local nature of the station I present my show in Dutch unless interviewing people who don't speak Dutch. I'd be happy to feature people who would have a chance to stop by or -more likely- interesting material send my way. There is 0 budget but of course I'd be happy to attribute pieces to their composer.
All in all it's not that big a deal, just a fun hobby project because I find midnight radio romantic. _________________ Kassen |
|
Back to top
|
|
 |
radarsat1
Joined: Mar 14, 2008 Posts: 85 Location: Montreal
|
Posted: Tue Nov 04, 2008 1:38 pm Post subject:
|
 |
|
Inventor wrote: | Well, I don't know drums that much, the only reason I asked about hi-hat is that a friend of mine listened to the music and said "don't you think you need a little hi-hat?". Maybe just a cymbal will do... |
you'll find that drum synthesis can actually get really complicated, because percussion sounds can be very complex. Cymbals in particular tend to oscillate in very chaotic ways, not just simple modes. But the good news is that you can get away with a pretty simple (if a bit 'robotic') hihat sound by just running some noise through an enveloped high-pass filter.
(that's pretty much how the TR-808 drum machine does it) |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Wed Nov 05, 2008 3:50 am Post subject:
|
 |
|
Inventor: This is one of my recent idea on a Hi Hat sound.
It's quite straight forward, made from filtered / enveloped Noise.
The result is quite nice but need some more filtering to carve out the frequencies we don't need.
In there i've got a ringing sound of the cymbal, can be set by "CymbalFreq",
and also the bass sound heard when hitting a real Hi-Hat.
Now it's not easy to use,
but let's try it.
You can play by setting s.gain to velocity
and see the way i set hi hat decay in Rehit() function.
Code: | // example Electro Hi Hat sound
// - for ChucK programming language
// Copyright 2008 by Kijjasak Triyanond (kijjaz@yahoo.com)
// This software is protected by GPL version 3 license.
0.7 => float DecayRate;
3000 => float CymbalFreq; // Karplus-Strong Frequency
120 => float HiHatBassFreq;
6.5 => float HiHatBassQ;
1.1 => float HiHatBassGain;
5.5 => float HiHatNoiseGain;
.5 => float HihatLimiterThresh;
.18 => float HihatOverdrive;
// PATCHING
Noise s => Delay d => Gain d_fb => d => Dyno MASTER => SinOsc MASTER_od => dac;
d => LPF d_f => SinOsc d_f_od => MASTER;
s => Gain s_DriveGain => SinOsc s_od => MASTER;
// INITIALIZING
second => d.max;
1 => s_od.sync => d_f_od.sync;
d_f.set(HiHatBassFreq, HiHatBassQ);
HiHatBassGain => d_f.gain;
HiHatNoiseGain => s_DriveGain.gain;
second / CymbalFreq => d.delay;
1 => MASTER_od.sync;
MASTER.limit();
HihatLimiterThresh => MASTER.thresh;
HihatOverdrive => MASTER.gain;
// TEST CODE:
spork ~ Rehit();
while(true)
{
s.gain() * DecayRate => s.gain;
ms => now;
}
fun void Rehit()
{
int i;
while(true)
{
if(i % 4 == 0) 1 => s.gain;
else .05 => s.gain;
Std.rand2f(.1, .99) => DecayRate; // Randomize Decay Rate
1.0 - (1.0 / DecayRate) * (samp / ms) => d_fb.gain; // Reset Delay Feedback Value
if (i % 16 < 8) .2::second => now;
else .1::second => now;
i++;
}
} |
|
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Wed Nov 05, 2008 7:25 pm Post subject:
|
 |
|
kijjaz,
this looks terrific and well thought out. However at the moment my schizophrenia is acting up. My mom dragged me to a psychological study of schizophrenics and it brought back a torrent of bad memories and anger toward God and all sorts of horrible feelings and in this state of mind I cannot concentrate well enough to understand your code. Give me another day or two for it to clear up, then I will look closer.
Les _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Wed Nov 05, 2008 11:39 pm Post subject:
|
 |
|
Oh Les, get well soon. Are there many places to chill there? |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Nov 06, 2008 12:09 am Post subject:
|
 |
|
There are a few, but I don't go there because the public always stares at me. They are very rude, they look at me, they gawk, then they turn away and pretend to ignore me. They seem to recognize me from tv or internet or something, but I have not been on either. I just want it to end. Maybe I need to move to a smaller town. But no, no place to relax. I just sit in front of the computer and play loud rock music on the headphones until I get better. _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Thu Nov 06, 2008 3:15 am Post subject:
|
 |
|
hmm.. how about the birds and the trees in the park? |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Nov 06, 2008 9:31 am Post subject:
|
 |
|
Well, there is a park nearby, but the people there would stare at me, which only serves to aggravate the condition. There is the back porch looking over the lake but i have no chair for it. So I stay inside.
I wrote a song, a very angry evil song, and slept some. That seems to have helped a good bit. _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Nov 07, 2008 1:20 am Post subject:
|
 |
|
OK, kijjaz my man, I had a nice long talk with my girl and slept some more and now I feel refreshed and ready to work on it. First, the hi-hat sounds terrific!
My primary concerns now are with name conflicts and calling methods. I suppose the 1::ms spinning time loop can be made into a shred, because my time loop is already occupied. but then how do I turn the rehit() function into a called routine? It needs to be called with a frequency maximum of about 1/8 of a second or so. Can we spork it and have it me.exit() after an appropriate time?
Also there will be name conflicts with some things like n and s and such being names you use in the bass drum or elsewhere. Can I just throw a class wrapper around the body and refer to everything within by class reference? Better still, can spin() and rehit() be member functions?
I really hate to reply to your excellent work with a request for a little polishing up, but I guess that is what I am doing. So how about it kij, a little cleanup work to make it a truly reusable, portable code? If you do not want to do that, I will gladly take a try at it, but you are the one who has it all active in memory so to speak...
Thanks so much, kijjaz! You brightened my week with a little hi-hat! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Nov 07, 2008 1:38 am Post subject:
|
 |
|
I tried to make the changes, but all I got was a high-pitched squeal. Help kijjaz, haha!
Code: | // example Electro Hi Hat sound
// - for ChucK programming language
// Copyright 2008 by Kijjasak Triyanond (kijjaz@yahoo.com)
// This software is protected by GPL version 3 license.
class hi_hat_drum {
0.7 => float DecayRate;
3000 => float CymbalFreq; // Karplus-Strong Frequency
120 => float HiHatBassFreq;
6.5 => float HiHatBassQ;
1.1 => float HiHatBassGain;
5.5 => float HiHatNoiseGain;
.5 => float HihatLimiterThresh;
.18 => float HihatOverdrive;
// PATCHING
Noise s => Delay d => Gain d_fb => d => Dyno MASTER => SinOsc MASTER_od => dac;
d => LPF d_f => SinOsc d_f_od => MASTER;
s => Gain s_DriveGain => SinOsc s_od => MASTER;
// INITIALIZING
second => d.max;
1 => s_od.sync => d_f_od.sync;
d_f.set(HiHatBassFreq, HiHatBassQ);
HiHatBassGain => d_f.gain;
HiHatNoiseGain => s_DriveGain.gain;
second / CymbalFreq => d.delay;
1 => MASTER_od.sync;
MASTER.limit();
HihatLimiterThresh => MASTER.thresh;
HihatOverdrive => MASTER.gain;
fun void Rehit(float s_gain, float decay)
{
s_gain => s.gain;
decay => DecayRate;
1.0 - (1.0 / DecayRate) * (samp / ms) => d_fb.gain; // Reset Delay Feedback Value
}
// time loop
while(true)
{
s.gain() * DecayRate => s.gain;
ms => now;
}
}
// Test Code
hi_hat_drum hi_hat;
while (true) {
hi_hat.Rehit(Math.rand2f(0.05, 1.0), Std.rand2f(.1, .99));
second / 4.0 => now;
} |
_________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Fri Nov 07, 2008 8:28 am Post subject:
|
 |
|
I have something a little more positive to report this morning. I got the idea that I could make a drumless drum set by securing the GMS prototype to a plastic stick and writing appropriate software. So far it kind of works. I have it triggering kijjaz's bass drum, though it hits extra times due to the rebounding of the stick in the stop position. Any ideas on how to fix this? Anyways, cool application eh? _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
 |
|