Programs to edit or create table files for Axoloti?


#1

Hey and merry chippin' Xmas :deer:

I have been making some files using Axoloti, which is basically just 128 random numbers stored onto the SD-card. They are created and then saved in a table and then stored to SD-card using table/save, so I can call them up later.

Now I was looking for an easier way to edit and/or even create files with, for example random numbers in, that can be read by Axolotis tables.

So my questions are:

  • Which program would be suitable to edit these table files... .tab files..... that I've created with Axoloti?

  • Or even just create new files directly in the program, with numbers, list or whatever that I can load in Axolotis tables?

What I've tried:
I tried opening one of the files in Text Wrangler, but that didnt work, all data came up as question marks.

I also tried X-code, but the only thing I see is an executable file and doesnt show me any content of the file. But to be honest I am also new to Xcode, so I might be missing something.

One of the files I tried opening in TW/Xcode is similar to the one created with @SirSickSik's object called sss/harmony/scaleGenerator
(Just add it to a patch load the patch and it will create the file on the SD-card. I am not allowed to upload .tab files so you need to fetch it, create it yourself if you want to test it, but it is very easy. Anyway that was the filetype I tried opening with no luck).

Any ideas?

Good evening!


#2

the easiest way would be notepad, just giving you the direct text that is in the file. Then add your "returns" ("enter") to get a nice list from top to bottom.. At least, that's what I've used when I needed to do something like this..
Apart from that.. I've got no ideas or experience with other programs except synthedit, in which it is quite another level to go to the same type of info... which I don't really recommend unless you already got at least some years of experience using synthedit..


#3

Thanks @SirSickSik . I am on Mac, and I just tried using textedit to open the file, which I think is the mac equivalent to notepad. Unfortunately it comes up as a blank document :weary: So I can't edit it.

Ahh well, seems like I have to do it the hard way for now then.


#4

If you want to manually input values you can do it in the table/alloc object (simply editing the init code, check the help file).
If you want to draw a table you could do in in audacity (load a blank project, generate silence for the desired amount of samples and use the draw tool) and export as raw file.
Alternatively you could generate the table in axoloti and then save it, somehow.


#5

Ahh yes didnt think of that. Will try, thanks. And that also would still load the random numbers or scales or whatever from SD-card, so this is good, I can use the same random numbers for many table/play objects., so I dont waste resources and load the same file 5 times.

This I thought about too, and it will work for random numbers. But not sure about more precise stuff like scales.

YeahI think that is how I have been doing it now, creating the tables internally in axoloti and then create a object like sss/harmony/scaleGenerator, that suits the format of the list to save the file to SD-card But the problem with this is that every time you need to make a new type of list you also need to make a new object like sss/harmony/scaleGenerator to save it to SD-card.

I think using "init" is my best option here. It is easily accesible and easy to edit.... Thanks @Sputnki, going to try that today :slight_smile:


#6

you can also just hard-code your lists in the local data or init data.

to make a normal array:

int32_t array[8]={ 0,1,2,3,4,5,6,7 };

to make a multi-dimensional array:

int32_t array[3][4]=
{
{0,1,2,3},
{7,3,5,8},
{9,3,6,3}
};
the last one could for example be used as a preset&parameter indexing, though I'm not sure if it's possible to save it to the SD card.
But for this you could also just use a single array with a +4 offset for each preset:

int length=4;
int presets=3;
int LENGTH=length*presets; (each extra preset will add 4 more slots to the array)
int32_t array[LENGTH];

to read it, it would be like: (with index going from 0 to 3)
outlet_out=array[pst*length+index];

also, depending on the size of the values to be saved, you can save some memory by using either:
bool 0 or 1, eg. gates
int8_t 0 to 127
int16_t 0 to 65535
int32_t 0 to 4294967295
int64_t (though not sure if this can be saved to the SD card)

you can probably also make string arrays like:

char32_t array[4]={ "sine", "cosine","saw","dip"};


#7

