Sound File Playback Question
Ok so I have a simple question here. I want to be able to load up a patch and have three sounds playback one after another when it receives a bang. Basically just like sflist~ but I can’t stream off disk so I have to use buffer. I thought I could use 3 grooves and 3 buffers and once the first sound finishes playing through the buffer then a bang outputs from the right outlet and I could use that to trigger the next sound but I guess I am wrong. If anyone could help me and point me in the right direction I would appreciate it very much.
You could do this with play~ pretty easily. Take a look at the patch below.(you can also do this with groove~, wave~,etc. just set it up to refer to different buffers upon reaching end of each playback).
Hope it helps:
----------begin_max5_patcher---------- 1031.3ocyYsrbhiCEcM7UnxqyPoqdXI265p21+ASM0TFPP7L9QJrnlzcpju8 wRxlPBAaQLVgEApqPw9bO9beI+z7YQKqdTUGg9F5OQyl8z7YyrKYVXVq8rnh zGWkmVa2VTo5+pV9OQ249Is5Qsc4soZU2hOjpWceV41+dmZk1csoT9B7cHHl Y9hZ+jfWfQ+U6+S49hrxbk1dSHsKtopTWlVnr2guuKKMO50sWsW2senc0r01 c1fu+.R51pae5e8fxAknnC2Ty0uN621e.HKvlUed9byG24IcTnpqS2pNgO.O HCPZICxBdigbJIC4WKYfGlLH.KTjg3qkLpUZzC4o+pnu3EHVXYElkbhSr5kI kUhCCqrppnPUpOgUHKP+HOa0+hz2qPKSK2hzUnZc5NcerDwRLwfkdnI8mUAt PVB+ArDOZ5oBXA5mUoqQYkHJZSVdS94dBejNsAwxAIxomBXQSeLxNU55dbZF 0EcfwuVMYZiNnWZzArfmvAoH3jBHHghTHAjTT+dc5pW5KW.kZ8ap08c4MMe1 u6OrbGhBTgPh.G3tBvgIk+x8ZcU4vO5jwcIu7IE1ft24a.zTdowCmjZ5z9xU C7iJpK3SdDp7VoSGRe5dpHrrRf5+6LCJUqxQXDf5kRH1.BhKVfmXREb8JpyN kRh6OV4tS+95RU6KVp1MLg.t9a33qaWNjSID9YIjLSGaGxgL4xkUU6K0pcMR FrORFvE+Hg9YH93kLrgXnt+LlAfnVteyF0tW5RCi.LtupsLgKqC3ZZpMfaJk TmuExM4UoCIpFQqSdQXDOILnadiomvHeUD1Ha.mwBTC3DQ.a.2KUjuhn1I1A wzKhj2ZpHii2vRCQUsMECTawNgbxUSTxWuZJOqT0+Pdtwh31QEZO4vq1wH+Q IsOeV65rsklqTfSaaBzdwiCPzIeHR6Whq7Qi8QxG1PLk2LjciVsv6dyDV+zr 9aos5p86V0cyZG8C8pmtVUqyJS0YMCg95dLmI9Qa59r0qUkGeH.EYqenpo4k VL.LmzC6jdMI46rNyjj9BVy4QOLZStLz1hOhqJDU55X9MV.Sdrmvji1SZlh. QFxQDWliPZm9g4NpOW1v2YAvQNh0ZrOR7Q.YxW9Idj.x1y2g3xn+FK2KAoSp YrFqmHm.w0HwjImZy.vdfI3BBO4tJjh1S.us6K9wVbgqpQhqFhX7rarO5DVP YWefz6v8vAgtxtsgcfH9f0HAq71i+D2dPx71GFFSgERDOfDIroUX9n7gaTLA g6QG1CLYvMMXPxq90vex90bEDDIGrB.XojfmyenFujex9tbuMQB6f0U.qCU7 WDT1i6wCz3fhHexZvu85YiEdHciUol5SYQZXKUS7oiFhbDXpw344+O3f0ojJ -----------end_max5_patcher-----------
Hey thanks for the reply but I need the sounds to be able to play the entire duration and always be able to start and stop with sample accuracy even when dynamically changing sounds out. I tried using waveform then send it message 0 -1 0 -1 so it selects the entire duration then having the second to last outlet output the duration time in ms and have that control a metro to change between the three sounds receiving the order from a coll but for strange reason the two of the sounds where about 200 ms and another was 1000 but it would never let the 1000ms play all way through it kept registering it as 200 ms. If that makes sense. Any other suggestions? Thanks again.
ah never mind its all good, thanks a lot raja
Ok, (i was about to mention to try using the "replace" message for buffer~(this will automatically resize the buffer~; (instead of "read")) and then simply refer your playback object to different buffers, also using info~ object attached to the right-outlet of a buffer~ can give you the replaced soundfiles length immediately upon replacement, etc.) but… hopefully you’ve got everything settled.