borax questions
Hi list,
Beginner here, still learning and experimenting, so please forgive my naivety.
(1) CPU EFFICIENCY
"borax" seems to be pretty useful, but because it does so much (counting all the notes, calculating all note durations, etc.) I can't help wondering whether using lots of instances of it would seriously chew up CPU cycles.
So, is borax so efficient that it doesn't really matter? Or is it better to avoid it if there are less CPU-taxing ways to do the same thing? (I'm planning to eventually make a fairly big patch.)
For example, I'm currently using borax as a simple way to count the number of active notes, not using any of the other functions, which seems a bit like cracking a nut with a sledgehammer. Would it be better to use a few buttons, "+" and "-" objects (or whatever) instead?
Actually, does borax use *any* CPU power for things it's not being used for? e.g. If I'm using it to simply count notes would it still be working out all the note durations, etc.?
(2) NOTE NUMBERS/MULTIPLE MIDI CHANNELS
I'm trying to make a multi-channel version of borax by...
- multiplying (channel-1) by 128 and adding it to the note number
- sending it to a borax object as a note number
- extracting the proper channel and note number from the Pitch output
... but there are problems: Max often crashes when I'm doing this (on a G4/733, 10.4.11 in case it matters) and Reset (i.e. bang in 3rd input) only seems to work for notes on channel 1 (i.e. note numbers 0 to 127, not in the "extended range" of 128 to 2047).
Are there ways around these problems, or am I attempting the impossible?
Thanks in advance for any help.
Cheers, Bill Canty
I wrote Borax in the dim dark past for CNMAT. Cycling 74 has been maintaining it for well over a decade (!). My memories of what the code looks like are foggy, at best.
That said, I don' think it's all that heavy in cpu use. I remember that at the time I was a little worried about memory usage, because I used 128-byte arrays for things like tracking notes. Nowadays, this seems like a ridiculous worry.
I'm pretty sure that it does calculate all the timing info all the time, but it's not really that taxing, certainly nothing compared to just the tiniest bit of DSP.
I'm not sure that your approach of modifying the note number that goes into Borax is sound. Borax was squarely targeted towards the MIDI spec, so I'm not that surprised that you are having problems. I think that using multiple Borax instances is a better way to go.
-C
> I wrote Borax...
Wow - the man himself! =:-)
> I don't think it's all that heavy in cpu use. [snip]
> I'm pretty sure that it does calculate all the timing info all the time, but it's not really that taxing, certainly nothing compared to just the tiniest bit of DSP.
Thanks - I'll go ahead and be extravagant then.
> I'm not sure that your approach of modifying the note number that goes into Borax is sound. Borax was squarely targeted towards the MIDI spec, so I'm not that surprised that you are having problems. I think that using multiple Borax instances is a better way to go.
Oh, OK.
Thanks for your help, Chris, and for being so ridiculously quick to respond. :-)
Cheers, Bill
On Jun 8, 2008, at 11:25 PM, Bill Canty wrote:
> Thanks for your help, Chris, and for being so ridiculously quick to
> respond. :-)
Just well-synced sample rates.
-C
Chris Muir
cbm@well.com
http://www.xfade.com