Giter Site home page Giter Site logo

Csound segfault about php-frontend HOT 12 CLOSED

Aman1531 avatar Aman1531 commented on September 25, 2024
Csound segfault

from php-frontend.

Comments (12)

belbernard avatar belbernard commented on September 25, 2024

I am currently using Csound version 6.15 on a Mac0S 10.14 equipped with MAMP. Unfortunately not able to test Linux.

The version appeared with the command:

/usr/local/bin/csound --version
--Csound version 6.15 (double samples) Aug 10 2020

Does this command work on your machine?
Do you see the "Csound is installed and responsive" on the right top of the window?

Which Grammar or Data are you trying to operate?

The problem might just be in the syntax of the command since you are not in MacOS. So, let's see…

For instance, when PRODUCE ITEM(s) is clicked in grammar "-gr.Mozart", BP3 will first execute this command:

../bp produce -se ../ctests/-se.Mozart -gr ../ctests/-gr.Mozart -cs ../csound_resources/-cs.Mozart -d --csoundout ../my_output/Mozart.sco --traceout ../temp_bolprocessor/trace_5hvh0vhurlqrlhoul6sodr6r0n.txt

then the interface will send the following command to Csound:

/usr/local/bin/csound --wave -o ../my_output/[email protected] ../csound_resources/0-default.orc ../my_output/Mozart.sco

"17325" is of course a random number aimed at preserving all occurrences of the WAV file.

These commands are displayed on a window showing up when "PRODUCE ITEM(s)" is called, as explained on
https://bolprocessor.org/check-bp3/#csound

(Anyway I am going to check Csound 6.17!)

from php-frontend.

Aman1531 avatar Aman1531 commented on September 25, 2024

csound --version command seg faults when it is executed with browser using Apache or lighttpd

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

Well… Since "csound --version" is a pure Unix command, my guess is that this problem has nothing to do with BP3 (console and PHP interface)… Nonetheless I will try Csound 6.17 on Mac and let you know if I face a similar problem.

from php-frontend.

Aman1531 avatar Aman1531 commented on September 25, 2024

Csound is also not owning this issue.

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

"Not owning"… I don't understand. Do you mean that you can run Csound on your machine via another device? What is the syntax of the command?
I tried to locate the meaning of "exit 139" on the Csound manual but wasn't successful.

from php-frontend.

Aman1531 avatar Aman1531 commented on September 25, 2024

csound/csound#1632
139 is bash exit code for seg fault
You can also see the error in server error log which in linux is /var/log/httpd/error.log

How can I use bp on command line (without browser) ?

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

Yes, but again you get this message with Linux command
/usr/local/bin/csound --version
which does not involve bp nor a browser. Therefore the problem may be only your installation of Csound.

Command lines are listed by command:
../bp --help

Below is the complete listing. Several commands have not (yet) been implemented in the PHP interface because we still miss an immplementation of the real-time MIDI output. There is not much you can do via exclusively command lines. You need to use or develop an interface to send commands to bp and then to csound…

Bol Processor console app
Version 2.999... (May 21 2022)

Usage: ../bp action [options] { [file-type] inputfile }+

OPTIONS (General):
-h or --help print this help information
--version print the program name, version #, and date compiled
--short-version print just the version number

ACTIONS: Specify which operation to perform. They are case-insensitive.
produce produce one item from the grammar
produce-items N produce N items from the grammar
produce-all produce all items from the grammar

play play item in the input data file
play-item N play the Nth item in the input data file
play-all play all items in the input data file
analyze-item N analyze the Nth item's derivation using the grammar
expand expand item in the input data file to a complete polymetric expression
show-beats N display the Nth item using periods to show the beats

compile check the syntax of input files and report errors
templates produce templates from the grammar

FILE-TYPES: Input files are automatically recognized if they use BP's naming
conventions (either prefixes or extensions). Otherwise, specify
the type of input files with the following markers.

These file types can currently be loaded and used:

-da fname load data file 'fname'
-gl fname load glossary file 'fname'
-gr fname load grammar file 'fname'
-ho fname load alphabet file 'fname'
-se fname load settings file 'fname'
-mi fname load sound-object prototypes file 'fname'

These file-type markers currently are recognized but ignored:
-cs -in -kb -md -mi -or -tb -tr -wg +sc

OPTIONS (Output):
-D or --display print produced items to standard output (default)
-d or --no-display don't print produced items to standard output
-o outfile write produced items to file 'outfile'
-e or --use-stderr print messages to standard error instead of standard output
--traceout tracefile write compilation & trace output to file 'tracefile'

--csoundout outfile write Csound score to file 'outfile' ('-' for stdout)
--midiout outfile write Midi score to file 'outfile' ('-' for stdout)
--midiformat num use Midi file format 0, 1, or 2 (default is 1)
--rtmidi destination play real-time Midi on 'destination'

OPTIONS (Computation):
-s or --start string use 'string' as the start string (default is "S")
-S startfile read the start string from file 'startfile'
--seed num seeds the random number generator with the integer 'num'
--show-production outputs the work string at each step of producing items
--trace-production outputs the work string & selected rule at each step of production

OPTIONS (Musical):
--english specifies that the input files use English note conventions
--french specifies that the input files use Italian/Spanish/French note conventions
--indian specifies that the input files use Indian note conventions
--keys specifies that the input files use Midi note numbers

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

Maybe related with your request: after installing Csound 6.17, calling "csound --version" via exec() or system() hangs the PHP page although the same command in the terminal works fine for both versions. I submitted a query to the Csound forum…

from php-frontend.

Aman1531 avatar Aman1531 commented on September 25, 2024

I use fluidsynth for midi out . Playing midi file is like aplaymidi -p 14 file.mid where 14 is port number of fluidsynth.
How can I do the same with bp ?
Bash supports pipes and redirection for combining programs. I hope I can do the same with bp and csound .

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

FluidSynth seems to be an excellent improvement for the processing of MIDIfiles via BP3's interface. Thanks for the suggestion! As per today we only have the MIDIjs code played via HTML (with ugly sounds). Otherwise, I upload MIDI files to better synthesisers such as PianoTeq.

Therefore I am writing this development on our "to-do" list. I haven't yet looked at details but it shouldn't be too difficult if it is implemented in the interface…

As to pipes and redirections I'll need examples of commands that you would like to run. Keep in mind that BP3 should work on all platforms. In the PHP interface we have a getOS() function identifying the system, which helps customising shell commands if necessary.

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

Regarding Csound: I am working on this problem and will hopefully get suggestions from the forum. Meanwhile, on page https://bolprocessor.org/check-bp3/ I have put a link for Mac users who need to download a copy of Csound 6.15.

from php-frontend.

belbernard avatar belbernard commented on September 25, 2024

This problem has been identified and will be fixed in version 6.18 of Csound.

from php-frontend.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.