Csound Csound-dev Csound-tekno Search About

[Csnd] lets fluidAllOut

Date2010-06-10 12:52
Frommenno
Subject[Csnd] lets fluidAllOut
Hi,

i'm still cleaning up all the examples and hope to upload some in the near
future.
I have a problem with FluidAllOut. 
Would somebody please try out this example from the manual and confirm this
error: error:  
insufficient required arguments, line 76:
  aL, aR	 fluidAllOut

This is the csd i use:




; Audio out   Audio in
-odac           -iadc     -M0    ;;;RT audio I/O and RT midi




sr = 44100
kr = 4410
ksmps = 10  
nchnls = 2
0dbfs = 32767

; LOAD SOUNDFONTS
gienginenum1 fluidEngine
gienginenum2 fluidEngine
; soundfont path to manual/examples
isfnum1      fluidLoad "/home/menno/Piano Steinway Grand Model C
(21,738KB).sf2", gienginenum1, 1
; Bright Steinway, program 1, channel 1
             fluidProgramSelect gienginenum1, 1, isfnum1, 0, 1
; Concert Steinway with reverb, program 2, channel 3
             fluidProgramSelect gienginenum1, 3, isfnum1, 0, 2
; soundfont2 path to manual/examples
isfnum2      fluidLoad "/home/menno/63.3mg The Sound Site Album Bank
V1.0.SF2", gienginenum2, 1
; General MIDI, program 50, channel 2
             fluidProgramSelect gienginenum2, 2, isfnum2, 0, 50

; SEND NOTES TO STEINWAY SOUNDFONT

instr 1 ; FluidSynth Steinway Rev
  ; INITIALIZATION
             mididefault   60, p3 ; Default duration of 60 -- overridden by
score.
             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
  ; Use channel assigned in fluidload.
  ichannel   = 1
  ikey       = p4
  ivelocity  = p5
  istatus    = 144
             fluidControl gienginenum1, istatus, ichannel, ikey, ivelocity
endin

instr 2 ; GM soundfont
  ; INITIALIZATION
             mididefault   60, p3 ; Default duration of 60 -- overridden by
score.
             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
  ; Use channel assigned in fluidload.
  ichannel   = 2
  ikey       = p4
  ivelocity  = p5
  istatus    = 144
             fluidNote gienginenum2, ichannel, ikey, ivelocity
endin

instr 3 ; FluidSynth Steinway Rev
  ; INITIALIZATION
             mididefault   60, p3 ; Default duration of 60 -- overridden by
score.
             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
  ; Use channel assigned in fluidload.
  ichannel   = 3
  ikey       = p4
  ivelocity  = p5
  istatus    = 144
             fluidNote gienginenum1, ichannel, ikey, ivelocity
endin


; COLLECT AUDIO FROM ALL SOUNDFONTS

instr 100 ; Fluidsynth output
  ; INITIALIZATION
  ; Normalize so iamplitude for p5 of 80 == ampdb(80).
  iamplitude = ampdb(p4) * (10000.0 / 0.1)  
  ; AUDIO
  aL, aR	 fluidAllOut
             outs aL, aR
endin





;i 1 0 3600
i 1 0 36 60 100
i 2 1 36 60 100
i 3 3 36 63 100
i 100 0 40 80
e








thank you!
Menno

Date2010-06-10 13:03
FromVictor Lazzarini
Subject[Csnd] Re: lets fluidAllOut
It takes one i-time argument, according to the sources (engine number?)

Victor
On 10 Jun 2010, at 12:52, menno wrote:

