pouët.net

jazzy scuba adventure by Fit [web]
[nfo]
screenshot added by yzi on 2018-08-05 00:30:56
platform :
type :
release date : august 2018
release party : Assembly 2018
compo : combined 1k
ranked : 9th
  • 10
  • 2
  • 0
popularity : 47%
 47%
  • 0.83
alltime top: #22902
  • yzi yzi [Code, music]
added on the 2018-08-05 00:30:56 by yzi yzi

popularity helper

increase the popularity of this prod by spreading this URL:

or via: facebook twitter pinterest tumblr

comments

The audio is pretty damn good for a 1k,so that kinda explains the visuals.
rulez added on the 2018-08-05 02:22:00 by Trilkk Trilkk
neat
rulez added on the 2018-08-05 08:55:39 by wbcbz7 wbcbz7
Trilkk: hey the visuals are by far the best I've ever done in a 1k! ;) But they were really only an afterthought, and it's better to have at least some visuals. The music routine isn't optimized, it was merely a quickly made experiment. I usually make the music routines in C first and then if it looks like it's going to end up in a prod, I'll rewrite it by hand in assembly and spend dozens of hours optimizing it for Crinkler. But this time I didn't to that, I just left it as a C routine and squeezed some visuals into the remaining bytes.

Here's the music routine in all its weird unoptimized glory, with an example main program and everything.

Code: #include <windows.h> unsigned int framecount = 0; HMIDIOUT midiout_handle; // Call this at around 60 times per second void addTune() { // Chord/bass+melody sequence, as indices into the scale[] array static unsigned int sequence[] = { 0, 5, 6, 2, 1, 3, 4, 7 }; // Two octaves of Barry Harris's "6th Diminished" scale static unsigned int scale[16] = { 0, 2, 4, 5, 7, 8, 9, 11, 12+0, 12+2, 12+4, 12+5, 12+7, 12+8, 12+9, 12+11, }; // MIDI status bytes // 0x0000xxCy : Program Change (xx) on channel y // 0x00vvnn9y : Note On, channel y, note nn, velocity vv // 0x00007BBy : All Notes Off, channel y // 0x00vvnnBy : Control Change (xx) on channel y, controller nn, value vv if (framecount & 3) return; unsigned int chan=8, seqnote=0, note=24, vel=127; if ((framecount >= 1024)) { if (framecount >= (1024+2048+33)) framecount -= ((framecount >> 5) << 5); if ((framecount & 63) == 32) { chan = 15; note += (framecount >> 10) * 12 + 24; } if ((framecount & 31) == 0) goto ohi; } chan = (framecount >> 2) & 7; note += 24; vel = 60; ohi: unsigned int seqstep = framecount >> 7; seqnote = sequence[seqstep & 7]; note += scale[((((framecount >> 2) & 7) << 1) + seqnote) & 15]; midiOutShortMsg(midiout_handle, 0x00007BB0 + chan); // all notes off if (chan < 15) midiOutShortMsg(midiout_handle, 0x00005Fc0 + chan); // patch change else midiOutShortMsg(midiout_handle, 0x000058c0 + chan); // patch change midiOutShortMsg(midiout_handle, 0x00000090 + chan + (note << 8) + (vel << 16)); // note on midiOutShortMsg(midiout_handle, 0x000000B0 + chan + (10 << 8) + ((framecount * 17 & 127) << 16)); // panning } void main() { midiOutOpen(&midiout_handle,0,0,0,CALLBACK_NULL); loop: ShowCursor(0); PeekMessage(0, 0, 0, 0, PM_REMOVE); addTune(); framecount++; Sleep(15); if(!GetAsyncKeyState(VK_ESCAPE)) goto loop; ExitProcess(0); }
added on the 2018-08-05 21:08:00 by yzi yzi
Worm! Love the harmony, and thanks for the music generator source!
rulez added on the 2018-08-06 22:15:57 by noby noby
Worm!
rulez added on the 2018-08-06 22:37:46 by fizzer fizzer
Rather cool music, and thanks a ton for posting the code.
Most helpful.
rulez added on the 2018-08-06 23:38:01 by p01 p01
Gotta thumb up the jazzy vibes in 1k
rulez added on the 2018-08-11 08:02:08 by Serpent Serpent
parasite!
rulez added on the 2018-08-11 08:08:41 by sensenstahl sensenstahl
...........
added on the 2018-08-12 13:41:46 by Frequent Frequent
Nice
rulez added on the 2018-10-02 22:03:22 by tomkh tomkh
Nice little scuba adventure
rulez added on the 2021-03-13 08:54:41 by Queen_Luna Queen_Luna
nice

submit changes

if this prod is a fake, some info is false or the download link is broken,

do not post about it in the comments, it will get lost.

instead, click here !

[previous edits]

add a comment