## Search found 1530 matches

### Re: Squares

Albert, a simple formula could be to discard the leftmost bit, so you can use only 7 bits instead of 8: most ASCII texts, in fact, never use that bit, and it is always set to 0. In the few cases that bit is used, you can alert the decompressor, by sending a sequence of seven 1 before the byte that n...

### Re: Squares

@albert

Try your concept of altered binaries on number from 0 to 15 (all the numbers than can be expressed with one nibble). Then, write here the numbers, and the altered binary representation, so we can see if it would work or not

Try your concept of altered binaries on number from 0 to 15 (all the numbers than can be expressed with one nibble). Then, write here the numbers, and the altered binary representation, so we can see if it would work or not

### Re: Squares

Albert, I would recommend you to try a simple thing: write all numbers from 0 to 15 (since each of them can represent a different nibble, and they represent all possible nibbles). Then, , write all the possible combinations of three bits, and count them. Then, try to match every three bit sequence t...

### Re: Squares

Two conflicts, at least: if n1 = "0000" then n2 = "0111" if n1 = "1111" then n2 = "0011" <---- if n1 = "0001" then n2 = "1000" if n1 = "0010" then n2 = "1001" if n1 = "0100" then n2 = "1010" if n1 = &...

### Re: Squares

@angros47 Could you look over it to see if there's duplicates... You seem to have a better mind than me at finding the duplicates... I don't have a better mind. I just know for sure that duplicates are inevitable , for the reason I already told you if n1 = "0000" then n2 = "0110"...

### Re: Squares

*sigh* You wrote: I fixed the duplicate problem.. by making the 4th bit "01" instead of "0" So now , there's no duplicates... There is a duplicate, instead: Nibbles 0100 and 1000 : they produce 100 and 10 Nibble 0101: it produces 10010 When I have to decompress, if I find the seq...

### Re: Squares

But while hard wiring it.. i found a problem... there's duplicates... How many times have you repeated this part? There will always be duplicates, it is inevitable, because in n bits you can only have 2^n possible combinations, so you cannot map all the combinations of n bits in a number of bits lo...

### Re: Squares

So if n1 is 11111111, n2 should be 011011 (6 bits), and so n3. Add the 0 separators, and you end with 6+1+6+1=14 bits instead of 8. You will not compress, you will bloat the data set.

And having 4 bit set (or not set) is actually pretty common, in pictures for examples, if a big area is white.

And having 4 bit set (or not set) is actually pretty common, in pictures for examples, if a big area is white.

### Re: Squares

I think if somebody says to you that something is mathematically impossible (as per angros47), then a mathematical proof of this is required. You are right. In fact, I provided a mathematical proof of it: https://freebasic.net/forum/viewtopic.php?p=265180#p265180 Do you think that my approach is su...

### Re: Squares

Albert, are you starting to understand, now, why I told you that it is mathematically impossible to compress at a constant, fix ratio?

There is always some ambiguity, no matter how you rearrange your bits

There is always some ambiguity, no matter how you rearrange your bits

- Jan 01, 2020 0:02
- Forum: Beginners
- Topic: Playing non-file audio
- Replies:
**16** - Views:
**444**

### Re: Playing non-file audio

Try my library at: https://sourceforge.net/projects/freebasic-sfx-library/files/

It has specific commands to emit sine waves, or also other waveforms, and to shape and filter them

It has specific commands to emit sine waves, or also other waveforms, and to shape and filter them

### Re: Squares

And what happens if you have to compress a quadruple that starts with "A0" and ends with "~"? When you try to restore it, the decompression algorithm can tell that it was part of the original data set, and not something to decompress?

- Nov 28, 2019 16:18
- Forum: Community Discussion
- Topic: Audio library for FreeBasic - Features
- Replies:
**77** - Views:
**13233**

### Re: Audio library for FreeBasic - Features

My library supports mixing two sound channels, actually (and it also allows to play two different sounds on right and left channel). It does not support 3d sound, because 3d sound is actually an abstraction, that is rendered in different ways depending on the available hardware: if the audio output ...

### Re: Squares

@Stonemonkey

Don't waste your time. We all told albert that what he is trying to do is mathematically impossible. He doesn't believe it, so I guess he will have to find out himself.

Don't waste your time. We all told albert that what he is trying to do is mathematically impossible. He doesn't believe it, so I guess he will have to find out himself.

- Nov 25, 2019 21:12
- Forum: Community Discussion
- Topic: Audio library for FreeBasic - Features
- Replies:
**77** - Views:
**13233**

### Re: Audio library for FreeBasic - Features

Whoops, I missed it, checking it now