Csound Csound-dev Csound-tekno Search About

[Csnd] Problems using fluidsynth opcodes

Date2010-07-21 17:55
FromJulien Claassen
Subject[Csnd] Problems using fluidsynth opcodes
Hello!
   I think this is due to misusage, but I can't find the faux. I simply want to 
play a sound from a soundfont. I want to control playing with a sco-file. 
Here's my code, mostly directly stolen from the manual:
sr = 48000
kr = 4800
ksmps = 10
nchnls = 2

giengine fluidEngine 0, 0 ; instantiate fluidsynth without reverb and chorus
gisfnum fluidLoad "/home/src/test/gm-set/fluidr3.sf2", giengine ; load sf2
fluidProgramSelect giengine, 1, gisfnum, 0, 55 ; set to gm 55 (orch hit)

; instrument to control fluidsynth
instr 1
   mididefault 60, p3
   midinoteonkey p4, 127
   ikey = p4
   ivel = 127
   fluidNote giengine, 1, ikey, ivel ; play key at max velocity
endin

; instrument to output
instr 99
   ivol init 70000 ; taken from manual, is that a good value?
   aleft, aright fluidAllOut giengine
   outs aleft * ivol, aright * ivol
endin

   The sco-file:
i1 0 2 36
i1 2 2 48
i1 4 2 60
e
   Result: No errors, I get the channel, key and velocity of the notes output 
to screen, yet the audio file is silent!
   Can anyone please put me on the right track?
   Kindest regards
            Julien

--------
Music was my first love and it will be my last (John Miles)

======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de


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-07-21 18:10
FromAndres Cabrera
Subject[Csnd] Re: Problems using fluidsynth opcodes
I think you forgot to turn on instrument 99...

Cheers,
Andrés

On Wed, Jul 21, 2010 at 5:55 PM, Julien Claassen  wrote:
> Hello!
>  I think this is due to misusage, but I can't find the faux. I simply want
> to play a sound from a soundfont. I want to control playing with a sco-file.
> Here's my code, mostly directly stolen from the manual:
> sr = 48000
> kr = 4800
> ksmps = 10
> nchnls = 2
>
> giengine fluidEngine 0, 0 ; instantiate fluidsynth without reverb and chorus
> gisfnum fluidLoad "/home/src/test/gm-set/fluidr3.sf2", giengine ; load sf2
> fluidProgramSelect giengine, 1, gisfnum, 0, 55 ; set to gm 55 (orch hit)
>
> ; instrument to control fluidsynth
> instr 1
>  mididefault 60, p3
>  midinoteonkey p4, 127
>  ikey = p4
>  ivel = 127
>  fluidNote giengine, 1, ikey, ivel ; play key at max velocity
> endin
>
> ; instrument to output
> instr 99
>  ivol init 70000 ; taken from manual, is that a good value?
>  aleft, aright fluidAllOut giengine
>  outs aleft * ivol, aright * ivol
> endin
>
>  The sco-file:
> i1 0 2 36
> i1 2 2 48
> i1 4 2 60
> e
>  Result: No errors, I get the channel, key and velocity of the notes output
> to screen, yet the audio file is silent!
>  Can anyone please put me on the right track?
>  Kindest regards
>           Julien
>
> --------
> Music was my first love and it will be my last (John Miles)
>
> ======== FIND MY WEB-PROJECT AT: ========
> http://ltsb.sourceforge.net
> the Linux TextBased Studio guide
> ======= AND MY PERSONAL PAGES AT: =======
> http://www.juliencoder.de
>
>
> 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"
>
>



-- 


Andrés


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-07-21 18:47
FromJulien Claassen
Subject[Csnd] Re: Re: Problems using fluidsynth opcodes
Hello andres!
   I now renamed instrument 100 to instrument 99.
   Still no sound. what amI missing here? I never reallyworked with processing 
by several instruments and it's still a mystery tome, why instr 99 and instr 
100 have such special meaning.
   Kindest regards
             Julien

--------
Music was my first love and it will be my last (John Miles)

======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de


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-07-21 18:49
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Problems using fluidsynth opcodes
Hi Julien,

They don't have any special meaning.
I mean you forgot:

i 99 0 3600

To make sure that instrument 99 is turned on. If it isn't you won't
hear anything, since that instrument is the one gathering the audio
from the fluid engine.

Cheers,
Andrés

On Wed, Jul 21, 2010 at 6:47 PM, Julien Claassen  wrote:
> Hello andres!
>  I now renamed instrument 100 to instrument 99.
>  Still no sound. what amI missing here? I never reallyworked with processing
> by several instruments and it's still a mystery tome, why instr 99 and instr
> 100 have such special meaning.
>  Kindest regards
>            Julien
>
> --------
> Music was my first love and it will be my last (John Miles)
>
> ======== FIND MY WEB-PROJECT AT: ========
> http://ltsb.sourceforge.net
> the Linux TextBased Studio guide
> ======= AND MY PERSONAL PAGES AT: =======
> http://www.juliencoder.de
>
>
> 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"
>
>



-- 


Andrés


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-07-21 18:51
FromJulien Claassen
Subject[Csnd] Re: Re: Re: Re: Problems using fluidsynth opcodes
Hi Andrs!
   Ah, now I get it. thanks a lot!
   Warm regards
            Julien

--------
Music was my first love and it will be my last (John Miles)

======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de


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"