Skip to content

Get Audio Parameters

pd.get_sample_rate

This get the current samplerate 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 get the current vectorsize/blocksize of PureData. This get the vector size of the object, so it is inside some patch with block~ 128 and the PureData is configured with vectorsize = 64 it will return 128. To get the PureData vector size you can use pd.VECSIZE.

  • Example

    It just returns 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 get the actual number of channels of the object.

  • Example

    It just returns unique string.

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

    There is no args for this function.