>
> Hi,
>
> i'm still cleaning up all the examples and hope to upload some in  
> the near
> future.
> I have a problem with FluidAllOut.
> Would somebody please try out this example from the manual and  
> confirm this
> error: error:
> insufficient required arguments, line 76:
>  aL, aR	 fluidAllOut
>
> This is the csd i use:
>
> 
>
> 
> ; Audio out   Audio in
> -odac           -iadc     -M0    ;;;RT audio I/O and RT midi
> 
>
> 
>
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 2
> 0dbfs = 32767
>
> ; LOAD SOUNDFONTS
> gienginenum1 fluidEngine
> gienginenum2 fluidEngine
> ; soundfont path to manual/examples
> isfnum1      fluidLoad "/home/menno/Piano Steinway Grand Model C
> (21,738KB).sf2", gienginenum1, 1
> ; Bright Steinway, program 1, channel 1
>             fluidProgramSelect gienginenum1, 1, isfnum1, 0, 1
> ; Concert Steinway with reverb, program 2, channel 3
>             fluidProgramSelect gienginenum1, 3, isfnum1, 0, 2
> ; soundfont2 path to manual/examples
> isfnum2      fluidLoad "/home/menno/63.3mg The Sound Site Album Bank
> V1.0.SF2", gienginenum2, 1
> ; General MIDI, program 50, channel 2
>             fluidProgramSelect gienginenum2, 2, isfnum2, 0, 50
>
> ; SEND NOTES TO STEINWAY SOUNDFONT
>
> instr 1 ; FluidSynth Steinway Rev
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 --  
> overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 1
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidControl gienginenum1, istatus, ichannel, ikey,  
> ivelocity
> endin
>
> instr 2 ; GM soundfont
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 --  
> overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 2
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidNote gienginenum2, ichannel, ikey, ivelocity
> endin
>
> instr 3 ; FluidSynth Steinway Rev
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 --  
> overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 3
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidNote gienginenum1, ichannel, ikey, ivelocity
> endin
>
>
> ; COLLECT AUDIO FROM ALL SOUNDFONTS
>
> instr 100 ; Fluidsynth output
>  ; INITIALIZATION
>  ; Normalize so iamplitude for p5 of 80 == ampdb(80).
>  iamplitude = ampdb(p4) * (10000.0 / 0.1)
>  ; AUDIO
>  aL, aR	 fluidAllOut
>             outs aL, aR
> endin
>
>
> 
>
> 
> ;i 1 0 3600
> i 1 0 36 60 100
> i 2 1 36 60 100
> i 3 3 36 63 100
> i 100 0 40 80
> e
>
>
> 
>
> 
>
>
>
> thank you!
> Menno
>
> -- 
> View this message in context: http://old.nabble.com/lets-fluidAllOut-tp28841992p28841992.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-06-10 15:30
FromMichael Gogins
Subject[Csnd] Re: lets fluidAllOut
I think you need to supply the fluidsynth handle.

Hope this helps,
Mike

