Hi,
I posted a couple of questions a little while ago, but I'm still very much a noobie. I have two questions about a simple computer keyboard sampler I'm working on.
1. I assume that before every time I want the [readsf~] object to read a file, there has to be a message telling it to open that file. I assume that, because that's the only way I get the [readsf~] to play a sound file more than once, by constantly feeding it the [open../etc.( message. So I send that message to the respective sound file every time the respective key that triggers that sound file is lifted, with a [keyup] object, so that the next time that key is pressed, that sound file is played again. This strategy seems to work well in my lewiskrayboardsample.pd patch I attached to this message (uses the q, s, d and f keys), so why is it that I am constantly getting an error message saying "error: readsf: start requested with no prior 'open'"?
2. In order to clean things up and make things a little bit easier to work with I decided to put everything in subpatches except for the [open../soundfile( message. this is the other attached file: lewiskrayboardsample2.pd. (I'll attach this patch in my next message since I can only do one attachment at a time). Theoretically it seems like it should work exactly the same as my previous patch lewiskrayboardsample.pd, but for some reason the sound always breaks whenever I try to "slur" two notes together (say, playing 's' immediately after playing 'q'). I have no idea why defining things in subpatches makes it do this.
Obviously I didn't think it necessary to include the sound files I was using, you can just substitute your own sound files.
I would really appreciate it if anyone can tell me why this stuff is going on! Thanks a bunch!
Lewis
http://www.pdpatchrepo.info/hurleur/lewiskrayboardsampler.pd