Yes the first one I have also done that before, but the reason I want to avoid this approach is I want to load it into the SD-ram not the S-ram. When I do it in local code, it uses S-ram, right?

Main goal:
1. Load it from SD-ram, to save S-ram for other purposes.
2. Only load it ONCE, to be used im multiple objects, to save even more resources.
3. TO have the list easy accessible without having to use an object like sss/harmony/scaleGenerator to save the table content to SD-card.

(About variable types, I just need int8_t, 0-127, so I use table/alloc 8b sdram)

Second way you show here @SirSickSik , with multidimension is freaking awesome. Have been thinking about that too, but not in this context. I had a few crazy use cases for that in some blunt fueled later nighter a few weeks back, haha :slight_smile:

ANYWAY... Here is what I tried for now. I followed the example on how to use the init function from the table help file:

But I get only zeros in the table/read object.

Guess I need to try a few more things.


#8

Ahh I went back to the example and I see I did one mistake I think I fixed, I used int variable, where I think I should have used int8_t. I changed that:

int8_t i;
for(i=0;i<LENGTH;i++)
array[i]=(1<<21)*i;

But still I only get zeros. I checked the example again, and the example actually uses 32_bit table. Maybe that is why it doesnt work. When I only use values within int8_t range, I should be able to just use a 8 bit table, right?


#9

This is probably the most qualified attempt for now:

But still just zeros on the table/read.

TEST INIT TABLE 3 32bit 1 .axp (1.4 KB)


#10

you're using "int8_t" which means you only got 8 bits to save your value.
But you're trying to save 2^21.... saving a "1" at the 21ths bit.. which ain't there, so it returns zero.

For values above (1<<16), you need to use int32_t
only values between 0 and 127 can go into an int8_t


#11

also, if you just want to scale integer notes like:
12 notes in key of C from C to B, with down-quantizing for excluded notes:
int8_t note[12]={0,0,2,2,4,5,5,7,7,9,9,11};

then you can use int8_t to save memory, which later in the algorithm can be converted to fractional range by doing:
outlet_semitone=(int32_t)note[select]<<21;

see that I added the "(int32_t)" before note[select], this is to make sure the calculation is done with 32bits instead of only the 8 bits of the note[..]


#12

just an addition, because I spent quite a time with this.

If you want to store a table (in my case a gamma-correction table for led fading) in the init file,
you can't directly assign it to the array[].
You have to define a new array first and than assign it element-by-element to the array[].
For example like this:

int8_t pwm_lut[128] = {
	0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 
	1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 
	3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 
	5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 
	9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 
	14, 15, 15, 16, 16, 17, 18, 19, 19, 20, 
	21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 
	29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 
	40, 42, 43, 44, 45, 47, 48, 49, 51, 52, 
	54, 55, 57, 58, 60, 61, 63, 65, 66, 68, 
	70, 71, 73, 75, 77, 79, 81, 83, 85, 87, 
	89, 91, 93, 95, 97, 99, 101, 104, 106, 108, 
	111, 113, 115, 118, 120, 123, 125, 127, 
};

int i;
for(i=0;i<LENGTH;i++)
	array[i]=pwm_lut[i];

#13

Hey @himi :=)

I was just looking into this again and I realised I missed your message here.

I got this working now, like you did it, by not directly assigning it to array[].

But after reading a few post about sd-ram, for example from this thread here and especially @johannes post:

Is it correctly understood that the data will be loaded into the sram first and then into the sd-ram?
So essentially, doing it this way, I might as well load it into the sram, cause it has to pass through the sram and will occupy space int the sram anyway, before the data is loaded to the sdram?

Thanks!


#14

exactly! that is why you have to load it from a file into sdram.


#15

Hey @lokki

Thank you very much, just wanted to make sure :slight_smile:

It just gets a bit complicated editing stuff in files saved and played from SD card.

For example an array of scales, it would be a lot easier just having them loaded into "init", and then edit them there, without having to save it again to sd-card.