[Csnd] MIDI playback
| Date | 2010-04-14 22:58 | 
| From | See Sound | 
| Subject | [Csnd] MIDI playback | 
| Hi, all I am following the example on http://wiki.laptop.org/go/Csound#MIDI_playback Copying and pasting the "GM_example.csd" code (also modifying the path to the sound font), but "csound ./GM_example.csd" gives me: time resolution is 1000.000 ns virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 5.10 beta (double samples) Dec 3 2009 libsndfile-1.0.20 UnifiedCSD: ./GM_example.csd STARTING FILE Creating orchestra Creating score orchname: /tmp/filepv0vlb.orc scorename: /tmp/fileMOARQL.sco rtaudio: pulseaudio module enabled orch compiler: 122 lines read instr 1 instr 10 outs inconsistent with global nchnls (1); replaced with out error: too many input args, line 122: outs a1*kvol*(0.5-kpan/2)*kenv, a2*kvol*(0.5+kpan/2)*kenv error: input arg 'a2*kvol*(0.5+kpan/2)*kenv' of type a not allowed when expecting i, line 122: outs a1*kvol*(0.5-kpan/2)*kenv, a2*kvol*(0.5+kpan/2)*kenv ################################################################ # WARNING: OPCODEDIR64 IS NOT SET ! # # Csound requires this environment variable to be set to find # # its plugin libraries. If it is not set, you may experience # # missing opcodes, audio/MIDI drivers, or utilities. # ################################################################ 2 syntax errors in orchestra. compilation invalid Removing temporary file /tmp/fileMOARQL.sco ... Removing temporary file /tmp/filepv0vlb.orc ... ------------ What am I doing wrong? I could not get any help on the OLPC mailing list, nor on IRC. TIA andrew | 
| Date | 2010-04-14 23:21 | 
| From | Steven Yi | 
| Subject | [Csnd] Re: MIDI playback | 
| Hi Andrew, This error message seems to be the main clue: outs inconsistent with global nchnls (1); replaced with out I have not seen the CSD but my guess is that it has a line setting nchnls to 1 like this: nchnls=1 probably in the head of the | 
| Date | 2010-04-14 23:24 | 
| From | Steven Yi | 
| Subject | [Csnd] Re: MIDI playback | 
| I just took a look at the CSD and there's no header that one would normally expect, so you should add nchnls=2 at the top of the CsInstruments section. It's odd too as it means the project is just using default settings; maybe OLPC Csound was modified to default to nchnls=2, I don't know, but they must be doing something or the project would fail as it does for you. On Wed, Apr 14, 2010 at 6:21 PM, Steven Yi | 
| Date | 2010-04-14 23:36 | 
| From | See Sound | 
| Subject | [Csnd] Re: Re: MIDI playback | 
| 
 Thanks for the quick response! 
 
      On April 14, 2010 at 10:24 PM Steven Yi <stevenyi@gmail.com> wrote: > I just took a look at the CSD and there's no header that one would > normally expect, so you should add nchnls=2 at the top of the > CsInstruments section. It's odd too as it means the project is just 
 Great! Adding "nchnls=2" got me past the original error. 
 Now I am getting: 
 SoundFont file "/.../8MBGMGS.SF2" contains ROM samples ! 
 I am a COMPLETE newbie with csound, and definitely need to read the fine manual, but the OLPC instructions seemed to promise instant (newbie) gratification, so I gave it a whirl ... 
 
 > using default settings; maybe OLPC Csound was modified to default to> nchnls=2, I don't know, but they >must be doing something or the 
      > project would fail as it does for you. > 
 Without the "nchnls=2" I was getting the same error on the XO and on a standard Fedora (12) ... > On Wed, Apr 14, 2010 at 6:21 PM, Steven Yi <stevenyi@gmail.com> wrote: 
      > > Hi Andrew, > > > > This error message seems to be the main clue: > > > > outs inconsistent with global nchnls (1); replaced with out > > > > I haveO not seen the CSD but my guess is that it has a line setting > > nchnls to 1 like this: > > > > nchnls=1 > > > > probably in the head of the <CsInstruments> section. I'd try changing that to: > > > > nchnls=2 > > > > steven > > > > | 
