farbrauschs music lib in a Purebasic userlibrary ...
farbrauschs music lib in a Purebasic userlibrary ...
Hi,
with some help of traumatic, Paul and Rings I wrapped kb/farbrauschs libv2 static library. Tthe synthesizer that was responsible for creating all sounds in the famous farbrausch intros such as .the .product, poemtoahorse, Candytron, Flybye and of course the 96 kilobyte shoot-em-up .kkrieger to a Purebasic userlibrary.
Summarized: With this userlibrary you can play .v2m songs.
The Links:
+ The userlibrary Libv2Purebasic www.schliess.net
+ .schnurpfel - a lame libv2 player written with Libv2Purebasic www.schliess.net
+ kb/farbrausch http://kebby.org
+ farbrausch www.farb-rausch.de
+ libv2 library with some additional infos http://www.1337haxorz.de/products.html
Have fun + MFG
WolfgangS
with some help of traumatic, Paul and Rings I wrapped kb/farbrauschs libv2 static library. Tthe synthesizer that was responsible for creating all sounds in the famous farbrausch intros such as .the .product, poemtoahorse, Candytron, Flybye and of course the 96 kilobyte shoot-em-up .kkrieger to a Purebasic userlibrary.
Summarized: With this userlibrary you can play .v2m songs.
The Links:
+ The userlibrary Libv2Purebasic www.schliess.net
+ .schnurpfel - a lame libv2 player written with Libv2Purebasic www.schliess.net
+ kb/farbrausch http://kebby.org
+ farbrausch www.farb-rausch.de
+ libv2 library with some additional infos http://www.1337haxorz.de/products.html
Have fun + MFG
WolfgangS
Last edited by WolfgangS on Sun Feb 13, 2005 12:07 am, edited 1 time in total.
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Re: farbrauschs music lib in a Purebasic userlibrary ...
In case someone's interested, here's the original (obviously adapted) example:
I really liked the animation 
Code: Select all
ssInit(?theTune, GetForegroundWindow_())
OpenConsole()
PrintN("Farbrausch Tiny Music Player v0.2")
PrintN("Code and Synthesizer (C) 2000-2004 kb/Farbrausch");
PrintN("Now Playing: 'Experimental Trance' by DaFunk");
ssPlay()
Dim anim.b(3) : anim() = @"|/-\"
Repeat
ConsoleLocate(0,4)
Print(FormatDate("%ii:%ss", ssGetTime()*0.001) + " " +Chr(anim(Int(ssGetTime()/250.0)&3)))
Sleep_(10)
Until GetAsyncKeyState_(#VK_ESCAPE)
ssClose()
CloseConsole()
End
DataSection
theTune:
IncludeBinary("Dafunk - Experimental Trance.v2m")
EndDataSection

Good programmers don't comment their code. It was hard to write, should be hard to read.
:*)
...with a little help from my friends...
...with a little help from my friends...
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Re: farbrauschs music lib in a Purebasic userlibrary ...
The following line of my above example doesn't work in v3.93b1:
only the "Chr(anim(Int(ssGetTime()/250.0)&3)))"-part is shown.
However this works:
This works, too:
And even that works (no additional space):
It worked in 3.92. Sorry, I just couldn't nail it down...
Code: Select all
Print(FormatDate("%ii:%ss", ssGetTime()*0.001) + " " + Chr(anim(Int(ssGetTime()/250.0)&3)))
However this works:
Code: Select all
Print(FormatDate("%ii:%ss", ssGetTime()*0.001) + " " + Hex(anim(Int(ssGetTime()/250.0)&3)))
Code: Select all
Print(FormatDate("%ii:%ss", ssGetTime()*0.001) + " " + Str(anim(Int(ssGetTime()/250.0)&3)))
Code: Select all
Print(FormatDate("%ii:%ss", ssGetTime()*0.001) + Chr(anim(Int(ssGetTime()/250.0)&3)))
Good programmers don't comment their code. It was hard to write, should be hard to read.
Re: farbrauschs music lib in a Purebasic userlibrary ...
Another strange thing:
Take the above code and remark the following lines:
Now the debugger says: "Array index out of bounds" !?
And no, this is no 3rd party library issue, try the following:
@WolfgangS: Sorry for hijacking your thread! Maybe some kind admin will move this 
Take the above code and remark the following lines:
Code: Select all
; PrintN("Farbrausch Tiny Music Player v0.2")
; PrintN("Code and Synthesizer (C) 2000-2004 kb/Farbrausch");
; PrintN("Now Playing: 'Experimental Trance' by DaFunk");
And no, this is no 3rd party library issue, try the following:
Code: Select all
OpenConsole()
PrintN("PureBasic rules") ; comment me to get "Array index out of bounds"!
Dim anim.b(0) : anim() = @"|/-\"
Repeat
ConsoleLocate(0,4)
Print(FormatDate("%ii:%ss", i*0.001) + " " + Chr(anim(Int(i/250.0)&3)))
i+10
Sleep_(10)
Until GetAsyncKeyState_(#VK_ESCAPE)
CloseConsole()
End

Good programmers don't comment their code. It was hard to write, should be hard to read.
Re: farbrauschs music lib in a Purebasic userlibrary ...
Code: Select all
Dim anim.b(0) : anim() = @"|/-\"
Thanks for clearing this, Fred!
Good programmers don't comment their code. It was hard to write, should be hard to read.
-
- Enthusiast
- Posts: 276
- Joined: Fri Apr 25, 2003 5:06 pm
- Location: Gummersbach - Germany
- Contact:
Hi, there's a new v2m version out! http://www.1337haxorz.de/products.html#v2
It would be very nice to have the new version as a lib for Purebasic!
Thanx in advance!
It would be very nice to have the new version as a lib for Purebasic!
Thanx in advance!
The Human Code Machine / Masters' Design Group
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
I converted the new v2synth player code within 3 days of work after it was released (This spaghetti code of kb is really damn hard - Never thought anyone would missuse C++ to do spaghetticode in OOP [you can't do spaghetti code in OOP languages, just kb is able to do this] ) to purebasic. If you want it, please send me a private message and I'll send you the translated code.
bye,
Daniel
Daniel