Programmer Guide/Command Reference/SFTRUNCATE: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
==SFTRUNCATE==
The <code>SFTRUNCATEy</code> commands removes part of the [[Programmer_Guide/Concepts/Current_Soundfile|current, i.e. active, i.e. currently active, soundfile]]. It will return the number of remaining samples.


<code><var>var</var> := SFTRUNCATE <var>endaddress</var></code>
Note that the segment directory will not be updated.


Remove signal after <var>endaddress</var>
Also note that you can use the command [[Programmer_Guide/Macro_Library/BSF#Select|<code>BSF SELECT</code>]] to designate a sound file the [[Programmer_Guide/Concepts/Current_Soundfile|current soundfile]].


<code><var>var</var> := SFTRUNCATE <var>segment</var></code>
<var>var</var> := SFTRUNCATE <var>endaddress</var>


Remove signal outside <var>segment</var>.
This will truncate the [[Programmer_Guide/Concepts/Current_Soundfile|current soundfile]] at the [[XXX|address]] <var>endaddress</var>. This document doesn't tell us how this address is specified - my guess is that if works like a [[Programmer_Guide/General_Descriptions/Segment_Expression|segment expression]], but don't rely on that.


-> var = 'numberofremainingsamples'
<var>var</var> := SFTRUNCATE <var>segment</var>


Truncate signal from current sound file. The Segment directory is not updated! You can use the command <code>BSF SELECT</code> to select the current sound file.
This will remove everything from the [[Programmer_Guide/Concepts/Current_Soundfile|current soundfile]] before and after the respective <var>segment</var>. This document doesn't tell us if <var>segment</var> has to be the name of a segment or if you may use a full [[Programmer_Guide/General_Descriptions/Segment_Expression|segment expression]]. My guess is the latter, but don't rely on that.

Revision as of 18:19, 29 April 2014

The SFTRUNCATEy commands removes part of the current, i.e. active, i.e. currently active, soundfile. It will return the number of remaining samples.

Note that the segment directory will not be updated.

Also note that you can use the command BSF SELECT to designate a sound file the current soundfile.

var := SFTRUNCATE endaddress

This will truncate the current soundfile at the address endaddress. This document doesn't tell us how this address is specified - my guess is that if works like a segment expression, but don't rely on that.

var := SFTRUNCATE segment

This will remove everything from the current soundfile before and after the respective segment. This document doesn't tell us if segment has to be the name of a segment or if you may use a full segment expression. My guess is the latter, but don't rely on that.

Navigation menu

Personal tools