Ryuhphino's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
21 (0.02 per day)
Joined:
05-March 11
Profile Views:
852
Last Active:
User is offline Jun 25 2014 01:32 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   Ryuhphino has not set their status

Posts I've Made

  1. In Topic: Creating an array within class problem

    Posted 25 Jun 2014

    I have been reading more up on vectors and I have a little better understanding with them, but I'm still running into a problem initializing these values.
    const int NotesInScale = 49;
    const double A440 = 440.0;
    const double TwelthRootOfTwo = pow(2, 1/12.0);
    class Scales
    {
    private:
    	//all Major Scales
    	vector <double> Notes[NotesInScale];
    
    public:
    
    	Scales()
    	{
    		//All Major Note Frequencies
    	for (int i=0;i<=49;i++)
    		{
    		double x = -12;
    		Notes[i] = pow(TwelthRootOfTwo, x) * A440;
    		x++;
    
    		}
    	}
    


    From everything I've been reading and where my error message is, my error is on how i'm trying to add the element to the vector, line 18. Through the formula I have here, I should be able to store into my vector all of the frequencies between C3 to C7, which is about the range i'm looking for.

    Also, any suggestions on vector tutorials would be appreciated as well. I read a few (two on DIC) so I may just need time fooling with it. Thanks again.
  2. In Topic: Creating an array within class problem

    Posted 24 Jun 2014

    Thanks for the quick reply from everyone. I never touched on std::array or std::vector because, honestly, i never was taught ever to mess with them much. It looks a lot simpler though so I will definitely put in some time with those.

    Also the idea of going more mathematically through creating the frequencies, although is a different approach, seems like an easier one. I had never actually looked up how those frequencies were obtained, but now that I have, I could easily just run a loop set on a scalar model (whole whole, half, whole whole half kind of idea) and just have the iterator pump the power as I need (it can just be a variable).

    I'll try to have something tomorrow to hopefully fix the problem. Thanks for all the responses.
  3. In Topic: Sorting numbers through pointers

    Posted 5 May 2014

    I actually started this program a while ago and left it alone as I did other things, and I realized you're completely correct. That initial for loop is incorrect. I'll have to work on that a moment and make sure it outputs the correct data before I move on. I'll post more once It is all done. Thank you!
  4. In Topic: Nested array not working properly to find differences

    Posted 30 Jun 2013

    Added a parameter that qtr cannot equal 3.

    for(qtr=0; qtr<Num_Qtrs && qtr!=3;qtr++)
    


    I just need to change some of my cout statements so the quarters print out right. Seems to have done the trick! Thank you!
  5. In Topic: LNK error in basic program

    Posted 12 Feb 2013

    Many thanks! I'll make sure not to ever post a similar problem here again.!

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

Ryuhphino hasn't added any friends yet.

Comments

Ryuhphino has no profile comments yet. Why not say hello?