| Author |
Message |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
|
Posted: Thu Mar 12, 2009 11:34 am Post subject:
|
 |
|
The filter is a second order low-pass model built into ChucK. You can see it in the patch of the guitar class, it's called LPF. You control it's characteristics by setting the gain and the Q. _________________ "Let's make noise for peace." - Kijjaz |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 237
|
Posted: Thu Mar 12, 2009 11:49 am Post subject:
|
 |
|
Your description of LPF sounds like a state variable filter, for which I have an FPGA module already designed up. An SVF also needs a Q value plus whatever it's Fc should be. A state variable filter is also a 2 pole filter, currently I implement it as a lowpass. Should I assume that the ChucK's implementation is also a lowpass state variable?
The setting of LPF's Fc at 3 times the string's natural frequency would indicate that it's 3rd harmonic dies slowly compared to the rest of the harmonics and the fundamental. Or a nice perfect fifth.
Is that what makes it sound more guitar-like? _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
Last edited by JovianPyx on Thu Mar 12, 2009 12:08 pm; edited 1 time in total |
|
|
Back to top
|
|
 |
Kassen
Moderator

Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Thu Mar 12, 2009 11:55 am Post subject:
|
 |
|
| Inventor wrote: |
Well I'm not sure be I doubt that a 4-pole low-pass filter with feedback will resonate because the gain at the cutoff frequency is -3dB, so the loop gain is below unity. Isn't there a resonant peak below the cutoff frequency for Q higher than 1, as in a Wah pedal? Not sure. |
You simply boost the feedback gain :¬)
Here's a text that Rob Hordijk wrote on it;
http://www.xs4all.nl/~rhordijk/G2Pages/ResFilters.htm
I thought I remembered a single pole should have a 90° phase offset at the cutoff, Rob says it's 45°, with a inversion making up the other 180°. The trick is that a filter has a different phase delay for each input frequency so if we want it to resonate we need the phase offset at that frequency to be 0 (or 360° or a multiple of that).
| Quote: | | But how would that affect the delay calculations for Karplus-Strong anyway? |
Well, if we want the "string" to resonate at a certain frequency and the filter adds a phase offset then that offset has to be added to the total delay at that frequency. I think the math will become a lot easier if we make sure our filter has 0 delay at the frequency we want the whole thing to be at.
Note; you could also see the whole KS construct of a delay line plus a filter as a single huge filter.
Warning; I'm no digital filter expert and any and all of this may be completely wrong, I just like to dabble :¬). _________________ Kassen |
|
|
Back to top
|
|
 |
neuro182

Joined: Sep 07, 2009 Posts: 4 Location: Singapore
|
Posted: Thu Sep 10, 2009 1:22 pm Post subject:
Need help to code for individual note |
 |
|
Hi guys,
I am in a dire situation where I need to code for individual guitar notes from 1st string to the 6th string, from open note to the 12 fretted notes.
Anybody got any clue on this? Please advise. |
|
|
Back to top
|
|
 |
blue hell
Former site admin

Joined: Apr 03, 2004 Posts: 24864 Location: The Netherlands, Enschede
Audio files: 353
G2 patch files: 320
|
Posted: Thu Sep 10, 2009 1:29 pm Post subject:
Re: Need help to code for individual note |
 |
|
| neuro182 wrote: | | I am in a dire situation where I need |
Yes I know, I've read your other two messages (and deleted one of 'm). Still your need doesn't justify posting basically the same message here again and again, so please stop doing that. |
|
|
Back to top
|
|
 |
Inventor
Stream Operator

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

Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Thu Sep 10, 2009 6:44 pm Post subject:
Re: Need help to code for individual note |
 |
|
| Blue Hell wrote: | | neuro182 wrote: | | I am in a dire situation where I need |
Yes I know, I've read your other two messages (and deleted one of 'm). Still your need doesn't justify posting basically the same message here again and again, so please stop doing that. |
On top of that, this sounds like a homework assignment. After consulting some of the more foremost teachers teaching ChucK it was decided that we don't do other people's homework for them (though we will os course answer questions if there is a particular thing you are stuck on). _________________ Kassen |
|
|
Back to top
|
|
 |
neuro182

Joined: Sep 07, 2009 Posts: 4 Location: Singapore
|
Posted: Thu Sep 10, 2009 10:17 pm Post subject:
|
 |
|
@Kassen: it's not a homework assignment, but rather I am working on an iPhone Music App with my buddies so I needed some idea on how to go about doing it since I am not the music-savvy guy.
@Blue Hell: apologies for multi posting. |
|
|
Back to top
|
|
 |
blue hell
Former site admin

Joined: Apr 03, 2004 Posts: 24864 Location: The Netherlands, Enschede
Audio files: 353
G2 patch files: 320
|
Posted: Fri Sep 11, 2009 1:14 pm Post subject:
|
 |
|
| neuro182 wrote: | | @Blue Hell: apologies for multi posting. |
Ok, thanks for understanding. |
|
|
Back to top
|
|
 |
Kassen
Moderator

Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Sep 12, 2009 10:29 am Post subject:
|
 |
|
| neuro182 wrote: | @Kassen: it's not a homework assignment, but rather I am working on an iPhone Music App with my buddies so I needed some idea on how to go about doing it since I am not the music-savvy guy.
|
Whoopsy! that was completely my mistake, sorry, hope you understand.
Is this still a problem? If so could you explain exactly where you are stuck and what you'd like explained? Is it the nature of scales, the way of calculating pitch or perhaps the guitar sound itself? In ChucK particularly or in a more general sense? _________________ Kassen |
|
|
Back to top
|
|
 |
neuro182

Joined: Sep 07, 2009 Posts: 4 Location: Singapore
|
Posted: Sat Sep 12, 2009 10:37 am Post subject:
|
 |
|
Hi Kassen,
I have skimmed thru the sample codes for the Kijjaz guitar code & I am stuck @ the part about how to create guitar sound.
Also of particular interest to my project is the idea of keeping the pitch frequency to the standard 440hz. As of now, the ones I tested out doesn't sound close to a standard electric guitar. It is airy and the sample sounded like it came off from a traditional cultural instrument rather than a modern one.
Please advise me on how I should approach these problems. Perhaps, besides Chuck, are there any recommendations where/how I can get organic analog guitar sounds? |
|
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
|
Posted: Sat Sep 12, 2009 2:18 pm Post subject:
|
 |
|
neuro182, there are a few ways, two of which I have tried. One is kijjaz's technique of summing mandolins and overdriving a distortion effect. The other is Karplus-Strong.
For the kijjaz technique we set the frequency of the mandolins to be the desired note frequency, so that should be on target, note-wise. For Karplus-Strong, the period of the signal is a function of the delay line time and the filter time delay, which is trickier to set properly.
Have a look at the link I provided you for some Karplus-Strong files.
Les _________________ "Let's make noise for peace." - Kijjaz |
|
|
Back to top
|
|
 |
|