electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 » Clavia Nord Modular » Nord Modular G2 Discussion
calculating 3rds
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
tayholliday



Joined: Apr 23, 2008
Posts: 39
Location: San Francisco, CA
G2 patch files: 1

PostPosted: Thu Nov 20, 2008 9:58 am    Post subject: calculating 3rds Reply with quote  Mark this post and the followings unread

I'm trying to implement a diatonic harmonizer.

Given a scale and a note value, how can I calculate the note value of, say, a 3rd up in the scale?

I have a few ideas but they all seem rather ugly to implement. One way which might make for a nice interface, is to map the current note to a step in the note sequencer, which in turn would give me the correct output note. Seems like the only way to get a sequencer to a particular step is to reset it and give it N clock pulses, which I'm not sure how to do.

thanks!
Back to top
View user's profile Send private message
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Thu Nov 20, 2008 10:26 am    Post subject: Re: calculating 3rds Reply with quote  Mark this post and the followings unread

tayholliday wrote:
Given a scale and a note value, how can I calculate the note value of, say, a 3rd up in the scale?

In equal temperament, you go up a minor third by multiplying the frequency by the fourth root of 2; you go up a major third by multiplying the frequency by the cube root of 2.
Back to top
View user's profile Send private message Visit poster's website
tayholliday



Joined: Apr 23, 2008
Posts: 39
Location: San Francisco, CA
G2 patch files: 1

PostPosted: Thu Nov 20, 2008 10:37 am    Post subject: Re: calculating 3rds Reply with quote  Mark this post and the followings unread

ark wrote:

In equal temperament, you go up a minor third by multiplying the frequency by the fourth root of 2; you go up a major third by multiplying the frequency by the cube root of 2.


Right, but I'm implementing a diatonic harmonizer, so I need some logic to decide which interval to use (maj3, min3), depending on the note I'm playing.

Oh, and I'm trying to do this for guitar, so I'm using the pitch track module to determine the note I'm playing.
Back to top
View user's profile Send private message
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Thu Nov 20, 2008 10:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Won't a key quantizer do most of what you want?
Back to top
View user's profile Send private message Visit poster's website
tayholliday



Joined: Apr 23, 2008
Posts: 39
Location: San Francisco, CA
G2 patch files: 1

PostPosted: Thu Nov 20, 2008 11:01 am    Post subject: Reply with quote  Mark this post and the followings unread

ark wrote:
Won't a key quantizer do most of what you want?


I was thinking about that... but I'm not sure how to apply it. Adding a fixed number of semitones (3 for min3, 4 for maj3) and then quantizing only gets it right half of the time. I still need a way of choosing which interval to use based on the current note. Really, it would be cool to have an arbitrary 1 octave note -> note mapping.
Back to top
View user's profile Send private message
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Thu Nov 20, 2008 11:32 am    Post subject: Reply with quote  Mark this post and the followings unread

tayholliday wrote:
I was thinking about that... but I'm not sure how to apply it. Adding a fixed number of semitones (3 for min3, 4 for maj3) and then quantizing only gets it right half of the time.

What happens if you add 3.5 semitones?
Back to top
View user's profile Send private message Visit poster's website
tayholliday



Joined: Apr 23, 2008
Posts: 39
Location: San Francisco, CA
G2 patch files: 1

PostPosted: Thu Nov 20, 2008 11:48 am    Post subject: Reply with quote  Mark this post and the followings unread

ark wrote:
What happens if you add 3.5 semitones?


Ok for Cmaj:

C -> half way between D# and E -> quantized to E
D -> between F and F# -> quantized to F
E -> between G and G# -> quantized to G
F -> between G # and A -> quantized to A
G -> B
A -> C
B -> D

voila... you're a genius ark! Very Happy

Now, can I actually add 3.5 to a control signal? I thought they were integers.
Back to top
View user's profile Send private message
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Thu Nov 20, 2008 12:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

tayholliday wrote:

Now, can I actually add 3.5 to a control signal? I thought they were integers.

They're not integers. See attached patch.


Thirds.pch2
 Description:

Download
 Filename:  Thirds.pch2
 Filesize:  1.29 KB
 Downloaded:  1346 Time(s)

Back to top
View user's profile Send private message Visit poster's website
tayholliday



Joined: Apr 23, 2008
Posts: 39
Location: San Francisco, CA
G2 patch files: 1

PostPosted: Thu Nov 20, 2008 12:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

ark wrote:
See attached patch.


Awesome. Now to do the shift on audio input, I guess I just use the difference between the two pitches as the shift amount?
Back to top
View user's profile Send private message
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Thu Nov 20, 2008 12:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

tayholliday wrote:
Now to do the shift on audio input, I guess I just use the difference between the two pitches as the shift amount?

I would think.
Back to top
View user's profile Send private message Visit poster's website
tayholliday



Joined: Apr 23, 2008
Posts: 39
Location: San Francisco, CA
G2 patch files: 1

PostPosted: Fri Nov 21, 2008 6:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's my stab at harmonizing 3rds from audio in. It sounded quite good to me with my guitar Smile

Thanks again ark.


Diatonic3rds.pch2
 Description:
Harmonizes a maj3 or a min3 depending on which note you play.

Download
 Filename:  Diatonic3rds.pch2
 Filesize:  1.81 KB
 Downloaded:  1207 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
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


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use