| Date | 2010-04-14 23:39 | 
| From | Victor Lazzarini | 
| Subject | [Csnd] Re: Re: MIDI playback | 
| I fixed the wiki! On 14 Apr 2010, at 23:24, Steven Yi wrote: > I just took a look at the CSD and there's no header that one would > normally expect, so you should add nchnls=2 at the top of the > CsInstruments section. It's odd too as it means the project is just > using default settings; maybe OLPC Csound was modified to default to > nchnls=2, I don't know, but they must be doing something or the > project would fail as it does for you. > > On Wed, Apr 14, 2010 at 6:21 PM, Steven Yi | 
| Date | 2010-04-14 23:46 | 
| From | Victor Lazzarini | 
| Subject | [Csnd] Re: Re: Re: MIDI playback | 
| you need to try a different soundfont file, as that one does not seem to be accepted. Maybe try one without ROM samples. Victor On 14 Apr 2010, at 23:36, See Sound wrote: 
 | 
| Date | 2010-04-15 00:13 | 
| From | See Sound | 
| Subject | [Csnd] Re: Re: Re: Re: MIDI playback | 
| OK, got past the latest error, by using a different sound font. 
 Now I am getting a rapidly growing "test.wav" that is flooding the partition on my (standard) laptop, and is SURE to rapidly flood a normal XO partition. Also, load average sky-rocketed, in a dual core AMD -- so, i am "scared" to try this on an XO now :-( Because of this, it doesn't quite look like one can generate realtime audio this way, on an XO, or am I wrong? (I mean: [midi signal in] -> [csound] -> [soundfont] -> [some type of real-time audio out]) 
 Also, whoever is maintaining the wiki, regarding the line "csound -M hw:1,0 ..." : 
 A "dot dot dot" in a wiki is scary for newbies, particularly if it is not explained anywhere what might go in place of the "..." 
 I realize I am probably in the RTFM territory; I will be reading on. Apologies; i am just getting my feet wet with all this. 
 Thanks again andrew 
 
      On April 14, 2010 at 10:46 PM Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: > you need to try a different soundfont file, as that one does not seem > to be accepted. Maybe try one without ROM samples. > > Victor > > > On 14 Apr 2010, at 23:36, See Sound wrote: > > > > > Thanks for the quick response! > > > > On April 14, 2010 at 10:24 PM Steven Yi <stevenyi@gmail.com> wrote: > > > > > I just took a look at the CSD and there's no header that one would > > > normally expect, so you should add nchnls=2 at the top of the > > > CsInstruments section. It's odd too as it means the project is just > > > > Great! Adding "nchnls=2" got me past the original error. > > > > Now I am getting: > > > > SoundFont file "/.../8MBGMGS.SF2" contains ROM samples ! > > At present time only RAM samples are allowed by sfload. > > Session aborted ! > > > > I am a COMPLETE newbie with csound, and definitely need to read the > > fine manual, but the OLPC instructions seemed to promise instant > > (newbie) gratification, so I gave it a whirl ... > > > > > > > using default settings; maybe OLPC Csound was modified to default > > to> nchnls=2, I don't know, but they >must be doing something or the > > > project would fail as it does for you. > > > > > > > Without the "nchnls=2" I was getting the same error on the XO and on > > a standard Fedora (12) ... > > > > > On Wed, Apr 14, 2010 at 6:21 PM, Steven Yi <stevenyi@gmail.com> > > wrote: > > > > Hi Andrew, > > > > > > > > This error message seems to be the main clue: > > > > > > > > outs inconsistent with global nchnls (1); replaced with out > > > > > > > > I haveO not seen the CSD but my guess is that it has a line > > setting > > > > nchnls to 1 like this: > > > > > > > > nchnls=1 > > > > > > > > probably in the head of the <CsInstruments> section. I'd try > > changing that to: > > > > > > > > nchnls=2 > > > > > > > > steven > > > > > > > > > > > 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" > | 
| Date | 2010-04-15 00:23 | 
| From | Victor Lazzarini | 
| Subject | [Csnd] Re: Re: Re: Re: Re: MIDI playback | 
| What is happening is that you are writing to a soundfile instead of DAC. You should add -odac to write to output. Something like  csound -odac -M hw:1,0 gm.csd   should do, provided you have a MIDI device in hw:1,0. You can also try the virtual keyboard instead csound -odac -M0 -+rtmidi=virtual gm.csd or a MIDI file csound -odac -F midifile.mid gm.csd I also found that this soundfont works well: Victor On 15 Apr 2010, at 00:13, See Sound wrote: 
 |