Set Sampler Position to Zero on File input.
Hi, sorry if this is easy, but I cannot think of a way to do this.
I have connected a fader to the File input of the sampler. I have it on BUTTON sync.
I start the sampler and begin to play a file and then move the fader to jump to another file (later I will use another method for file #).
If the audio file is long then the sampler switches on the fader input and plays the next file immediately - great.
But if the file is short, of course I get silence.
I was wondering if someone knows if I can (re)set the position to zero and playback the file that is chosen by the fader?
What I am hoping to do is have a constantly playing list of audio file that are triggered by the input to the FILE pin.
Thanks!
Carl
I have connected a fader to the File input of the sampler. I have it on BUTTON sync.
I start the sampler and begin to play a file and then move the fader to jump to another file (later I will use another method for file #).
If the audio file is long then the sampler switches on the fader input and plays the next file immediately - great.
But if the file is short, of course I get silence.
I was wondering if someone knows if I can (re)set the position to zero and playback the file that is chosen by the fader?
What I am hoping to do is have a constantly playing list of audio file that are triggered by the input to the FILE pin.
Thanks!
Carl
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
hello and welcome !
not sure to understand the way you want to do this , but adding "has changed " module ( in events control menu ) between the outlet of your fader and your button will start the sampler each time you choose a new sample...?
not sure to understand the way you want to do this , but adding "has changed " module ( in events control menu ) between the outlet of your fader and your button will start the sampler each time you choose a new sample...?
Thanks that works great for kicking off the sample at each fader change.
Here's what I am really trying to do, which I know is harder, but I needed to get it to work simple first.
I'm trying to imitate a game audio engine's functionality for interactive music.
Here's what I'd really like to do:
Start the sampler.
While the sample is playing be able to move to a new audio clip
Have the audio clip I am changing to be at the same sample point by following a timeline, and transition (for now) on the next beat. I think that the sampler does this already (keeps the files in sync)?
If the sample requested is no longer available at that sample point (it's shorter than the original) then re-set the new one to Zero and play it.
Ultimately I'd like to be able to configure the transition point as - immediate - immediate with x-fade- one the beat - on the bar measure. I'm guessing the x-fade will have to involve another sampler since polyphony controls the behavior (hmm need to check that with the solution you just gave me).
I'm looking for a way to have continuous playback with that logic hooked to a controller so that I can cue up clips.
Thanks again for any insight into my quest!
cheers
Here's what I am really trying to do, which I know is harder, but I needed to get it to work simple first.
I'm trying to imitate a game audio engine's functionality for interactive music.
Here's what I'd really like to do:
Start the sampler.
While the sample is playing be able to move to a new audio clip
Have the audio clip I am changing to be at the same sample point by following a timeline, and transition (for now) on the next beat. I think that the sampler does this already (keeps the files in sync)?
If the sample requested is no longer available at that sample point (it's shorter than the original) then re-set the new one to Zero and play it.
Ultimately I'd like to be able to configure the transition point as - immediate - immediate with x-fade- one the beat - on the bar measure. I'm guessing the x-fade will have to involve another sampler since polyphony controls the behavior (hmm need to check that with the solution you just gave me).
I'm looking for a way to have continuous playback with that logic hooked to a controller so that I can cue up clips.
Thanks again for any insight into my quest!
cheers
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra

a first step to what you're after if i well understood.
quantize change sample on beat,bar ect or no quantize, with same reading position, and the new sample restart if shorter than previous.
in "quantize" combo box values should be : no, bar, beat, 1/8, 1/16
Wow - Thank you.
I think I understand this patch... I see that the selector is basically sending in the "pulse" that I choose in the Combo box.
I'm not sure I understand the use of the position >= 100% becuase I cannot see that being evaluated and passed to the AND... except when the File has been changed. When the File changes I am guessing the AND is evaluated and the decision is made to "hit the play" command again... re-starting the playback of the file. I don't understand using the Wait.
This is very cool, but doesn't exactly do what I was hoping for. By connecting a fader to the position output I can see the % of playback. If I jump between two files then the position of the two audio clips are not maintained.
My explanation should be better. I'll give a musical example.
Say we have two clips both playing a 12 bar blues in a loop, just different orchestrations. Let's say, to keep it simple, that they are both at the same tempo and therefore the same exact sample count. When I jump between I wish them to be in sync so that they are always in the same place of the 12-bar form. No matter how many times I jump back and forth they are at the same point becuase they are both following the same timeline (clock). In a game audio engine this is possible becuase the engine is keeping track of all clips set to that global timeline. It's not playing all of them of course, it's accessing them at the next sample where the other one let off.
With this patch I notice that say Clip 1 plays to 20%, then I jump to Clip 2, and I jump right back to Clip 1. I'm hoping that Clip 1 has progressed and is now at around 22% (or whatever, you get the idea I am sure), but this is not the case, Clip 1 has been reset to a previous point. It's not 0%... but it's not pass the 20% either.
I think that by resetting to a new CLIP by fader movement that all clips are being reset to 0% position and then are proceeding?
That's what appears to be happening. Do I need to perhaps store the position of each clip's pos% and supply that to the sampler when returning to that Clip? Hmmm - thinking about it that would not help. The time elapsed would have to be added to the CLIP I want to return to. I somehow need to know each clip's length and then subtract the timeline from it so that... oh hell I don't know!
Thanks so much for this patch - it really puts me forward a great deal...
Carl
I think I understand this patch... I see that the selector is basically sending in the "pulse" that I choose in the Combo box.
I'm not sure I understand the use of the position >= 100% becuase I cannot see that being evaluated and passed to the AND... except when the File has been changed. When the File changes I am guessing the AND is evaluated and the decision is made to "hit the play" command again... re-starting the playback of the file. I don't understand using the Wait.
This is very cool, but doesn't exactly do what I was hoping for. By connecting a fader to the position output I can see the % of playback. If I jump between two files then the position of the two audio clips are not maintained.
My explanation should be better. I'll give a musical example.
Say we have two clips both playing a 12 bar blues in a loop, just different orchestrations. Let's say, to keep it simple, that they are both at the same tempo and therefore the same exact sample count. When I jump between I wish them to be in sync so that they are always in the same place of the 12-bar form. No matter how many times I jump back and forth they are at the same point becuase they are both following the same timeline (clock). In a game audio engine this is possible becuase the engine is keeping track of all clips set to that global timeline. It's not playing all of them of course, it's accessing them at the next sample where the other one let off.
With this patch I notice that say Clip 1 plays to 20%, then I jump to Clip 2, and I jump right back to Clip 1. I'm hoping that Clip 1 has progressed and is now at around 22% (or whatever, you get the idea I am sure), but this is not the case, Clip 1 has been reset to a previous point. It's not 0%... but it's not pass the 20% either.
I think that by resetting to a new CLIP by fader movement that all clips are being reset to 0% position and then are proceeding?
That's what appears to be happening. Do I need to perhaps store the position of each clip's pos% and supply that to the sampler when returning to that Clip? Hmmm - thinking about it that would not help. The time elapsed would have to be added to the CLIP I want to return to. I somehow need to know each clip's length and then subtract the timeline from it so that... oh hell I don't know!
Thanks so much for this patch - it really puts me forward a great deal...
Carl
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
oh yup i know what you mean, i didn't really checked with beat loops, i thought it was working like this, that pos was changing because of my sounds had differents lenth i lll try to have a look with beat loops, a bit late now.
the >=100 percent was if a clip is playing, when you swich to next, if next was shorter, displayed pos is greater than 100 percent.
the wait is because when changing file, if analysing directly pos it return pos of the "was playing file", need to wait one cycle so the next file is loaded and then check his position, if >=100percent reset the play.
nb: just tested with 2 loops same tempo, they keep in sync when changing, if loop 1 is 2 bar and 2 is 4 bar, make play first, swich when it's 50 percent show me the second loop at 25 percent, rechanging to 1 is then around 60, in sync, don't understand,
is the sampler set to play mode: button,(i forgot to precise by default it's loop) and usine play button enabled?
the >=100 percent was if a clip is playing, when you swich to next, if next was shorter, displayed pos is greater than 100 percent.
the wait is because when changing file, if analysing directly pos it return pos of the "was playing file", need to wait one cycle so the next file is loaded and then check his position, if >=100percent reset the play.
nb: just tested with 2 loops same tempo, they keep in sync when changing, if loop 1 is 2 bar and 2 is 4 bar, make play first, swich when it's 50 percent show me the second loop at 25 percent, rechanging to 1 is then around 60, in sync, don't understand,
is the sampler set to play mode: button,(i forgot to precise by default it's loop) and usine play button enabled?
Maybe I can ask my question in an easier way than as a patch?
Can Usine, from one Sampler object, keep track of where it is in each audio clip in it's list?
And if it can, then I'll have to figure out how to get to that index and access it so that I can go between clips.
If it can't, no problem, but I'll have to try another patching environment to accomplish my goal.
Either that or learn to code in C++ and put a performance front end on a game audio engine like FMOD!!
cheers
carl
Can Usine, from one Sampler object, keep track of where it is in each audio clip in it's list?
And if it can, then I'll have to figure out how to get to that index and access it so that I can go between clips.
If it can't, no problem, but I'll have to try another patching environment to accomplish my goal.
Either that or learn to code in C++ and put a performance front end on a game audio engine like FMOD!!
cheers
carl
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
just a short note (didnt read the discussion very deeply):
how many different samples should be available at any time?
tkx for the patch picture btw, nay
layer down all ur samples on different tracks in sequencer mode isnt an option? then u could faders to control the mixer and sequencer modules (eg. if fader >= 10, solo track1, if fader >= 20, solo track 2, ...).sunship wrote:No matter how many times I jump back and forth they are at the same point becuase they are both following the same timeline (clock). In a game audio engine this is possible becuase the engine is keeping track of all clips set to that global timeline. It's not playing all of them of course, it's accessing them at the next sample where the other one let off.
how many different samples should be available at any time?
it seems for me that u need to access the wave player (Usines internal sample player), but u cant derive any sample file properties. afaik the wave player does not load the samples in its list into RAM. as cubase doesnt do with its media pool.sunship wrote:What I am hoping to do is have a constantly playing list of audio file that are triggered by the input to the FILE pin.
tkx for the patch picture btw, nay
Hi Amiga, yes I do the technique of using a DAW to do the functionality you mention (sequencer) in order to compose the clips to create the adaptive score (Cubase arranger tracks). That works, however given the flexibility that I need to move to any given clip by examining a global parameter(s) or Cues, the implication of playing all the clips at once would be too resource draining on the computer's HDD.
I have thought about using Abelton with Max for Live but the problem there is similar. Live does not make the index of the audio clips available as a parameter, but I do think it can track them (still checking that out). Game audio engines do that. Similar to a Usine Sampler module, the engine allows you to load a series of clips into an object. If you bind a timeline (clock) to that object of clips the engine then tracks all of the clips. It doesn't play them, it simply knows where it would be along their timeline and then enters them (or leaves them) at that timeline position when doing a transition from another clip. Most all of the game audio engines do this. It's quite handy!
I got the idea that, hey this could be quite cool for doing live performance interactive composition by being able to use a GUI to do in performance what this game engine is doing programmatically by interacting with the game code.
It would be feasible to write a GUI performance app to front the game audio engine instead of a game itself, however environments like Usine offer way more power than the game engine by allowing lots of other audio processing power, not to mention plug-ins, and especially the touch screen aspect coming up that I am quite excited about.
I had a feeling that this probably would not be supported in the usual patching apps like Max, Usine, reaktor etc. Perhaps it could be done and requires low-level coding...
that's out of my league.
carl
I have thought about using Abelton with Max for Live but the problem there is similar. Live does not make the index of the audio clips available as a parameter, but I do think it can track them (still checking that out). Game audio engines do that. Similar to a Usine Sampler module, the engine allows you to load a series of clips into an object. If you bind a timeline (clock) to that object of clips the engine then tracks all of the clips. It doesn't play them, it simply knows where it would be along their timeline and then enters them (or leaves them) at that timeline position when doing a transition from another clip. Most all of the game audio engines do this. It's quite handy!
I got the idea that, hey this could be quite cool for doing live performance interactive composition by being able to use a GUI to do in performance what this game engine is doing programmatically by interacting with the game code.
It would be feasible to write a GUI performance app to front the game audio engine instead of a game itself, however environments like Usine offer way more power than the game engine by allowing lots of other audio processing power, not to mention plug-ins, and especially the touch screen aspect coming up that I am quite excited about.
I had a feeling that this probably would not be supported in the usual patching apps like Max, Usine, reaktor etc. Perhaps it could be done and requires low-level coding...
carl
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
I think your idea (if I have understood it correctly, that is :=)), is doable within Usine, but I think it would be better to run two samplers in parallell and crossfade between them.
For example: When selecting a new file, you would have to pass the current position to the other sampler, start the new sampler, do a crossfade from old to new, reset the new sampler's start position to 0, and possibly stop the old one.
It's probably doable with just one sampler, but that will create gaps in the audio and (I think) harder to patch to get everything done in the right order. That doesn't mean that I think the two sampler idea is very easy to create, though.
When you think of it, a two sampler patch like this is just a mixture of the two other ideas in this thread. I know absolutely nothing about game engines, but I wouldn't be at all surprised if at least some of them used a simliar concept.
For example: When selecting a new file, you would have to pass the current position to the other sampler, start the new sampler, do a crossfade from old to new, reset the new sampler's start position to 0, and possibly stop the old one.
It's probably doable with just one sampler, but that will create gaps in the audio and (I think) harder to patch to get everything done in the right order. That doesn't mean that I think the two sampler idea is very easy to create, though.
When you think of it, a two sampler patch like this is just a mixture of the two other ideas in this thread. I know absolutely nothing about game engines, but I wouldn't be at all surprised if at least some of them used a simliar concept.
Bjørn S
Hi Bjorn, thanks for considering my quest! 
I suppose that if all the clips are the exact same length that this would be "just" a matter of jumping to the other sampler at roughly the same pos%. Of course I would much prefer the ability to hit the clip at an exact point of a timeline (like measure 3, beat 2). I'm really not sure exactly how the game engine does this without out at least putting the other clips into a memory buffer.
Maybe it's a bit like DFD in Kontakt (streaming) where they are just caching the bits they need to make a transition. I actually wish I knew the approach they took.
But it becomes much harder (in Usine) I think if the clips are not exactly the same (say one is 1 measure and the other is 3 measures). Going back and forth I suppose I'd have to constantly know the clip, it's length, and what a "pos%" means in terms of where in the music that is. In a 1 measure clip (at the right BPM) each beat would be 25%, no problem, but in the 3 measure clip I'd have to calculate each beat (100/12 = 8.333333....%). I'd have to experiment but just from the number it looks like I'd not arrive at the exact audio sample that comprises the exact start of the beat...
In the game engine this is easier because the engine tracks the timeline for you and enters the clip correctly on the beat (or bar) that the other one is exiting on, of course assuming you've put the right BPM into it. Meaning that it is looping the 1 bar phrase over and over and it is always "available" to transition to, and the same with the 3 bar segment. The game engine knows Bars and Beats, but it's not like a DAW where it knows it's on Measure 47 etc.
I think my main problem is the "pos%" as the only way to position the cursor in the clip. I haven;t looked yet but are there "slice" samplers in Usine that might make more sense for me? (going to look at the manual)....
carl
I suppose that if all the clips are the exact same length that this would be "just" a matter of jumping to the other sampler at roughly the same pos%. Of course I would much prefer the ability to hit the clip at an exact point of a timeline (like measure 3, beat 2). I'm really not sure exactly how the game engine does this without out at least putting the other clips into a memory buffer.
Maybe it's a bit like DFD in Kontakt (streaming) where they are just caching the bits they need to make a transition. I actually wish I knew the approach they took.
But it becomes much harder (in Usine) I think if the clips are not exactly the same (say one is 1 measure and the other is 3 measures). Going back and forth I suppose I'd have to constantly know the clip, it's length, and what a "pos%" means in terms of where in the music that is. In a 1 measure clip (at the right BPM) each beat would be 25%, no problem, but in the 3 measure clip I'd have to calculate each beat (100/12 = 8.333333....%). I'd have to experiment but just from the number it looks like I'd not arrive at the exact audio sample that comprises the exact start of the beat...
In the game engine this is easier because the engine tracks the timeline for you and enters the clip correctly on the beat (or bar) that the other one is exiting on, of course assuming you've put the right BPM into it. Meaning that it is looping the 1 bar phrase over and over and it is always "available" to transition to, and the same with the 3 bar segment. The game engine knows Bars and Beats, but it's not like a DAW where it knows it's on Measure 47 etc.
I think my main problem is the "pos%" as the only way to position the cursor in the clip. I haven;t looked yet but are there "slice" samplers in Usine that might make more sense for me? (going to look at the manual)....
carl
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
You know it's looks like I need to work with the Sychro modules and try to do as you say (two samplers) and experiment with entering and exiting clips by doing the math between the Sync and the Sampler Position%. But it would be obviously much easier if the sampler "spoke" the same language as the sync and I could pass SMPTE, milliseconds, bars/beats, etc. to it instead of 0-100%.
I bet some of you that are way smarter than me have done this somewhere in a patch...? I'll go look. If anyone knows about that please point me in the right direction (pretty please).
Cheers
Carl
I bet some of you that are way smarter than me have done this somewhere in a patch...? I'll go look. If anyone knows about that please point me in the right direction (pretty please).
Cheers
Carl
======================================================
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
- The Sound of Joy is Enlightment - Space Fire Truth is Enlightment -
- Space Fire sometimes it's Music - Strange Mathematic Rhythmic Equations - lesonyelra
Who is online
Users browsing this forum: No registered users and 20 guests