On Thu, Jun 10, 2010 at 7:52 AM, menno  wrote:
>
> Hi,
>
> i'm still cleaning up all the examples and hope to upload some in the near
> future.
> I have a problem with FluidAllOut.
> Would somebody please try out this example from the manual and confirm this
> error: error:
> insufficient required arguments, line 76:
>  aL, aR         fluidAllOut
>
> This is the csd i use:
>
> 
>
> 
> ; Audio out   Audio in
> -odac           -iadc     -M0    ;;;RT audio I/O and RT midi
> 
>
> 
>
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 2
> 0dbfs = 32767
>
> ; LOAD SOUNDFONTS
> gienginenum1 fluidEngine
> gienginenum2 fluidEngine
> ; soundfont path to manual/examples
> isfnum1      fluidLoad "/home/menno/Piano Steinway Grand Model C
> (21,738KB).sf2", gienginenum1, 1
> ; Bright Steinway, program 1, channel 1
>             fluidProgramSelect gienginenum1, 1, isfnum1, 0, 1
> ; Concert Steinway with reverb, program 2, channel 3
>             fluidProgramSelect gienginenum1, 3, isfnum1, 0, 2
> ; soundfont2 path to manual/examples
> isfnum2      fluidLoad "/home/menno/63.3mg The Sound Site Album Bank
> V1.0.SF2", gienginenum2, 1
> ; General MIDI, program 50, channel 2
>             fluidProgramSelect gienginenum2, 2, isfnum2, 0, 50
>
> ; SEND NOTES TO STEINWAY SOUNDFONT
>
> instr 1 ; FluidSynth Steinway Rev
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 -- overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 1
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidControl gienginenum1, istatus, ichannel, ikey, ivelocity
> endin
>
> instr 2 ; GM soundfont
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 -- overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 2
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidNote gienginenum2, ichannel, ikey, ivelocity
> endin
>
> instr 3 ; FluidSynth Steinway Rev
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 -- overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 3
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidNote gienginenum1, ichannel, ikey, ivelocity
> endin
>
>
> ; COLLECT AUDIO FROM ALL SOUNDFONTS
>
> instr 100 ; Fluidsynth output
>  ; INITIALIZATION
>  ; Normalize so iamplitude for p5 of 80 == ampdb(80).
>  iamplitude = ampdb(p4) * (10000.0 / 0.1)
>  ; AUDIO
>  aL, aR         fluidAllOut
>             outs aL, aR
> endin
>
>
> 
>
> 
> ;i 1 0 3600
> i 1 0 36 60 100
> i 2 1 36 60 100
> i 3 3 36 63 100
> i 100 0 40 80
> e
>
>
> 
>
> 
>
>
>
> thank you!
> Menno
>
> --
> View this message in context: http://old.nabble.com/lets-fluidAllOut-tp28841992p28841992.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-06-10 21:13
Frommenno
Subject[Csnd] Re: lets fluidAllOut
Michael, i still don't get it.
i made some modification to this example from the manual and i do not get an
error anymore. But there are some things i do not understand.
This is a modified, simplyfied example:



; Audio out   Audio in
-odac           -iadc     -M0    ;;;RT audio I/O and RT midi



sr = 44100
kr = 4410
ksmps = 10  
nchnls = 2
0dbfs = 32767

; LOAD SOUNDFONTS
gienginenum1 fluidEngine
gienginenum2 fluidEngine
; soundfont path to manual/examples
isfnum1      fluidLoad "/home/menno/Piano Steinway Grand Model C
(21,738KB).sf2", gienginenum1, 1
; Bright Steinway, program 1, channel 1
             fluidProgramSelect gienginenum1, 1, isfnum1, 0, 1
; Concert Steinway with reverb, program 2, channel 3
             fluidProgramSelect gienginenum1, 3, isfnum1, 0, 2
; soundfont2 path to manual/examples
isfnum2      fluidLoad "/home/menno/63.3mg The Sound Site Album Bank
V1.0.sf2", gienginenum2, 1
; General MIDI, program 50, channel 2
             fluidProgramSelect gienginenum2, 2, isfnum2, 0, 50

; SEND NOTES TO STEINWAY SOUNDFONT

instr 2 ; GM soundfont
  ; INITIALIZATION
             mididefault   60, p3 ; Default duration of 60 -- overridden by
score.
             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
  ; Use channel assigned in fluidload.
  ichannel   = 2
  ikey       = p4
  ivelocity  = p5
  istatus    = 144
             fluidNote gienginenum2, ichannel, ikey, ivelocity
endin

instr 3 ; FluidSynth Steinway Rev
  ; INITIALIZATION
             mididefault   60, p3 ; Default duration of 60 -- overridden by
score.
             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
  ; Use channel assigned in fluidload.
  ichannel   = 3
  ikey       = p4
  ivelocity  = p5
  istatus    = 144
             fluidNote gienginenum1, ichannel, ikey, ivelocity
endin

; COLLECT AUDIO FROM ALL SOUNDFONTS

instr 100 ; Fluidsynth output
  ; INITIALIZATION
  ; Normalize so iamplitude for p5 of 80 == ampdb(80).
  iamplitude = ampdb(p5)
  ; AUDIO
  aL, aR	 fluidAllOut gienginenum1
             outs aL*10000, aR*10000
endin



