Dark Bit Factory & Gravity
PROGRAMMING => Freebasic => Topic started by: Rbz on February 01, 2009
-
Just for the sake of completeness ;), here is freebasic compatible library of "Farbrausch libV2" (XP / Vista compatible)
Install V2.1.0:
-----------
From "freebasic_libV2.zip" file extract and copy the file "libV2.a"
library to the freebasic install folder:
Eg.: C:\FreeBasic\lib\win32
And "libv2.bi" to the folder C:\FreeBasic\inc
Install V2.1.5:
-----------
From "freebasic_libV215.zip" file extract and copy the file "libV215.a"
library to the freebasic install folder:
Eg.: C:\FreeBasic\lib\win32
And "libv215.bi" to the folder C:\FreeBasic\inc
Check out example test folder
More Songs here:
ftp://ftp.modland.com/pub/modules/V2/
-
Another Karmic moment for you Rbz.
Nice one mate :)
It plays wonderfully well here.
I will need to add this to the resources section soon (along with some others).
-
That's truely great news for all freebasic demo coders.
Cool, rbz!
-
Thanks to kb^fr :)
-
Does the song automatically loop?
The example seems to play once :) Cant see any instructions in the source.
-
Does the song automatically loop?
The example seems to play once :) Cant see any instructions in the source.
I'm not sure either mate, my guess is that it should not to be meant to loop.
-
This is sweet work indeed master Rbz. :D
First thing I noticed is the song file size is a bit on the big side, or maybe it's just the example song length. I will check out the linky, and try some more out.
I like the idea of the V2 Soft Synth alot, as you can somehow incorporate speech into the tune; ( Clyde thats probably why it's called a soft synth, berk ) as heard in a few of the popular FR releases.
However I have yet to get the composer to work myself. There was talk if im not mistaken about adding it to WinAmp, but no joys there. Maybe I can persuade one of my musical chiefs to try it out, if theres an editor / tracker that is compatible with it.
I wonder what else can be done with it, any monitoring / syncing to be done, like Samples being played?
Also how does that command about the music being out of alignment to the visuals work exactly?
Im just VERY curious on the abilities of it. And you've done us proud Rbz and thankyou.
Smart,
Clyde.
-
It will crunch down to about 20kb with the song rbz used as an example clyde,
as for sync, I think that you can use the song timer to do your sync, I don't think that this allows you to monitor what sound effect is being played, I might be wrong though.
-
With this lib, as it is, you can only synch your effects with song timer (ssGetTime) events, maybe fr guys have one special version of it (internal use only), which can be synchronized with MIDI events etc...
-
With this lib, as it is, you can only synch your effects with song timer (ssGetTime) events, maybe fr guys have one special version of it (internal use only), which can be synchronized with MIDI events etc...
I'm pretty certain that they do.
-
Hi Rbraz,
Thanx for sharing!
is this the Replayer for the new V2M Sounds?
The new sounds arent compatible with the old V2M replayer!
Im currently working on.
Here are 2 compiled exe, 1 converted sound and the converter...
-
@energy: this one is based on the old version 1.0, I didn't know about the new v.1.5 oO
And yes, the new version have everything someone need to synch with visuals, very nice :)
I'm going to make another wrapper for FB users.
-
AWESOME!!!!!!! :D
-
Watch here! :whisper:
http://www.1337haxorz.de/products.html
-
Shame they have no instructions / documention on how to compose libV2 songs.
And like I thought it has the plugins to be able to listen to tunes via WinAmp.
I also Googled for Buzz Machines, seems like a sample generator.
I would really be interested, as im sure others who are affraid to ask are as well, would like to know how in a seperate post, how it's possible to actually make a v2 song in an editor / tracker fashion.
My next little question what is the difference between libv2 and the other BR404 Synth; which has an editor, I believe? Can people make v2 songs in that ?
Chin Chin,
Clyde.
-
Ok it's done :), check the attached file below:
Functions:
----------
' init sound system
' data: pointer to V2M file
' SampleRate: song Sample Rate (default=44100)
' Tickspersec: song ticks per second (default=1000)
' hWnd: window handle
Declare Function libV215_Init cdecl Alias "libV215_Init"(byval music as any ptr, byval SampleRate as integer, byval Tickspersec as integer, byval hWnd as HWND) as integer
' start playing (from song start)
'a_time : time offset from song start in msecs
Declare Sub libV215_Play cdecl Alias "libV215_Play"(byval a_time as integer)
' stop playing
' a_fadetime : optional fade out time in msecs
Declare Sub libV215_Stop cdecl Alias "libV215_Stop"(byval a_fadetime as integer)
' close sound system
Declare Sub libV215_Close cdecl Alias "libV215_Close"()
' returns if song is currently playing
Declare Function libV215_IsPlaying cdecl Alias "libV215_IsPlaying" () as integer
' sets operation mode of VU meters
' mode : 0 for peak meters, 1 for RMS meters
Declare Sub libV215_SetVUMode cdecl Alias "libV215_SetVUMode"(byval mode as integer)
' retrieves VU meter data for a channel
' ch : channel to retrieve (0..15)
' l : pointer to float variable where left VU is stored
' r : pointer to float variable where right VU is stored
Declare Sub libV215_GetChannelVU cdecl Alias "libV215_GetChannelVU"(byval ch as integer, byval l as single ptr, byval r as single ptr)
' gets sample-exact and latency compensated current play position
Declare Function libV215_GetCurSmp cdecl Alias "libV215_GetCurSmp" () as long
' sets player volume (default is 1.0)
Declare Sub libV215_SetVolume cdecl Alias "libV215_SetVolume"(byval volume as single)
' forces rendering thread to update. On single-core CPUs it's a good idea to
' call this once per frame (improves A/V sync and reduces any stuttering),
' with more than one CPU it's pretty much useless.
Declare Sub libV215_Tick cdecl Alias "libV215_Tick"()
I would really be interested, as im sure others who are affraid to ask are as well, would like to know how in a seperate post, how it's possible to actually make a v2 song in an editor / tracker fashion.
@Clyde: I think you will need some help from a experienced V2M composer.
My next little question what is the difference between libv2 and the other BR404 Synth;
They are both synth players, V2 was done by kb (http://www.pouet.net/prod.php?which=15073) and br404 done by bero (http://www.pouet.net/prod.php?which=52346)
which has an editor, I believe? Can people make v2 songs in that ?
Those synth work as VSTi pluggins for trakers like for example buzzmachine, maybe your musician friend can help you on how to install and work with those VSTi pluggins.
-
Thats fantastic mate :)
K++
-
Thanks mate
Check the attached file below and feel the power ;)
-
Brilliant, and thankyou for your advice, tips and ability.
-
The Product will make you beautiful.
-
I prefer Poem To A Horse, personally.
What I am going to do, off my own back unless anyone here has already done so, and thats contact ( if I can find a contact ) the Farbrausch team about here featuring some of their libs for FB. I do know that they like to teach others their wisdom; I think they are proffessors. I remember reading this somewhere, or was it all in a dream I had.
-
Well im not having much success with Buzz Machines after it's iinstalled and run the thing it crashes. Hopefully the lib v2 isnt specifically designed for buzz machines. I wouldnt know as theres no documentation.
What else could I try any suggestions for software thats like Buzz Machines to try out?
Cheers,
Clyde.
-
@Clyde: You can try Madtracker http://www.madtracker.org
After installation go to the MadTracker\VST folder and copy there those 4 files:
Farbrausch V2 (single).dll
Farbrausch V2.dll
v2edit.dle
v2edit_s.dle
You can find them on vsti folder inside "farbrausch_v2_plugins_1.5.zip"
Execute Madtracker and go to the plugin menu, select load and select either Farbrausch V2.dll or Farbrausch V2 (single).dll
Two click on the V2 VSTI bar (check image below) and it will open main V2 synth program window.
After this point I cannot help you anymore :), either you will have to discover it by yourself (how to make music there) or ask it to an experienced musician.
-
You star, nice one mate. I've dabbled abit myself with MadTracker.
-
I understand you dude, im not a musician either, but it's very nice to learn new techniques, even if we arent Musicians our selves. Surely some of the members here who do make tunes, know how this works???????????? Im sure they are lurking.
Ok, I've managed per instructions to get it working, btw when Rbz is refering to copy over the farbrausch stuff, he's referring to downloading from Buzz Machines ( Jesko Buzz )
Do a search for in the plugins for V2, and then you'll see the details and opt for v1.5 has all the bug fixes. Then extract the files over to MadTracker V2; when you run MT2 it will automatically scan for any plugins.
From what I gather LibV2 is something for creating your own instrumens / samples, with the features it has.
I couldnt find a play button; only loading / saving and exporting. One thing I could not do with the plugin window is resize / rescale it, as it goes outside the top and bottom of the screen. Have tried changing resolutions, but it still does it. Perhaps theres a hidden play button.
So what I am suducing is that this is a sample modifier. But it cant be, seeming as people have written complete v2 modules with it.
I think once this is sussed out, we must have a tutorial for it.
-
I couldnt find a play button; only loading / saving and exporting. One thing I could not do with the plugin window is resize / rescale it, as it goes outside the top and bottom of the screen. Have tried changing resolutions, but it still does it. Perhaps theres a hidden play button.
@Clyde, you will need to change your display settings to 1280x1024, works fine for me, btw you can scroll down window settings, check the attached image below.
-
Thanks again, I did try changing my resolution funnyly enough, obviously not upped it enough.
Btw, tried all that still cant find where or how to get into an tracker to use this / play button etc etc?
-
I have heard a problem with the newly updated wrapper for v1.5, listening to that song by little bitchard and friend in the vu example, the tune stutters and skips. Basically doesnt play correctly.
Stutters is a word I use for pauses, and then catches up with itself. Bit like how you watch a video stream on youtube, but dont quite have a fast enough connection.
I am in the process of making something out of this, even though I dont have a clue how to use the vst plugin or make a tune :( There surely must be a tracker made for this???
I Dont suppose any one out there attended the seminar at last years Break Point?
Even one of my sonix dudes, found it difficult to do stuff when he tried it, and he was one of the lucky ones to attend the seminar.
It must be a dooddle once you know the processes. Tutorial would be a great asset as it is a great piece of workmanship.
Again I dont know if anybody knows KB and Farbrausch, if you do then if you wouldnt mind, politely ask him to pop over and take a quick look; or you may know somebody else that has created music with it. If no body does, then I'll try and reach him / them myself.
Your probably wondering, why the bursts of interest. I like the sound of this ( literally ) and it's great that there's an alternative to Bass and FMod ( including the variants ). I doubly like it, due to the syncing capabilities.
Bass is far too big in its current form, and BR404 doesnt have a particularly nice interface, unless there is another editor around?????
Lots of stuff in here and hopefully some of you will have answers. If not, lets gather together and find out more.
Cheers and many thanks,
Clyde.
-
Next point of call I need a routine to display what samples are being played during the song, also wonderng if there's a means to list all the of the sample in a list for a particular song??
I have this so far:
Print str(libV215_GetCurSmp())
but that isnt giving me a sample, like this is sample no. 1 or this is sample no. 5 for example, etc. The current data Looks like frequency info.
So im guessing there's something else that needs doing to it, or another route.
There has got to be a means of using a pointer to retrieve the samples / instruments that are being played over the channels ( not a volumetric meter - usually only good for getting a loud bass drum, an actual sample number=12 has started playing detector ) if its not possible from retrieving it from memory, then maybe the information is in the music files / .bas data arrays themselves?
-
libV215_GetCurSmp -> return current play position (time elapsed) with latency compensated.
There has got to be a means of using a pointer to retrieve the samples / instruments that are being played over the channels ( not a volumetric meter - usually only good for getting a loud bass drum, an actual sample number=12 has started playing detector ) if its not possible from retrieving it from memory, then maybe the information is in the music files / .bas data arrays themselves?
No way to do it using Freebasic, sorry.
Yesterday I was reading some pouet bbs and I found a thread about effects synchronization, you can read it here:
http://www.pouet.net/topic.php?which=6163&page=1
Look for the reply from Keops, I truly believe on what he is saying.
-
Thanks matey, I was kinda mislead with the GetCurSmp, I thought that the smp part stood for Sample.
Cheers also for the links and info.
-
Hi RBZ!
After a long time i need this cool lib for my codings in MASM.
But as Shockie asked. Can yu add a replay? Unfortunatly Purebasic cant compile LIBs for other languages!
I did it in Purebasic version like that:
Adding a Variable replay in
Structure PlayerState
state.l
time.l
nexttime.l
*gptr.c
gnt.l
gnr.l
usecs.l
num.l
den.l
tpq.l
bar.l
beat.l
tick.l
chan.PlayerChannel[16]
cursmpl.l
smpldelta.l
smplrem.l
tdif.l
replay.l
EndStructure
Adding that in Funktion OPEN
Interface V2MPlayer
; Public
Init(a_tickspersec.l = 1000)
Open.l(*a_v2mptr, a_samplerate.l = 44100,replay.l=#True)
Close()
Play(a_time.l = 0)
Stop(a_fadetime.l = 0)
RenderToFile(filename.s, callback.RENDERTOFILECB = 0)
Render(*a_buffer, a_len.l, a_add.l = 0)
RenderProxy(*a_this, *a_buffer, a_len.l)
IsPlaying.l()
GetCurrentTime.l()
GetNeededTime.l()
GetChannelVU.l(channel.l, *left.Long, *right.Long)
GetMainVU.l(*left.Long, *right.Long)
; Private
InitBase.l(*a_v2m)
Reset()
Tick()
EndInterface
Writing structure variable:
Procedure.l V2MPlayer_Open(*this.V2MPlayer_Object, *a_v2mptr, a_samplerate.l = 44100,replay.l=#True)
Protected *thisInterface.V2MPlayer
Protected cursmpl.d
*thisInterface.V2MPlayer = *this
If *this\m_base\valid : *thisInterface\Close() : EndIf
*this\m_state\replay=replay
*this\m_samplerate = a_samplerate
If *thisInterface\InitBase(*a_v2mptr) = 0 : ProcedureReturn 0 : EndIf
*thisInterface\Reset()
synthSetVUMode(@*this\m_synth, 1)
; Get the time
*this\m_base\valid = 0
cursmpl = 0.0
*this\m_state\state = #PLAYING
*this\m_state\smpldelta = 0
*this\m_state\smplrem = 0
While (*this\m_state\state = #PLAYING)
*thisInterface\Tick()
If (*this\m_state\state = #PLAYING)
UpdateSampleDelta(*this\m_state\nexttime, *this\m_state\time, *this\m_state\usecs, *this\m_base\timediv2, @*this\m_state\smplrem, @*this\m_state\smpldelta)
Else
*this\m_state\smpldelta = 0
EndIf
cursmpl + *this\m_state\smpldelta
Wend
*this\m_maxtime = cursmpl * 1000.0 / *this\m_samplerate
*this\m_state\state = #OFF
*this\m_state\smpldelta = 0
*this\m_state\smplrem = 0
*this\m_base\valid = 1
ProcedureReturn *this\m_base\valid
EndProcedure
Final using this in the V2MPlayer_IsPlaying funktion:
Procedure.l V2MPlayer_IsPlaying(*this.V2MPlayer_Object)
Protected *thisInterface.V2MPlayer
*thisInterface.V2MPlayer = *this
If *this\m_state\replay And V2MPlayer_GetCurrentTime(*this) >= V2MPlayer_GetNeededTime(*this)
*thisInterface\Stop()
*thisInterface\Reset()
*thisInterface\Play()
EndIf
ProcedureReturn (*this\m_base\valid <> 0 And *this\m_state\state = #PLAYING) Or 0
EndProcedure
Thanx in advance
eNeRGy