I made a patch enabling the user to trigger pd playing wave-files. The "adress" of the file is stored in an array, so pd can loop the played files. This is working fine.
(I use readf~)
I made a second patch that stores 10 of the first one, so the user is enabled to make a kind of "song"^^.
This is also working, but not fine. I have two major problems:
if there was a pause between two files there is an ugly sound, not like raising the volume without line~ but as the speakers are turned off(sounds like "bubb"^^).
Sometimes pd "chokes" and than the only output is noise~(like overdriving). This keeps some seconds and than smooth comes back to normal sound.
Did I perhaps connected the outlets wrong? I used [+~] and connected all (8) to the left side. This seems wrong in resume, but if i connect to left and right the right side might only played when the left side also has some input...
I hope someone can give me some tipps
I know its a little offtopic but can someone show me the right syntax for the |resize< message-box?
|resize $1 datas1< and also |resize datas1 $1<
All i got is a "argument $1 out of range" Error.
I also tried it with replacing $1 with 100 and klicking it but nothing happend. Do i need to connect the outlet to somewhere? Its a little confusing^^
first let me discripe my project in short way:
Im using a wii nunchuk-controller with an arduino to controll short wav-files(small soundfiles like a drumkick) played in pd.
I want to use an array to store which file shell be played (0 for none, 1, 2, 3, etc.). With a [select] pd choose the rhight file. The Arduino sents messages every 125ms.
This is working so far...
But now my problem: By pressing the "C"-Button the user decides to not play from the array but from his interaction-input. And by pressing the "Z"-Button the user decides to override the old array with his interaction-input. But the Array shell only have the length depending of the users-input (so that their is no pause in the loop or the array is to small).
So in my thougt I need to "reset" the array if the user hit the Z-Button and than resize the array +1 each intervall the Z-Button is pressed. But I can't find a way how to detect if the "1" from Arduino-input is sent the first time or in a row, so PD don't knows if it should count up or reset.
So is there a object or a construction giving the following logic:
bang if you got a 1 the first time, but do not bang if it is the second time without getting a 0 before?
I hope you understand me and have a solution. If not please ask or help me to explain better