;i 1 0 3600
;i 1 0 36 60 100
i 2 1 36 60 100
i 3 3 36 63 100
i 100 0 40 80 80
e





1. the manual says: aleft, aright fluidAllOut
nothing more, but i did:   aL, aR	 fluidAllOut gienginenum1
not according to the manual but now i get a very soft, distorted sound - and
the error is gone!?
2. i changed a weird line like the line: iamplitude = ampdb(p5) * (10000.0 /
0.1) 
as found in instr 100
3. removed instr 1 just to get a smaller example and narrowing possible
error generators.
3. instr 100 there is p5 but no p4
4. there is no score in the manual
5. i had to amplify the output a lot: outs aL*10000, aR*10000 

So i get very soft output and it is distorted. 
Any suggestions?

greetings
Menno

Date2010-06-10 21:25
FromMichael Gogins
Subject[Csnd] Re: Re: lets fluidAllOut
The manual examples are out of date.

You should have better luck using the Fluidsynth instruments in
examples/CsoundAC.csd, the manual examples should be corrected to
follow their usage.

FYI, Fluidsynth was not actively developed for some years, then some
developers created patches that were not in the Fluidsynth repository,
and now development of Fluidsynth appears to have resumed, with
incorporation of these patches. This is what is now going into Csound.

The funny code in the manual was a workaround for an unpatched bug, it
is no longer necessary.

I use the Fluidsynth opcodes all the time, I have made some of my
biggest pieces using Fluidsynth piano and marimba instruments.

Also FYI, you can load more than 1 SoundFont into a single engine. You
only need more than 1 engine if several SoundFont output levels do not
match.

Hope this helps,
Mike

On Thu, Jun 10, 2010 at 4:13 PM, menno  wrote:
>
> Michael, i still don't get it.
> i made some modification to this example from the manual and i do not get an
> error anymore. But there are some things i do not understand.
> This is a modified, simplyfied example:
>
> 
> 
> ; Audio out   Audio in
> -odac           -iadc     -M0    ;;;RT audio I/O and RT midi
> 
> 
>
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 2
> 0dbfs = 32767
>
> ; LOAD SOUNDFONTS
> gienginenum1 fluidEngine
> gienginenum2 fluidEngine
> ; soundfont path to manual/examples
> isfnum1      fluidLoad "/home/menno/Piano Steinway Grand Model C
> (21,738KB).sf2", gienginenum1, 1
> ; Bright Steinway, program 1, channel 1
>             fluidProgramSelect gienginenum1, 1, isfnum1, 0, 1
> ; Concert Steinway with reverb, program 2, channel 3
>             fluidProgramSelect gienginenum1, 3, isfnum1, 0, 2
> ; soundfont2 path to manual/examples
> isfnum2      fluidLoad "/home/menno/63.3mg The Sound Site Album Bank
> V1.0.sf2", gienginenum2, 1
> ; General MIDI, program 50, channel 2
>             fluidProgramSelect gienginenum2, 2, isfnum2, 0, 50
>
> ; SEND NOTES TO STEINWAY SOUNDFONT
>
> instr 2 ; GM soundfont
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 -- overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 2
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidNote gienginenum2, ichannel, ikey, ivelocity
> endin
>
> instr 3 ; FluidSynth Steinway Rev
>  ; INITIALIZATION
>             mididefault   60, p3 ; Default duration of 60 -- overridden by
> score.
>             midinoteonkey p4, p5 ; Channels MIDI input to pfields.
>  ; Use channel assigned in fluidload.
>  ichannel   = 3
>  ikey       = p4
>  ivelocity  = p5
>  istatus    = 144
>             fluidNote gienginenum1, ichannel, ikey, ivelocity
> endin
>
> ; COLLECT AUDIO FROM ALL SOUNDFONTS
>
> instr 100 ; Fluidsynth output
>  ; INITIALIZATION
>  ; Normalize so iamplitude for p5 of 80 == ampdb(80).
>  iamplitude = ampdb(p5)
>  ; AUDIO
>  aL, aR         fluidAllOut gienginenum1
>             outs aL*10000, aR*10000
> endin
>
> 
> 
> ;i 1 0 3600
> ;i 1 0 36 60 100
> i 2 1 36 60 100
> i 3 3 36 63 100
> i 100 0 40 80 80
> e
>
> 
> 
>
>
> 1. the manual says: aleft, aright fluidAllOut
> nothing more, but i did:   aL, aR        fluidAllOut gienginenum1
> not according to the manual but now i get a very soft, distorted sound - and
> the error is gone!?
> 2. i changed a weird line like the line: iamplitude = ampdb(p5) * (10000.0 /
> 0.1)
> as found in instr 100
> 3. removed instr 1 just to get a smaller example and narrowing possible
> error generators.
> 3. instr 100 there is p5 but no p4
> 4. there is no score in the manual
> 5. i had to amplify the output a lot: outs aL*10000, aR*10000
>
> So i get very soft output and it is distorted.
> Any suggestions?
>
> greetings
> Menno
>
> --
> View this message in context: http://old.nabble.com/lets-fluidAllOut-tp28841992p28847947.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-06-11 19:44
Frommenno
Subject[Csnd] Re: Re: lets fluidAllOut

