Skip to content

Get Audio Parameters

pd.get_sample_rate

This gets the current sample-rate of PureData. You can use the pd.SAMPLERATE variable too.

  • Example

    It just returns unique string.

    import pd
    
    def getsampleRate():
        return pd.get_sample_rate()
    
  • Arguments

    There is no args for this function.


pd.get_vec_size

This gets the current vector-size/blocksize of PureData. This gets the vector size of the object, so it is inside some patch with block~ 128, and the PureData is configured withvectorsize = 64it will return 128. To get the PureData vector size you can usepd.VECSIZE`.

  • Example

    It just returns a unique string.

    import pd
    
    def getVecSize():
        return pd.get_vec_size()
    
  • Arguments

    There is no args for this function.

pd.get_num_channels

This function gets the actual number of channels of the object.

  • Example

    It just returns a unique string.

    import pd
    
    def getNumberOfChannels(audio):
        return pd.get_num_channels()
    
  • Arguments

    There is no args for this function.