All right, admit if you've made a Scala file importer. If not, it's about time that it was done, likely not to extend mtof() directly but rather as a separate public class/static method (like Scala.mtof or something). I know you're probably sick of hearing about microtonal things, but I've just been having a tough time getting a sustainable system going where I can work with an existing scale archive and develop my own tunings reasonably easily. I think a Scala converter is where it's at. If it hasn't been done, can someone tell me (before I send this to the dev list) where in the source the FileIO capabilities are? I just finished building ChucK with Xcode, so I'm ready to dive in and make some mistakes. Side projects for extending FileIO also include implementing the tinyXML file parser, which would let us easily parse XML files with ChucK. So, hands up if anyone has been working with FileIO to a large extent. Andrew
... So, hands up if anyone has been working with FileIO to a large extent.
me!
All right, admit if you've made a Scala file importer. If not, it's about time that it was done,
agreed.
... Side projects for extending FileIO also include implementing the tinyXML file parser, which would let us easily parse XML files with ChucK.
That is a great idea. ChucK FileIO is kind of limited at the moment.
I've been writing lots of pre-processing scripts in Python to make
fileIO in ChucK a great deal easier. I think that fileIO is really a
great thing to have in ChucK and the better we make it, the more
options we have for using complex data in our favorite audio
programming language.
More when the storms pass...
Mike
On Sat, Sep 26, 2009 at 12:09 AM, Andrew C. Smith
All right, admit if you've made a Scala file importer. If not, it's about time that it was done, likely not to extend mtof() directly but rather as a separate public class/static method (like Scala.mtof or something). I know you're probably sick of hearing about microtonal things, but I've just been having a tough time getting a sustainable system going where I can work with an existing scale archive and develop my own tunings reasonably easily. I think a Scala converter is where it's at.
If it hasn't been done, can someone tell me (before I send this to the dev list) where in the source the FileIO capabilities are? I just finished building ChucK with Xcode, so I'm ready to dive in and make some mistakes. Side projects for extending FileIO also include implementing the tinyXML file parser, which would let us easily parse XML files with ChucK. So, hands up if anyone has been working with FileIO to a large extent.
Andrew _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
All right, after digging through the ChucK source code I found a few
new methods--FileIO.seek(int) and FileIO.tell()--which made the whole
thing far easier than I thought. In the process I also got the
string.getat(int) method working, but couldn't decide whether it
should return an int or a string. Right now (in my build of ChucK) it
returns an int, and -1 if it goes out of bounds. I could probably
include the patch here, but it's messy and gross.
Anyway, Scala class works now. It reads in a file with
Scala.read(string) and initializes with Scala.init(), then you can get
a pitch with Scala.mtof(int). That's all it does--any other
suggestions? The real Scala program does so much more that I hate to
just short it like this. It even reads in the files that are mixed
with cents and ratios, basically by just reading the first number and
looking for a "/". If it finds one, it reads the second number and
calculates the ratio, but if not then it calculates it as cents.
You have to have the CVS version of ChucK to use this. Search "CVS" on
the list and you'll find it posted often. Source code is attached. I'm
up for suggestions, interpretations, reactions, anything. Paraphrasing
Harry Partch, the only reason that a musical system is sustained is
because significant music has been written with it. So keep ChucKing.
Andrew
On Sat, Sep 26, 2009 at 12:25 PM, mike clemow
... So, hands up if anyone has been working with FileIO to a large extent.
me!
All right, admit if you've made a Scala file importer. If not, it's about time that it was done,
agreed.
... Side projects for extending FileIO also include implementing the tinyXML file parser, which would let us easily parse XML files with ChucK.
That is a great idea. ChucK FileIO is kind of limited at the moment. I've been writing lots of pre-processing scripts in Python to make fileIO in ChucK a great deal easier. I think that fileIO is really a great thing to have in ChucK and the better we make it, the more options we have for using complex data in our favorite audio programming language.
More when the storms pass...
Mike
On Sat, Sep 26, 2009 at 12:09 AM, Andrew C. Smith
wrote: All right, admit if you've made a Scala file importer. If not, it's about time that it was done, likely not to extend mtof() directly but rather as a separate public class/static method (like Scala.mtof or something). I know you're probably sick of hearing about microtonal things, but I've just been having a tough time getting a sustainable system going where I can work with an existing scale archive and develop my own tunings reasonably easily. I think a Scala converter is where it's at.
If it hasn't been done, can someone tell me (before I send this to the dev list) where in the source the FileIO capabilities are? I just finished building ChucK with Xcode, so I'm ready to dive in and make some mistakes. Side projects for extending FileIO also include implementing the tinyXML file parser, which would let us easily parse XML files with ChucK. So, hands up if anyone has been working with FileIO to a large extent.
Andrew _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- http://michaelclemow.com http://semiotech.org _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 26 Sep 2009, at 06:09, Andrew C. Smith wrote:
All right, admit if you've made a Scala file importer. If not, it's about time that it was done, likely not to extend mtof() directly but rather as a separate public class/static method (like Scala.mtof or something). I know you're probably sick of hearing about microtonal things, but I've just been having a tough time getting a sustainable system going where I can work with an existing scale archive and develop my own tunings reasonably easily. I think a Scala converter is where it's at.
Manuel Op de Coul said a few months ago he wanted to do a seq to ck converter. Hans
I like this idea. Maybe it could be like a control shred, sending OSC
messages with frequency parameters or something. That way it could be
used as a control score in ChucK or SC. The pitch-bend thing only
really seems useful if you're using standard MIDI-based VSTs.
Andrew
On Sat, Sep 26, 2009 at 7:21 PM, Hans Aberg
On 26 Sep 2009, at 06:09, Andrew C. Smith wrote:
All right, admit if you've made a Scala file importer. If not, it's about time that it was done, likely not to extend mtof() directly but rather as a separate public class/static method (like Scala.mtof or something). I know you're probably sick of hearing about microtonal things, but I've just been having a tough time getting a sustainable system going where I can work with an existing scale archive and develop my own tunings reasonably easily. I think a Scala converter is where it's at.
Manuel Op de Coul said a few months ago he wanted to do a seq to ck converter.
Hans
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
Andrew C. Smith
-
Hans Aberg
-
mike clemow