Michael Gogins-2 wrote:
> 
> The manual examples are out of date.
> 
> You should have better luck using the Fluidsynth instruments in
> examples/CsoundAC.csd, the manual examples should be corrected to
> follow their usage.
> 
> 

i studied CsoundAC.csd when i was looking into the STK opcodes, and now i'm
back and will study the use of the Soundfonts :) 
But i must say i got the present examples from the manual working pretty
good, except for the one using FluidAllOut of course.
I attach them here:  http://old.nabble.com/file/p28858819/fluidmanual.zip
fluidmanual.zip   (it can be seen in Nabble)


Michael Gogins-2 wrote:
> 
> FYI, Fluidsynth was not actively developed for some years, then some
> developers created patches that were not in the Fluidsynth repository,
> and now development of Fluidsynth appears to have resumed, with
> incorporation of these patches. This is what is now going into Csound.
> 

Are the changed and improved fluid opcodes a part of Csound already?
Or will that take time and is it okay for me to upload the
working-right-out-the-box examples for the present fluid opcodes?

bye,
Menno 

Date2010-06-11 19:46
FromMichael Gogins
Subject[Csnd] Re: Re: Re: lets fluidAllOut
There has been no change in the opcode signatures or documentation AFAIK.

The new Fluidsynth will be in 5.12, maybe already is in 5.11.

Regards,
Mike

On Fri, Jun 11, 2010 at 2:44 PM, menno  wrote:
>
>
> Michael Gogins-2 wrote:
>>
>> The manual examples are out of date.
>>
>> You should have better luck using the Fluidsynth instruments in
>> examples/CsoundAC.csd, the manual examples should be corrected to
>> follow their usage.
>>
>>
>
> i studied CsoundAC.csd when i was looking into the STK opcodes, and now i'm
> back and will study the use of the Soundfonts :)
> But i must say i got the present examples from the manual working pretty
> good, except for the one using FluidAllOut of course.
> I attach them here:  http://old.nabble.com/file/p28858819/fluidmanual.zip
> fluidmanual.zip   (it can be seen in Nabble)
>
>
> Michael Gogins-2 wrote:
>>
>> FYI, Fluidsynth was not actively developed for some years, then some
>> developers created patches that were not in the Fluidsynth repository,
>> and now development of Fluidsynth appears to have resumed, with
>> incorporation of these patches. This is what is now going into Csound.
>>
>
> Are the changed and improved fluid opcodes a part of Csound already?
> Or will that take time and is it okay for me to upload the
> working-right-out-the-box examples for the present fluid opcodes?
>
> bye,
> Menno
> --
> View this message in context: http://old.nabble.com/lets-fluidAllOut-tp28841992p28858819.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"