michaelgeis
2011-08-17 06:15:40 UTC
Hi,
I have been asked to investigate what it takes to access soundfont data from
within SC. I am new to SC itself, but have been asked to look into this
because of my experience bit twiddling with MIDI and .wav files. It would
help me tremendously to receive feedback on my process of reasoning below so
as to get a sense whether I am on a viable track or not (and whether there
is a simpler way).
Judging from the soundfont specification, parsing the soundfont format looks
like a rather finicky enterprise. So I was glad to see that the code in
fluidsynth that achieves this is conveniently all in one location (it turns
it has been taken from an app called 'Smurf Editor').
So my thought was I need to create an sc class/set of classes that interface
with that piece of fluidsynth C code. Running a find on
~/share/SuperCollider/quarks reveals essentially no .c files, which leads me
to conclude that quarks (with the possible exception of UGens) are not
allowed to/able to call C code. Is this correct?
That in turn seems to imply that I would need to create a primitive in order
to call C code, which looks like a bit more involved than creating a quark.
I downloaded the SC source tarball and got the impression that my code would
least be out of place in SuperCollider-Source/common/Source/common and that
the names of the class(es) should be added to commonSources in
SuperCollider-Source/common/SConstruct. After which I'd cross my fingers
that the build process still works...
Are there documents that describe how the build scripts need to be edited
under Linux in order to add a primitive? While I found the chapter on
primitives in the supercollider book very insightful, it gave no
instructions on how to modify/perform the actual build for a given OS.
Does this sound like it could work? Is someone aware of a simpler way of
achieving this (e.g. implementing the .sf2 parsing code in .sc and bypassing
fluisynth)?
Thanks for your consideration.
Best,
Michael
P.S.: I have read the thread at
http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SoundFonts-in-SC-td5194018.html#a5194873
Since the app that is intended to use the soundfont data will need to be
live playable, I have been told that wiring sc to an instance of fluidsynth
via the alsa sequencer and a jack connection is not an option
(as elegant as the approach may be).
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/accessing-soundfont-data-in-SC-tp6694322p6694322.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
I have been asked to investigate what it takes to access soundfont data from
within SC. I am new to SC itself, but have been asked to look into this
because of my experience bit twiddling with MIDI and .wav files. It would
help me tremendously to receive feedback on my process of reasoning below so
as to get a sense whether I am on a viable track or not (and whether there
is a simpler way).
Judging from the soundfont specification, parsing the soundfont format looks
like a rather finicky enterprise. So I was glad to see that the code in
fluidsynth that achieves this is conveniently all in one location (it turns
it has been taken from an app called 'Smurf Editor').
So my thought was I need to create an sc class/set of classes that interface
with that piece of fluidsynth C code. Running a find on
~/share/SuperCollider/quarks reveals essentially no .c files, which leads me
to conclude that quarks (with the possible exception of UGens) are not
allowed to/able to call C code. Is this correct?
That in turn seems to imply that I would need to create a primitive in order
to call C code, which looks like a bit more involved than creating a quark.
I downloaded the SC source tarball and got the impression that my code would
least be out of place in SuperCollider-Source/common/Source/common and that
the names of the class(es) should be added to commonSources in
SuperCollider-Source/common/SConstruct. After which I'd cross my fingers
that the build process still works...
Are there documents that describe how the build scripts need to be edited
under Linux in order to add a primitive? While I found the chapter on
primitives in the supercollider book very insightful, it gave no
instructions on how to modify/perform the actual build for a given OS.
Does this sound like it could work? Is someone aware of a simpler way of
achieving this (e.g. implementing the .sf2 parsing code in .sc and bypassing
fluisynth)?
Thanks for your consideration.
Best,
Michael
P.S.: I have read the thread at
http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SoundFonts-in-SC-td5194018.html#a5194873
Since the app that is intended to use the soundfont data will need to be
live playable, I have been told that wiring sc to an instance of fluidsynth
via the alsa sequencer and a jack connection is not an option
(as elegant as the approach may be).
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/accessing-soundfont-data-in-SC-tp6694322p6694322.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/