Recent Posts

Pages: [1] 2 3 4 5 6 7 8 ... 10
1
Coding tutorials / Re: sine text scroller in 30 lines of JavaScript
« Last post by Rbz on Yesterday at 10:16 PM »
 :goodpost:

Very nice javascript/html5 tutorial!

It's nice to see  all those nice effects done on a browser and running smoothly.

Right now, I'm learning some webgl/javascript myself and I'm really happy with it!  :kewl:
2
General chat / The most interesting thing I saw today. seen me
« Last post by thmtht1612 on Yesterday at 06:51 PM »
If you see, read or hear something interesting, usefull or just plain cool, please post it here. I'll start with this very interesting TED talk that updates A monkey that controls a robot with its thoughts. No, really.
 
like so: https://www.ted.com/talks/miguel_nicolelis_a_monkey_that_controls_a_robot_with_its_thoughts_no_really
3
Purebasic / Re: 4Klang Software Synthesizer usage in Purebasic
« Last post by Ampli on Yesterday at 05:28 PM »
Thanks alot, I will look into it and see if I can get it to work.
4
Purebasic / Re: 4Klang Software Synthesizer usage in Purebasic
« Last post by Rbz on Yesterday at 01:09 PM »
Hi Ampli,

Unfortunately I don't have purebasic nor linux installed, but here some ideas for you to research about it.

Using Energy's example, you will need to remove "wimm.lib" and "kernel32.lib" they are windows specific, on linux you will use SDL.

Use something like this:
Code: [Select]
ImportC "-lSDL2"
Here is a "C" code used to setup sdl audio, I think it should be easy to convert to purebasic:

Code: [Select]
static void synthCallback(void *udata, Uint8 *stream, int len) {
/* the music is stereo - use 32 bit for left and right channel */
static int32_t* sample = (int32_t*)synthBuffer;
int32_t* ptr = (int32_t*) stream;

udata += 0;
int i;
for (i = len / (SYNTH_OUTPUT_SAMPLE_SIZE * SYNTH_CHANNELS); i > 0 ; i--) {
/* loop the track */
if (samplePosition >= MAX_SAMPLES) {
samplePosition = 0;
sample = udata;
}
/* copy left and right channel at the same time */
*ptr++ = *sample++;
samplePosition++;
}
}

Code: [Select]
/* audio specification */
SDL_AudioSpec audioSpec;
audioSpec.freq = SAMPLE_RATE;
audioSpec.format = AUDIO_S16SYS;
audioSpec.channels = SYNTH_CHANNELS;
audioSpec.silence = 0;
audioSpec.samples = SYNTH_PLAY_BUFFER;
audioSpec.size = 0;
audioSpec.callback = synthCallback;
audioSpec.userdata = synthBuffer;

/* setup audio */
if (SDL_OpenAudio(&audioSpec, NULL)) {
fprintf(stderr, "SDL_OpenAudio() failed\n");
SDL_Quit();
return EXIT_FAILURE;
}

/* no multicore - precalculate the music */
__4klang_render(synthBuffer);

/* start the music */
SDL_PauseAudio(0);

Another thing to check is how to allocate memory for "synthBuffer", I believe it should be:
Code: [Select]
synthBuffer = AllocateMemory(#MAX_SAMPLES*#SAMPLE_TYPE*2)
5
Purebasic / Re: 4Klang Software Synthesizer usage in Purebasic
« Last post by Ampli on October 20, 2018 »
Sorry for posting in this old Thread, Is it possible somehow to convert this 4klang usage to PureBasic Linux?
6
General chat / Re: The Welcoming Committee
« Last post by Rbz on October 17, 2018 »
 :hi: @ablablablablabla and @js
7
Coding tutorials / sine text scroller in 30 lines of JavaScript
« Last post by js on October 15, 2018 »


easy HTML5 Canvas tutorial:

http://slicker.me/javascript/scroll.htm
8
General chat / Re: The Welcoming Committee
« Last post by js on October 15, 2018 »
howdy folks,

javascript fan here. looks like not much action here recently, but i'm still enjoying the downloads.

9
Challenges & Competitions / Re: Halloween Challenge 2018
« Last post by ~Ar-S~ on October 10, 2018 »
Yop yop.. i'll try to do something.. But no much time..
10
Challenges & Competitions / Re: Halloween Challenge 2018
« Last post by aNdy on October 08, 2018 »
But don't get me wrong, I know the value of a competition, it's part of our life, every day we are competing some how, but if we have a chance to make a fair compo - that's what we should do.
Agreed.  Compos are *vital* to progress and pushing the limits of any given machine.  Coming from the C64 scene, the demos released in the last 10-15 years are mind blowing, mainly because of all those groups trying to out-do each other over the years, whether in 'official' competition with rules, or 'friendly' competition.

But sometimes, 'just for fun' particularly with the pre-tense of 'try-something-new', encourages more involvement., as you are trying to do with this challenge.  That's why I'm in! My level is not as good as others, but I will be releasing my source so that those with a lower level than even me (if that's possible), can learn also.  For me, this challenge is all about the learn and not about the kudos.

I'll stop stating the obvious now...
Pages: [1] 2 3 4 5 6 7 8 ... 10