[Gambas-user] R: Another use case of gb.openal
Ru Vuott
vuott at ...325...
Wed Jul 31 12:46:29 CEST 2013
Hello Benoît,
I'ld like to come back on this argument: gb.openal & Midi.
Surely you remember that I wrote you that I was able to run Midi file using the function:
AlureSetStreamPatchset()
but using the Alure API (NOT gb.openal).
Well, today I wanted to try running Midi files by using the features of the new Gambas component: gb.openal.
Well, I did, and I'll send you the simple code that I used:
****************************
Public Sub Form_Open()
Dim percorsoFile As String = "/path/of/my/file.mid"
Dim src, lungh, ast, isdone As Integer
Dim ast As AlureStream
Alure.InitDevice(Null, Null)
src = Al.GenSources(1)[0]
lungh = Stat(percorsoFile).Size
ast = Alure.CreateStreamFromFile(percorsoFile, lungh, 0)
Alure.SetStreamPatchset(ast, "/path/of/my/soundfont/file.sf2")
Alure.PlaySourceStream(src, ast, 3, 0)
While isdone = 0
Alure.Update()
Wend
End
***********************************************
Regards
vuott
--------------------------------------------
Mar 23/7/13, Benoît Minisini <gambas at ...1...> ha scritto:
Oggetto: Re: [Gambas-user] R: Another use case of gb.openal
A: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Data: Martedì 23 luglio 2013, 16:33
Le 23/07/2013 16:22, PICCORO McKAY
Lenz a écrit :
> From: Ru Vuott <vuott at ...325...>
>
>> ...but you knows I'm Midi maniac ;-) so I wanted to
try a Midi file.
>>
>> In console I received those notices:
>> fluidsynth: warning: No preset found on channel 0
[bank=0 prog=56]
>> fluidsynth: warning: No preset found on channel 1
[bank=0 prog=61]
>> fluidsynth: warning: No preset found on channel 2
[bank=0 prog=32]
>> fluidsynth: warning: No preset found on channel 3
[bank=0 prog=65]
>> fluidsynth: warning: No preset found on channel 4
[bank=0 prog=66]
>> fluidsynth: warning: No preset found on channel 5
[bank=0 prog=66]
>> fluidsynth: warning: No preset found on channel 6
[bank=0 prog=67]
>> fluidsynth: warning: No preset found on channel 7
[bank=0 prog=71]
>> fluidsynth: warning: No preset found on channel 9
[bank=128 prog=0]
>>
>> So I run FluidSynth before your test-openal, but I
otained same warnings.
>>
>
> u must use a midi bank file.. .. i mean, u'r channels
has no instruments
> loaded.. so dont sound anything due not defined any
instrument/sound
>
I successfully loaded a sound bank file (by using the
Alure.SetStreamPatchset method or the FLUID_SOUNDFONT
environment variable).
The warnings disappeared, but I got no sound at all. :-/
--
Benoît Minisini
------------------------------------------------------------------------------
See everything from the browser to the database with
AppDynamics
Get end-to-end visibility with application monitoring from
AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list