Module requests


#136

Yup that is a real problem. I don think there are any objects that clears out a tables content, but I am not sure.

Try make a post about it or go through the ever growing commuity library, maybe you find some thing there :slight_smile:

EDIT:
But one could argue that the envelope is there to prevent playing more of the files than you need. You could use the timer/pulselength object as in the helpfile to make sure the gate/adsr only is open when the part of the file you want is playing.


#137

one way to avoid that would be to load a silence sample in between, but that will take some time. don't know if you have that :wink:


#138

I think that I could load a silent sample in between, like lokki said, or make all samples the same lenght (adding silence to the shorter ones), both solutions are a bit complicated for what I trying to do...

Basically I created some directories in my SD card with about 200 drum samples I like. And I want to use that samples in whatever project I want to use them.
I did a drum machine with 8 sample players, and I want to select one of the samples on the fly. With the object factory/wave/play it's working great, but for some of the samples I want pitch control, and there is when things gets complicated...
Also I have to note that I'm going to use this drum machine inside other projects, so I'm trying to keep the use of resources low to keep room for synth, FXs, etc...

Thank you for your answers :slight_smile:


#139

Well, finally I ended loading a silent sample between samples. Didn't take much more processing and is fast enough... If the sample is playing I can hear a glitch when changing samples (did't happen with neither the other configurations), but I think a can live with that.
Thank you very much for the help!


#140

looking at the table load/save modules, I now see there are options to set "offset" and length.
So I think it should be possible to make a "loading train" that loads the samples one by one into a table (names like drum000,drum001 etc), taking notice of the length and saving the start/end-positions in a second table (last write position plus 1 is start position, end position is read from start-position of next sample minus 1). Though, I need to know how to get the length of a file that's being read to declare the "load length".

From there it should be easy to mod, morph and do anything with your samples..


#141

I think rbrt knows how to get the sample length


#142

alas, he saves the sample length of a sample that is being recorded and saves that into the table/an extra table, he doesn't get the samplelength from the file itself.
But I'm pretty sure I saw some code somewhere where this is actually done.... but where...?

wow, aaaand again... asking the question to kind of immediatly know the anwser.. drj's preset manager...

it's: f_size( &FileObject )


#143

Hey. Dr justice have made a seperate object for getting file size in samples. I implemented it into a table. Works fine. It has got a trigger function implemented, so when you load a new file when the patch is live, the table will send the new information to the filesize object.

drj/file/file_size


#144

kinda had it working for a moment, but suddenly somehow it disconnects while loading the patch :frowning:
gotta go to work now, so maybe tomorrow..


#145

and got it working again.
Was searching for the mistake in the wrong place...accidentilly tried to write to position 64 of the 64-tablesize.. (as it starts at 0, max entry would be 63..)

*update
yes yes yes, thiz iz nize :stuck_out_tongue:

I saved a bunch of wav files as BD000.wave, BD001.wav etc etc and the module is able to automatically load a set of samples one after another to the same array. I'm gonna add some more goodies now, like a text attribute to pre-set a set of samples to be loaded, start/end positions, reverse, pitch, normalising, sample-morphing/mixing/layering...
more ideas are welcome (also about how we would like to control them!)! Let's enable the axoloti to be the sample-master!


#146

That will be totally wonderfull!!!


#147

hi @SirSickSik sounds great!
I'm currently working on a 'sample-bank-recorder' , which is the same direction..
..got some ideas/wishes/proposals

-how about keeping this as modular as possible?
(one object to load the samples to an array,and fill another array with the start / end info,
other objects to normalize/porcess the samples and handle the actual playback)

-how about using the same 'format' for the array that stores the sample info ?
for these looper/player objects I'm doing,I decided for this approach::

-first of all,it's all expressed as 'blue float -64 ... 64 '

then,for each sample, I use blocks of data in this format :

0. offset 0 - 64 -->sample start relative to table length
1. range 0 - 64 -->sample length relative to table length
2. startpoint 0 - 64 -->when recording in sync with a clock,at what clock position did recording start?
..useful for syncing loops.
4. speed -64 64 -->playback speed (-64 = full speed reverse, +64 = full speed ahead)

maybe you feel like adding,here ?


#148

hi rbrt,
most of the things I already do, like the 0-64 controls, as this is widely used within the axo environment.

At the moment the sample-data and sample length info are saved in the same module, but I'll change this to 2 array's. Also because at the moment I'm saving to an array that's not called array, so saving/loading the table ain't possible yet without a dedicated table-save/load code.. I first wanted to get the code working nicely.
So in the end I'll just use the factory table modules to save the info into, so different modules can read/write to it.

Also, all the controls on the module are inputs, not knobs/buttons, most are floats (-64 to 64) and some are integer (eg. sample number), so these could also be controlled by universal table-preset-modules/pattern generators.

About the "float-values".. I think you mean the blue fractional outputs? As these are just integer values that are shown as decimal values on the knobs and displays. An actual float-value costs more cpu to calculate, so I mostly try to not use them if possible (or only as k-rate or updated at input-trigger/gate/change).

The start, end, loop-start and loop-end of the sample is already done in 0-64 values, but the offset is saved as the integer offset in the table to prevent mis-calculations. If you'ld use 0-64 values(of course with the <<21 behind it) with scaling, you'll probably have some mistakes at some points about where to start/end the sample, possibly adding unwanted clicks (-1/+1 sample and perhaps even more if more bits are lost in the calculation process) .
This sample-start-position info should be enough information to calculate the 0-64 offset and range in the module that's reading the array (that's what I'm also doing now).
As the recording rate is always the same (48000hz), all the needed read-out values should able to be calculated using known scalings.
Next to this, if somebody would use a smaller/larger array then the table is saved as, all these offset and range positions would be off. By saving the actual positions, you can just make your table smaller with a loss of some samples if you need the sdram space for something else.

About the playback speed, I'm using a phazor that is rescaled back to the right size using the start-position of the sample and starting position of the next sample ("next sample start"-"current sample start"-1=width) and use the width to rescale the frequency of the phazor, so a 0 for pitch is the normal play rate. The ratio-play-rate can easily be done by just multiplying the frequency. So the playspeed can be adjusted in ratio, integer multiplications and in semitones.


#149

hi @SirSickSik

makes sense!

ah..true!

..sounds interesting.could you post a 'prototype' ?


#150

it's actually quite simple..
if you have a sample-size of 795 samples, you just multiply this value with the phase and add the sample-offset (start position)..
position=___SMMUL(samplesize,phase)+sampleoffset;

so I've put all the start-positions of the soundsamples into an array. And as every sound-sample ends at one sample before the next one, you can always get the width of each sample by subtracting the starting positions minus one.


#151

current setup for the sample loading train
ps. nice thing about the BPM-control, it automatically in/de-creases pitch when changing the control-BPM while linked.
When unlinking, it matches up the base-BPM with the control-BPM, so pitch goes back to normal. So you can kind of fake slowing down or speeding up a complete track, but actually all individually with samples and synths :stuck_out_tongue:


#152

Looks great!!!
Could be posible to save the wavetable? So I could use a patch to load the samples into the array and save the table, then I could use the table in other patches (saving a bit of recourses).


#153

yes, it's just two normal array files. One small one of 32bit for the start-positions and one big one of 16bit for the samples.
So you can use the normal table save/load modules to load them.


#154

That's great!!!
I cant't wait to try it :slight_smile:


#155

hmm, just found out the start-positions are still not saved right... :frowning:
still trying to figure out how to get the last loaded array-position..