*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> audiofile/AFgetinstparamlong (3d)              
Title
Content
Arch
Section
 

Contents


afGetInstParamLong(3dm)				       afGetInstParamLong(3dm)


NAME    [Toc]    [Back]

     afGetInstParams, afSetInstParams, afGetInstParamLong, afSetInstParamLong
     - get / set a parameter list / long parameter value for an	instrument
     configuration in an AFfilehandle structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     void afGetInstParams(AFfilehandle file, int instid,
				      AUpvlist pvlist, int nparams)

     void afSetInstParams(AFfilehandle file, int instid,
				      AUpvlist pvlist, int nparams)

     long afGetInstParamLong(AFfilehandle file,	int instid,
					      int param)

     void afSetInstParamLong(AFfilehandle file,	int instid,
					      int param, long value)

PARAMETER    [Toc]    [Back]

     file      is an AFfilehandle structure, previously	created	by a call to
	       afOpenFile(3dm).

     instid    is a positive integer which identifies an instrument
	       configuration in	the file.  Since the number of supported inst
	       chunks varies with file format, applications should always
	       retrieve	this value via afGetInstIDs(3dm).

     pvlist    is an AUpvlist structure, previously created by a call to
	       AUpvnew(3dm)

     nparams   is an integer value specifying the number of {parameter,	value}
	       item pairs (containing the instrument parameters) to be set or
	       retrieved

     param     is a symbolic constant which identifies an instrument
	       parameter.

     value     is an integer value to be assigned by afSetInstParamLong() to
	       the given parameter.

RETURN VALUE    [Toc]    [Back]

     afGetInstParamLong() returns the value associated with param in the given
     instrument	map.  If inst or param is invalid, the return value is 0.
     Note that this routine and	afQueryLong(3dm) are the only AF routines
     which still return	a long int as opposed to an int.

DESCRIPTION    [Toc]    [Back]

     afGetInstParams() returns the values for nparams of the parameters	in an
     instrument	configuration via the AUpvlist structure.




									Page 1






afGetInstParamLong(3dm)				       afGetInstParamLong(3dm)



     afSetInstParams() allows you to set nparams instrument parameters,	via
     the AUpvlist structure, for a file	which is opened	with write access.

     afGetInstParamLong() returns the value for	a parameter of type
     AU_PVTYPE_LONG from an instrument configuration.

     afSetInstParamLong() allows you to	set an instrument parameter of type
     AU_PVTYPE_LONG for	a file which is	opened with write access.

     The valid instrument parameters are:

     AF_INST_MIDI_BASENOTE     MIDI base note for sample: 0 to 127

     AF_INST_NUMCENTS_DETUNE   MIDI detune in cents: -50 to 50 for AIFC;
			       limits vary with	file format

     AF_INST_MIDI_LONOTE       Lowest MIDI note	for sample: 0 to 127

     AF_INST_MIDI_HINOTE       Highest MIDI note for sample: 0 to 127

     AF_INST_MIDI_LOVELOCITY   Lowest MIDI velocity for	sample:	1 to 127

     AF_INST_MIDI_HIVELOCITY   Highest MIDI velocity for sample: 1 to 127

     AF_INST_NUMDBS_GAIN       Gain in dB's for	sample

     AF_INST_SUSLOOPID	       Loop id for sustain loop	(AIFF and AIFF-C only)

     AF_INST_RELLOOPID	       Loop id for release loop	(AIFF and AIFF-C only)

     Additional	instrument parameters (for non-AIFF files):

     AF_INST_SAMP_STARTFRAME   Starting	frame of sample	associated with	the
			       inst: 0 or greater

     AF_INST_SAMP_ENDFRAME     Ending frame of sample associated with the
			       inst: 0 or greater

     AF_INST_SAMP_MODE	       Sample looping mode associated with the inst.
			       If this parameter is present, it	will be	one of
			       the following:

	  AF_INST_LOOP_OFF
	  AF_INST_LOOP_CONTINUOUS
	  AF_INST_LOOP_SUSTAIN

     AF_INST_TRACKID    [Toc]    [Back]
	  Track	ID for inst sample data:  AF_DEFAULT_TRACK

     AF_INST_NAME    [Toc]    [Back]
	  Name string for instrument configuration.  This is type
	  AU_PVTYPE_PTR.



									Page 2






