Csound 6.09 and playing MIDI soundfonts problem
Date | 2017-06-05 20:54 |
From | David Bellows |
Subject | Csound 6.09 and playing MIDI soundfonts problem |
I recently compiled and installed Csound 6.09 on [K]Ubuntu 17.04 When I attempt to play the Csound file at the bottom of this email I get a seg-fault: ******************************************************** virtual_keyboard real time MIDI plugin for Csound WARNING: STK opcodes not available: define environment variable RAWWAVE_PATH (points to rawwaves directory) to use STK opcodes. 0dBFS level = 32768.0 --Csound version 6.09 (double samples) May 31 2017 [commit: 6b458ffef8fe829a399cc461a960b4db32364e9b] libsndfile-1.0.27 UnifiedCSD: Piano_Simple_Melody.csd STARTING FILE Creating options Creating orchestra Creating score WARNING: STK opcodes not available: define environment variable RAWWAVE_PATH (points to rawwaves directory) to use STK opcodes. rtaudio: ALSA module enabled rtmidi: ALSA Raw MIDI module enabled instr MIDI uses instrument number 1 Elapsed time at end of orchestra compile: real: 0.007s, CPU: 0.007s sorting score ... ... done Elapsed time at end of score sort: real: 0.007s, CPU: 0.007s graphics suppressed, ascii substituted 0dBFS level = 1.0 csound command: Segmentation fault inactive allocs returned to freespace end of score. overall amps: 0.00000 0.00000 overall samples out of range: 0 0 0 errors in performance Elapsed time at end of performance: real: 0.734s, CPU: 0.483s ******************************************************** In Csound 6.08 (as supplied by Ubuntu) the exact same file plays just fine. If I play a Csound file that does not use a MIDI soundfont (ie, that uses sound synthesis like in the first example in the Getting Started tutorial) it plays fine. In other words it appears that the problem is with MIDI or soundfonts or something. Or maybe a change in syntax? I don't really understand how my Csound file generates music -- it's just something I got to work once and use that template for everything else so it's entirely possible I'm doing something very wrong (though as I said, it worked with previous Csound versions). Follows is my Csound file. It uses a General MIDI sound font that you'll have to supply yourself. And notice that I'm using audio frequencies and not MIDI numbers. This is so I can use custom alternate tunings (though this one should be standard 12-EDO): **************************************************** |
Date | 2017-06-05 21:34 |
From | jpff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
Runs OK for me on Linux Can you run under gdb to see where the crash happens? On Mon, 5 Jun 2017, David Bellows wrote: > I recently compiled and installed Csound 6.09 on [K]Ubuntu 17.04 > > When I attempt to play the Csound file at the bottom of this email I > get a seg-fault: > > ******************************************************** > virtual_keyboard real time MIDI plugin for Csound > WARNING: STK opcodes not available: define environment variable RAWWAVE_PATH > (points to rawwaves directory) to use STK opcodes. > 0dBFS level = 32768.0 > --Csound version 6.09 (double samples) May 31 2017 > [commit: 6b458ffef8fe829a399cc461a960b4db32364e9b] > libsndfile-1.0.27 > UnifiedCSD: Piano_Simple_Melody.csd > STARTING FILE > Creating options > Creating orchestra > Creating score > WARNING: STK opcodes not available: define environment variable RAWWAVE_PATH > (points to rawwaves directory) to use STK opcodes. > rtaudio: ALSA module enabled > rtmidi: ALSA Raw MIDI module enabled > instr MIDI uses instrument number 1 > Elapsed time at end of orchestra compile: real: 0.007s, CPU: 0.007s > sorting score ... > ... done > Elapsed time at end of score sort: real: 0.007s, CPU: 0.007s > graphics suppressed, ascii substituted > 0dBFS level = 1.0 > > csound command: Segmentation fault > inactive allocs returned to freespace > end of score. overall amps: 0.00000 0.00000 > overall samples out of range: 0 0 > 0 errors in performance > Elapsed time at end of performance: real: 0.734s, CPU: 0.483s > ******************************************************** > > In Csound 6.08 (as supplied by Ubuntu) the exact same file plays just fine. > > If I play a Csound file that does not use a MIDI soundfont (ie, that > uses sound synthesis like in the first example in the Getting Started > tutorial) it plays fine. In other words it appears that the problem is > with MIDI or soundfonts or something. > > Or maybe a change in syntax? I don't really understand how my Csound > file generates music -- it's just something I got to work once and use > that template for everything else so it's entirely possible I'm doing > something very wrong (though as I said, it worked with previous Csound > versions). > > Follows is my Csound file. It uses a General MIDI sound font that > you'll have to supply yourself. And notice that I'm using audio > frequencies and not MIDI numbers. This is so I can use custom > alternate tunings (though this one should be standard 12-EDO): > > **************************************************** > |
Date | 2017-06-05 21:43 |
From | David Bellows |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
> Can you run under gdb to see where the crash happens? I honestly don't know what that means. I'm really not a developer, I just follow instructions about compiling and installing things. On Mon, Jun 5, 2017 at 1:34 PM, jpff |
Date | 2017-06-05 22:16 |
From | John ff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
If you are willing to try..
In an. Xterm type
gdb --args csound -v myfile.csd
And type
run
When it crashes type
where
And post the output.
If that is too hard we will think again
Sent from TypeApp
On 5 Jun 2017, at 21:44, David Bellows <davebellows@GMAIL.COM> wrote: Can you run under gdb to see where the crash happens? |
Date | 2017-06-05 22:40 |
From | David Bellows |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
You just wanted the output from "where"? If so: (gdb) where #0 0x00007ffff799dc72 in fill_SfStruct () from /usr/local/lib/libcsound64.so.6.0 #1 0x00007ffff798c60e in SoundFontLoad () from /usr/local/lib/libcsound64.so.6.0 #2 0x00007ffff798c7f1 in SfLoad_ () from /usr/local/lib/libcsound64.so.6.0 #3 0x00007ffff798c9a2 in SfLoad_S () from /usr/local/lib/libcsound64.so.6.0 #4 0x00007ffff78ae7b8 in init0 () from /usr/local/lib/libcsound64.so.6.0 #5 0x00007ffff78bd068 in musmon () from /usr/local/lib/libcsound64.so.6.0 #6 0x00007ffff7a32acf in csoundStart () from /usr/local/lib/libcsound64.so.6.0 #7 0x00007ffff7a32b17 in csoundCompile () from /usr/local/lib/libcsound64.so.6.0 #8 0x00005555555557fe in main () On Mon, Jun 5, 2017 at 2:16 PM, John ff |
Date | 2017-06-05 22:49 |
From | John ff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
Thanks. Will look into it
Sent from TypeApp
On 5 Jun 2017, at 22:41, David Bellows <davebellows@GMAIL.COM> wrote: You just wanted the output from "where"? If so: |
Date | 2017-06-06 10:59 |
From | John ff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
First thought is that your sound font file is the problem and mine is OK. More later
Sent from TypeApp
On 5 Jun 2017, at 22:50, John ff <jpff@CODEMIST.CO.UK> wrote:
|
Date | 2017-06-06 15:33 |
From | jpff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
unfortunately your csound is built without the -g flag (debug option) so while I know it is in fill_SfStruct that is a long function. I really need your .sf2 file, but I can try all the such I have to try to provoke it OR... you could remake csoud starting with cmake CMAKE_BUILD_TYPE="Debug" ...whateer... and do the gdb thing again On Tue, 6 Jun 2017, John ff wrote: > First thought is that your sound font file is the problem and mine is OK. > More later > > Sent from TypeApp > On 5 Jun 2017, at 22:50, John ff |
Date | 2017-06-06 15:36 |
From | David Bellows |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
Ok, I'll recompile with the debug information. I've now tried a number of different sf2 files and they all seg-fault in my version of 6.09 but work in 6.08. It'll probably be a few hours before I can do this but I will. On Tue, Jun 6, 2017 at 7:33 AM, jpff |
Date | 2017-06-06 15:45 |
From | jpff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
I ave reproduced your crash with the second sf2 file I tried, so I kow where it crashes -- about to investigate, cricket permittig On Tue, 6 Jun 2017, David Bellows wrote: > Ok, I'll recompile with the debug information. I've now tried a number > of different sf2 files and they all seg-fault in my version of 6.09 > but work in 6.08. > > It'll probably be a few hours before I can do this but I will. > > On Tue, Jun 6, 2017 at 7:33 AM, jpff |
Date | 2017-06-06 21:06 |
From | jpff |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
I think this is fixed in git now; can you pull and rebuild? it was an attempt to fix an extremely unlikely problem where the "fix" broke larger sound font files. On Tue, 6 Jun 2017, David Bellows wrote: > Ok, I'll recompile with the debug information. I've now tried a number > of different sf2 files and they all seg-fault in my version of 6.09 > but work in 6.08. > > It'll probably be a few hours before I can do this but I will. > > On Tue, Jun 6, 2017 at 7:33 AM, jpff |
Date | 2017-06-06 21:43 |
From | David Bellows |
Subject | Re: Csound 6.09 and playing MIDI soundfonts problem |
Yep, that did it! I checked it with all my sound fonts and everything is working. Thanks! On Tue, Jun 6, 2017 at 1:06 PM, jpff |