Dark Bit Factory & Gravity

GENERAL => General chat => Topic started by: harleyman on December 15, 2013

Title: 4klang for newbies
Post by: harleyman on December 15, 2013
I'm just playing around with the framework from iq / rgba  & Ferris (from TG11) and I was wondering
How do I export music from 4klang (I use re-noise as the host) to "the i4k_OGL_4klang" -framework?
I did try "record" and I got a .inc file and a .h file. But the fraimwork is looking for a obj file or something?
Any ideas ?


Title: Re: 4klang for newbies
Post by: Raizor on December 15, 2013
I've used v3.0 of 4kLang in Renoise and have always been able to export an obj file. When I export, I end up with a "4klang.h" fiile and a "4klang.obj" file. Are you perhaps using a different version?
Title: Re: 4klang for newbies
Post by: harleyman on December 16, 2013
I'm using the 3.0.1.  Maybe I got the "export" wrong?
Let me know how you use the 4klang export....

My 4klang-procedure:
1. start re-noise (start 4klang as the VSi via plugin)
2. load the song via open and load instruments/path
3. press "Panic" and then export
4. play the song in renoise
5. let the song play one loop and press stop.
6. save the .inc and .h file....  and then what?

Renoise : http://www.renoise.com/
4Klang : http://4klang.untergrund.net/    (If you don't know...4klang is music for 4/8K demos)
I have also looked at Clinkster by Loonies - great tool for making renoise music very small...
More info : http://www.pouet.net/prod.php?which=61592

Title: Re: 4klang for newbies
Post by: Raizor on December 17, 2013
You're indeed right harleyman, 3.0.1 of 4klang creates an INC file rather than an OBJ file.

You can either use 3.0.0 or you'll have to include a compilation step in your project to compile the INC fiile to an OBJ file. To compile the INC file, you'll need an ASM compiler such as MASM or YASM. The Clinkster release contains an example project that compiles the Clinkster ASM code, so that may be a good resource. It's also worth considering using Clinkster as it's pretty close to 4klang in terms of functionality/size.
Title: Re: 4klang for newbies
Post by: harleyman on December 17, 2013
Anyone got a code example for VS2010? (with .inc and .h ) or with the use of Clinkster ?
It most be better to use "code" insted of the included obj file. Let's minimize the tool-chain  ;D
I attach the code I got from Ferris @ TG11.... (tnx jack!) - Tested on VS2008 or VS2010
Ferris's talk can be found here :  http://ftp.gathering.org/TG/2011/Productions/
Title: Re: 4klang for newbies
Post by: Punqtured on December 20, 2013
Sorry to kick in with a post, not really answering your main question about integration. But from a musician's point of view, Clinkster is WAY easier to use for non-coders. I'd prefer Clinkster over 4klang anytime.

There's some noteworthy differences between Clinkster and 4klang, though. The main ones are:
1: 4klang supports LFO-control of any given part of the signal-chain, Clinkster doesn't. (resulting in more complex/interesting instruments)
2: 4klang features reverb, Clinkster doesn't (resulting in more complex/interesting instruments)
3: 4klang features filters, Clinkster doesn't (resulting in more complex/interesting instruments)
4: Clinkster doesn't require knowledge of signal processing, 4klang does
5: Clinkster doesn't require knowledge stack based operations, 4klang does
6: Clinkster requires all audio to be precalced, resulting in waiting time before intro starts
7: 4klang is extremely CPU-heavy, making it impossible to compose complex tunes, that require more than 4-5 instruments simultanously
8: Clinkster has a really nice analyzing script, that allows the coder to leave the size-optimizations to the musician.
9: Clinkster usually ends up 2-300 bytes smaller than an equally complex 4klang tunes.

As far as I'm aware, both are somewhat manageble to integrate into your intro, so my suggestion would be to always ask the musician you're cooperating with, which synth he/she prefers, if at all possible. My guess is, that it's easier to find musicians willing to compose using Clinkster than finding someone willing to compose using 4klang.

Hope the above is usefull to somebody :)

/Punqtured
Title: Re: 4klang for newbies
Post by: Raizor on December 20, 2013
harleyman, Clinkster comes with a fair chunk of sample code, so it's probably worth having a look at that. As Punqtured says, 4klang isn't the most musician friendly synth out there, so going with Clinkster will probably make it easier for you to get a tune made by someone. If you don't have any luck getting things sorted, I'll try and put together a VS2010 sample project. Please have a try yourself though, as you'll learn some new tricks in the process :)
Title: Re: 4klang for newbies
Post by: Punqtured on December 21, 2013
And if you're fine with a little, quick track that doesn't have to be too long and doesn't require all kind of specific parts, I could probably help out. I'm a bit tight for spare time due to work these days, but let me know a week or so in advance, and I'm sure I'll at least be able to find an evening somewhere, to make something you can use :)
Title: Re: 4klang for newbies
Post by: harleyman on December 29, 2013
When running the "build.bat" from Clinkster.zip with a demo-song from Renoise 2.8.1 -> Songs

I get the error:

c:\temp\Clinkster\easy_exe>tools\RenoiseConvert DemoSong.xrns temp\music.asm
Traceback (most recent call last):
  File "RenoiseConvert.py", line 606, in <module>
  File "RenoiseConvert.py", line 524, in makeMusic
IndexError: list index out of range

------------
My Build :
del /q temp\*
del music.exe

tools\RenoiseConvert DemoSong.xrns temp\music.asm
tools\nasmw -f win32 src\clinkster.asm -o temp\clinkster.obj
tools\nasmw -f win32 src\play.asm -o temp\play.obj
tools\crinkler14\crinkler temp\clinkster.obj temp\play.obj /OUT:music.exe /ENTRY:main tools\kernel32.lib tools\user32.lib tools\winmm.lib tools\msvcrt_old.lib @crinkler_options.txt

pause

Title: Re: 4klang for newbies
Post by: Punqtured on December 30, 2013
When running the "build.bat" from Clinkster.zip with a demo-song from Renoise 2.8.1 -> Songs

If you try to magically convert a demosong that is made by using samples/wavefiles and not a song made using only Clinkster instruments, I'm pretty sure that's the problem. But Clinkster comes with a nice collection of example songs (I know, since I've made some of them) so you might want to try those instead of Renoise's demo-songs.