Ap0C552's Profile User Rating: -----

Reputation: -7 Shunned
Group:
Active Members
Active Posts:
314 (0.23 per day)
Joined:
08-December 10
Profile Views:
6,603
Last Active:
User is offline Mar 16 2014 11:53 AM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   Ap0C552 has not set their status

Posts I've Made

  1. In Topic: Java Object equivalent syntax

    Posted 8 Mar 2014

    Well I am not concerned with if there is a common superclass as much as how to acheive what I have done in the above code using comming superclasses.

    I believe what I am looking for is a void* and then using dynamic_cast.
  2. In Topic: Converting unsigned short ->float->unsigned short

    Posted 19 Feb 2014

    No but some audio formats are unsigned. So when working in java you have to maneuver around the fact java has no unsigned.
  3. In Topic: Converting unsigned short ->float->unsigned short

    Posted 19 Feb 2014

    Thanks for your help goose!! I solved the problem. The whole time I thought I should be reading in and writing out unsigned short, when it is supposed to be signed short. Ughhh. What a brain fart. At least the problem is solved though.

    Thank you again.
  4. In Topic: Converting unsigned short ->float->unsigned short

    Posted 18 Feb 2014

    After looking over the output wave file, it is clear that the pitched shifted sample has value that are substantially larger than the input sample. In an audio sense, the output sample is much louder. Those loud samples are the distortion.

    Now I did this code to print out what is happening in the linear interpolation algorithm. Basically, is is checking if there is some way that the outputed value of the linear interpolate formula is some way larger than the two input values. This code verifies that the pitch shifting is not causing the extreme values. But these extreme values only exist if the sample is pitch shifted. So the pitch shifting must be doing something to the float values, that makes them get corrupted later on...ie the conversion to short.

    if((output[outputPtr]>currSample[ptr+1]&&output[outputPtr]>currSample[ptr])
    							||(output[outputPtr]<currSample[ptr+1]&&output[outputPtr]<currSample[ptr]))
    					{
    						debug=debug+"sample:"+currSample[ptr]+"sample+1:"+currSample[ptr+1]+" output:"+output[outputPtr]+"\n\r";
    					}
    
    
  5. In Topic: Converting unsigned short ->float->unsigned short

    Posted 18 Feb 2014

    View Postg00se, on 18 February 2014 - 11:49 AM, said:

    Hm OK. I'm wondering why you're storing short in float, but never mind - let's press on ;)/>/> Can you please post a sample data dump (not too big) of that parameter?

    System.out.println(Arrays.toString(data));
    


    I will post it up very soon. I take short and convert to float in range 1.0 to -1.0 just because I think it is standard practice in audio processing. It is more desirable for when you start do effects processing.

    Also, a great insight into what is going on, is just to open the output wave I posted inside freeware program audacity.

    The pitched sample has values twice as high as the non pitched sample. So I am wondering where these extremely large values are coming from. Is it the linear interpolation algorithm, or is it something to do with data error when converting to unsigned short?

My Information

Member Title:
D.I.C Regular
Age:
29 years old
Birthday:
September 14, 1984
Gender:
Interests:
Video games, programming, elecstronic music productions
Years Programming:
2
Programming Languages:
Java, C

Contact Information

E-mail:
Private