electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Improving the kijjaz Guitar
Post new topic   Reply to topic Moderators: Kassen
Page 2 of 2 [37 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Thu Mar 12, 2009 11:34 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 237

PostPosted: Thu Mar 12, 2009 11:49 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Thu Mar 12, 2009 11:55 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website
neuro182



Joined: Sep 07, 2009
Posts: 4
Location: Singapore

PostPosted: Thu Sep 10, 2009 1:22 pm    Post subject: Need help to code for individual note Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
blue hell
Former site admin


Joined: Apr 03, 2004
Posts: 24864
Location: The Netherlands, Enschede
Audio files: 353
G2 patch files: 320

PostPosted: Thu Sep 10, 2009 1:29 pm    Post subject: Re: Need help to code for individual note Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Thu Sep 10, 2009 5:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Try this thread:

http://electro-music.com/forum/topic-35496.html

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Thu Sep 10, 2009 6:44 pm    Post subject: Re: Need help to code for individual note Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website
neuro182



Joined: Sep 07, 2009
Posts: 4
Location: Singapore

PostPosted: Thu Sep 10, 2009 10:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

@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
View user's profile Send private message
blue hell
Former site admin


Joined: Apr 03, 2004
Posts: 24864
Location: The Netherlands, Enschede
Audio files: 353
G2 patch files: 320

PostPosted: Fri Sep 11, 2009 1:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

neuro182 wrote:
@Blue Hell: apologies for multi posting.


Ok, thanks for understanding.
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Sep 12, 2009 10:29 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail Visit poster's website
neuro182



Joined: Sep 07, 2009
Posts: 4
Location: Singapore

PostPosted: Sat Sep 12, 2009 10:37 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 270

PostPosted: Sat Sep 12, 2009 2:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 2 of 2 [37 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org