Audio waveform/sampler start/end points not recalling in daw
-
Hi all,
I am an issue that I can't seem to solve and I am hoping that somebody can point me in the right direction.
I have a sampler in my project and an audio waveform in the UI. The user can drag the start and end points on the waveform and this will affect the start and end points of the sample.
This all works fine but inside a DAW when you reload a project in which you have changed the start/end points via the drag feature then the new points are not reflected and the full sample range is selected again.My questions are as follows:
-
Is there something I need to add to my script to allow these to save?
-
Is this how it is supposed to work or could it be something else in my script causing a clash? I can't find anything but maybe there is something.
-
I have done this before using the audio loop player instead of the sampler and it recalled fine.
It may be worth noting that I am using expansions. I have never used them before and a few unexpected things had to be solved because I was using them, could this be causing a problem too?
Any help is appreciated as I can't figure this out after countless tests and builds but with no change
-
-
@rzrsharpeprod Further info in this.
I just added an audioloopplayer to the project and it recalled the drag points just fine in DAW.
I also just built a basic project separate from the one above with just a sampler and waveform in it.
That didn't recall the drag points correctly in DAW so that leads me to believe that the sampler itself is the issue and not any clashes of code in my project etc.So now I am hoping that there is some script that I can use or add to my script that will allow the drag points to save and be recalled in DAW?
-
@rzrsharpeprod i've done a hack way around that for some eq stuff. Link the value of the sample sliders to knobs on the ui, set to 'save in preset' and make the knobs invisible. It should save along with anything else you're already saving in preset.
-
@Chazrox thanks for the reply. I tried that the other day but it didn't seem to work.
If I dragged the start/end point in saw when using it in a project, when I reopened the saved project next time they were back at the start and end of the waveform as they were originally. -
@rzrsharpeprod I think you might need to use a sample loading callback. This means that when a sample map is loaded into the sampler (which happens when your plugin first loads) you can then use the callback to do whatever you need.
In this case that means getting the values from the knobs that you have saved the loop information in and triggering their callbacks (or use their values to set the loop information).
I've used a panel for the callback - think it was something I learned from @d-healey ...
LoadPanel.setLoadingCallback(function(isPreloading) { if(isPreloading) { ls = LoopStart.getValue(); le = LoopEnd.getValue(); xf = LoopXFade.getValue(); LoopStart.setValue(ls); LoopStart.changed(); LoopEnd.setValue(le); LoopEnd.changed(); LoopXFade.setValue(xf); LoopXFade.changed(); } });
Otherwise the sample map loads the loop information that has been saved in the sample map, as it seems to load after your slider callbacks etc
-
@DanH said in Audio waveform/sampler start/end points not recalling in daw:
Otherwise the sample map loads the loop information that has been saved in the sample map
This might indicate another solution. After changing the loop points, resave the sample map. I think this is what Christoph does in the sample import example project.
-
@d-healey Didn't know that was possible... Makes sense now that you say it! However it still doesn't overcome the issue of the sample map being loaded after the slider callbacks. Also if the sample map is used in several presets but using different loop points in each preset, does re saving the sample map help?
-
@DanH said in Audio waveform/sampler start/end points not recalling in daw:
Also if the sample map is used in several presets but using different loop points in each preset, does re saving the sample map help?
Nope, wouldn't help in this case.