Ok I've finally cracked it and the whole program is working now! The [select] method looks much cleaner and I will probably switch to it at some point, for the time being though my program is using the [moses] waterfall. If anyone is interested here is my patch: soundController2.pd
Again thank you for your time david its been a big help.
Hi David, thanks for the help its been great. I've now got everything working as it should apart from the sound loop which still restarts itself whenever the number received by [netreceive] changes. Its not the Python code as I'm testing it just by sliding the number object in pd and I don't believe [readsf] is receiving a 1 from anywhere else. This is my patch so far:
Ahh I didn't realise [== x] could be used on [*~], I'll give that a whirl and upload my patch tomorrow if i'm still struggling. As for the [readsf~], I am indeed sending it a '1' in the format of [open file.wav, 1] but I was under the impression you need to give it a '1' for the file to play, or is that not the case?
Thank you for the speedy reply and help David!
Hi, im fairly new to pd and have run into some issues that I can't find any answers to online. Basically I am creating a program that takes the output of a python script in the form of a number (1-5) and adjusts the sound dimensions (volume, pitch, speaker channel) accordingly. The program loops a sound file continuously when started and should not require any interaction with pure data from the user.
I've currently hit a brick wall however and have two main issues with my program: firstly when the bangs that change the volume are received and the volume changes, the looped file restarts itself before finishing resulting in a skip. The looped file should continuously loop uninterrupted.
The 2nd issue is I can't figure out how to switch speaker channel via a conditional statement, i.e. the output of [readsf~] can't be routed through a [moses], a [moses] can't be placed between the [dac~] and [*~], a [moses] can't be placed between the [readsf~] and [open file.wav] either as the loop doesn't play. Again I would need the channel to switch without interrupting or restarting the looped file.
Hopefully you understand what I am trying to accomplish, let me know if you need more information.
Perhaps I am misunderstanding Pure Data's data flow, any pointers or tips would be greatly appreciated.