afGetInstParamLong(3dm)				       afGetInstParamLong(3dm)



     AF_INST_SAMP_RATE    [Toc]    [Back]
	  Sample rate for sample associated with the inst.  This is type
	  AU_PVTYPE_DOUBLE

     Note that the last	two are	NOT AU_PVTYPE_LONG and therefor	cannot be set
     or	retrieved via af{Set,Get}InstParamLong() -- you	must use
     afGetInstParams() and retrieve the	value using AUpvgetval(3dm).

EXAMPLE    [Toc]    [Back]

     You can obtain loop ID's for the sustain and release loops	in an AIFF-C
     file by calling afGetInstParamLong().

     For each of these loop ID's, you can obtain start and end sample frame
     marker ID's by calling afGetLoopStart(3dm)	and afGetLoopEnd(3dm).

     Finally, you can obtain the sample	frame marker positions by calling
     afGetMarkPosition(3dm).  These positions tell you the beginning and end
     sample frame locations for	each of	the loops.

CAVEATS    [Toc]    [Back]

     This function may return an arbitrary number of instrument	parameters,
     unlike the	fixed set found	in AIFF/AIFF-C files.  Many file formats have
     different inst configurations than	AIFF/AIFF-C.  As mentioned above,
     parameters	exist whose type is not	AU_PVTYPE_LONG,	and these must be
     retrieved via afGetInstParams(3dm).

     In	the case of INST parameters it is important to to query	at runtime the
     capabilities of a given file format prior to retrieving the params.  An
     application can use afQuery(3dm) to determine whether a given file	format
     supports INST chunks, and if so, the quantity, ID,	and return type	of any
     instrument	parameters.  Apps should also be written to expect and ignore
     instrument	configurations or instrument parameters	they do	not
     understand.

SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm), afGetLoopStart(3dm), afSetLoopStart(3dm),
     afGetMarkPosition(3dm), afQuery(3dm)
afGetInstParamLong(3dm)				       afGetInstParamLong(3dm)


NAME    [Toc]    [Back]

     afGetInstParams, afSetInstParams, afGetInstParamLong, afSetInstParamLong
     - get / set a parameter list / long parameter value for an	instrument
     configuration in an AFfilehandle structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     void afGetInstParams(AFfilehandle file, int instid,
				      AUpvlist pvlist, int nparams)

     void afSetInstParams(AFfilehandle file, int instid,
				      AUpvlist pvlist, int nparams)

     long afGetInstParamLong(AFfilehandle file,	int instid,
					      int param)

     void afSetInstParamLong(AFfilehandle file,	int instid,
					      int param, long value)

PARAMETER    [Toc]    [Back]

     file      is an AFfilehandle structure, previously	created	by a call to
	       afOpenFile(3dm).

     instid    is a positive integer which identifies an instrument
	       configuration in	the file.  Since the number of supported inst
	       chunks varies with file format, applications should always
	       retrieve	this value via afGetInstIDs(3dm).

     pvlist    is an AUpvlist structure, previously created by a call to
	       AUpvnew(3dm)

     nparams   is an integer value specifying the number of {parameter,	value}
	       item pairs (containing the instrument parameters) to be set or
	       retrieved

     param     is a symbolic constant which identifies an instrument
	       parameter.

     value     is an integer value to be assigned by afSetInstParamLong() to
	       the given parameter.

RETURN VALUE    [Toc]    [Back]

     afGetInstParamLong() returns the value associated with param in the given
     instrument	map.  If inst or param is invalid, the return value is 0.
     Note that this routine and	afQueryLong(3dm) are the only AF routines
     which still return	a long int as opposed to an int.

DESCRIPTION    [Toc]    [Back]

     afGetInstParams() returns the values for nparams of the parameters	in an
     instrument	configuration via the AUpvlist structure.




									Page 1






