Return to Snippet

Revision: 51988
at October 10, 2011 14:22 by Cano0617


Updated Code
length1 = int(fadefactor_left * left)
        length2 = int(fadefactor_right * right)
        #p < 0 = to left, p > 0 = to right
        if index < length:
            sound.set_left(samp,length1)
            if index >= length:
                sound.set_right(samp,length2)
        return new_snd4

Revision: 51987
at October 10, 2011 12:59 by Cano0617


Initial Code
def left_to_right (snd, pan_length):
    new_snd4=sound.copy(snd)
    samples_unfaded=pan_length
    for samp in new_snd4:
        index = sound.get_index(samp)
        fading_factor_left = (float(index)/samples_unfaded)
        fading_factor_right= (float(samples_unfaded)/pan_length)
        samples_unfaded-=1

Initial URL

                                

Initial Description

                                

Initial Title
example code python

Initial Tags

                                

Initial Language
Python