| moduleSize | R Documentation | 
Get the file size in bytes of a PTModule object, when it is to be saved
as an original module file with write.module.
## S4 method for signature 'PTModule'
moduleSize(x)
| x | A  | 
The ProTracker module has a 1084 byte sized header containing all (meta)
information on the patterns, their order and the audio samples. Each pattern
holds exactly 1 Kb of information and the length of the audio samples corresponds
with the size in bytes, as they are of 8 bit quality in mono. This function
calculates the file size of the PTModule object when it is to
be saved with write.module.
Returns potential uncompressed module file size in bytes represented
by a number of class object_size.
Pepijn de Vries
Other module.operations: 
PTModule-class,
appendPattern(),
clearSamples(),
clearSong(),
deletePattern(),
fix.PTModule(),
modToWave(),
patternLength(),
patternOrderLength(),
patternOrder(),
playMod(),
playingtable(),
rawToPTModule(),
read.module(),
trackerFlag(),
write.module()
## Calculate the file size for the example module 'mod.intro':
data("mod.intro")
moduleSize(mod.intro)
## Note that this is not the same as the size the object
## requires in R working memory:
object.size(mod.intro)
## In working memory it takes more memory to store the module, than in a
## file. This is because the S4 structure of the object consumes some
## memory. In addition, samples are of 8 bit quality, corresponding with
## a byte per sample. In the PTSample object it is stored as a
## vector of integer values. In R, integer values are 32 bit, which
## costs 4 times as much memory as the original 8 bit.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.