How To Find Out Sizes Of Samples In A Renoise Song?

hi, i’ve got a horrifically large (350mb) .XRNS.
i’m trying to conserve space and so forth, and i’d really like to know, is there some method for me to see what size the individual samples are?

i converted most of the 32bit samples to 16bit, but i’m still at 300mb. how would i go about finding the
sizes of the samples?

You can do it from the Disk Op. Browse to where the song is, as if you were going to open it, and click the little Plus (+) next to the filename. This should list all samples, I believe with their size.

Hey, that’s pretty neat. I do wonder if there could be a script that shows the sample names and sample amounts directly from within renoise, without requiring a save first :)

Give this a try:

function bytes_to_string(bytes)  
 -- Gigabytes  
 if (bytes >= 1073741824) then  
 return string.format("%.2f GB (%d bytes)", bytes / 1073741824, bytes)  
 -- Megabytes  
 elseif (bytes >= 1048576) then  
 return string.format("%.2f MB (%d bytes)", bytes / 1048576, bytes)  
 -- Kilobytes   
 elseif (bytes >= 1024) then  
 return string.format("%.2f kB (%d bytes)", bytes / 1024, bytes)  
 -- Bytes   
 return string.format("%d bytes", bytes)  
local rs =  
for i = 1, #rs.instruments do  
 local instrument = rs:instrument(i)  
 if (instrument:sample(1).sample_buffer.has_sample_data) then  
 print(' ')  
 print('Instrument #' .. i .. ' : ' ..  
 local total_bytes = 0  
 for s = 1, #instrument.samples do  
 local sample = instrument:sample(s)  
 local buffer = sample.sample_buffer  
 if (buffer.has_sample_data) then  
 local bytes = (buffer.number_of_frames * buffer.number_of_channels   
 * buffer.bit_depth) / 8  
 total_bytes = total_bytes + bytes  
 print('Sample #' .. s .. ' : ' .. .. ' : ' .. bytes_to_string(bytes))  
 print('Total: ' .. bytes_to_string(total_bytes))  

I did! It’s really lush :)


You know you can have those samples converted to lossless flac’s right, through a setting in the preferences? Or if you don’t mind some compression, .oggs though an external app.