csound~ partikkel synth causing crashes
Hey, I just wanted to see if anyone had any suggestions on how to fix this. I’m working on integrating my own version of the granular synthesizer example patch that comes with csound~v.1.0.4 (by Davis Pyon) into an interactive system I’m building. It uses the partikkel opcode in csound. Only trouble is that I’d really like to use a larger chunk of audio to cut up, and right now it only accepts around the first minute of whatever sample I load in.
Whenever I try to use a larger ftable size csound won’t run. Then I found in the csound~ manual that you can send Csound~ a "loadsamp" message and the first argument in the message defines which ftable to load the sample into, and supposedly that if you send a negative number the csound file will automatically create that ftable if it doesn’t exist and size it appropriately. For some reason when I tried that the whole thing started crashing. I thought it was an order of operations problem, i.e. load the sample, then run the csound patch, then turn on the audio rather than running csound, and then loading the sample, but sometimes when I even try to open the file I was working on Max crashes all together.
I went backwards and started working from the help file instead of my version, and everything was working fine until I put the -1 in. Should I try to upgrade to csound~1.0.5? Could it be a bug in csound? It was working for awhile with the -1, and allowed me to load in 6:10 of audio no problem, but strangely enough all the audio was transposed up 4 octaves – I was able to adjust for that but then the crashes started. Tried running the disk utility and deleting my plists, but no help there. I also got these strange error messages. They didn’t seem to affect the program at first, but they might have something to do with it. In the csound program:
WARNING: buffer size should be an integer multiple of ksmps in full-duplex mode
In Max, even if I don’t use dropfile it says:
"drop file doesn’t understand […an old filepath for audio I’m not using anymore.]"
Thanks for any ideas at all.
Using the "loadsamp" message with a negative table # can be
pretty tricky. Replacing tables while they’re being used
can cause crashes (perhaps I didn’t make that clear in the
docs). Anyway, here’s what I would do (assuming your partikkel
instr # is 1):
1) Create an instrument to turn off the partikkel instr:
turnoff2 1, 0, 0
2) In your Max patch, create two message boxes:
e i1 0 -1 // this will turn on instr 1 indefinitely
e i2 0 0.1 // this will turn off all instr 1 instances
3) To safely replace tables, send the "e i2 0 0.1" message to
turn off all partikkel instruments, then send the "loadsamp"
message, then send the "e i1 0 -1" to turn it back on.
I hope this helps. Let me know how things work out.
I’m new to Max/MSP and still learning it – slowly due to other duties
I have for work, etc. and health.
But I can see there’s a good rapport here among several groups of
I’m just a tad concerned that if I end up getting an Ebody2 and
interface it with my RME Fireface 800, and write a unique app in Max/
MSP, that it has a chance of being unstable in live performance.
The reason I say that is I’ve been getting all the e-mails (lots of
them) and appreciate reading them, but there seems to be a lot of
mentioning of "bugs".
Are these appearing in Max/MSP 5, or does this have anything to do
I’m a C++ programmer and Computer Science major, been programming for
20 years so I’m familiar with memory faults, and resource usage, and
improper semaphores when threading, etc.
So I’m sure the visual aspect will be very appealing to me. But is
this a very solid and stable environment for live performance –
especially with something like a new MacBook Pro 15" w/ Solid State
Drive, running only Ableton Live with Max, and some control surfaces,
and also Gibson HD.6X.Pro Input into the EBody2, and another EBody2
taking in seperated audio from TD20BK V-Drums, 2 of them of course
going to the first EBody.
I’m still in planning stages, but I’m hoping this was a great
investment, as I’ve purchased all of C’74’s software.
The other thing I’m hoping for is Interaction between Action Script
3.0 in Flash CS4 (or FLEX) so that I can use Papervision3D for my
animations. It’s a better economy of scale for me to learn 1 OpenGL
interface that will apply to making a living as well as making fun
Nobody usually replies to me, but I can assure you, I’m not a lepor :)
On Feb 3, 2009, at 12:11 AM, Davis Pyon wrote:
> Using the "loadsamp" message with a negative table # can be
> pretty tricky. Replacing tables while they’re being used
> can cause crashes (perhaps I didn’t make that clear in the
> docs). Anyway, here’s what I would do (assuming your partikkel
> instr # is 1):
> 1) Create an instrument to turn off the partikkel instr:
> instr 2
> turnoff2 1, 0, 0
> 2) In your Max patch, create two message boxes:
> e i1 0 -1 // this will turn on instr 1 indefinitely
> e i2 0 0.1 // this will turn off all instr 1 instances
> 3) To safely replace tables, send the "e i2 0 0.1" message to
> turn off all partikkel instruments, then send the "loadsamp"
> message, then send the "e i1 0 -1" to turn it back on.
> I hope this helps. Let me know how things work out.
Thank you so much for your response Davis! I love csound~ it’s not as hard to understand as I thought it would be. Anyway, I tried out what you suggested and I am still having problems. It did manage to load the file and not crash, but the event telling instrument 2 to turn on and turn off all instances of instrument 1 is giving me a weird error message. I typed in everything you suggested:
e i2 0 .1 (to activate instr 2)
e i1 0 -1 (after hitting the first event, I loaded the file and then hit this one to activate instr 1 again)
but e i2 0 .1 is having no effect on audio or csound, it just says in the max window:
insert_score_event():invalid instrument number or name
And the text I put into csound (right after the endin statement on instrument 1):
turnoff2 1, 0, 0
and for now I’m still working off your example, so the partikkel synth is instr 1. I’m not sure what the problem is, I think it was a fluke that the audio loaded without crashing it, that did happen a couple times before I started having problems. Incidentally, it is still transposing it up 4 octaves – any idea why it’s doing that? Anyway, thank you so much for your help, I love how the Max world is small enough that people still help each other. Let me know if I should send you my patch.
Could you send your patch and csd to:
Don’t bother sending audio files; I’ve got plenty of those.
I’m not sure what’s causing the "invalid instrument" error. If I could examine your csd, I’m sure I could figure out what’s wrong.
WRT to the transposition by 4 octaves, it may have something to do
with reading in multiple channels when partikkel expects the table to be mono.
Sample rate mismatch could also be the problem. If your audio file sample rate is 22050 and your csd is running at 44100, it will be transposed up 1 octave.
Forums > MaxMSP