afGetInstParamLong(3dm)				       afGetInstParamLong(3dm)



     afSetInstParams() allows you to set nparams instrument parameters,	via
     the AUpvlist structure, for a file	which is opened	with write access.

     afGetInstParamLong() returns the value for	a parameter of type
     AU_PVTYPE_LONG from an instrument configuration.

     afSetInstParamLong() allows you to	set an instrument parameter of type
     AU_PVTYPE_LONG for	a file which is	opened with write access.

     The valid instrument parameters are:

     AF_INST_MIDI_BASENOTE     MIDI base note for sample: 0 to 127

     AF_INST_NUMCENTS_DETUNE   MIDI detune in cents: -50 to 50 for AIFC;
			       limits vary with	file format

     AF_INST_MIDI_LONOTE       Lowest MIDI note	for sample: 0 to 127

     AF_INST_MIDI_HINOTE       Highest MIDI note for sample: 0 to 127

     AF_INST_MIDI_LOVELOCITY   Lowest MIDI velocity for	sample:	1 to 127

     AF_INST_MIDI_HIVELOCITY   Highest MIDI velocity for sample: 1 to 127

     AF_INST_NUMDBS_GAIN       Gain in dB's for	sample

     AF_INST_SUSLOOPID	       Loop id for sustain loop	(AIFF and AIFF-C only)

     AF_INST_RELLOOPID	       Loop id for release loop	(AIFF and AIFF-C only)

     Additional	instrument parameters (for non-AIFF files):

     AF_INST_SAMP_STARTFRAME   Starting	frame of sample	associated with	the
			       inst: 0 or greater

     AF_INST_SAMP_ENDFRAME     Ending frame of sample associated with the
			       inst: 0 or greater

     AF_INST_SAMP_MODE	       Sample looping mode associated with the inst.
			       If this parameter is present, it	will be	one of
			       the following:

	  AF_INST_LOOP_OFF
	  AF_INST_LOOP_CONTINUOUS
	  AF_INST_LOOP_SUSTAIN

     AF_INST_TRACKID    [Toc]    [Back]
	  Track	ID for inst sample data:  AF_DEFAULT_TRACK

     AF_INST_NAME    [Toc]    [Back]
	  Name string for instrument configuration.  This is type
	  AU_PVTYPE_PTR.



									Page 2






afGetInstParamLong(3dm)				       afGetInstParamLong(3dm)



     AF_INST_SAMP_RATE    [Toc]    [Back]
	  Sample rate for sample associated with the inst.  This is type
	  AU_PVTYPE_DOUBLE

     Note that the last	two are	NOT AU_PVTYPE_LONG and therefor	cannot be set
     or	retrieved via af{Set,Get}InstParamLong() -- you	must use
     afGetInstParams() and retrieve the	value using AUpvgetval(3dm).

EXAMPLE    [Toc]    [Back]

     You can obtain loop ID's for the sustain and release loops	in an AIFF-C
     file by calling afGetInstParamLong().

     For each of these loop ID's, you can obtain start and end sample frame
     marker ID's by calling afGetLoopStart(3dm)	and afGetLoopEnd(3dm).

     Finally, you can obtain the sample	frame marker positions by calling
     afGetMarkPosition(3dm).  These positions tell you the beginning and end
     sample frame locations for	each of	the loops.

CAVEATS    [Toc]    [Back]

     This function may return an arbitrary number of instrument	parameters,
     unlike the	fixed set found	in AIFF/AIFF-C files.  Many file formats have
     different inst configurations than	AIFF/AIFF-C.  As mentioned above,
     parameters	exist whose type is not	AU_PVTYPE_LONG,	and these must be
     retrieved via afGetInstParams(3dm).

     In	the case of INST parameters it is important to to query	at runtime the
     capabilities of a given file format prior to retrieving the params.  An
     application can use afQuery(3dm) to determine whether a given file	format
     supports INST chunks, and if so, the quantity, ID,	and return type	of any
     instrument	parameters.  Apps should also be written to expect and ignore
     instrument	configurations or instrument parameters	they do	not
     understand.

SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm), afGetLoopStart(3dm), afSetLoopStart(3dm),
     afGetMarkPosition(3dm), afQuery(3dm)


									PPPPaaaaggggeeee 3333
[ Back ]
 Similar pages
Name OS Title
AFinitinstids IRIX specify a list of instrument parameter chunk identifiers to be stored in an AFfilesetup structure.
AFgetinstids IRIX get a list of instrument configurations from an AFfilehandle
AFinitloopids IRIX initialize a list of loop ID's for a given instrument in an AFfilesetup structure
AFgetloopids IRIX get a number and list of loop ID's for an instrument configuration
va_arg Tru64 Handle a variablelength parameter list
va_end Tru64 Handle a variablelength parameter list
varargs Tru64 Handle a variablelength parameter list
va_start Tru64 Handle a variablelength parameter list
stdarg Tru64 Handle a variable-length parameter list
clQueryParams IRIX Get a list of the parameters for a specified processing object, or the parameter identifier given the name
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service