pouët.net

general 4klang thread

category: music [glöplog]
4klang produces x86 assembly source code as its "end-product", and I can't think of any reason why it couldn't be used on just about any operating system that runs x86 code.
added on the 2017-07-28 17:40:11 by yzi yzi
yzi: I think they're talking about the VST
Exactly. Also:
Quote:
and I can't think of any reason why it couldn't be used on just about any operating system that runs x86 code.

Calling conventions / stack mangement used in the code must match those of the target environment.
Maybe with this app?
BB Image
http://diaphone.blogspot.fi/2010/12/11.html

..first thing why i moved to macs was not to read 3 pages of how to install something.
it actually could be easier to install windows and a vst host than this plugin..
added on the 2017-07-28 19:57:15 by 1in10 1in10
Saga Musix: what kind of calling convention and stack management related problem scenario did you have in mind?
added on the 2017-07-29 09:27:36 by yzi yzi
Uhm... whenver you call a function, you need to match the calling convention and stack alignment requirements of your platform? Those are different between Windows and Linux, 32-bit and 64-bit (e.g. stack must be aligned by 16 bytes on x64). 4klang seems to use stdcall by default, which is rather Microsoft-specific.
I made a simple swing modification to 4klang. There was previously some "groove pattern" stuff, but for me it seemed a bit overkill to have a 16-step pattern of per-tick swing on/off values, and the swing strength value was hard-coded as 3000 samples, and only changing the "up-ticks", increasing the actual effective tempo and ruining beat/bar sync positions. This one is simpler, and it retains the beat/bar sync, so that the time values of bar/beat positions and length of the song should be correct. (testing and corrections welcome)


Put the following code in 4klang.asm, in the _4klang_render routine around line 1464, replacing the "%ifdef GO4K_USE_GROOVE_PATTERN" thingy.

Code: ... %ifdef GO4K_USE_SWING mov ebx, dword SAMPLES_PER_TICK_SWING_DOWNTICK mov eax, dword [esp] test eax, 1 jz go4k_render_noswing mov ebx, dword SAMPLES_PER_TICK_SWING_UPTICK go4k_render_noswing: cmp ecx, ebx %else cmp ecx, dword SAMPLES_PER_TICK %endif jl go4k_render_sampleloop ...


And then in your song.inc file, put this (do not enable GO4K_USE_GROOVE_PATTERN, because it isn't used anymore) around the beginning of the file, after the SAMPLES_PER_TICK definition

Code: ... %define SAMPLES_PER_TICK 11025 ... %define GO4K_USE_SWING %define SWING_STRENGTH_PERCENT 62 %define SWING_TICK_DIFFERENCE ((SAMPLES_PER_TICK * 2) * (2 * SWING_STRENGTH_PERCENT - 100) / 100) %define SAMPLES_PER_TICK_SWING_DOWNTICK (SAMPLES_PER_TICK + (SWING_TICK_DIFFERENCE / 2)) %define SAMPLES_PER_TICK_SWING_UPTICK (SAMPLES_PER_TICK - (SWING_TICK_DIFFERENCE / 2))



Use SWING_STRENGTH_PERCENT to define the swing strength.
50 = straight beat, no swing
66 = triplet swing
75 = dotted note swing, sixteenth or eighth note or whatever you've defined as your tick resolution in the Quant. setting when recording the song

When making the song e.g. in Ableton live, use a non-destructive swing parameter, so you can hear it how you want it to be. Then, when recording into 4klang, disable the swing, so 4klang hears a straight beat.


And unrelated to this, but remember to change

Code:%macro GO4K_FLD 1 db %endmacro


into

Code:%macro GO4K_FLD 1 db %1 %endmacro

in your song.inc, or otherwise it will crash.
added on the 2017-10-28 17:37:47 by yzi yzi
The "go4k_render_noswing" label is a bit misleading, but since posts cannot be edited, I won't fix it.
added on the 2017-10-28 17:42:49 by yzi yzi

login